sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
d67b587259f45218eb139c7a4c7ab6e29261e583903fe609d94d3dce9bd9fea9
R
11,260
292
require(dplyr) require(optparse) require(MSstats) booleanOrString <- function(argument) { if (argument == "FALSE") { return(FALSE) } if (argument == "TRUE") { return(TRUE) } return(argument) } booleanOrNumber <- function(argument) { if (argument == "FALSE") { return(FALSE) } if (argument ==...
7d43b0bcd37c58346745e53b851bb613e4bbf2974cdc07dfb8f5015311ce390a
R
11,343
242
############################################################################################### # Script to Arrange samples in sliding age windows and estimate beta for WGCNA # # via connectivity match # # ...
6c0d2084c2ec034caad88eb344f1b947c1d3f6d330055798d4cdb36bccd5a1e8
R
11,387
242
############################################################################################### # Script to Arrange samples in sliding age windows and estimate beta for WGCNA # # via connectivity match # # ...
fd8c350ce760783c0f4ca02c42ecfed36c77b32874a4bda50e97bc993dc950a3
R
11,444
252
############################################################################################### # Script to preapre and preprocess iPSC data # ############################################################################################### options(java.parameters = "-Xm...
cf84512c747b80c82827f9600a26459f8c1b44ee10ae99261ecf01ca3800b845
R
11,558
290
library(Seurat) library(Signac) library(ggplot2) library(RColorBrewer) library(viridis) dir.create('Plots') ##=================================================================================================================================================== ## theme: my_theme <- theme( axis.line=element_blank(), ...
aae30c4d4ed2b35b5e04412687efb66a741d971b2185e5db3dcd396ff17f0cbf
R
11,564
322
#' Calculate relative motion of two bodies #' #'This function, similar to oRel in Maya, calculates the relative morion of #'either 'mobile' 3D point/s or rigid body relative to 'proximal'/reference #'rigid body. The function is written to handle multiple frames/timepoints of #'data (see arguments for format), and will ...
bdcd03e13811125d749e329e2129d242fbe0a82d354380eee29110cc653d4ca3
R
11,794
233
############################################################################################### # Script to Preprocess tissue rse data "Regional-coexpression" and "Age-period" studies # # (NC samples only) # # ...
4ea2c055103b9128cf2e9df488c37c74ff355ff1155ffd8a43a9b8ab42e562e3
R
11,859
427
# Produces Shewhart Control Charts and Pareto Analysis for Evaulating Proteomic Experiments # for Rv2.13 or later must be installed along with the qcc library from R and Skyline # (https://skyline.gs.washington.edu/labkey/project/home/software/Skyline/begin.view) options (echo = FALSE) debug <- FALSE # Retention Tim...
fd4d7e00dbdab98578aedfd02fdedd934cca5ae7992160cdf5493c4142079ca5
R
11,955
316
# Comparison of performance of risk stratification tools at predicting # overall survival insert_head() # container ------ surv_tools <- list() # analysis globals ------- insert_msg('Analysis globals') ## analysis variables surv_tools$var_lexicon <- rbind(tibble(variabl...
36b1fb1f2f376026cee1ef6c85c5d376e12a6182768f8a66d269ffdbab5ece7f
R
11,978
276
commonfactorGWAS <-function(covstruc=NULL,SNPs=NULL,estimation="DWLS",cores=NULL,toler=FALSE,SNPSE=FALSE,parallel=TRUE, GC="standard",MPI=FALSE,TWAS=FALSE,smooth_check=FALSE){ # Set toler to machine precision to enable passing this to solve() directly if (!toler) toler <- .Machine$double...
8af60c2c7b5765ddacf67591a84626733878f397aa66b037568a1e1ab59e06f4
R
12,003
340
####################################################################### ####### Create Figure 4 to evaluate trans-eQTL ####################################################################### options(stringAsFactors = F) library(bmediatR) library(data.table) link = "/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/t...
beff2d84f205d4c9a9f7bbb14761c7b4a93d7b3bcab25ed26d761d331ac2cdc3
R
12,008
244
#' get_neighborhood_preservation_scores #' #' Calculates cell neighborhood preservation scores by comparing distances to the neighbors from True and Selection k-NN graphs. #' #' @param sce SingleCellExperiment object containing gene counts matrix (stored in 'logcounts' assay). #' @param neighs.all_stat If not NULL, sho...
a365ba02c31953b306b5d6e12429109c843ff59e9a9d5c2d2f08ce21d292256c
R
12,143
261
# This script generates paper tables insert_head() # data container ---- paper_tables <- list() suppl_tables <- list() # Table 1: cohort characteristic ------ insert_msg('Table 1: cohort characteristic') paper_tables$cohort_features <- data_ex$result_table %>% filter(variabl...
0fc9911adf80ac4eb0ed238f143fcbde85e983d567dc4f74f1b3d2847015d256
R
12,236
257
library(ggplot2) library(ggpubr) library(gridExtra) setwd("/Volumes/SizhuFiles/TMS+EEGstudy/Main/visualization/data") ## Oscillation: hc vs. patients ## rm(list=ls(all=TRUE)) data <- read.csv("HCvsPats.csv",header = T) Group <- c(rep(c(rep("HC",64),rep("MDD",53)),5)) Freq <- c(rep("Delta",117),rep("Theta",117),rep("...
cbc5b832f15b1237ce344baa2e1f061414620c71ac9c6cdf603440ba1c4b693f
R
12,414
366
################################################################################# # FigureS3 A ################################################################################# options(stringAsFactors = F) link = "/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/conditional/" cell = "progenitor" L = "P" setwd("/pro...
0003931deee1e7542f8b04741abb791c2cb337caecdb77c57673d9cbd0c5d756
R
12,502
273
# $Id: QuaSAR-GP.R 107 2012-06-25 18:37:49Z rahmad $ print ("$Id: QuaSAR-GP.R 107 2012-06-25 18:37:49Z rahmad $", quote=FALSE) # The Broad Institute of MIT and Harvard # SOFTWARE COPYRIGHT NOTICE AGREEMENT # This software and its documentation are copyright (2009) by the # Broad Institute. All rights are reserved. # ...
4b41311ea22d7558b5c2e9098a903e89f2c8b304180bd56851da3fa2a4a82631
R
12,651
398
#' @importFrom R6 R6Class #' @include utils.R #' @include tuner.R #' @include model_helpers.R #' @include validator.R Model <- R6Class( classname = "Model", public = list( # Properties -------------------------------------------------- name = NULL, is_multivariate = NULL, allow_coefficients = NUL...
fb2d4ae3e21ad4c5405b171cded9003d01cc1bf1a28be0fdb0a0633971ca0d9d
R
12,866
353
# Contains various check functions to examine whether variables are of the right format #' @importFrom SingleCellExperiment logcounts counts #' @importFrom SummarizedExperiment assays .prepare_sce_counts = function(sce){ if (!is(sce , "SingleCellExperiment")){ stop("sce should be a SingleCellExperiment object."...
7d9abb2376625a5d80ca38d2c0f874a4924fcc04fe3c80cb33012394074f1133
R
12,872
357
--- title: "Graph Analyses- Segregation" author: "Sandra Martin" date: "11/17/2021" output: md_document: variant: markdown_github editor_options: chunk_output_type: console --- ```{r setup, include=FALSE, echo=FALSE} rm(list= ls()) # clear all knitr::opts_chunk$set() options(scipen = 999) ``` # Load package...
942de855f5e48119b69b1bcea025542e05c8232b993a30ef2fdee29637715fcf
R
12,959
361
library(Seurat) library(Signac) library(ggplot2) library(RColorBrewer) library(viridis) seuset.atac <- readRDS('SeuratObjects/PD.SN.snATAC.postAlign.geneExp.label.anno.rds') ##===========================================================================================================================================...
40d1eb2e1622038173a5afdd1e51c3db9a8871eeda644976609e07eef885c4f7
R
13,266
479
################################################################################ # This file has been taken from the lm4GS github package: # https://raw.githubusercontent.com/perpdgo/lme4GS/master/pkg_src/lme4GS/R/lmerUvcov.R ################################################################################ #' @import l...
b89a02f449b72b124baf73da65439a13790de69f0c321d68c1c1a2131d63d0b0
R
13,284
241
#################################################################################################### # Script to collate and combine network data from other published networks # # "Regional-coexpression" study # # ...
fb6fe78372b798b7b83547e9186961a6a176154d48b2a56b0dd2a30295d26116
R
13,421
428
# A medley of functional project tools require(plyr) require(tidyverse) require(rlang) require(cowplot) require(survival) require(stringi) require(caret) # import helpers ---- det_mortality <- function(inp_tbl, update = T) { # identifies if the patient survived in the study...
a7fe71ac5ac4c360d803bfbcdfe6cc6e64d74d406973ee8622c82df6ba24ffdb
R
13,453
369
options(stringAsFactors = F) library(bmediatR) library(data.table) type = "progenitor" setwd("/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/bmediate/scripts/") gtf = fread("/proj/steinlab/projects/R00/eQTLanalysis/phenofiles/gene_transcript_v92.csv",data.table = F) gtf = gtf[which(gtf$type == "gene"),] idx = whic...
cc58f124f64ed67316fe59536f7e65963b0433a4aece1b275f44db7d0c0c72d2
R
13,732
354
################################################################################################## # Figure 5A ################################################################################################## chr = 8 trait = "G-temporal-middle_cortical_area" gwas_dir = "/proj/steinlab/projects/R00/eQTLanalysis/Disease...
e400d76d80b06b546af4bfc1353069cb17e6a0b6da818e6d08836c1b1285d911
R
13,746
283
############################################################################################### # Script to calculate and plot SCZ enrichment measures for sliding window networks # # "Sliding window" study # # ...
4566382317aec93af16b258045d2472bb210555cc689338519e3502177c4c894
R
14,111
318
# context("Testing gene_prediction_scores") library(geneBasisR) ### set up inputs ## libs library(SingleCellExperiment) set.seed(32) ## toy data counts = matrix(c(rep(0,10),1,1,1,0,0, 1,1,1,0,0, 1,1, 0,0,0,1,0,0,0,0,0,1,1,0,0), nrow = 5, ncol = 7) sce_correct = SingleCellExperiment(list(logcounts = counts)) colnames...
d95638dbba189fccaf8015a934055e203adbce1045ff63c58b23fc3e6fb36f18
R
14,166
345
--- title: "Behavioral relevance - cPPI results" author: "Sandra Martin" date: "11/14/2021" output: md_document: variant: markdown_github editor_options: chunk_output_type: console --- ```{r setup, include=FALSE, echo=FALSE} rm(list= ls()) # clear all knitr::opts_chunk$set() options(scipen = 999) ``` # Load...
3fa0008ba281520a73839274c383c8eebc5582a34ab8c03dd9f2514032bbdf95
R
14,276
393
--- title: "DEMO : Spinal Cord Axis Projection Example" output: tufte::tufte_html: default author: Alma Andersson date: 2021-10-01 --- ## Prep This notebook illustrates how the distribution of certain features of interest (e.g., genes or cell types) along a specified axis can be analyzed. To simplify things, I've ...
bb14bfe785ca8056fdbd004fcd7d0a67c114728ff42488ab34d255fde6250f3c
R
14,536
301
--- title: "xrommRtools Vignette" output: rmarkdown::html_vignette description: Use this if this is your first time using xrommRtools. It will teach you the basic ideas and workflow. vignette: > %\VignetteIndexEntry{xrommRtools Vignette} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, in...
ccfe14047be8f6565cb6f51395c5dd7a339901a41e4981963ea0939970040786
R
14,551
408
library(Seurat) library(Rmagic) library(ggplot2) library(RColorBrewer) library(viridis) seuset <- readRDS('SeuratObjects/PD.SN.snRNA.postAlign.Anno.rds') sampleList <- c( 'X5628NOSN', 'X4689NOSN', 'X4870NOSN', 'X4996NOSN', 'X5006NOSN', 'X5130NOSN', 'Public1NOSN', 'Public2_1NOSN', 'Public2_2NOSN', 'Public3_1NOSN', ...
d782e78e30bef7e94f6f17a13d3b2aa09e2f5c20d49d79c36677780628f017d1
R
14,623
526
#----a options(stringAsFactors = F) library(data.table) link = "/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/bmediate/icc/" icc_gene_p = data.frame() for (i in 1:22) { dt = read.table(paste0(link,"progenitor_chr",i,"_icc_gene.txt"),header = T) icc_gene_p = rbind(icc_gene_p,dt) } icc_gene_n = data.frame() ...
a4f2fc660f795b67f94f17d0882e9a05b162c5170ea393e703128db880685ab4
R
14,747
346
#' @importFrom tensorflow set_random_seed #' @include utils.R #' @include validator.R #' @include deep_learning_model.R #' @title Fit a Deep Learning Model #' #' @templateVar ClassName DeepLearningModel #' @templateVar XType `matrix` #' @templateVar YType `vector` or `matrix` #' @templateVar refFunction keras::keras_...
a9292ca258687e44e6d2297763bdd952c81a05b0f145032d329b2cbf98d9d87f
R
15,224
370
library(Seurat) library(SingleR) library(DoubletFinder) library(tidyverse) library(patchwork) library(dplyr) library(GSVA) library(infercnv) library(AnnoProbe) library(ComplexHeatmap) library(limma) library(clusterProfiler) library(msigdbr) library(org.Hs.eg.db) library(monocle3) library(SCENIC) ## ...
a15242c36edf81b5140580043d01bcaa7ca52ac06f7e73a6da8630754a44f2fb
R
15,288
341
# context("Testing evaluate_library") library(geneBasisR) ### set up inputs ## libs library(SingleCellExperiment) set.seed(32) ## toy data counts = matrix(c(rep(0,10),1,1,1,0,0, 1,1,1,0,0, 1,1, 0,0,0,1,0,0,0,0,0,1,1,0,0), nrow = 5, ncol = 7) sce_correct = SingleCellExperiment(list(logcounts = counts)) colnames(sce_c...
7e53f21578448b2ea6d671398102af83cf639897b9bfae7d213499b9b1f2573a
R
15,403
357
library(shiny) library(shinydashboard) library(ggplot2) library(reshape2) source("Fun_Rank_disease.R") source("global.R") source("enrichr.R") Healthy_UI <- function(id,label="Rank"){ fluidPage( ## First Row: Filtering sex-biased genes from differential expression topTable. fluidRow( h3("Step1...
b5e425213337d76b3085a83c83f7de27a16618bfd09f32518b86f95c1826a66c
R
15,413
627
suppressMessages(library(e1071)) data(Iris) expect_tuning <- function(tuner, loss_function, cv_class, folds_number, testing_proportion, hyperparams, grid_proporti...
f61b3529180fd1112ee352d306be51ed8b039a8d7fba82614a2bd79fd82dada4
R
15,551
516
options(stringAsFactors = F) library(bmediatR) library(data.table) type = "progenitor" setwd("/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/bmediate/scripts/") ################################################################################## temp.link = "/pine/scr/n/i/nil1/tmp/" pheno.link = "/proj/steinlab/pro...
ababb1fa060299996bd78b9c548f858e1e0f76d026538f202a067cfa9fc4385c
R
15,679
369
# context("Testing get_DE_genes") library(geneBasisR) ### set up inputs ## libs library(SingleCellExperiment) set.seed(32) ## toy data counts = matrix(c(rep(0,10),1,1,1,0,0, 1,1,1,0,0, 1,1,0,0,0,1,0,0,0,0,0,1,1,0,0), nrow = 5, ncol = 7) sce_correct = SingleCellExperiment(list(logcounts = counts)) colnames(sce_corre...
8bc80585843b0064258f4343f6c3976d9f37c081fb8e22752badd6dbb40dad2a
R
15,952
275
groupDiscr <- function(data=NA,measures=c("TST_device","TST_ref"),size="reference",logTransf=FALSE, CI.type="classic",CI.level=.95,boot.type="basic",boot.R=10000,digits=2,warnings=TRUE){ require(BlandAltmanLeh) # setting measure name and unit of measurement measure <- gsub("_ref...
c7387e8c50024ec4c88e9cfb80f330bdd66d45fb50e2977db6a44b7561932c6e
R
16,148
429
#################################################################################### # Table S1 #################################################################################### dat = read.csv("/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/bmediate/data/progenitor_bmediatR_results_causal_final.csv") dat = dat[,...
84d0ca833bd07c68b6334a9ae3cf95e21331ee9d50c394d78bd022d66accc2a0
R
16,190
483
################################################################################################## # Figure 2A, prepare a Manhattan plot to view causal forward and reactive models (Model 1A and B) # Manhattan plot for caQTL->eQTL mediation options(stringAsFactors = F) library(data.table) gtf = fread("/proj/steinlab/...
c9a389333306863343445a3383c969b55b6690ea86ddd3736ca415886565d493
R
16,267
377
library(shiny) library(shinydashboard) library(ggplot2) library(reshape2) library(DT) source("global.R") source("Fun_Rank_disease.R") source("enrichr.R") HealthyAllUI <- function(id,label="RankAll"){ fluidPage( ### First Row ### fluidRow( h3("Rank aggregation of Sex-biased genes of all brai...
2f4b8634d2dd4d4e99e1607c9c693e67e9b6a4907c18e9ec24558c6ceb1422cb
R
16,360
296
############################################################################################### # Script to plot enrichment in PGC lists vs enrichment in consensus list in stemcell networks # # iPSC data[noKO+shuffle/KO] # ################################...
8aba93d62a425a709fd5a87049d97064307c9529e5415d5dfc3cd5074ded3b52
R
16,416
348
#Written by Cameron Wehrfritz #and Natan Basisty, PhD #Schilling Lab, Buck Institute for Research on Aging #Novato, California, USA #March, 2020 #updated: February 08, 2021 # PROTEIN TURNOVER ANALYSIS # STEP 3: # NON LINEAR FIT OF TURNOVER, THROUGH THE ORIGIN with single parameter: rate of change # # OUTPUT: # i. PDF...
5b30f4cca4154f5bd85820b52e7e611d46fcef4cf3296c49e12f1c660d9f5a44
R
16,424
412
```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Sptial analysis of T cell subpopulations in melanoma ```{r} library(Seurat) library(ggplot2) library(ggthemes) library(ggsignif) library(cowplot) library(dplyr) library(ggpubr) library(viridis) library(cgdsr) library(survival) library(survminer) lib...
d7a893b9e7dfd17793f5d2d9013144fa0eb615b4ff8b6afcb914fde4366b3930
R
16,471
305
con_ensembl = c( "ENSG00000101204" ,"ENSG00000119522" ,"ENSG00000162104" ,"ENSG00000173175" ,"ENSG00000196588" ,"ENSG00000198010" ,"ENSG00000215012" ,"ENSG00000002746" ,"ENSG00000105649" ,"ENSG00000174437" ,"ENSG00000175931" ,"ENSG00000184156" ,"ENSG00000198929" ,"ENSG000000847...
9967e7baada5f6bef7029be8563a1c4894f542391a4a1a7eb973a079dd9540dc
R
16,531
446
# This script generates main and supplementary figures ----- insert_head() # data containers ---- paper_figures <- list() suppl_figures <- list() rev_figures <- list() # Figure 1: STROBE ---- insert_msg('Figure 1: STROBE') paper_figures$strobe <- plot_grid(ggdraw() + ...
bbd378cd5150fe008cc7a14c66808577478a732d880645d3a2687fe672d68b1c
R
16,709
359
#Written by Cameron Wehrfritz #and Natan Basisty, PhD #Schilling Lab, Buck Institute for Research on Aging #Novato, California, USA #March, 2020 #updated: February 09, 2021 # PROTEIN TURNOVER ANALYSIS # STEP 2: # NON LINEAR FIT OF TURNOVER # CALCULATE X-INTERCEPTS # # OUTPUT: # i. PDF of non-linear regression plots:...
aa6a861f444f967a8585c14820a8d9f9dccafd659111b35dcf11f3179f9737fe
R
16,987
405
.userGWAS_main <- function(i, cores, k, n, I_LD, V_LD, S_LD, std.lv, varSNPSE2, order, SNPs, beta_SNP, SE_SNP, varSNP, GC, coords, smooth_check, TWAS, printwarn, toler, estimation, sub, Model1, df, npar, utilfuncs=NULL, basemodel=NULL, returnlavmodel=FALSE,Q_SNP,mod...
cfa86b7532debf257f58896e8151f1622449ec76928b0262d68491684e741134
R
17,958
654
local({ # the requested version of renv version <- "0.13.2" # the project directory project <- getwd() # avoid recursion if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA))) return(invisible(TRUE)) # signal that we're loading renv during R startup Sys.setenv("RENV_R_INITIALIZING" = "true"...
0519f121363a69dd39684b632c0b2de10288707ee1b04d0eef910364d4dcf434
R
18,428
433
# context("Testing gene_prediction_scores") library(geneBasisR) ### set up inputs ## libs library(SingleCellExperiment) set.seed(32) ## toy data counts = matrix(c(rep(0,10),1,1,1,0,0, 1,1,1,0,0, 1,1, 0,0,0,1,0,0,0,0,0,1,1,0,0), nrow = 5, ncol = 7) sce_correct = SingleCellExperiment(list(logcounts = counts)) colnames...
6cc3c92731b93bb41ae6f182b250a892decc7163121d8bc5eb83b719b187d411
R
18,592
601
#' @importFrom R6 R6Class #' @import keras #' @include utils.R #' @include model.R #' @include globals.R #' @include deep_learning_grid_tuner.R #' @include deep_learning_bayesian_tuner.R #' @include model_helpers.R DeepLearningModel <- R6Class( classname = "DeepLearningModel", inherit = Model, public = list( ...
45c2c6ee4a6db4eaf839d3845d9536241baef5100c443568eee798c2aef31fc7
R
19,315
730
set.seed(1) test_that("to_matrix", { categories <- factor(sample(c("A", "B", "C"), 10, replace = TRUE)) expect_matrix(to_matrix(1), nrows = 1, ncols = 1, any.missing = FALSE) expect_matrix(to_matrix(1, TRUE), nrows = 1, ncols = 2, any.missing = FALSE) expect_matrix(to_matrix(1:10), nrows = 10, ncols = 1) e...
559401c1697f0d12c41a450e9388a46a6f02ca7bd4124aad4d5ca2d4aa8c2601
R
19,503
339
# Lachlan T Strike # Based on scripts provided by Hermine Maes (https://hermine-maes.squarespace.com) # Saturated model used to check assumptions of twin data. Is setup for QTAB data (i.e. 5 zyg groups, with opposite sex twin pairs coded females as 01 and males as 02). # Take rMZ/DZ & covariate estimates from model wit...
d13e2e85c736b9b20f05fdf38eebac072366db01650804024b590498d31363f0
R
19,650
496
--- title: "Graph Analyses with Subnetworks" author: "Sandra Martin" date: "12/1/2021" output: md_document: variant: markdown_github editor_options: chunk_output_type: console --- ```{r setup, include=FALSE, echo=FALSE} rm(list= ls()) # clear all knitr::opts_chunk$set() options(scipen = 999) ``` # Load pack...
3960915d6bc0d9a480c915c901317232fcd2ab57c776770a704f50dca3469044
R
19,908
507
########################################################################################## ## BrainSpan expression profiles for various SCZ gene sets ## ## Author: Kalliopi Tsafou, Yu-Han Hsu ########################################################################################## rm(list=ls()) library(dplyr) librar...
e7536aa48771a847b14479a444e2e37c378040b4696b3728a171e92c77f83d5d
R
19,916
505
library(tidyverse) library(ggtern) library(hrbrthemes) library(ggtext) library(ggplot2) library(ggpubr) library(patchwork) library(scales) library(tidyr) library(matrixStats) library(ggrepel) require(pals) library(rdist) library(rpart) library(ggthemes) library(ComplexHeatmap) library(ggdendro) ###1.dr...
5bfb9d2133b1caf5e5e5a0ec8c786c6784ba0b7b73eb2c3eed19d5b7bb3d289b
R
19,923
347
BAplot <- function(data=NA,measures=c("TST_device","TST_ref"),logTransf=FALSE, xaxis="reference",CI.type="classic",CI.level=.95,boot.type="basic",boot.R=10000, xlim=NA,ylim=NA,warnings=TRUE){ require(BlandAltmanLeh); require(ggplot2); require(ggExtra) # setting labe...
9735a0f9dec9faf0bc5d6a5bfe8428ab39df127311da0e7a7fb10359de8b5279
R
19,930
505
library(tidyverse) library(ggtern) library(hrbrthemes) library(ggtext) library(ggplot2) library(ggpubr) library(patchwork) library(scales) library(tidyr) library(matrixStats) library(ggrepel) require(pals) library(rdist) library(rpart) library(ggthemes) library(ComplexHeatmap) library(ggdendro) ###1.dr...
50db4e261b0b9c0abe216dda720a39bf980042589e644e9d9ae681374c4a016f
R
19,944
719
# The Broad Institute # SOFTWARE COPYRIGHT NOTICE AGREEMENT # This software and its documentation are copyright (2003-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 I...
9466f837f8006be498a1dc269aec355b0ee8529950138b7cb4e0946e6b0fdc86
R
20,057
496
######################################################## # Figure S5C ######################################################## type = "progenitor" setwd("/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/bmediate/scripts/") ################################################################################## temp.lin...
56ddff9b153f4469affcf5c471a577c88583fd899af93ee50b117c261d10241e
R
20,146
492
join <- function(...) { paste(..., sep = "") } # # Global values for sharing scales between sites (comment out for site-specific scales) # acceptQCutoff = 0.01 acceptCvCutoff = 0.2 acceptRunsPercentile = 0.5 # # Reading data # command_args <- commandArgs(trailingOnly = FALSE) script_args <- commandArgs(trailingOn...
ca29fc26166ec38d354a89048c6b672be69e68ddd42e64e30dc4b5da7dd4d88a
R
20,147
693
expect_difftime <- function(x) { expect_class(x, "difftime") expect_number(as.numeric(x), lower = 0, finite = TRUE) } expect_model <- function(model, x, y, hyperparams, responses, tune_grid_...
caed44e03a075b7bc3c524fbf0ff5c53d2248eeda2e44fe3147e343a924d7cce
R
20,379
840
data(IrisMatrix) test_that("Univariate numeric (no tuning)", { model <- deep_learning( x_num, y_num, epochs_number = 5, verbose = FALSE ) expect_deep_learning( model = model, x = to_matrix(x_num), y = y_num, hyperparams = list( learning_rate = 0.001, epochs_number = 5...
a8c8a4e349d289acb0298ead6d8f6747fe0f04ed66af76eb0bd2b8421c30edf8
R
20,661
265
--- title: "The Combination of Supervised and Unsupervised Learning based Risk Stratification and Phenotyping in Pulmonary Arterial Hypertension - a Long-term Retrospective Multicenter Trial" subtitle: "PULM-D-22-00488, point-to-point reply" author: "Innsbruck PAH registry" date: "`r format(Sys.time(), '%Y-%m-%d')`...
5bfd0e52cda060a740df536ce138e449f0e345739a582ae2e59834436bec98ca
R
21,020
649
library(ggmsa) library(Biostrings) library(msa) library(tidyverse) library(ggpubr) library(rstatix) library(emmeans) library(ape) library(ggtree) library(ips) library(gt) library(webshot2) #--Multiple Sequence Alignments (MSA)---(figure 1)---########## oxtr_seq <- readDNAStringSet(filepath = "rodent_oxtr_mRNA_seq1.fa...
b0c6690d873c950e85c6bd91865bcbd4a5bd9dfa71dbe11c967161789bfe87fc
R
21,466
490
userGWAS <- function(covstruc=NULL, SNPs=NULL, estimation="DWLS", model="", printwarn=TRUE, sub=FALSE,cores=NULL, toler=FALSE, SNPSE=FALSE, parallel=TRUE, GC="standard", MPI=FALSE, smooth_check=FALSE, TWAS=FALSE, std.lv=FALSE,fix_measurement=TRUE,Q_SNP=FALSE, ...
8d59938bf175ff40dbf20a460641c0811d52d8c62542863529ef704ca8ed454f
R
21,531
861
#' @import keras #' @import dplyr #' @importFrom glmnet cv.glmnet #' @include utils.R #' @include validator.R #' @include kernels.R #' @include bayesian_model.R prepare_univariate_y <- function() { if (is.data.frame(self$y)) { self$y <- unlist(self$y, use.names = FALSE) } else if (is.matrix(self$y)) { se...
7cd9f3717b57b3165ec3a0d9ff9943b5009bd0e538617e431150054b280e95a4
R
21,918
403
#################################################################################################### # Script to plot main enrichment plots for SCZ risk modules for all networks # # Script to plot GO, TF and Pathology enrichments for SCZ risk modules for all networks # # "Regi...
54e4c0d2e5502933c0861012b28db34157d336c49655b22d88f23219e2136d7b
R
22,592
477
library(DESeq2) library(data.table) library(RUVSeq) # http://bioconductor.org/packages/release/bioc/vignettes/RUVSeq/inst/doc/RUVSeq.pdf library(EDASeq) library(readxl) #setwd("/data/NCATS_ifx/data/dbGaP/DRGs/SRA/DESeq2") setwd("~/Downloads/DRGs/") sampleTable <- as.data.table(readxl::read_xlsx('DRGs_merged_sampletab...
ae05eb24f6b4ac4b22a11112e04d69515577fc4d18b6fa07d9cba7d1575fb09a
R
23,000
509
```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Sptial analysis of the invasion of myeloid subpopulations in COVID-19 ```{r} library(GSVA) library(Seurat) library(ggplot2) library(ggthemes) library(ggsignif) library(ggforce) library(dplyr) library(reshape2) library(ggbeeswarm) library(cowplot) li...
633de6673d5f355fff95649c476fd578f792eaddcbeaecdd43c98d9516915713
R
23,838
497
# Project: Run economic evaluation and sensitivity analyses # Created by: James Hedley # Date created: 8th November 2021 # Last updated: 22nd June 2022 # Load libraries ---- # Set directories ---- user <- Sys.getenv("USERNAME") if (user == 'jhed6231') {user <- paste0(user, '.MCS')} paper3loc <- paste0('...
3cbb480f84a9b6d7662a76991e6f95d3db80209485df8f8a53b55ce4635c7e46
R
25,640
873
set.seed(1) numeric_vars <- list( observed = round(rnorm(5, 10, 1), 2) ) numeric_vars$predicted <- round(numeric_vars$observed + rnorm(5), 2) categorical_vars <- list( observed = factor(c("A", "B", "C", "A", "B", "A", "C")), predicted = factor(c("A", "C", "C", "B", "B", "A", "C")) ) test_that("confusion_matrix...
a79c134995458d42bfa56c98f3f559ef3bda70c2e5ab80d12dd7584e1ba20b21
R
27,259
611
enrich <-function(s_covstruc, model = "",params,fix= "regressions",std.lv=FALSE,rm_flank=TRUE,tau=FALSE,base=TRUE,toler=NULL,fixparam=NULL){ 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, ...
e4ca0e4f355e9fc67f6e6c184d8a4825b1a552e0bcfaaecbd6a6aa62d3db245a
R
27,413
648
#################################################################################################### # Script to run various enrichments on gene_module_list: # # SCZ, DEGs, DMGs, TWAS, GO, MAGMA, Cell Specificity etc. # # ...
e40fbad06ce4452a830c58a6c210f5c3f21442885880056989f6f280c19ca8c4
R
28,285
705
library(RUVSeq) # http://bioconductor.org/packages/release/bioc/vignettes/RUVSeq/inst/doc/RUVSeq.pdf library(EDASeq) library(RColorBrewer) library(DESeq2) library(data.table) library(ComplexHeatmap) library("scales") setwd('/Volumes/ncatssctl/NGS_related/BulkRNA/ISB012/Tao/') sampletable <- as.data.table(readxl::read_...
1a084765caead260ca957c34db86aed2c47b17b4a7f6f8c5a9ca7247285fa277
R
30,623
700
# DEPENDENCIES # nnls, Hmisc, mgcv, plyr Test <- function(){ # read in the data gc <- read.table("gc.txt")$V2 canoes.reads <- read.table("canoes.reads.txt") # rename the columns of canoes.reads sample.names <- paste("S", seq(1:26), sep="") names(canoes.reads) <- c("chromosome", "start", "end", sample.na...
7820cbdc6827bff81692bf10924718234e91a52d67d9fed45f016dab9fea31b7
R
33,339
685
usermodel <- function (covstruc, estimation = "DWLS", model = "", CFIcalc=TRUE, std.lv = FALSE, imp_cov = FALSE, fix_resid = TRUE, toler = NULL,Q_Factor=FALSE) { time <- proc.time() test <- c(str_detect(model, "~"), str_detect(model, "="), str_detect(model, "\\+")) if (any(tes...
0c4df31231bcb4bb333e3285e2a153938e5111488ee330df6c1fb6a7978e2d65
R
33,864
816
#Prepare genome feature file library(GenomicFeatures) library(BSgenomewheatpart) spompe <- makeTxDbFromGFF('/public/workspace/xuyongyue/ZLH/scATAC-seq/161010_Chinese_Spring_v1.0_pseudomolecules_parts.filter.gtf') #saveDb(spompe, file="/public/workspace/xuyongyue/ZLH/scATAC-seq/wheat_txdb.sqlite") wheat_txdb <- loadDb("...
e8099a6d9a866e0ffeef471ac43cd93a723a601214b2729661054a28613fa976
R
34,068
390
--- title: "The Combination of Supervised and Unsupervised Learning based Risk Stratification and Phenotyping in Pulmonary Arterial Hypertension - a Long-term Retrospective Multicenter Trial" subtitle: "Supplementary Material" author: "Innsbruck PAH registry" date: "`r format(Sys.time(), '%Y-%m-%d')`" output: ...
8021f43fd25601f0796289b33f783839a011ab2835425d5cb392d998d4189a82
R
34,408
818
```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Validation of scSpace on human middle temporal gyrus (MTG) scRNA-seq data ```{r} library(Seurat) library(ggplot2) library(ggsignif) library(ggforce) library(mclust) library(dplyr) library(cowplot) library(reshape2) ``` ### Load data ```{r} # Ground...
a63d247ab0d92791b8aaf4d1836454956df1bc99ef7ee7b2c0144e1781144349
R
35,420
914
#install.packages("devtools") library(devtools) library(ggplot2) library(reshape2) library(gridExtra) library(ggpubr) setwd("/Volumes/SizhuFiles/TMS+EEGstudy/Main/visualization/data") #### plot LMFA-AUC/TEPs: bar plot #### rm(list=ls(all=TRUE)) color1<-c("#222222","#E42600") # black=hc, red=patients data <- read.csv...
f3bcac2f02414f47f9cf5c5a3bcb3438f279e127178e803b31fd0182201832ce
R
35,455
754
#################################################################################################### # Script to run GO aqnd SCZ enrichments on consensus gene environment: # #################################################################################################### ##Function...
580c4560031d914c3415e4e80296691a752af58968571636f479d59fed83b32b
R
36,280
795
###### # This script builds multitissue gene-gene coexpression network byusing GTEx data. # The options(warn=-1) #install.packages("R.utils") #BiocManager::install("EnsDb.Hsapiens.v86")#BiocManager::install("EnsDb.Hsapiens.v79") library(R.utils) library(EnsDb.Hsapiens.v86) setwd("/data/users/cs15d017/backup_from_h...
9e6dd9bcc0925555b8be98834d6b883cc22407024b8bf0d2ae4345a0b975ef4c
R
37,319
1,406
#' @importFrom reticulate py_suppress_warnings py_capture_output #' @importFrom data.table fwrite fread #' @importFrom dplyr as_tibble #' @include globals.R #' @include validator.R # Computations -------------------------------------------------- lm_intercept <- function(x, y) { if (all(is.na(x)) || all(is.na(y)))...
39c6383f4f25faa9ddfdf9c214df4b5df6534017688bf1ea5bf88997bab30ef0
R
38,600
821
```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Validation of scSpace on human embryonic heart scRNA-seq data ```{r} library(Seurat) library(ggplot2) library(ggsignif) library(ggforce) library(mclust) library(dplyr) library(cowplot) library(reshape2) library(ggExtra) library(NMI) ``` ### Load da...
36a9137d9744b2c7d13be874879b2c7c2caea1b67e8d71c87659ee2e2b04cf33
R
43,595
1,523
#' @import checkmate #' @include globals.R #' @include utils.R #' @include kernels.R # Checkmate extension -------------------------------------------------- checkSubsetString <- function(x, choices, empty.ok, unique, ...
b555a7ced15586d5c21435789a5d58314c8fdac7f4bc022613db56df780f2ced
R
44,687
1,106
#---------S4A #-----caQTLs cpro = fread("/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/EMMAX/progenitor_caQTL_inpeak_snps.txt", data.table=F) cpro$fdr = p.adjust(cpro$V3, method = "fdr",n=nrow(cpro)) cpro = cpro[which(cpro$fdr < 0.05),] cpro$peak = sapply(cpro$V4, function(x) unlist(strsplit(x,"/",fixed="TRUE...
93774b00efd13b028587eeb2c6570f438e3d2a956e31679ac131ff25d764d98c
R
45,665
1,152
--- title: "Differential expression and exon usage analyses" author: "MW" editor_options: chunk_output_type: console date: "`r format(Sys.time(), '%d %B, %Y')`" output: bookdown::html_document2: code_folding: show toc: yes toc_float: collapsed: no params: dataset: 1 --- ```{r setup, include=FAL...
f8cf2a75ef7144fece022464ea0e5b1a3c489dd12fde91624dd8feb0b30e3d64
R
45,672
1,152
--- title: "Differential expression and exon usage analyses" author: "MW" editor_options: chunk_output_type: console date: "`r format(Sys.time(), '%d %B, %Y')`" output: bookdown::html_document2: code_folding: show toc: yes toc_float: collapsed: no params: dataset: 1 --- ```{r setup, include=FAL...
b0b6cb453518b93008fa88a1d574cd6e8bb01b69d24a6ac47d44c2b8aee5e045
R
46,014
1,699
#' @import checkmate #' @importFrom MLmetrics PRAUC #' @include validator.R # For categorical data --------------------------------------------------------- #' @title Mathematical Mode #' #' @description #' Obtain the most frecuent values (mode) with the frequency from a vector. By #' default all values with the gre...
21eb3694dd29e82de0dcd3d2415989523f1aa9157d3e34c9173bfe371ee3c1d1
R
49,935
912
#################################################################################################### # Script to run various enrichments on gene_module_list: # # SCZ, DEGs, DMGs, TWAS, GO, MAGMA, Cell Specificity etc. # # ...
917a69ce5f63b8a3d71c481374f1bd683757ff7339ec86bdf48d0430086e2d04
R
50,107
1,508
#!/bin/env Rscript #### License Notice #### ## # Copyright (c) 2023 Cedars-Sinai Medical Center # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
88f42d3508e80d8bbb957cd2edff29455f8b558a31436d707294444123173484
R
52,421
1,285
```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Validation of scSpace on DLPFC and STARmap spatial transcriptomics data ```{r} library(Seurat) library(ggplot2) library(ggsignif) library(ggforce) library(mclust) library(dplyr) library(cowplot) library(reshape2) library(ggExtra) library(NMI) ``` ...
8fd5e405d2358af30bec276ea0656ea60eb40d91791b68f0498d74d3e4d311f6
R
55,943
1,074
--- title: "Variant_Analysis" author: "MW" editor_options: chunk_output_type: console date: "`r format(Sys.time(), '%d %B, %Y')`" output: bookdown::html_document2: code_folding: show toc: yes toc_float: collapsed: no params: dataset: 1 --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo ...
ba3d08ccbc244a0779ae7f2e64fce30f65621608c0eea0741d21643e0ac98e85
R
57,370
945
#################################################################################################### # Script to run various enrichments on gene_module_list: # # SCZ, DEGs, DMGs, TWAS, GO, MAGMA, Cell Specificity etc. # # ...
f3e88df0ffd9c1767f893951182b7f7cb348f50b32272eafe7cab61524b731ca
R
65,018
759
#################################################################################################### # Script to plot main enrichment plots for SCZ risk modules for all networks # # Script to plot GO, TF and Pathology enrichments for SCZ risk modules for all networks # # "R...
40f1c272df45014557ea8d74f60daf9ec1fbcf945c9cd3abcdba60c958726ac5
R
67,683
1,218
########################################################################################## ## ## ## Functions to combine pipeline runs for individual samples into something more useful ## ## ...
c68dfdc73cd1475bb5763278e9932f2f6725d518e038807beae8a90587f56f1f
R
78,150
1,203
--- title: "Flanking Intron Analysis" author: "MW" editor_options: chunk_output_type: console date: "`r format(Sys.time(), '%d %B, %Y')`" output: bookdown::html_document2: code_folding: show toc: yes toc_float: collapsed: no params: dataset: 1 --- ```{r setup, include=FALSE} knitr::opts_chunk$s...