sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
7e9e736b8cda75734e1eeb956a0a3e2513df7a244e1760f6652c985f82d6c23e
R
6,119
207
#' @importFrom R6 R6Class #' @importFrom randomForestSRC rfsrc vimp get.mv.vimp #' @include utils.R #' @include model.R #' @include model_helpers.R RandomForestModel <- R6Class( classname = "RandomForestModel", inherit = Model, public = list( # Properties -------------------------------------------------- ...
188addfdbbc1f39437cd543c5fdf63a2156fcf639392ecd0262eef2440d9ba91
R
6,161
126
library(dplyr) library(purrr) library(SummarizedExperiment); library(qs);library(ggplot2); library(gridExtra);library(pryr); library(tibble); library(furrr); library(tidyr); library(readr) library(dplyr); library(data.table); library(grid); library(limma); library(pheatmap); library(RColorBrewer); library(broom); li...
9458c817ede81ac61f7b9587a04942b6277ab60718de04f1747c28609de2798e
R
6,219
168
# Prepare covariates #------------caQTL--------------# options(stringAsFactors = F) outdir = "/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/phenotype/caQTL/" library(DESeq2); library(limma); library(statmod); options(stringsAsFactors=FALSE); ##load vst count number load("/proj/steinlab/projects/R00/ATACpreproce...
4ca1f3e0fa501bd8ec4199fb34fbab0632f0a11d5667381a79eb63a6c41b96b7
R
6,227
269
data(Iris) test_that("Univariate numeric (no tuning)", { model <- generalized_boosted_machine(x_num, y_num, seed = 1, verbose = FALSE) expect_generalized_boosted_machine( model = model, x = x_num, y = y_num, hyperparams = list( trees_number = 100, max_depth = 1, node_size = 10, ...
22855f253b8d2095c544c63d9361645e16bb7d227fa3e16952b63fcbbb1400e0
R
6,248
137
groupEBE <- function(data=NA,idCol="subject",RefCol="reference",deviceCol="device", stage=0,stageLabel="wake",metricsType="avg",CI.type="classic",CI.level=.95,boot.type="basic",boot.R=10000, advancedMetrics=FALSE,doROC=FALSE,digits=2){ # renaming variables colnames(...
d5016b9f3039f6fab283d7885a66eeaf35af9059410e39a80e711076e585d9ea
R
6,255
131
#' get_celltype_mapping #' #' For each cell, returns an estimate of its cell type based on cell type labels of neighbors in Selection graph. #' Requires at least 2 genes for the Selection graph. If cell type mapping for the Selection graph is not possible, returns NULL. #' #' @param sce SingleCellExperiment object co...
18f7e288cae0fe115b0e315cffbcb456eab5066c8ba4cf02da60f950119768dc
R
6,317
150
options(stringsAsFactors = FALSE) library(data.table) ################################################################################## ################################################################################## ### ### Condition mediators for each pair of listed SNP-gene candidates ### ### Author: Nil...
c805171858967673f58a91aa4aceb66abcc9d747833b8d62594153e394978f72
R
6,346
162
#' @include utils.R #' @include validator.R #' @include random_forest_model.R #' @title Fit a Generalized Boosted Machine (GBM) #' #' @templateVar ClassName GeneralizedBoostedMachineModel #' @templateVar XType matrix #' @templateVar YType `vector` #' @templateVar refFunction gbm::gbm.fit() #' #' @description #' `gener...
fc333249f3bc1f35a772142100047303ad380635023f0e02413b60a0396ba744
R
6,402
184
#Statistical analysis (Relationsip between Volume & BodyMass as an example) ##"SurfaceArea", "Main_V", "Main_SA" can be inserted instead of "Volume". ##"SkullVolume" "HeadModel" can be insterted instaed of "BodyMass". setwd("") library(caper) library(smatr) library(maptools) library(phytools) library(geiger) library...
fbb68ae8e77a5970b7932f5676236bce351ab340caf37c6a393104460f7cb8d1
R
6,407
213
library(reshape2) library(ggplot2) source('global.R') Filter_gene <- function( order.gene.df, P.val.cutoff, FC.val.cutoff, gender ) { if(gender =='F'){ logFC <- log2(1/as.numeric(FC.val.cutoff)) gene.sig <- order.gene.df[ order.gene.df[["P.Value"]] <= P.val.cutoff ...
759770243f14f19555eb0cec0e47600992ac5076e7a579f69a422caedaf570e9
R
6,493
139
#################################################################################################### # Script to erform WGCNA to obtain samples match HP-DG networks # # "Cell-population enrichment" studies # # ...
5eac8f85ececc9f318615008e1ff3d2bfb6d3e16a7bb84a4c4fa5cb37a124a44
R
6,521
137
#################################################################################################### # Script to erform WGCNA to obtain samples match HP-DG networks # # "Cell-population enrichment" studies # # ...
9c9b4b721fbb18e56f7c0ae6b13dfe1d1b5e64fb88236ef07ba7262946d9528f
R
6,555
154
--- title: "Custom code for 'Lonely individuals process the world in idiosyncratic ways'" author: "Elisa Baek" date: "9/22/2022" output: html_document --- This is the custom code that was used for the main analyses for the manuscript "Lonely individuals process the world in idiosyncratic ways" under revision at <i>Psy...
476277442b1508de5d7dd49678f2a6a0be1e1464c8243cb47405ed870ae40a99
R
6,585
144
############################################################################################### # Script to Estimate beta for WGCNA via connectivity match # # iPSC data[noKO] # #############################...
7d2b98ddcbc6f2791ea627f432161beb58dc644988dbd6bb684cc22a4c36a0f0
R
6,619
176
# This script generates plots with the results of multivariate modeling insert_head() # data container ----- multi_plots <- list() # globals: lasso coefficients, fits, stats ------ insert_msg('Globals setup') ## variable extraction regex multi_plots$var_regex <- multi_cox$var...
0b30b45b1984b36cdf3c0a0b57e922f27561dd689ca09f072b52b3ddc6e8d6a2
R
6,653
150
############################################################################################### # Script to generate WGCNA networks and save output # # "Regional-coexpression" and "Age-period" studies # # ...
61dddddc03c990802de4a0b963c67e4b3a94aead467a4920542ea1119f257088
R
6,661
148
########################################################################################## ## Significant interactors overlap enrichment Heatmap for each bait IPs ## ## Author: Joshua King To Ching ########################################################################################## library(circlize) library(Com...
8fc096e8fd8a461a3dd7bc5c5170adef6c446684bf84ca41cbda1c4e5102ed98
R
6,670
163
#' plot_coexpression #' #' @param sce SingleCellExperiment object containing gene counts matrix (stored in 'logcounts' assay). #' @param genes Character vector containing gene names to evaluate for co-expression. #' @param title String to be passed as a title. Default title=NULL. #' @param ... Additional arguments to...
7fe83af37d4fa01912dcb7b3486fbca443103ff89502db879fb6b05f9f7f771d
R
6,702
132
library(dplyr) library(purrr) library(SummarizedExperiment); library(qs);library(ggplot2); library(gridExtra);library(pryr); library(tibble); library(furrr); library(tidyr); library(readr) library(dplyr); library(data.table); library(grid); library(limma); library(pheatmap); library(RColorBrewer); library(broom); li...
2fcd23ebc553c1174a50118e18c76587fae2e6f11a9e7b8ababef95c09dc4d1f
R
6,724
180
options(stringAsFactors = F) setwd("/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/trans-eQTL/scripts/model/") files = list.files(path = "/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/trans-eQTL/scripts/model/progenitor", pattern=glob2rx("*.hsq.RData"), full.names = T) pro...
75ac9dade47bdb0a392938623b286f79a4405e60e14bb29a3d0f9f51cbe3fe21
R
6,755
188
# This script contains functions to construct kNN_graphs (designated for the internal use) #' .get_mapping = function(sce , genes = rownames(sce), batch = NULL, n.neigh = 5, nPC = 50 , cosine = F){ if (is.null(batch)){ out = .get_mapping_single_batch(sce , genes = genes, n.neigh = n.neigh, nPC = nPC , cosine = c...
1245513e22931e518cfb3812aff80874e0a40bf84bae594dfbbc840fe8f07c25
R
6,814
171
```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Benckmark scSpace with other methods on 140 simulated datasets ```{r} library(ggplot2) library(ggthemes) library(ggsignif) library(mclust) library(RColorBrewer) ``` ### Load data ```{r} # Ground Truth sim_gt <- readRDS('../data/simulation/sim_grou...
799f2409b339e24d5e0e963941dd93f5214fbb6a85ed226de4175e8777e40e02
R
6,824
152
#!/home/ajl1213/anaconda2/bin/R library(Seurat) library(ggplot2) library(RColorBrewer) library(viridis) seuset <- readRDS('SeuratObjects/PD.SN.snRNA.postAlign.rds') table(seuset@meta.data$orig.ident) table(seuset@meta.data$disease) ##================================================================================...
b75ecd0296ee773b9c33ce41471a76bd9120da9a924458141e655ef4b49c65db
R
6,830
157
############################################################################################### # Script to Perform WGCNA to obtain iPSC network # # iPSC data[noKO] # #############################...
913f18a6bbc77fcf8f2148c76a27707113e77921157f62bf898b960e43df7f2a
R
6,869
201
--- title: "graphAnalyses_Hubs_Matlab_BCT" author: "Sandra Martin" date: "2/8/2022" 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...
d7804129101437e6e1c785e00e3971d4abd904a60b5fad686e66f1d5674f71f2
R
6,876
199
########################################################################################## ## Compare and plot co-expression z-scores between bait-interactor pairs vs. other ## gene pairs, using co-expression data derived from 4 transcriptomic datasets: ## Stickels2021, Maynard2021, Velmeshev2019, BrainSpan ## ## Autho...
d2a21245f6c87cceaec6674cd5939a694fba6b37834dc252ea647f330112c04c
R
6,914
168
########################################################################################## ## ## ## Functions to combine pipeline runs for individual samples into something more useful ## ## ...
898c2fe348fdc79c865a8647ecc02c413a09c96ab9e6fed5c83c8bd5acb6e17a
R
6,986
156
############################################################################################### # Script to Perform WGCNA to obtain iPSC networks # # iPSC data[shuffle/KO] # #############################...
dce6706c635178d3e5403bfcc7ea46bc622af6432e0ce1c7be21feeb8309f995
R
7,016
157
############################################################################################### # Script to estimate beta for WGCNA based on connecitivity match # # "Regional-coexpression" and "Age-period" studies # # ...
4902630aab102d7b04c97668a1fccd183f2a17147198fc94c6e921a87482c524
R
7,079
168
#' @include utils.R #' @include validator.R #' @include bayesian_model_model.R #' @title Fit a Bayesian Generalized Linear Regression Model (BGLR) #' #' @templateVar ClassName BayesianModel #' @templateVar XType list #' @templateVar YType `vector` or `matrix` #' @templateVar refFunction BGLR::BGLR() #' #' @description...
08dd60eaac9f3a5184a9cd5bf56df15854db1e4d77974cc4d2b8fc7acd62ce57
R
7,090
147
#' raw_to_sce #' #' Essentially a parser: raw counts (or log-normalized counts) stored in a file (e.g. .txt) -> SingleCellExperiment object of the right format. #' If raw counts are passed, log-normalization is performed (optional but recommended) and logcounts will be used downstream. #' If no batch is supplied, si...
a4bb94e2cb6c0f483a0fe44733c35322451949d72c81e2c7f1fbf3287ad63d3c
R
7,118
153
############################################################################################### # Script to generate WGCNA networks and save output # # "Regional-coexpression" and "Age-period" studies # # ...
28e9a4b26b18789b83c0ce2c939c9bcfb2089fec94fcaed68e63c17a1eee94c4
R
7,138
184
#' Sci Data Paper Figure 2 #' @import grid #' @import gridExtra #' @import cowplot #' @import ggplot2 #' @import reshape2 #' #' @return figure2.pdf #' #' @export get_fig2=function() { # warnings off w <- getOption("warn") options(warn=-1) if( !exists("fig")) dir.create("fig") # load data into local env...
a738a585f819cd094f3d6ee9fa5bef700b8bb573954d48b5d53d4c2b5b2fc27c
R
7,195
177
options(stringAsFactors = F) library(GenomicRanges) library(data.table) library(rtracklayer) k = commandArgs(trailingOnly=TRUE)[1] bim = fread(paste0("/work/users/n/i/nil1/replication_data_xQTL/mQTLchr",k,"_50Kb.csv"), data.table=F) # liftover the data path = "/proj/steinlab/projects/R00/eQTLanalysis/hg19ToHg38.o...
afa278bb44a84c55d479454177176178bf31bf6f0e1b6c61c0400c7e1853adf4
R
7,202
131
############################################################################################### # Script for additional sliding window plots # # "Sliding window" study # # ...
80dc287a03d80c6708cc9e8f412fd8746250ccfaf947808aca7e2fdb4df1aead
R
7,204
239
#' @importFrom R6 R6Class #' @importFrom nlme fixef #' @include lme4GS.R #' @include model.R #' @include model_helpers.R MixedModel <- R6Class( classname = "MixedModel", inherit = Model, public = list( # Constructor -------------------------------------------------- initialize = function(..., testing_i...
ef273075e9055d3554c694a68510ddb0e3d1eaa3af629f0c32e93a100634992c
R
7,269
199
# Explorative data analysis and comparison of the study features # between the cohorts # tools ------- library(plyr) library(tidyverse) library(trafo) library(soucer) library(exda) library(survival) library(survminer) # container list ---- data_ex <- list() # globals ----- ...
acf3cb1374e3f5785b5a76171d319ae4d44b985bf890d930edef6393eaa40886
R
7,318
173
#------------------------------------------------------------------------------------ # PACKAGES # packages = c("tidyr", "plyr", "dplyr", "reshape2", "seqinr", "ggplot2", "coefplot", "forcats", "tibble", "stringr", "purrr", "gridExtra", "pracma", "hablar") invisible(lapply(packages, library, characte...
4cb2d56b191dbd8295659586fd5e32ca4c66a770ec926a8e1e66a1eaa9ddd2ec
R
7,381
178
#GNT SVM 3 Group Classifier build process: library(minfi) library(ConsensusClusterPlus) library(Rtsne) library(ggplot2) library(caret) library(doParallel) library(MLmetrics) #Read in raw training (450k) and test (EPIC) data and combine into one array baseDir <- getwd() targets <- read.metharray.sheet(baseDir, pattern ...
3b9b1d3ce3aaa6866b7913c0c4fe923fd56cbc7f88bbc0a448b7cb9fa46c45d8
R
7,416
157
############################################################################################### # Script to estimate beta for WGCNA based on connecitivity match # # "Regional-coexpression" and "Age-period" studies # # ...
fd2d89c455d30678e3eb4175bcf15088a498445c2506f12995d547ff813dc490
R
7,425
191
#' @include utils.R #' @include validator.R #' @include random_forest_model.R #' @title Fit a Random Forest Model #' #' @templateVar ClassName RandomForestModel #' @templateVar XType `matrix` #' @templateVar YType `vector` or `data.frame` #' @templateVar refFunction randomForestSRC::rfsrc() #' #' @description #' `rand...
0b1c5a6bd6eb76b1bfa5c76a7da2821317dad9b36a48f48c75738504deeede61
R
7,449
176
#!/home/ajl1213/anaconda2/bin/R library(Seurat) library(Rmagic) library(ggplot2) library(RColorBrewer) library(viridis) seuset <- readRDS('SeuratObjects/PD.SN.snRNA.postAlign.rds') ##======================================================================================================= ## theme: my_theme <- theme(...
749a7bf13c97bcf6a55f6757b511847637670784c7da54b6857081ac397ffac3
R
7,474
132
#' gene_search #' #' Main function of the package - returns optimal library of the selected size. #' #' @param sce SingleCellExperiment object containing gene counts matrix (stored in 'logcounts' assay). #' @param genes_base Character vector specifying base genes to construct first Selection graph. Default=NULL in ca...
56667d6d9e4c7ce67ddc5c11c3a8c284fc4b15a0e60360c6a993dce50dfec50e
R
7,499
229
# Clustering of the participants with the optimal clustering algorithm # chosen by cross-validation and variance fraction comparison insert_head() # container list ----- clust <- list() # parallel backend ------ insert_msg('Parallel backend') plan('multisession') # globals ---...
ce6c6afecde04a6596a5ef8de2b19580809ca6f97e1d06e20ccd7bcbf2938e1a
R
7,587
244
# Random Forest ensemble of the established risk assessment tools # and of the newly developed Elastic Net score insert_head() # container ------ rf_tools <- list() # parallel backend ------- insert_msg('Parallel backend') plan('multisession') # analysis globals ------ i...
2fec5195baec65c256f45b8b8470c7827f28a9709240833fc8058c60318078c8
R
7,588
150
################################################################# # Function for MAGMA enrichment preprocessing # # Annotation and Gene Analysis steps # ################################################################# #### MAGMA enrich preprocess #### MAGMA_enr...
9afedf74d0479c7d1ee3cdc46fc81d838a9fa0e682263491de14f4798b04abdb
R
7,607
215
#' @include utils.R #' @include validator.R #' @include support_vector_machine_model.R #' @title Fit a Support Vector Machine (SVM) #' #' @templateVar ClassName SupportVectorMachineModel #' @templateVar XType matrix #' @templateVar YType `vector` #' @templateVar refFunction e1071::svm() #' #' @description #' `support_...
76d35d539962f19f4f51b177ebaf8b8cd3d908c7693596f4632e2d94b8fb69c3
R
7,627
159
################################################################# # Function for MAGMA enrichment processing # # Gene Level Analysis step # ################################################################# #### MAGMA enrich #### MAGMA_enrich = functio...
df63afd96baf8b9682719cf00a879e0c34c3088f9f837af84cf0a17f23942e8c
R
7,690
212
########################################################################################## ## Generate volcano and scatter plots for SCZ IP-MS datasets ## ## Author: Yu-Han Hsu ########################################################################################## rm(list=ls()) library(readxl) library(ggplot2) lib...
95688571e820f8888333631032a57cc13252dfc5aae02ecd6647bf37aa36e454
R
7,757
220
########################################################################################## ## Generate SCZ social Manhattan plot using PGC3 GWAS data ## ## Author: Yu-Han Hsu ########################################################################################## rm(list=ls()) library(ggplot2) library(dplyr) librar...
075ccd464db27ca2bac2067e4eb804b0325c6fe021f13b8c6e16886a33fb2ef4
R
7,868
229
# Ridge ensemble of the established risk assessment tools insert_head() # container ------ lasso_tools <- list() # parallel backend ------- insert_msg('Parallel backend') plan('multisession') # analysis globals ------ insert_msg('Analysis globals') ## analysis variables l...
31f481d8d4513996c443e502d83f37492a393bafdfd73d4a374c5d344f39440a
R
8,032
204
############################################################################ ######## Figure 2A ########################################################################### library(ggplot2) link = "" raw = read.table(paste0("/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/genotype/caQTL/",type,"/chr",chr,"/chr3_7452...
f2d8f2583551c59d20d7a08e245925ccde5a6e0009cfe8c9a24e3615e553d8ce
R
8,088
189
############################################################################################### # Script to create shoffle/KO networks # # Script to Estimate beta for WGCNA via connectivity match # # ...
d09d4143f6ba283c60f72ef2cf7c2047532abe55c44cbb1686299addbd970879
R
8,102
145
errorMatrix <- function(data=NA,idCol="subject",RefCol="reference",deviceCol="device", staging=TRUE,stages=c(wake=0,light=1,deep=2,REM=3),matrixType="prop", CI.type="classic",CI.level=.95,boot.type="basic",boot.R=10000,digits=2){ # renaming variables colnames(...
69d084fab5ca27d548b39d50a7688cbfbc24be663a64839e562cca5ba40a56fc
R
8,115
125
setwd("C:/GitHub/twin-data-models") rm(list = ls()) # Load libraries library(tidyverse) #### Setup participants datafile #### qtab.participants <- read_delim("non_imaging_phenotypes/participants_restricted.tsv", delim = "\t", na = "n/a") # Recode sex from M/F to sex_female 0/1 qtab.participants <- qtab.participants ...
3eb3c02fd9b8f7ae14724031a9f88d1bc3a7d3cde1b9afbac78d5a0d3cb827bd
R
8,139
279
# custom functions for downstream analysis run_RCTD <- function(sc_meta, sc_data, st_meta, st_data, celltype_index){ ### Create the Reference object cell_types <- as.factor(sc_meta[[celltype_index]]); names(cell_types) <- colnames...
ca2005ac5ea966d16e4f8227572c900a057675648453b5c42908524e61720f89
R
8,173
212
# DESCRIPTION: # The degree to which edges are more dense within communites and more # sparse between communities, which quantifies the segregation of a # weighted network (Chan et al. 2014). # # Inputs: M, Correlation matrix # Ci, Community affiliation vector (e.g., system labels) # Optiona...
6ab63eff9c2f538c2f2db851202b3e5679b08f405da71711823d66eefd534c6e
R
8,227
224
# # ggbiplot.r # # Copyright 2011 Vincent Q. Vu. # # 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 2 # of the License, or (at your option) any later version. # # This...
084d6b61ea662c083b14a1a925c9e7ec49b0f5f0f17581582cf46b8fb47c1b1d
R
8,235
155
#' evaluate_library #' #' For the selected library, returns estimates of the library quality (at cell, gene and/or celltype levels) as a function of number of genes. #' Grid of number of genes is specified with 'library.size_type' and 'n_genes.step' arguments. For each type of stat (cell, gene and/or celltype) return...
306f0e45724dfa2f876ccb612a5362eece0308a499b6dc721588b5ef9e535780
R
8,484
285
#' @importFrom R6 R6Class #' @importFrom pls plsr selectNcomp MSEP RMSEP mvrValstats #' @include utils.R #' @include globals.R #' @include model.R #' @include model_helpers.R PartialLeastSquaresModel <- R6Class( classname = "PartialLeastSquaresModel", inherit = Model, public = list( # Properties -----------...
9bc0b536388e65c4f6b4187da9150261c184a43bee698ab005f6667defc84bcd
R
8,650
321
#' @import dplyr #' @include utils.R #' @include metrics.R #' @include validator.R lm_intercept <- function(x, y) { if (all(is.na(x)) || all(is.na(y))) { return(NaN) } Data <- data.frame(x = x, y = y) return(lm(y ~ x, data = Data)$coefficients[1]) } lm_slope <- function(x, y) { if (all(is.na(x)) || al...
5d50c627df31dd8127e918176e6eabcab79c3b3d30e1d36e3f708bca3ffb9548
R
8,671
266
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...
417caf0ef3c0a91b16cb8087e7673a853b0511b5fb2584db49af1f8f515f9d09
R
8,693
266
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...
c27d2f1da7855b53d2a4d8ff0039bfab885091880c6273e2a6cdd03a947af522
R
8,700
221
############################################################################################### # Script to Perform WGCNA to obtain sliding window networks # # "Sliding window" study # # ...
e3a795463dd2ea80bd9de0df342b271dc2bfabfdb89a2b979919b9fded04051f
R
8,704
273
#' @import dplyr #' @importFrom R6 R6Class #' @include utils.R #' @include bayesian_model.R #' @include gs_cross_evaluator.R #' @include gs_bayesian_predictor_preparator.R GSFastBayesianCrossEvaluator <- R6Class( classname = "GSFastBayesianCrossEvaluator", inherit = GSCrossEvaluator, public = list( # Prope...
61ede35cbee70189c7f3ac16d86652315847ca1bbbc5458d3945d0814537e0fc
R
8,710
241
##################################################### ##################################################### ## Eliminate FP cis-eQTLs ## ## Author Nil Aygun ##################################################### ##################################################### setwd("/proj/steinlab/projects/R00/eQTLanalysis/path_Q...
4b109667a5e830894c45c5229d35bc22e1c09f213f8a6bf3c480e1b40cf13c4b
R
8,847
202
#################################################################################################### # Script to Preprocess samples match rse data for HP-DG # # "Cell-population enrichment" studies # # ...
a4c5879561fda991f5f498c6d8793af514156c938912a7b5c255611d5272c1af
R
8,858
219
############################################################################################### # Script to Perform WGCNA to obtain sliding window networks # # "Sliding window" study # # ...
d7176cf8b9af3ae77decac9addff29ff23c3c56dbd32936d5a36505c96736c52
R
8,912
253
# Characteristic of the participant clusters. The features are compared with tow-tailed T test insert_head() # container list ---- cl_chara <- list() # analysis tables ------ insert_msg('Analysis tables') ## analysis tables cl_chara$analysis_tbl <- clust$clust_obj %>% ma...
53d36b71de27ab1c6e4f99780801f5cb56f6c559d3d873fa9b39580d1ec5d745
R
9,031
244
# ------------------------------------------------------------------------------ # Program: miFunctions.R # Author: Hermine Maes # Date: 02 21 2018 # # Set of my options & functions used in basic twin methodology scripts # Email: hmaes@vcu.edu # -------|---------|---------|---------|---------|---------|-------...
3a338cc5ba719b114363aedbc7c8bda329f538ed3c67aa01c7b2d499b678cedc
R
9,053
264
# Searches of the optimal clustering procedure in the exploration IBK cohort # The cslustering features identified by elastic net regression insert_head() # container list ---- clust_dev <- list() # parallel backend ------ insert_msg('Parallel backend') plan('multisession') # g...
4f6a43931f911e80ae643f79bbb72cf05dd472aaa65b2abd644e156526c632c8
R
9,086
221
########################################################################################## ## Generate plots to show common variant enrichment results of SCZ PPI networks ## (1) MAGMA results ## (2) GRS results ## ## Author: Yu-Han Hsu ####################################################################################...
cda4da11c0106b24848c8bf843c61180b583d9cf674a145cdc170dbdab72fe5a
R
9,195
203
library(data.table) library(DESeq2) library(readxl) library(stringr) samples_DRG_paired <- paste0('SRR853396', c(0:5)) samples_DRG_single <- paste0('SRR85339', c(66:86)) samples_DRG_paired samples_DRG_single # trimming - single----- dir <- '/data/NCATS_ifx/data/dbGaP/DRGs/SRA/FASTQs' samples <- unique(samples_DRG_si...
b83de0ffaf2607b48b334f890d18edcd9d8c86a0dbf2cde7421529783cefd00a
R
9,216
254
# context("Testing calc_Minkowski_distances") 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)) colnam...
9e7de018c208069a2d5939c29dc0d04d7c407a55e4bceb8d51fb626b90ef1c66
R
9,247
210
############################################################################################### # Script to Preprocess tissue rse data "Sliding window" study # # (SCZ samples only) # ################################...
6ffb3a2019953114c866ee5c48120fda5d4a563c08cd79ca247e12369971472d
R
9,271
285
# Motif serach for figure 5, SLC26A7 gene locus setwd("/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/") options(stringsAsFactors = F) library(data.table) library(Biostrings) library(BSgenome.Hsapiens.UCSC.hg38) library(TFBSTools) library(JASPAR2020) # chr8:91180477:GT:G start = 91180477 - 50 end = 91180477 + 5...
0e6f0cfd44a5a6738689c24bf8e6609ede85f1bab503bf56ede53750918e9ce4
R
9,275
281
--- title: "OMST" author: "Sandra Martin" date: "2/2/2022" 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 packages ```{r packages, message...
29b3703b217c7a5c508a1e75633db2bc41bd5d2e2ceaf3f9629dba7b3e889512
R
9,278
183
#' get_gene_prediction_scores #' #' Calculates gene prediction scores by comparing True and Selection k-NN graphs. #' #' @param sce SingleCellExperiment object containing gene counts matrix (stored in 'logcounts' assay). #' @param genes.selection Character vector containing names of selected genes. #' @param genes.al...
d7551f92e40ef86a7f896f7857afb2131a981188e8cee6e79b01bfe662f9f812
R
9,298
168
# Lachlan T Strike # Based on scripts provided by Hermine Maes (https://hermine-maes.squarespace.com) # Direct estimates of variance components #### Load libraries #### library(OpenMx) library(dplyr) source("miFunctions.R") #mxOption(NULL, "Default optimizer", "CSOLNP") # NPSOL SLSQP CSOLNP Univariate_ACE <- function...
dfa57a14a74835d852cbaf37c44352d92327c4a5329cb1382c26fe96b7ad981f
R
9,337
411
data(Iris) test_that("Univariate numeric (no tuning)", { model <- random_forest(x_num, y_num, seed = 1, verbose = FALSE) expect_random_forest( model = model, x = x_num, y = y_num, hyperparams = list(trees_number = 500, node_size = 5), responses = list( y = list(type = RESPONSE_TYPES$CONT...
4782f8ab289cbcc02ef2d3c658c59e6d1983dd620115a2320d97cd6b3c2b71e5
R
9,380
428
data(IrisMatrix) test_that("Univariate numeric (no tuning)", { model <- generalized_linear_model(x_num, y_num, seed = 1, verbose = FALSE) expect_generalized_linear_model( model = model, x = to_matrix(x_num), y = y_num, hyperparams = list(alpha = 1), responses = list( y = list(type = RESP...
47b39e00ee19a1203fda933cf27f75ea9ea6d128b307a0c1e7cb78fd08eb1ad5
R
9,555
160
--- title: "The Combination of Supervised and Unsupervised Learning based Risk Stratification and Phenotyping in Pulmonary Arterial Hypertension - a Long-term Retrospective Multicenter Trial" subtitle: "Figures and Tables" author: "Innsbruck PAH registry" date: "`r format(Sys.time(), '%Y-%m-%d')`" output: bo...
7c5ba4991c4eeed3713039f33847a04344edbd1318bd9cc41792714f9931b3f0
R
9,614
246
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...
3221a335bb5edefb24dba94298451b28d06b7830863727a5484af9f0d460fdaa
R
9,728
196
# Lachlan T Strike # Based on scripts provided by Hermine Maes (https://hermine-maes.squarespace.com) # Univariate model specifying path coefficients and covariates #### Load libraries #### library(OpenMx) library(dplyr) source("miFunctions.R") mxOption(NULL, "Default optimizer", "CSOLNP") # NPSOL SLSQP CSOLNP #### M...
c13d93daff2038d7f2fa14cfdeee375c50c74102b4edc67ab84c02fce7c6faec
R
9,780
222
############################################################################################### # Script to Preprocess tissue rse data "Regional-coexpression" and "Age-period" studies # # (NC samples only) # ################################...
37f433cbe8f6214728e459ca1dcd810b5162b7f73148be45d98d97b8834b7544
R
9,837
290
########################################################################################## ## pLI score enrichment analysis for various SCZ gene sets using KS test ## ## Author: Yu-Han Hsu ########################################################################################## rm(list=ls()) library(genoppi) # for p...
a434d5ecde0a70bac8e6c9b5f683ea83358b765bc9fc5d0eb9719424d908649b
R
9,969
360
#' @include utils.R #' @include globals.R #' @include validator.R # Helpers -------------------------------------------------- l2norm <- function(x) sqrt(sum(x^2)) diagAK_f <- function(dAK1) { AKAK <- dAK1^2 costheta <- dAK1 * AKAK^(-1 / 2) costheta[which(costheta > 1, arr.ind = TRUE)] <- 1 theta <- acos(cos...
42dce16157e3a1ad3ea74e7e82ee919c3fad8de74fe7811478333634dd0e7521
R
10,016
257
--- title: "cPPI Results - Plots" author: "Sandra Martin" date: "10/27/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 packages ```{r...
9a8ad7728a912c15f6c215b3d4e3a623f18491da451e9da7c9790c1ce66cf4ce
R
10,034
341
#' @importFrom R6 R6Class #' @importFrom BGLR BGLR Multitrait #' @include utils.R #' @include model.R #' @include model_helpers.R #' @include validator.R BayesianModel <- R6Class( classname = "BayesianModel", inherit = Model, public = list( # Constructor -------------------------------------------------- ...
c57b3b35eb2d56406d26940333f4e2589e5751c8e846e32dc3578a120bce6ae2
R
10,092
356
#################################################################################################### # Script to test module preservation using WGCNA # # Preserving DLPFC Perinatal modules in DLPFC Prenatal networks # # ...
57a2ffb7add3bda61d7cb09705ee233a2b1f3d6557d677a50dd98b8052b29d3a
R
10,386
270
--- title: "NBS results from Matlab - Plots" author: "Sandra Martin" date: "11/10/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 pa...
c321d77cc5c0140011f6b82a755df2eaf3c2559dbb00e25f00f121d954932ccc
R
10,388
283
options(stringAsFactors = F) library(bmediatR) library(data.table) options(stringAsFactors = F) files = list.files(path = "/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/trans-eQTL/", pattern = glob2rx("FDR25_MAF025_trans.progenitor.big.bmediate.chr*_updated_w_complete.csv"), ...
695224f10b5c3c85a6bfe5f1d24af98ee072181f47a468df814239a8cb925680
R
10,508
285
## PURPOSE: generate unique motifs from miRBase data ## INPUT: miRBase data miRNA.xls ## OUTPUT: fasta file motif_list_species_mirbase_22.fa ## table containing motifs species-miRBase22.tsv require(gdata) require(plyr) require(data.table) base_path<-'C:/Users/Susanna/Documents/NCI/miRBase/' setwd(base_pat...
0425f24410e2228d4f4b5033bfab385f08853cee61a2fbb1adf5f1c47b231719
R
10,637
216
.commonfactorGWAS_main <- function(i, cores, n, S_LD, V_LD, I_LD, beta_SNP, SE_SNP, varSNP, varSNPSE2, GC, coords, k, smooth_check, Model1, toler, estimation, order, utilfuncs=NULL, basemodel=NULL, returnlavmodel=FALSE) { if (!is.null(utilfuncs)) { for (j in names(utilfuncs)) { ...
09dbdab250240121d36a4cd37bc0dde331b706c8b3812325a1bad1e26f189cca
R
10,663
330
# Figure 3A-E, evaluate the features that can be predictive to assume causality options(stringAsFactors = F) # Data input pro = read.csv("/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/bmediate/data/progenitor_bmediatR_results_final.csv") neuro = read.csv("/proj/steinlab/projects/R00/eQTLanalysis/path_QTL/bmedi...
0be7c02ac88ade233ff2d3b6e5a728138d4742c90913019a66ef37c6514ba03c
R
10,672
288
--- title: "geneBasis, mouseEmbryo." author: - Alsu Missarova output: BiocStyle::html_document: toc_float: true code_folding: hide number_sections: yes toc: yes BiocStyle::pdf_document: default package: geneBasisR vignette: > %\VignetteIndexEntry{geneBasis_mouseEmbryo} %\VignetteEngine{knitr...
c9e2e2dbe3f90013d4e3cea54d98dd33f25067efe1c1626ada21cf1246b0e18c
R
10,995
239
# Taisz, Galili et al., (2023) # Figure S1F, H, I # find all downstream cell types of DA1 (Or67d) ORNs that are not ALLNs in the hemibrain dataset # ORN cell type and hemisphere annotation from Schlegel, Bates et al., (2021) # see https://github.com/natverse/hemibrainr on how to access hemibrain data # ----------------...
14fd78b4a5037b22e54d4d3b842f83812bf94bb576df92c171708883acb3512e
R
11,098
221
#' @importFrom GPfit predict.GP #' @title Bayesian Optimization #' #' @description #' Bayesian Optimization of Hyperparameters. #' #' @param FUN The function to be maximized. This Function should return a named list with 2 components. #' The first component "Score" should be the metrics to be maximized, and the seco...
64ffd5dba74f9a02dc4f36f3869ddc2b24b7dcd7c3a212d1749b05e2fde18675
R
11,099
224
#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 4: # Linear model of log(Percent.Newly.Synthesized) by timepoints and cohorts and their interaction # # OUTPUT:...
2f5f0d971e2d2debc78a9e4f417c282df5c561af16743e8abe7559214c7915c0
R
11,259
256
# This script reads and clears data from the PAH Innsbruck study # libraries ----- library(plyr) library(tidyverse) library(readxl) library(stringi) library(survival) library(soucer) library(figur) library(trafo) source_all('./tools/project_tools.R', message = TRUE, ...