sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
f37b2da63fc380476fc94b5eac9b72dba958cc79f2bdf18b58f88c6ff045c725 | R | 24,698 | 473 | #' Options used for futures
#'
#' Below are the \R options and environment variables that are used by the
#' \pkg{future} package and packages enhancing it.\cr
#' \cr
#' _WARNING: Note that the names and the default values of these options may
#' change in future versions of the package. Please use with care until
#'... |
312de75ed4571abc2e647584fbef992fbc6b9db0ce58980801891b68a0f31473 | R | 24,762 | 707 | #' Get number of cores currently used
#'
#' Get number of children (and don't count the current process)
#' used by the current \R session. The number of children
#' is the total number of subprocesses launched by this
#' process that are still running and whose values have yet
#' not been collected.
#'
#' @return A n... |
2a9511a1ae76b70b07724cce1a21dd00bcb2333e5b42004219ac2d075a2e44b6 | R | 24,788 | 712 | #' Create a Future Cluster of Stateless Workers for Parallel Processing
#'
#' _WARNING: Please note that this sets up a stateless set of cluster nodes,
#' which means that `clusterEvalQ(cl, { a <- 3.14 })` will not work.
#' The exception is `clusterEvalQ()` calls that only attach packages,
#' e.g. `clusterEvalQ(cl, lib... |
1122345dab19b6c0ea2a637e61dab65aa8e810a7e6b878f6f528ad682a89a5d0 | R | 24,810 | 626 | #get survival data for Breast Cancer TCGA do this in R4 env
library(dplyr)
library(DT)
library(SummarizedExperiment)
library(ggfortify)
library(survival)
library(EDASeq)
library(survminer)
library(gridExtra)
library(TCGAbiolinks) #download this using devtools::install_github()
#set working directory
setwd('~/HumanNetv... |
57242c2efa6c6e823fa856efa6912c6973adffd487dcf478538df5d9c092002b | R | 25,043 | 376 | #' sitednds
#'
#' Function to estimate site-wise dN/dS values and p-values against neutrality. To generate a valid input object for this function, use outmats=T when running dndscv. This function is in testing, please interpret the results with caution. Also note that recurrent artefacts or SNP contamination can violat... |
8eeebe974b0e01de0d1547a2dac7a2c3ecc15ec18aa7722323f67dfe360b0832 | R | 25,087 | 586 | # Note: ARMLA is the abbreviation for Aggregate Repeated Matrix Lookup Analysis.
# User facing -------------------------------------------------------------
#' Aggregrate Peak Analysis
#'
#' Perform multiple matrix lookup in Hi-C matrices for a twodimensional set of
#' locations, for example loops.
#'
#' @param expli... |
4cdd139f24ea02e00ea6ae3577ea5ea134921808fc21881bfb763842bedd3d9e | R | 25,125 | 605 | ---
title: "Models with Mixed Response Types"
output:
rmarkdown::html_vignette:
fig_width: 6
fig_height: 4
bibliography: ../inst/REFERENCES.bib
link-citations: yes
vignette: >
%\VignetteIndexEntry{Models with Mixed Response Types}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
``` ... |
48d75bcd793f7237ee503ec9262c50e6fa2df12b727f12523e97d45efbad63be | R | 25,380 | 438 | ---
title: "Subsample and run analysis"
output: html_notebook
---
Randomly selecting only 5 animals from each cohort and running the analyses again to ensure that my results aren't due to sample size differences between cohorts.
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute c... |
511bb7e7c9736f86074d1c200864f888eec23cb0ae1c8c3fc266f7fcd4e6707d | R | 25,450 | 703 | rm(list=ls())
options(stringsAsFactors = FALSE);
library(WGCNA);
allowWGCNAThreads()
library(flashClust);
library(gplots)
library(RColorBrewer)
setwd(dirname(rstudioapi::callFun("getActiveDocumentContext")$path))
# colon specific/consensus----------
# create input----------
load("../Consensus/inputData.rda")
datE... |
9e1307fb55b9fad65ea78e482f00f8622f31bc546d6d931947a0529cf7bae9cd | R | 26,142 | 553 |
library(data.table)
library(ggplot2)
library(plyr)
library("dplyr")
library(stringr)
library("optparse")
library(RColorBrewer)
library(tidyr)
# Get command line arguments
option_list = list(
make_option(c("-i", "--input"), type="character", default=getwd(),
help="path to input file base directory (wi... |
256e754e63a9bac365260949df873df6acf1f6fc34f3c904b133cb96360b375a | R | 26,540 | 176 | ###########################################################
## ccAF: U5-hNSC analysis to discover cell cycle phases ##
## ______ ______ __ __ ##
## /\ __ \ /\ ___\ /\ \/\ \ ##
## \ \ __ \ \ \___ \ \ \ \_\ \ ##
## \ \_\ \_\ \/\__... |
e9af658ae07a55b897afa78c261b9ecbf6f23d523c1041f936094405aeedb814 | R | 26,846 | 807 | #' @import hdf5r
h5addAttr.str <- function(h5group, attr.name, attr.val) {
dtype = H5T_STRING$new(type = "c", size = Inf)
dtype = dtype$set_cset(cset = "UTF-8")
space = H5S$new(type = "scalar")
h5group$create_attr(attr_name = attr.name, dtype = dtype, space = space)
attr = h5group$attr_open_by_nam... |
222f4236e6f12c98018ca68b1f42bd4dadac4fb2d46732e52a947563071807c6 | R | 26,914 | 640 | ---
title: "RISC: implementing RPCI algorithm for integration of single-cell RNA-seq datasets"
author:
- name: Yang Liu, Tao Wang, Deyou Zheng
affiliation: Albert Einstein College of Medicine, Bronx, NY, United States
date: "2020"
output: rmarkdown::html_vignette
---
```{r setup, include=FALSE}
knitr::opts_chunk$se... |
37cca625f6e025c52af2cdb629da521d00fd55a0936d173a75ae74e3908d1273 | R | 27,044 | 734 | ####################################################################################
#' Find Cluster Markers
####################################################################################
#'
#' This is the basic function in RISC, it can identify the cluster markers by
#' comparing samples in the selected cluster... |
39a6659957b99d48e7bcc0cf058acc25ae7249751ea90df155e50574a0cd8a7d | R | 27,303 | 670 | mast="#########################################\n### BrainGENIE (LR-PCA imputation) ###\n#########################################"
version = "\n\nversion 0.0.1"
contact = "\n\nJonathan L. Hess, PhD
SUNY Upstate Medical University
hessjo@upstate.edu"
mast_head = c(mast, version, contact)
message(mast_head)
# == ... |
2ba00e962673c685d6b8ba5731470ede1708c19b04b54c6ff3947c8a76d50566 | R | 27,406 | 647 | readABF <- function (file) {
BLOCKSIZE <- 512
sectionNames <- c("ProtocolSection", "ADCSection", "DACSection",
"EpochSection", "ADCPerDACSection", "EpochPerDACSection",
"UserListSection", "StatsRegionSection", "MathSection",
"StringsSection", "Dat... |
c85ce44ec1fadf5a9f1cbfb71467c359d5344a9aaef96adb0a0555f189c00c79 | R | 27,415 | 653 | #' @title Fit a generalized additive latent and mixed model
#'
#' @description This function fits a generalized additive latent and mixed model
#' (GALAMMs), as described in
#' \insertCite{sorensenLongitudinalModelingAgeDependent2023;textual}{galamm}.
#' The building blocks of these models are generalized additiv... |
d00eb70e406858663e884abda163c2e2dd3710375cdce83637aecf6754f964da | R | 27,514 | 804 | # Documentation -----------------------------------------------------------
#' @name anchors
#' @title Anchors for Hi-C
#'
#' @description Anchors are indices to the matrix in a \code{contacts} object.
#' Anchor functions translate genomic coordinates, typically BED-formatted
#' \code{data.frame}s, into indices co... |
778daebd13188800cdaf2742f287e73cacf3c88f063535fc58cc3d14d9a3d6e3 | R | 27,734 | 788 | # LOADING: Packages and function definitions
```{r}
library(data.table)
library(ggplot2)
rotate <- function(x) t(apply(x, 2, rev))
custom.gls <- function(x, y, Sigi) {
x <- as.matrix(x, ncol=1)
# Calculated beta on pre-computed inverse matrix
# xtxi = b1
xtxi <- solve(t(x) %*% Sigi %*% x)
# part between... |
9c7b5f3e05535ea558566bdfad8034c663a9b67243dea525e036128e99a44c1b | R | 27,868 | 668 | #' Plot a score heatmap
#'
#' Create a heatmap of the \code{\link{SingleR}} assignment scores across all cell-label combinations.
#'
#' @param results A \link[S4Vectors]{DataFrame} containing the output from \code{\link{SingleR}}, \code{\link{classifySingleR}}, or \code{\link{combineRecomputedResults}}.
#' @param cells... |
6da9da3d2accb6fffa21432dfd57bfee92dbd2f7ce166ae90553d7b0b18ed0dc | R | 28,122 | 364 | # Utility functions to parse and merge phenotype and covariate data
get_options <- function(){
# Get command line arguments
option_list = list(
make_option(c('-r', '--QcBaseDir'), type='character', default=getwd(),
help='Path to RNAseq multiQC data (base directory that contains all subdirs)'... |
57cde8a3ee28caca867b350e11d2fa14768cdc2b318ca26d972187fbd85fb21d | R | 28,409 | 832 | ---
title: "Semiparametric Latent Variable Modeling"
output:
rmarkdown::html_vignette:
fig_width: 6
fig_height: 4
bibliography: ../inst/REFERENCES.bib
link-citations: yes
vignette: >
%\VignetteIndexEntry{Semiparametric Latent Variable Modeling}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8... |
4ea3e83cc0150a26a77c7e9bbede6a8d6136f7075e48d06bb4d11569447527b8 | R | 28,518 | 530 | ####### Main workflow in the paper
# If you only want to run part of the workflow, you can load the required data from the previous steps as indicated in each section below (load(...))
#######################################
### Load required packages ###
#######################################
library(... |
dfa636d6b33b1b56565faaf425aae88cb1c3a71a70c704884bc5e971f47eeb96 | R | 28,829 | 821 | setwd("/Users/hastingj/Work/Python/semantic-prediction/regression")
# Required libraries
if (!require('xlsx',quietly = T)) install.packages('xlsx'); library('xlsx')
if (!require('tidyverse',quietly = T)) install.packages('tidyverse'); library(tidyverse)
if (!require('lme4',quietly=T)) install.packages('lme4') ; libra... |
72d64ec2c6fe7402da574453640602fbad4e4bca7a7eedb353a739270120a16f | R | 29,045 | 562 | #INPUT FOR THESE SCRIPTS WERE NOT UPLODADED DUE TO THEIR SIZE.
# STEPS -------------------------------------------------------------------
# Convert fastq.gz to fq
# Cut Adapter sequences
# Map reads to the closest species genome with ngm
# Convert ngm unsorted sam output files to mapping coordinates sorted bam f... |
140cbd190b67618e54d29fb414fc23375be0269b5b0216361edf5e70823d1b33 | R | 29,059 | 597 | #!/usr/bin/env Rscript
#######################################################################################################
######################################## Author: Yize Li ##############################################
############ Date: 12/01/2017 (Initiation); 07/26/18 (Revision); 10/05/18 (Revision) ####... |
0ae9ae23e773040cf0dfa2dfe9767b3c370a612d1c74b0a51b73612e1238788f | R | 29,201 | 660 | ---
output: html_document
editor_options:
chunk_output_type: console
---
This R markdown code was used to compile and analyze FlyTracker x,y data in Wilson et al, 2022.
Author: Emily Petruccelli, Ph.D. (Southern Illinois University Edwardsville) <-- not an R master
```{r}
#Load required libraries
library(readxl)
li... |
68aba195ac1c0b316c5a78625d5622a5833bfeaa5753871366512c5e7155570b | R | 29,344 | 591 | #loading packages
library(Matrix)
library(Seurat)
###read hash tag data
RH1<-readMM("RH1/outs/filtered_feature_bc_matrix/matrix.mtx.gz")
RH1f = read.delim("RH1/outs/filtered_feature_bc_matrix/features.tsv.gz",
header = FALSE,
stringsAsFactors = FALSE)
RH1b = read.d... |
b6f593cdcbf48e53c49158d137495ed15a18018a5c29bff0178a560b83fddad3 | R | 29,362 | 657 |
# make a layer grid using LC4 dendrite (ED Fig.5a) -----------------------------
# Fit a surface to LC4 dendrites,
# and generate grid on the surface for later analysis
# - get all nodes downstream of a dendrite tag
LC4_dend <- list()
dend_v <- matrix(ncol = 3)
for (j in 1:length(LC4)) {
tar <- LC4[[j]]
targ <-... |
092fc0d81e0b16830470c65517ba8c2f05773c8f8d6db7e20203496e5fe5896d | R | 29,574 | 974 | ---
title: "plot_10X_Clk856_TH"
author: "Dylan Ma"
date: "10/27/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# laod libraries, setup enviroment
```{r}
library( tidyverse )
library( gtools )
library( magrittr )
library( ggrepel )
library( cowplot )
library( patchw... |
ece90bb1ec9814374e550fe368d20964bb804f4866a5c07d192f4686b1600004 | R | 30,217 | 772 | #srun --cpus-per-task=1 --mem=50gb --nodes=1 --qos=priority --time=168:00:00 --pty bash -i
#remoter::server(verbose = T, port = 55001, password = "laberkak", sync = T)
#remoter::client("localhost", port = 55001, password = "laberkak")
library(uwot)
setwd("D:\\UMCG\\Genetica\\Projects\\Depict2Pgs\\Recount3\\")
set... |
1cefa5547e2c355c0dcd76897d7ecf35413ff15f5ec8c7b6dd483b5cdd10ca6c | R | 30,262 | 729 | #' Simulate one of the 4-node circuits from the 60212 unique circuits
#' @param index Numeric index number of 4-node circuit to be simulate. Takes values from 1:60212
#' @param Gaussian Logical. If T, kinetic parameters will be sampled from a gaussian distribution. If F, kinetic parameters will be sampled from a unifo... |
fa29b385b1f194dbb62b8a43d24dca59392f866080def53e0277a4d2d6a62abb | R | 30,455 | 719 | ---
title: "EEC_tmt_final.Rmd"
author: "Judith Kaye"
date: "12/21/2021"
output: html_document
---
```{r}
setwd("/n/scratch3/users/j/jk386/marito")
.libPaths("~/R-4.1.1/library")
.libPaths()
#install.packages("", lib = "~/R-4.1.1/library")
#BiocManager::install("glmGamPoi")
#local({options(repos = BiocManager::reposito... |
801f50d543e213d4802db9d0b18a21ecea46d576cc6ec08bd665b80ffde8c12b | R | 30,494 | 689 | library(ggplot2)
library(glmnet)
library(caret)
library(plyr)
library(stringr)
library(tidyr)
library(grid)
library(scales)
library(tools)
# root_dir = "/mnt/data/CLC/"
root_dir=paste(file_path_as_absolute("../../"),"/", sep="")
# behaviour_colours <- c("Walking"="#e7298a", "Resting"="gray", "Antennal grooming"="#7... |
fcc6c2ef8845b3b3e9d9969df680909980f2ebdb7f46f690de820abf65480bbe | R | 30,820 | 885 | ####################################################################################
#' Integrating Multiple Datasets
####################################################################################
#'
#' The "scMultiIntegrate" function can be used for data integration of multiple
#' datasets, it is basically bas... |
2603ddfae4e31e75b2fae06ec7dd687f5ec84b3a3c6ee538d9a1dbcba2ce54cc | R | 30,966 | 897 | #' @exportS3Method all.equal future
all.equal.future <- function(target, current, ..., debug = FALSE) {
if (debug) {
mdebug_push("all.equal() for future ...")
on.exit(mdebug_pop())
mstr(list(target = target, current = current))
}
## Comparing a future strategy against a non-function, e.g. when 'all... |
3caf858067a4bf3f3fb2dae0a819f2f0eacc5bad2e2094bae81ce4726920b1b4 | R | 31,248 | 800 | #' Demultiplex paired-end FASTQ file by marker only
#'
#' Demultiplex the paired-end FASTQ reads (demultiplexed by sample) and assigns the sequence to each marker.
#'
#' @param sample_read_manifest (Required). The sample reads file. The file should include sample_id, reads_1 (Forward fastq filepaths and fastq filenames... |
6ff40015a7ff8f2554333b1ba774e24c7a376a05bdd5a29755ac8503237f54b3 | R | 31,411 | 798 | s_ldsc <- function(traits,sample.prev=NULL,population.prev=NULL,ld,wld,frq,trait.names=NULL,n.blocks=200){
log2<-paste(traits,collapse="_")
logtraits<-gsub(".*/","",traits)
log2<-paste(logtraits,collapse="_")
if(object.size(log2) > 200){
log2<-substr(log2,1,100)
}
log.file <- file(paste0(log2, "_P... |
6a80ff49d6b1fcfdafe6ed3b768d7538a9c6dcf99d05ca23c2ec4f54a0defa10 | R | 31,573 | 930 | getEmptyCols <- function(mat, Nmad = 2, slop = 0.9, lowDiag = 2, highDiag = 10, zeroNA = T) {
if (zeroNA) {
mat$z[mat$z == 0] <- NA
}
delta <- row(mat$z) - col(mat$z)
mat$z[abs(delta) <= lowDiag | abs(delta) >= highDiag] <- NA
tres <- median(mat$z[!is.na(mat$z)]) - (Nmad * mad(mat$z[!is.na(mat$z)]))... |
eb12ed23b2a103b8caf9fa19841bbab60bca23fdfa4bd1340bf4d4eb283a5342 | R | 31,675 | 745 | #' A combined motif enrichment analysis for single two-node circuit motifs and motif coupling
#' @param all.circuits List of the topologies of all 60212 non-redundant 4-node circuits. Default "all.circuits" from the package data.
#' @param all.scores Data frame. 1st column: scores; 2nd column: circuit index. The data f... |
baa26071d6c90e468cbfadee8b74eab7d25ced0a88cae740dd36e2ea3ec6cbfc | R | 32,492 | 1,008 | # As a rule of thumb, for any discovery the following is ideally true:
# identical(discovery, do.call(bundle, unbundle(discovery)))
# Class Documentation -----------------------------------------------------------
#' @title Discovery class
#' @name discovery
#'
#' @description The discovery classes contains the resul... |
50018fb8666efd4dec2356571402397e155e0b9491f91ec724e8037a47d1f9c6 | R | 32,538 | 991 | #' @export
#' @importFrom dplyr mutate filter left_join select summarise group_by rename ungroup
#' @importFrom magrittr "%>%"
#' @importFrom plyr join_all
#' @importFrom DT datatable
read_counts_tab <- function(demultiplexed, flt_reads, sub_reads, seq_ann_tbl, seq_flt_tbl) {
dem <- demultiplexed %>%
filter(!(is.... |
4205dd673ff47c3a7b26b690d9e12e4066900fe402b6eded1200df79d1fb7838 | R | 32,553 | 917 |
#' The value of a future or the values of all elements in a container
#'
#' Gets the value of a future or the values of all elements (including futures)
#' in a container such as a list, an environment, or a list environment.
#' If one or more futures are unresolved, then this function blocks until all
#' queried futu... |
995cfd6e52c2cc9d8448ad1c1dd89cd16d070a437996f0723e01f6cbcfb4db7a | R | 32,718 | 1,017 | computeF1score <- function(pred, ground_truth){
TP <- length(intersect(pred,ground_truth))
FP <- sum(!(pred %in% ground_truth))
FN <- sum(!(ground_truth %in% pred))
F1_Score <- TP/(TP + (1/2)*(FP+ FN))
return(F1_Score)
}
calinsky <- function (hhc, dist = NULL, gMax = round(1 + 3.3 * log(length(hhc$o... |
c95461f0d0f88991ab113911186ea4b648990d38201af227d82115408d941e7f | R | 33,195 | 876 | ---
title: "RNA ~ protein in YG, HA and PD"
author: "Fiona Dick"
date: "`r Sys.Date()`"
output: html_document
toc: true
runtime: shiny
---
<!--
To convert Markdown document to HTML,
R -e "rmarkdown::render('methods.Rmd')"
-->
```{r dependencies}
library(ensembldb)
library(cowplot)
library(boot)
library(mixOmics)
#... |
23d9e3d832777e0a99389647a88c31c611897a6b4123234c56aef2ee0b627e52 | R | 33,310 | 1,050 | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Computes SVD decomposition
#'
#' This is direct implementation of the randomized SVD algorithm for sparse
NULL
#' Computes SVD decomposition
#'
#' This is direct implementation of the rando... |
93e4dbbbaa9fcfcc6a85fc33114753166b4b2f4c49ea008afefdce4e20cb15e3 | R | 33,529 | 594 | # Parse samplesheets of the different Brain datasets
library(data.table)
source('utility.R')
library(naniar)
library(stringr)
parse_samplesheet_files <- function(opt){
AMP_AD <- parse_amp_ad(opt)
Braineac <- parse_Braineac(opt)
Brainseq <- parse_Brainseq(opt)
CMC <- parse_CMC(opt)
GTEx <- parse_GTEx(opt)
N... |
a8aac667bba2447bd80d3f40c87a325f86e092d1695f481380e051f56d19bd81 | R | 33,639 | 534 | ---
title: "01_Merge.Phenotypes"
output: html_document
---
## Install packages #
```{r}
options(stringsAsFactors = FALSE)
library(tidyverse)
```
## Load raw data from ABCD text files #
```{r}
## Set working directory #
setwd("../ABCD/Release3.0/raw_data")
## Sex, age, site
Longit_Tracking <- read.delim("abcd_lt01.t... |
ecde9da54a5595f30e4a68975e34dbeead5a9761fbf13dfcbe2439cee48a0bf0 | R | 33,687 | 1,032 | computeF1score <- function(pred, ground_truth){
TP <- length(intersect(pred,ground_truth))
FP <- sum(!(pred %in% ground_truth))
FN <- sum(!(ground_truth %in% pred))
F1_Score <- TP/(TP + (1/2)*(FP+ FN))
return(F1_Score)
}
calinsky <- function (hhc, dist = NULL, gMax = round(1 + 3.3 * log(length(hhc$o... |
8c03ad0802c83abe5bb7d731dcbe78b5a9e17e65f4b90bf92b14af75f390a389 | R | 35,356 | 658 | ---
title: "Positive selection in multispecies projects"
author: "Emeline Favreau"
date: "08/03/2021"
output: html_document
---
Copyright 2021 Emeline Favreau, University College London.
---
##### Objective of analysis
*Branch model*
We obtained the dN/dS value for 1,971 orthogroups shared between 9 sp... |
8b3c618451226a2a22e25a08d861e48009ecafec30c8b02774f30c20016550c3 | R | 35,913 | 785 |
usermodel <-function(covstruc,estimation="DWLS", model = "", CFIcalc=TRUE, std.lv=FALSE, imp_cov=FALSE,fix_resid=TRUE,toler=FALSE){
time<-proc.time()
##determine if the model is likely being listed in quotes and print warning if so
test<-c(str_detect(model, "~"),str_detect(model, "="),str_detect(model, "\\+"))
... |
621a8426155dbc0928a676b3c5471cd6fb75ee019ed962c8fdf11bbdcebc2f4a | R | 36,487 | 776 | library(tidyverse)
library(ggplot2)
library(imager)
library(reshape2)
library(patchwork)
library(magick)
library(raster)
library(figpatch)
library(readr)
library(rlang)
##This function takes as input a tibbles generated from the puncta_per_hair_cell() function
##(SynapseJ data compilation script)
##Th... |
eea1eef17e97bf7c12a8a55c6ce546707d009ef82b8d3421eae0e53d86b83a51 | R | 37,251 | 820 |
start_time = Sys.time()
cat(file=stderr(), 'Loading dependencies...'); flush.console()
options(stringsAsFactors=F)
suppressMessages(library(tidyverse))
suppressMessages(library(janitor))
suppressMessages(library(survival))
suppressMessages(library(MASS)); select=dplyr::select; summarize=dplyr::summarize
suppressMessa... |
b39bbde4d18c309e08a3e60dd7d96bed990c29adc39c01c92beea9ec0b658789 | R | 37,282 | 1,182 | # Documentation -----------------------------------------------------------
#' @name plot_discovery
#' @title Plot discoveries
#'
#' @description The base R plotting equivalent to
#' \code{\link[GENOVA]{visualise}} for discovery objects.
#'
#' @param x A \code{\link[GENOVA]{discovery}} object.
#' @param contrast An ... |
7aece87dcdd2905c2bdbf3fc8ef45d5589d2fe340517417ec86060a519569186 | R | 37,470 | 1,009 |
#All Tables Categorical data######
required <- c("readxl","openxlsx","dplyr","tidyr","purrr","stringr","tibble")
to_install <- setdiff(required, rownames(installed.packages()))
if(length(to_install)) install.packages(to_install)
library(readxl)
library(openxlsx)
library(dplyr)
library(tidyr)
library(purrr)
librar... |
27192a32d9fd6059a75abc8ede7aff93659721d14c0ae225a84eba2774d25581 | R | 37,721 | 661 |
work='/mnt/raid/name/project/renyanming/RYM_DMG_project'
spaceranger='/home/name/name/software/biosoft/spaceranger-1.1.0/spaceranger'
ref="/mnt/raid/Public/genome/cellranger/refdata-gex-GRCh38-2020-A"
# spaceranger pipline
cd ${work}
$spaceranger count --id=DMG_1_all \
--transcriptome... |
4757b83ab61cd2d4bd74715a7f13072360fec1f13616d92717817f1f369e6f8b | R | 38,094 | 1,061 | #' A future represents a value that will be available at some point in the future
#'
#' A _future_ is an abstraction for a _value_ that may be
#' available at some point in the future. A future can either be
#' `unresolved` or `resolved`, a state which can be checked
#' with [resolved()]. As long as it is _unresolved... |
c54b54167c9fa130ef60980e9691cc7a84a2509afafe8e9774e2f6f426b87848 | R | 39,084 | 850 | ---
title: "06_GREx.Brain"
output:
html_document:
df_print: paged
---
## Install packages #
```{r}
rm(list = ls())
options(stringsAsFactors = FALSE)
library(tidyverse)
library(lme4)
library(ggseg)
library(ggseg3d)
library(sjPlot)
library(plotrix)
library(ggridges)
library(ggpubr)
library(rstatix)
theme_set(them... |
22f4cff26d87116233577078b0457aaea0ec80a7d95f7be26c2eb7486183aec8 | R | 39,363 | 1,244 | ---
title: "Pathway enrichment analysis"
author: Fiona Dick
output:
html_document:
fig_width: 10
fig_height: 5
toc: true
toc_depth: 6
toc_float: true
self_contained: true
---
```{r echo = F}
#set JAVA_HOME correctly for ermineR (ermineJ wrapper) to work
Sys.setenv(JAVA_HOME = "/usr/lib/jvm/... |
850ddfb1cb43f8c94f81f06a3e84c4523d1e4f0d4c5e14bf2dc94839c7582507 | R | 40,058 | 1,164 | FutureEvalError <- function(...) {
ex <- FutureError(...)
class(ex) <- c("FutureEvalError", class(ex))
ex
}
attachPackages <- function(packages) {
debug <- isTRUE(getOption("future.debug"))
if (debug) {
mdebug_push("attachPackages() ...")
mdebugf("packages: [n=%d] %s", length(packages), commaq(packa... |
b951166d00cf26470281d2b5d7bff9e20b34f5d938a769e02df9b42b76828ef1 | R | 40,304 | 930 | ####################################################################################
#' UMAP Plots
####################################################################################
#'
#' The UMAP plots are widespread in scRNA-seq data analysis. Here, the "UMAPlot"
#' function not only can make plots for factor lab... |
a97f95a3a3e9f0d581f62758539e3a7bef3f98ae1dfddaf09a2b0176521bc019 | R | 40,331 | 750 | ---
title: "DESeq with RRHO and GO analysis"
output: html_notebook
---
This notebook contains the primary DESeq2 and RRHO bulk RNAseq analyses. For both sections, GO analysis is performed on both DEGs/quadrant genes and intersections of those gene lists generated by the Fisher's Exact Test. Additionally, gene lis... |
1e87126fdebb9bed335c0bad5190082fb95c98fb42cf1fd026261e823b4cabec | R | 40,484 | 707 | ---
title: "Behavior analysis for Figure 1"
output: html_notebook
---
R notebook to analyze behavior data for Prolonged partner separation erodes nucleus accumbens transcriptional signatures of pair bonding in male prairie voles. eLife 12:e80517.
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. ... |
afb14aa5304d757b536b08ba4695da6fb50c074a69cb8664ec1274c41c0253a0 | R | 40,788 | 918 | GetAnnoFiles <- function(platform){
platform <- as.character(platform)
if(length(list.files(pattern=platform)) == 0){
download.file(paste0("https://gemma.msl.ubc.ca/annots/", platform, "_noParents.an.txt.gz"), destfile=paste0(platform, ".gz"))
}
if(length(list.files(pattern=platform)) > 1){
... |
a62c553e0982109cc9ba420f49676e0b2b7bd7d20795334125548f7b03da0c21 | R | 41,241 | 537 | #######################################
### Cell-type enrichment ###
#######################################
### Code for cell-type enrichment was written by Suzanne Miedema
### Note that EWCE requires installation of additional R packages
# Create output directories
dir.create('figures/EWCE')
dir.create('ou... |
34eb7df56fb0425dfb1b2d4eb2e73cb8e3c629376791d04c1bf17258f6a631c8 | R | 41,535 | 1,022 | #APOE e3 vs. e4 graphs################
setwd(#set location)
library(readxl)
library(dplyr)
library(ggplot2)
library(dplyr)
library(tidyr)
library(dplyr)
library(dunn.test) # for dunn.test()
# install.packages("FSA") if you want the fallback
library(FSA)
datadir <- #Set location
LGDIR <- paste0(... |
ebbd3c7d7bd904f844ff75beeae138a018fa44ffe7e6c645087783b5db856e6b | R | 41,556 | 862 | #!/usr/bin/env Rscript
# Load packages
reticulate::use_python('/usr/bin/python3.7')
library(Seurat)
library(getopt)
library(future)
library(cowplot)
library(clustree)
library(gridExtra)
library(grid)
library(pheatmap)
library(RColorBrewer)
library(Antler)
library(ggbeeswarm)
library(tidyverse)
# set arguments for Rs... |
53af2ab8eae9f46379f228f82a5d177d7ec526d5bb7d17297f9329baaecc097f | R | 42,305 | 1,332 | ---
title: "Permutation testing for SC Contribution - HCPEP"
author: "Fran Hancock"
affiliation: Department of Neuroimaging, Institute of Psychiatry, Psychology and Neuroscience, King's College London, London, UK
date: "`r format(Sys.time(), '%B %d, %Y')`"
fontsize: 14pt
output: html_document
---
```{r setup, include... |
e08bb3460317ea184b5377edba6d2a88723da2256869e57235473c0d3cef5cc7 | R | 43,033 | 989 | #######################################################
### Deep Brain Stimulation: When to go directional.
### Data Derivations
### 2022 Katrin Petermann
#######################################################
derivedata <- function(dd){
# calculating derivations for best contact, therapeutic window and efficacy
... |
9549fbeebd1fe58cc5566cda033c4f7abbaf75b2c51b3958512ccbe01d700ca6 | R | 43,297 | 1,200 |
library(RRHO2)
library(limma)
setwd(dirname(rstudioapi::callFun("getActiveDocumentContext")$path))
outDir="rrhoFigs"
dir.create(outDir,showWarnings = F)
datlist<-readRDS("data/FinalProcessedData.rds")
datexpr.list<-list(Colon=datlist$dcAll$dat.expr,
Striatum=datlist$strAll$dat.expr)
f.list<-li... |
b14bc5c28649258a396b55208eac2f79bee34fc0d76f06b7af9a5aede2cc86c8 | R | 44,199 | 1,376 | # User function -----------------------------------------------------------
#' @rdname pyramid
#' @title Plot a region as a pyramid
#'
#' @description Plots a region of the Hi-C map with a 45 degree rotation. The
#' rotation makes it such that the diagonal coincides with the x-axis and the
#' y-axis indicates dist... |
316a4ad75a3253f857c845628f59196630a55f5a22ab0e6d60ea68bedd75b99d | R | 44,590 | 874 | ## ---------------------------
##
## This script was created with R version 4.2.1 (2022-06-23)
##
##
## Title: Patient-specific identification of genome-wide DNA-methylation differences between intracranial and extracranial melanoma metastases
##
## Purpose of script: Script to rebuild analysis of manuscript
##
## Auth... |
6918d9db91f882131d7b97153f06ebd212ed9474abdbb0c3e7e8ad20d003a5ec | R | 45,197 | 806 | ---
title: "GENOVA: explore the Hi-Cs"
author:
- name: Robin H. van der Weide
affiliation:
- Division of Gene Regulation, the Netherlands Cancer Institute
- name: Teun van den Brand
affiliation:
- Division of Gene Regulation, the Netherlands Cancer Institute
- name: Elzo de Wit
affiliation: Division of Gene R... |
2f1cc0ee369ceaf3b0f457f23fc9e86ec4237765930927ac877726ef50883e78 | R | 45,226 | 966 | ---
title: "06_GREx.Brain"
output:
html_document:
df_print: paged
---
## Install packages #
```{r}
rm(list = ls())
options(stringsAsFactors = FALSE)
library(tidyverse)
library(lme4)
library(ggseg)
library(ggseg3d)
library(sjPlot)
library(plotrix)
library(ggridges)
library(ggpubr)
library(rstatix)
theme_set(them... |
afa7f70afdd4d8f3429d33d0d466a999e02f1ae704c3c2e059ff5317b8662b7e | R | 46,257 | 1,849 |
#START_OF_LICENSE_TEXT
######################
#License #
######################
# Copyright (c) 2020-2021 National Technical University of Athens
# Contact C. Gousiadou, email:cgousiadou@gmail.com
####################################
#https://opensource.org/licenses/BSD-3-Clause
#Redistribution a... |
c879607567b6e9f1896b4f8abc3c76cc654b5266302f24e83310fc8041baf48a | R | 47,741 | 1,255 | #---------------------------------------------------------------------------------
## Create the one dimensional plot with kde and scatter
##
sc.plot1d <- function(sco, outputFile=NULL,
cnToPlot=c(1,2,3,4), showCopyNumberScatterPlots=TRUE, highlightSexChrs=TRUE,
positionsToHighligh... |
b5682764854a6159cd57e7bcdfc4cc65a977b27b2b4cdbbbf5cff6ddf891b384 | R | 49,899 | 842 | #' dNdScv
#'
#' Analyses of selection using the dNdScv and dNdSloc models. Default parameters typically increase the performance of the method on cancer genomic studies. Default arguments use the GRCh37/hg19 version of the human genome. To run dNdScv on other assemblies or species see the buildref function and the dnds... |
004c1248fe4e21618b5911935d4fd05dcfb48b54a3bff43bbe4c1a1ad2106b7f | R | 49,938 | 1,375 | # heatmap3 function modified from from "https://raw.githubusercontent.com/obigriffith/biostar-tutorials/master/Heatmaps/heatmap.3.R"
heatmap.3 <- function(x,
Rowv = TRUE, Colv = if (symm) "Rowv" else TRUE,
hcr,
dendrogram = c("both","row", "column", "non... |
8636d9666ef4ad56f8181795d1ae03e79d85714a8902cf3a900acc21e703142e | R | 50,440 | 1,395 | ---
title: "Isofrom SFs SJs analysis"
author: "junwei"
date: ""
output: html_document
---
#Top
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE)
knitr::opts_knit$set(root.dir = "/mnt/raid61/Personal_data/songjunwei/Tumor_visium/15.3NC_iso_sudobulk_pct/")
source("/mnt/raid61/Personal_data... |
d9d48cf141e650fa4f112b9cb3aef9b38930fc2caeb902db3144f32a489f0825 | R | 53,342 | 1,443 | # heatmap3 function modified from from "https://raw.githubusercontent.com/obigriffith/biostar-tutorials/master/Heatmaps/heatmap.3.R"
heatmap.3 <- function(x,
Rowv = TRUE, Colv = if (symm) "Rowv" else TRUE,
hcr,
dendrogram = c("both","row", "column", "non... |
97b7dad7cb3fd8cda6782cbf449e9fd08c64c68c004eeebd5cf96f5758c4d752 | R | 55,753 | 744 | ---
title: "04_PheWAS.Behavior.1YearFollowUp"
output:
html_document:
df_print: paged
---
## Install packages #
```{r}
rm(list = ls())
options(stringsAsFactors = FALSE)
library(tidyverse)
library(lme4)
library(lmerTest)
library(FRGEpistasis)
library(viridis)
library(PheWAS)
library(ggrepel)
library(effects)
libr... |
edb8f14a1c992c2485b8c0f22edf843fbe948cbe1d722d4ee3e5ea88f40647ed | R | 56,111 | 744 | ---
title: "05_PheWAS.Behavior.2YearFollowUp"
output:
html_document:
df_print: paged
---
## Install packages #
```{r}
rm(list = ls())
options(stringsAsFactors = FALSE)
library(tidyverse)
library(lme4)
library(lmerTest)
library(FRGEpistasis)
library(viridis)
library(PheWAS)
library(ggrepel)
library(effects)
libr... |
cc1e57a16ae03a9ffe2d31e40c841ade61c80ad972a5120ab7db95763cbd6223 | R | 56,722 | 1,932 |
#' Plot ACTIONet scatter plot
#'
#' @param data 'ACTIONetExperiment' object or two-column numeric matrix of X-Y coordinates.
#' @param label_attr Character vector of length NROW(ace) or colname of 'colData(ace)' containing cell labels of interest (clusters, celltypes, etc.).
#' @param color_attr Character vector of le... |
f503cc1dd8841104931ebe4d68ac3beb124e69c9109c1caecce459992b9f0698 | R | 57,266 | 1,152 | ##########################################################
## ccAF: makeDatasetsForClassification.R ##
## ______ ______ __ __ ##
## /\ __ \ /\ ___\ /\ \/\ \ ##
## \ \ __ \ \ \___ \ \ \ \_\ \ ##
## \ \_\ \_\ \/\_____\ ... |
91c74db3a13f76dd8acf27555394a6c664785a28854b452ba937babc7ab1ae12 | R | 59,099 | 1,808 | # Documentation -----------------------------------------------------------
#' @name visualise
#' @aliases visualise visualize
#' @title Visualise discoveries
#'
#' @description Plot the results of \code{discovery} objects. By default
#' contrasts one sample with the others.
#'
#' @param discovery A \code{discovery}... |
c7c4d83dc91b916828ce65941cc9f0ac20cc000601ef5ba24e198dba0c675deb | R | 61,715 | 1,806 | #' A ClusterFutureBackend resolves futures in parallel using any PSOCK cluster
#'
#' @inheritParams FutureBackend-class
#'
#' @param workers ...
#'
#' @param persistent (deprecated) ...
#'
#' @details
#' The `ClusterFutureBackend` is selected by
#' `plan(cluster, workers = workers)`.
#'
#' @keywords internal
#' @rdname... |
1808d4c5931395019a29a822577dec1085817e65ae5aad77bc9e37f4959e00a4 | R | 71,210 | 1,616 | ---
title: "Positive selection in multispecies projects"
author: "Emeline Favreau"
date: "08/03/2021"
output: html_document
---
Copyright 2021 Emeline Favreau, University College London.
---
##### Objective of analysis
*Branch model*
We obtained the dN/dS value for 1,971 orthogroups shared between 9 species under th... |
b21aed64caaa4062418309fc8ba534fe07b8348a154041b67d5bbe688d4b38e3 | R | 71,271 | 1,594 | ---
title: "Metabolomics"
author: "Christina Schmidt"
date: "05 January 2022"
output:
html_document:
toc: yes
toc_depth: 3
toc_float: yes
pdf_document:
toc: yes
toc_depth: '3'
editor_options:
chunk_output_type: console
---
```{r intro-chunk, message=FALSE, warning=FALSE,}
#load the general l... |
8824afef01e40ae4c62fcb2c9fb6476a5ed05ff602a216d563bfc2ba90e79c99 | R | 83,155 | 2,058 | ##--------------------------------------------------------------------
## hand off the data to the appropriate clustering algorithm
##
## Each clustering algorithm function should take as input
## an NxM matrix of vafs (with M = # of samples and N = # of points to cluster),
## an NxM matrix of variant read counts,
## a... |
8cad328d6f8ffb0258140174c3a42b2e79174151d19fa87982dc748e29f2ad7e | R | 86,073 | 1,551 | ## -
## Purpose of script: TF prediction in ATAC-seq and its integration with transcriptomic datasets (cell line RNAseq, TCGA) and histone markers (Stepniak et al., Nat. Comms.2021)
##
## Author: Adria-Jaume Roura
##
## Date Created: 2020-22-10
##
## libraries used
library(preprocessCore)
library(biomaRt)
library(edg... |
7d290ab1a86adcedce98b08e72e0c85a5e2f3650e641ad0b1732a993c38d5515 | R | 87,503 | 2,687 | ---
title: "Plots for Leverage Scrubbing Paper"
author: "Damon Pham"
date: "01/01/2021"
output: html_document
---
# Setup
```{r}
source("0_SharedCode.R")
stopifnot(SharedCode_version == c(11,0))
rm(iters); rm(omit_subjects)
subjects_S1200 <- readRDS(
file.path(dir_data_misc, "HCP_S1200_LargeBalancedSample.rds")
)
... |
881116fc134441a86c315abf71366a7c06ece76e4cbbfc24a68096b8cf3b7e14 | R | 92,981 | 1,268 | ---
title: "03_PheWAS.Behavior.Baseline"
output:
html_document:
df_print: paged
---
## Install packages #
```{r}
rm(list = ls())
options(stringsAsFactors = FALSE)
library(tidyverse)
library(lme4)
library(lmerTest)
library(FRGEpistasis)
library(viridis)
library(plotrix)
library(PheWAS)
library(ggrepel)
library(e... |
5845948188c07523bf9055f17e674133d1099adc844fc53d19bd3416d2572cac | R | 103,923 | 1,881 | #srun --cpus-per-task=1 --mem=50gb --nodes=1 --qos=priority --time=168:00:00 --pty bash -i
#remoter::server(verbose = T, port = 55556, password = "laberkak", sync = T)
remoter::client("localhost", port = 55501, password = "laberkak")
#save.image("tmp2.RData")
setwd("/groups/umcg-fg/tmp01/projects/genenetwork/rec... |
da2be147d6985845cdc6eb237bd434793d455cca11377abd9fe8240ac3a55e97 | R | 103,943 | 1,881 | #srun --cpus-per-task=1 --mem=50gb --nodes=1 --qos=priority --time=168:00:00 --pty bash -i
#remoter::server(verbose = T, port = 55556, password = "laberkak", sync = T)
remoter::client("localhost", port = 55501, password = "laberkak")
#save.image("tmp2.RData")
setwd("/groups/umcg-fg/tmp01/projects/genenetwork/r... |
08934177bdc361f040d2f2e60f6b043dd738533471950836c3f92d231a22e89c | R | 110,919 | 2,798 | ---
title: "fc_continuous_analyses_201009"
author: "Pete Millar"
date: "10/9/2020"
output: html_document
---
#CLEAR & SET UP ENVIRONMENT
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, include = FALSE, echo = FALSE, message = FALSE, warning = FALSE}
#knitr::opts_chunk$set(echo = F... |
2c9a25e66cc16a69162143793123ae16d5fd9e8de86a649bf6e9b32f689e6f3b | R | 124,938 | 3,727 | # Load data (old)
```{r eval=FALSE}
a <- c(
"Baselines.rds",
"CC2MP6.rds"
)
a <- list(
meanFC = do.call(cbind, lapply(a, function(x){readRDS(file.path(dir_analysis, "meanFC", x))$meanFC})),
meanFCz = do.call(cbind, lapply(a, function(x){readRDS(file.path(dir_analysis, "meanFC", x))$meanFCz})),
ICC = do.call... |
f6f80686d86ee0eefc65d9706421b513423335646ab56277ec420f585345c888 | R | 157,894 | 5,072 | ---
title: 'Questionnaire-free machine-learning method to predict depressive
symptoms among community-dwelling older adults'
author:
- name: Sri Susanty, RN, PhD
affiliation:
- &nursing School of Nursing, College of Nursing, Taipei Medical
University, 250 Wu-Xing Street, Taipei 11031, Taiwan.
... |
99c92d9f3b797b81cd3846e22ca7508d490f219cd6b6b504a67dc4b1444211b2 | R | 200,000 | 1,820 | log=list()
log[['divnn_hyperparameters']]=
"Conduct hyperparameter tuning for DI-VNN model
Started: 2021-01-28 00:48:15
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=12s
Warm-up: 7 steps
Step: 122/122; LR: 0.015625; Total: loss=0.2636; Root: loss=0.2581; ROC=0.4679; TP=215; FN=286; FP=228; ... |
a7aabf8dfdce6aa43ebe10388b5902e70b0b7f378ae87ae340918a70a61ebcf4 | R | 200,000 | 5,391 | # The Broad Institute
# SOFTWARE COPYRIGHT NOTICE AGREEMENT
# This software and its documentation are copyright 2006 by the
# Broad Institute/Massachusetts Institute of Technology.
# All rights are reserved.
#
# This software is supplied without any warranty or guaranteed support
# whatsoever. Neither the Broad Institu... |
16beeb29db6fd2a74da7810f9c1ef727066f429e8c32e01e855568bf84039dd4 | R | 200,020 | 5,374 |
# Quant vs Semiquant panels ( with stats export)##################
# -------- Packages
req <- c("readxl","dplyr","ggplot2","scales","writexl")
to_install <- setdiff(req, rownames(installed.packages()))
if (length(to_install)) install.packages(to_install)
invisible(lapply(req, library, character.only = TRUE))
# LOAD... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.