sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
206a426713c3709ba631d4ad796070972cc6337a529630a48746d73a2ae39943
R
8,544
242
#' Create a future assignment #' #' `x %<-% value` (also known as a "future assignment") and #' `futureAssign("x", value)` create a [Future] that evaluates the expression #' (`value`) and binds it to variable `x` (as a #' \link[base:delayedAssign]{promise}). The expression is evaluated in parallel #' in the background....
cd7740be99f25ab473ddd6b9169a7893c1ed742dde4738c77b712fde4d5591b6
R
8,570
237
#' Create a future #' ## Rescaled to 120x138: convert -geometry 28.7% future-logo.png logo.png #' \if{html}{\figure{logo.png}{options: style='float: right;' alt='logo' width='120'}} #' Creates a future that evaluates an \R expression or #' a future that calls an \R function with a set of arguments. #' How, when, and wh...
f80b7e5eb46b05e11b224dd430a3fabfc589fd0b9d2460b9d05b6202a9c55844
R
8,602
212
########################################################################################## ## Plot cell type enrichment results generated by ASD_CellTypeEnrichmentAnalysis.py ## ## Author: Yu-Han Hsu ########################################################################################## rm(list=ls()) library(ggplo...
a02bda9b9a1a844a639df5565f4f5a6bc094495b81283f38ce803ef02cdda698
R
8,613
239
#' Clean homopolymers indels #' #' Detect indels exist in homopolymers and change the indel to be the same as in the reference genome. #' #' #' #' @param seq_ann_tbl (Required). The haplotype sequence table includes sample_id, marker_id, sequence (haplotype sequence), count (haplotype read counts). #' @param marker_inf...
886ccab4be7a57f38f132a3e5f0b54c30dc6ef520fdd716070d7107f1ea7a4d4
R
8,678
219
# # helper.functions.R # # Copyright (c) 2013-2013 GBIC: Danny Arends, Harm-Jan Westra, Lude Franke and Ritsert C. Jansen # last modified Jul, 2013 # first written Jun, 2013 # read.harmjan.zscores <- function(){ if(file.exists("metaRes.Rdata")){ load("metaRes.Rdata") }else{ metaRes <- read.csv("MetaAnalysi...
437d1edec27bf266445ece55d22b285eb4645f190c0666780d8d7844b285299b
R
8,751
231
########################################################################################## ## Compare and plot co-expression z-scores of bait-interactor pairs subsetted by ## different variables, using co-expression data derived from 4 transcriptomic datasets: ## Stickels2021, Maynard2021, Velmeshev2019, BrainSpan ## #...
c565857bf961dd1f98573e3d3110fa9a4243eb48dc40ba884cd95deee915679d
R
8,754
257
```{r} library(ggplot2) library(gridExtra) library(readxl) library(pheatmap) library(RColorBrewer) library(gridExtra) source("../downstreamer_functions.r") # Read reference datasets ensembl <- read.table("~/Documents/data/reference/ensembl/ensembl_gene_position_b37_biotype.txt",sep="\t", header=T, row.names = 1, stri...
3d908d068c1255b16f9a7f7165945893d90263f6ac624b815b3cc6ed414db4d8
R
8,764
186
.LOG <- function(..., file, print = TRUE) { msg <- paste0(..., "\n") if (print) cat(msg) cat(msg, file = file, append = TRUE) } .get_renamed_colnames <- function(hold_names, userprovided, checkforsingle=c(), filename, N_provided, log.file, warnz=FALSE, warn_for_missing=c(), stop...
1f36354ba44f70eaafbbb1c34f8ffc85283163ce4992cc666de5bba679f14e6d
R
8,771
234
#' Registry of Active Futures #' #' @param where (character string) The name of the registry, which is #' decided by the [FutureBackend]. #' #' @param action (character string) #' If `"add"`, add `future` to registry. #' If `"remove"`, remove `future` to registry. #' If `"contains"`, checks whether `future` is in re...
65b7e77c6bd879d371653d36def52af3052a8755b858449ee682799343d8fd41
R
8,777
226
#!/usr/bin/env Rscript library(data.table) library(simGWAS) library(mvtnorm) library(corpcor) library(GenomicRanges) # Function definitions #--------------------------------------------------------------- # Function to read haplotype block gethap <- function(i) { y=fread(ldd$comm[i], skip="#CHROM") ha <- simGWAS::...
cc3524079e6300be89f8de6b67af32809c610515ba6e24dd64f39094a3c3d62d
R
8,782
301
getCorrelationCN <- function(CNVref, CNVcomp){ #TODO - add the standard output dir as var for the function df_1 <- as.data.frame(approx(CNVcomp$Pos,CNVcomp$Mean, seq(min(CNVref$Pos,CNVcomp$Pos),max(CNVref$Pos,CNVcomp$Pos), by = 1), ties = "ordered")) df_2 <- as.data.frame(approx(CNVref$Pos,CNVref$Mean, seq(m...
203ea25d20524149505bbb7d92fd314047e43f3f9319b9eed9d189ce308b2554
R
8,856
259
########################################################################################## ## Generate volcano and scatter plots for ASD IP-MS datasets ## ## Author: Yu-Han Hsu ########################################################################################## rm(list=ls()) library(readxl) library(ggplot2) lib...
e08a2826fe532ff1e6e129f2cf30b1ace7cba2ef2ea1b04d4c33ae82d3db9d49
R
8,895
170
setwd("C:\\UMCG\\Genetica\\Projects\\Depict2Pgs") library(readr) #saveRDS(hpoMatrix, "../GeneNetwork/Data31995Genes05-12-2017/PCA_01_02_2018/PathwayMatrix/ALL_SOURCES_ALL_FREQUENCIES_phenotype_to_genes.txt_matrix.rds") hpoMatrix <- readRDS("../GeneNetwork/Data31995Genes05-12-2017/PCA_01_02_2018/PathwayMatrix/ALL...
2f12df5d1fde2841ed31eb6fd57efbb6e472d2512c8ff5bff48b5a17e93b3889
R
8,946
246
## -------------------------------------------------------------------------------------------------------------------------------------------------------------------- source("0_SharedCode.R") stopifnot(SharedCode_version == c(11,0)) ## ----------------------------------------------------------------------------...
f8ba0bf5cd19955cfeb25e13d8daef1bafc9cba96ecf3c997ee10b309741d906
R
8,977
287
# Tests for visualization functions # library(SingleR); library(testthat); source("setup.R"); source("test-score-dist.R") # pred1 = no pruned.labels pred1 <- SingleR(test=test, ref=training, labels=training$label, genes="de") # pred2 = 16 pruned labels pred2 <- pred1 pred2$pruned.labels[seq(5,80,5)]<-NA ############...
20bc247be60da83e2fdc9a26e38804f7e0b218936f25cc51f8acb106e1ec1349
R
8,984
226
####################################################### ### Deep Brain Stimulation: When to go directional. ### Figures ### 2022 Katrin Petermann ####################################################### ## grey, green, blue, yellow, pink cols <- c("#677078", "#009870", "#6ca5da", "#f8cf3b", "#ea8698") ################...
e860de0a72bba31f991e23b46f254158171d653315130078421ba637500e4b8a
R
9,020
220
# Usage: Rscript code/ses_simulation/run_simulation.R "iter" "level_2_theta" "0/1" iter <- as.integer(commandArgs(trailingOnly = TRUE)[[1]]) level_2_theta <- as.numeric(commandArgs(trailingOnly = TRUE)[[2]]) only_opt <- as.integer(commandArgs(trailingOnly = TRUE)[[3]]) library(tidyverse) library(galamm) library(lme4) ...
88f4a2b85dc616a0783e6f72f46c852c84d0f927e5090dea5db12b78418747e6
R
9,021
231
# Usage: Rscript code/ses_simulation/run_simulation.R "iter" iter <- as.integer(commandArgs(trailingOnly = TRUE)[[1]]) library(tidyverse) library(memoise) library(gamm4) library(galamm) sim_params <- readRDS("data/ses_model/sim_params.rds") outfile <- file.path( "results/ses_model/simulation/model_fits", paste0("si...
657e0d3c4c055c2d37bfc5c2954f22cbcfa3be4b828f324cf5771a7dc3c1da30
R
9,034
223
####################################################### ### Deep Brain Stimulation: When to go directional. ### Data Cleaning ### 2022 Katrin Petermann ####################################################### cleandata <- function(dd){ # cleaning up the original input file # subsetting the data to raw dd <- su...
3b31a94bad55f7bfe38927904df996048013efaaa66890c4be937d7e7053dcae
R
9,065
124
--- title: "Introduction" output: rmarkdown::html_vignette bibliography: ../inst/REFERENCES.bib link-citations: yes vignette: > %\VignetteIndexEntry{Introduction} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ...
074c4dc95d30cee6d9035548d0460aebce006810c5c68e51f16f0e055faafd2e
R
9,066
235
myplotEigengeneNetworks = function( multiME, setLabels, letterSubPlots = FALSE, Letters = NULL, excludeGrey = TRUE, greyLabel = "grey", plotDendrograms = TRUE, plotHeatmaps = TRUE, setMargins = TRUE, marDendro = NULL, marHeatmap = NULL, colorLabels = TRUE, signed = TRUE, heatmapColors = NULL, pl...
dd11ea16a850ccd05d63c81744411b2296a80e8bcb6887df4c1ef58908373bdc
R
9,078
204
#' geneci #' #' Function to calculate confidence intervals for dN/dS values per gene under the dNdScv model using profile likelihood. To generate a valid dndsout input object for this function, use outmats=T when running dndscv. #' #' @author Inigo Martincorena (Wellcome Sanger Institute) #' @details Martincorena I, et...
f4982c3aa502a51fa965d770493d9b9faedb3374d431be0e4dc123426fe12e8f
R
9,097
236
#!/usr/bin/env Rscript #need pandas pip install in the envrionment if you don't have it #usage ./metacell.R [outputfolder] [data.name] [path to count data] #example ./metacell.R /home3/junhacha/HumanNetv3/Benchmark/MetaCell/Bcell/ BC_metacell_Bcell /home3/junhacha/HumanNetv3/Benchmark/BC_countdata_f_B_cell.tsv #Junha C...
b56e6e24b7a5a2f63f563c7cac173d0bb52133aaf9d81843eaee8be5ebb354f0
R
9,165
327
--- title: "AD Genetics Descriptives" output: html_document date: "`r format(Sys.time(), '%d %B, %Y')`" author: - "Shea Andrews" params: rmd: "report.Rmd" editor_options: chunk_output_type: console --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(dplyr) library(tidyr) library(purrr...
776f1af0383839a1bffd2521f474a39646f4c07b1d0b0abf13ae6cefd7893b2a
R
9,190
302
getInitParameters <- function(segmVect,meanVect,sdVect, truncBoundRight,truncBoundLeft){ truncBoundLeftVect<-c(meanVect[2]*3,meanVect[2]-(3*sdVect[2]),-truncBoundLeft,truncBoundRight,meanVect[4]+(3*sdVect[4])) truncBoundRightVect<-c(meanVect[2]-(3*sdVect[2]),-truncBoundLeft,truncBoundRight,meanVect[4]+(3*sdVect...
afc4c798893bcfbe9445beee9159b3838de220a44d86c65a38c9ad5bb3d91bc8
R
9,208
189
#' Classify cells with SingleR #' #' Assign labels to each cell in a test dataset, using a pre-trained classifier combined with an iterative fine-tuning approach. #' #' @param test A numeric matrix of single-cell expression values where rows are genes and columns are cells. #' Each row should be named with the gene n...
470afe1d953a3754654c8c6f0f67fb03f2cfff61334c77817a9ceaa06ea4f8f5
R
9,246
174
library("optparse") library(ggplot2) library(ggpubr) library(gridExtra) library(matrixStats) library(plyr) library(data.table) # Get command line arguments option_list = list( make_option(c("-c", "--cisQTLs"), type="character", help="eQTLProbesFDR0.05-ProbeLevel.txt.gz of cis-eQTLs", metavar="character...
f9239aaf3efa1952554e8fee28dc54c3a287bc658955bdd8f22b12f99954d3b4
R
9,276
322
#=================================# # 0.Metabolic correlates paper: # # relevant analyses (WGCNA/ORA) # #=================================# ## Set up ---- filepath <- "" setwd(filepath) ### Load libraries ---- library(dplyr) library(openxlsx) library(tidyr) library(WGCNA) ### Load data ---- # Cognition & KNN...
441833653d4294f0e6e360bbf4263666fc7de38c3dc0c6f227798d6b5d419d93
R
9,327
270
#!/usr/bin/env Rscript #this code takes an expression data as an input, runs bigSCale correlation calculaion, and produce a unsorted PCC graph #rds file must be a seurat file #./Rscript.R [-i FULL path to exprs UMI data] [-s sort] [-o 20K_monocytes] #./Rscript.R --help for detail #RunbigSCale -> coverage filter -> cut ...
690b1a88e562387bb1f92bee876aa683c6c3955143a8ca885e81719a8caa20a1
R
9,339
178
#' Calculate starting points to be used in the likelihood function optimisation #' #' @param input.df The resulting data frame from merge_sumstats(), where the effect size, SE, RSID and other columns are present, in addition to columns representing LD scores, weights and local LD structure #' @param trait.names Vector ...
1a7ae5cd9d7a9304fa3ffeff8421055af85ba3f8112838c7db144624b9bd2f46
R
9,345
181
library(ggplot2) library(tidyverse) library(ggpmisc) # library(ggrepel) # library(broom) source("utils_Florian.R") # dir.create(paste(root_dir, "output/Fig10a_10c-PE_analysis/", sep="")) dir.create(paste(root_dir, "Ascending_neuron_screen_analysis_pipeline/output/Fig10a_10c-PE_analysis/plots/", sep="")) possible_crf...
0787987497bb00a911402ee197ea07943e28b7dbd656e64ef483f38fba7ef145
R
9,349
295
#' Pruning function #' #' @param pkn Prior Knowledge Network (read into df) #' @param bool_data (list of) booleanized data #' @param rule "MR" for Majority Rule or "ID" for Inhibition Dominant #' @param functional_only TRUE/FALSE return only the functional edges (from expressed nodes) #' @param nsol number of expected ...
74407d126b53dda1d7071d02b33ba44e9edf53c225e7c1c4fd29c954de9736e6
R
9,395
313
--- title: "Categorization of HCPEP COND based on VAR dynamic metrics - upsampling" author: - name: "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_...
9a38184302feb19567f535e5b49df7ee64d7e771ed9687edd978687bd26e49db
R
9,426
229
#remoter::server(verbose = T, port = 55557, password = "laberkak", sync = T) remoter::client("localhost", port = 55557, password = "laberkak") setwd("/groups/umcg-wijmenga/tmp04/projects/depict2/") setwd("D:\\UMCG\\Genetica\\Projects\\Depict2Pgs") source(paste0("C:\\Users\\patri\\Documents\\GitHub\\systemsgenetics\\...
b134f9716cd939f8695b2d16e50c59f40e5a6b9d07cdd9d92cfb47854f9c53ae
R
9,427
313
--- title: "Categorization of HCPEP COND based on VAR dynamic metrics" author: - name: "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 --...
30143c372356ba7d9d33374e3f455533763f4695dfbe4c9efc32eccdc4ef2213
R
9,445
293
--- title: "Non-parametric anova testing dFC Metrics -HCPEP CON PAP NAP - RAW" 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 --- `...
12330ed19331021af21ee6c6f8daba3f19e48e9912c8aabca780d01066ddd4d1
R
9,447
393
--- title: Effects of spatial separation on vowel discrimination in noise, and it's dependence on Auditory Cortex output: pdf_document: default html_notebook: default --- Version History: * Created: 2021-09-09 Stephen Town * Ported to notebook: 2022-05-19 ```{r} rm(list = ls()) suppressPackageStartupMessages...
c3ac0c760dddce4bbd8b7586a9711cf5ca3273fc2c1c8eedb4788977b9dd96d0
R
9,456
211
#' Plot a heatmap of the markers for a label #' #' Create a heatmap of the log-normalized expression for the most interesting markers of a particular label. #' #' @param results A \link[S4Vectors]{DataFrame} containing the output from \code{\link{SingleR}} or \code{\link{classifySingleR}} on a single reference. #' @par...
7ca2a225675cb7d8a2801def1fb4836043a3e3c9a74d45df522c8a5501fb9d0b
R
9,473
257
#' Analysis script to evaluate the state distribution of a four-node gene circuit #' @param rSet sRACIPE object. RACIPE simulation data. #' @param numModels Numeric. Number of models to be simulated. Default: 10000 #' @return List. plot objects. #' @importFrom webshot webshot #' @import sRACIPE #' @import SummarizedExp...
59f96584f2658d5ac1ba723d6a7f956d807250d4ca087a10b9c7bb31266d6d4d
R
9,481
241
#====================# # 7.PGS Analyses # #====================# ## Set up ---- filepath <- "" setwd(filepath) ### Load libraries ---- library(dplyr) library(magrittr) library(purrr) library(tidyr) ### Load data ---- # Metabolite & outcome imputed data dat <- readRDS("dat/ins_met_nodementia.Rdata") # Metabolite...
ff8efed522bd9a367b2f3d1cb80040ed42b0d6160c505537c5c690c9b2fba221
R
9,491
276
--- title: "Interactions Between Latent and Observed Covariates" output: rmarkdown::html_vignette: fig_width: 6 fig_height: 4 bibliography: ../inst/REFERENCES.bib link-citations: yes vignette: > %\VignetteIndexEntry{Interactions Between Latent and Observed Covariates} %\VignetteEngine{knitr::rmarkdown} ...
5b804ef107b018e57ae1a2cf2128f8e89f52754977d2d3ce6481a455e859184f
R
9,497
275
#' Computes a list of archetype-specific interactomes #' #' @param ace ACTIONet output object #' @param G Baseline network as an adjacency matrix or igraph object. #' If it is NULL, PCNet is loaded as the baseline from SCINET package. #' @param min.edge.weight Used in post-processing to remove insignificant edges #' @p...
67c25ec385a1a4f59f7ad0abc7bc3fc63aafb7697d68c8e7fa4ddd026ae9b249
R
9,520
288
#' Compartment score matrix plot #' #' Display a Hi-C matrix with compartment scores annotated in the margins. #' #' @inheritParams insulation_matrixplot #' @param CS_discovery A \code{CS_discovery} object, as created by the #' \code{\link[GENOVA]{compartment_score}} function. When \code{NULL}, the #' compartment...
c95bc62142ba85b8cf491ee5976961acee7e0ba07dc0d11e1e34dd86aba8da5e
R
9,525
240
rm(list = ls()) print("REPLACEME") Sys.time() load("/work/lulab/Ben/BenStuff/research/projects/oldhome/scripts/networks/rset/rsetlists/output/rsetlistREPLACEME") library(parallel) library(sRACIPE) library(combinat) detectCores() ks.test.self.imp <- function(a,b){ x <- a y <- b n.x <- length(x) n.y <- length(y) ...
7cca0f1aca0f7cde08cc0c071168ec0ade132a565448f3dfbb4919c3366015da
R
9,536
313
--- title: "Categorization of HCPEP COND based on META dynamic metrics" author: - name: "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 -...
c8beb56d80dfccf5d1c121e5fce6e9abbb46ac03c686fe35ca90b745258a9f84
R
9,536
212
library(data.table) library(ggplot2) library("dplyr") library(stringr) library("optparse") library(RColorBrewer) library(tidyr) library("readxl") library(tidyverse) # Get command line arguments option_list = list( make_option(c("-i", "--input"), type="character", default=getwd(), help="path to inpu...
3548b32b1c115868b9a66d562eb417164a9b8507bc727eb98861ea548ba30385
R
9,538
241
########################################################################################## ## Compare SCN2A, SYANK3, SYNGAP1 interactors found in induced neurons (iN) vs brain IPs ## ## Author: Yu-Han Hsu ########################################################################################## rm(list=ls()) library(...
84347cd507f2228a0b2abcdf9813f7bcdc76475a1589e4a7fdbb898e2100e6be
R
9,542
317
#' Add factor variables as data columns #' #' @param load_var The \code{load_var} argument provided to #' \code{\link{galamm}}. #' @param lambda The \code{lambda} argument provided to \code{\link{galamm}}. #' @param factor The \code{factor} argument provided to \code{\link{galamm}}. #' @param data The \code{data} arg...
9ad282279ea8d7b2d23310a3330f0006d60be8efa134fa40a672b16e28210160
R
9,590
243
#conda activate HNv3 library(ACTIONet) library(SCINET) library(igraph) library(SingleCellExperiment) library(Seurat) #load data and convert to sce############################################################################# setwd('/home3/junhacha/HumanNetv3/Velemeshev2019/condition_merged_celltype/') counts <- Seurat...
556b0f6454d7e914ff55cc85810d5c9fe6de274f2daf4317ebcedc39a19f1f4a
R
9,607
220
####################################################### ### Deep Brain Stimulation: When to go directional. ### Prediction Model ### 2022 Katrin Petermann ####################################################### ####################################################### ### Create new Dataframe with labels for prediction...
6c009871056d7aabd41e0a822c7f92b04cae659d8c495e1c4bc1cba261d840a3
R
9,609
238
#' Epilepsy Data #' #' Longitudinal epilepsy data from #' \insertCite{leppikControlledStudyProgabide1987;textual}{galamm}. This #' documentation is based on Chapter 11.3 of #' \insertCite{skrondalGeneralizedLatentVariable2004;textual}{galamm}, where #' the dataset is used. #' #' @srrstats {G5.1} Dataset used to test pa...
5194b0ae2dcdbd5cd7019bef124b732313bce9452538367ab4c10bb6d9424621
R
9,637
224
setwd("D:\\UMCG\\Genetica\\Projects\\Depict2Pgs") library(readr) hpoMatrix <- readRDS("../GeneNetwork/Data31995Genes05-12-2017/PCA_01_02_2018/PathwayMatrix/ALL_SOURCES_ALL_FREQUENCIES_phenotype_to_genes.txt_matrix.rds") #hpoMatrix <- hpoMatrix[,hpoTerm, drop = F] trait <- "height_2018_30124842_hg19" table_tmp...
89a0dbdbef7474f9f0ef2130028ef6aa003991fade42d141b0eca9437cb64e29
R
9,691
317
--- title: "Categorization of HCPEP COND based on VAR dynamic metrics - SVM" author: - name: "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_documen...
f4f4774fe10955bf0cba509bf7c7e04391d1b96c2ca13fdc4cfe3fc64c7521dd
R
9,698
192
--- title: "Optimization" output: rmarkdown::html_vignette: fig_width: 6 fig_height: 4 bibliography: ../inst/REFERENCES.bib link-citations: yes vignette: > %\VignetteIndexEntry{Optimization} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( ...
414e9851e8a3b9e609f1069d2e4ee5b61589065d40a56f2dec45327550f93d32
R
9,699
317
--- title: "Categorization of HCPEP COND based on VAR dynamic metrics - Logistic regression" author: - name: "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 outp...
41dab23a9f10fb5b208a0149924382e2bb5369faa8094eb7ddee1cba50c2b660
R
9,711
291
#' @tags value #' @tags list listenv environment #' @tags sequential multisession multicore library(future) library(listenv) options(future.debug = FALSE) ## https://stat.ethz.ch/pipermail/r-devel/2025-March/083892.html ## Fixed in R-devel (>= 4.6.0) /HB 2025-03-23 attr_on_primitive_is_error <- local({ res <- NA ...
3213570518a82aa33cf3364a036b4586d8bfa56e0a825ea6ce85ac1fbb9989b8
R
9,727
278
```{r} if (basename(getwd()) == "downstreamer_main") {setwd("evaluating_coregulation")} else {setwd("../evaluating_coregulation")} source("../downstreamer_functions.r") source("data/source_olivier.r") library(pROC) library(matrixStats) # Cached 2021-04-16 #datasets <- read.downstreamer.batch(main.downstr...
2921499b4672f1f3cd967275cc50ae20f263579c9b20b78663447ad7372760b0
R
9,745
54
# Discussion **Word limit**: `r wordcountaddin::word_count("04-discussion.Rmd")` of 800. Here, we show that deep learning architectures available in the PyTorch open source machine learning framework [@paszkePyTorchImperativeStyle2019] can classify radiographic views (anatomical location and projection) of horse limb...
7e3ffb1be099dba7bb276fda53f790165b67baf6526ed0833b136fae7a610757
R
9,752
305
library(data.table) source('../config.r') source('../utils.r') source('../read_data.r') extra_path <- file.path('inputs') fname <- 'post_predictive_analysis_all_models_combined_imaging_non_imaging.csv' DT_pred <- assemble_inputs(fname, path1 = extra_path) #' Get point estimates + standard outputs for conditional...
c7f5cd710c6350abaf0d5d16c2e51866205b7580ebccf62c7bf1b59cbcbe8467
R
9,766
247
--- title: "Generalized Linear Mixed Models with Factor Structures" output: rmarkdown::html_vignette: fig_width: 6 fig_height: 4 bibliography: ../inst/REFERENCES.bib link-citations: yes vignette: > %\VignetteIndexEntry{Generalized Linear Mixed Models with Factor Structures} %\VignetteEngine{knitr::rmarkdo...
b08785e8a0f6e5b5755400858d522a7502ab86fb16cec248ab889f97f1d4cb3a
R
9,767
241
```{r} if (basename(getwd()) == "downstreamer_main") {setwd("coregulation_calculations")} else {setwd("../coregulation_calculations")} source("../downstreamer_functions.r") library(GenomicRanges) # Read Ensembl ensembl.file <- "data/ensgR75_protein_coding.txt" ensembl <- read.table(ensembl.file, sep="\t...
42b814723fabb16a022e5ceceef2e51b8369ce034029946d91600143867ea870
R
9,785
211
setwd("C:\\UMCG\\Genetica\\Projects\\Depict2Pgs") library(readr) hpoMatrix <- readRDS("../GeneNetwork/Data31995Genes05-12-2017/PCA_01_02_2018/PathwayMatrix/ALL_SOURCES_ALL_FREQUENCIES_phenotype_to_genes.txt_matrix.rds") hpoTerm = "HP:0000002"#HP:0001511 hpoMatrix <- hpoMatrix[,hpoTerm, drop = F] table_tmp <- rea...
7bd6e2d550c0301f69223bc3c42d3ab634219aaaca5d699f87670f31fd8b953c
R
9,801
124
#' Title #' #' @param input.files - list of data frames, where each data frame contains the summary statistics of a trait to use #' @param trait.names - vector containing the trait names in the order they're found in 'input files' #' @param log.name - the name of the log.file connection to append log descriptions #' @...
763960f541046dcc174322bba5e319f68a546ba8cae39e9e0ef191a80b8a41d3
R
9,852
182
--- output: github_document: fig_width: 6 fig_height: 4 bibliography: inst/REFERENCES.bib link-citations: yes --- <!-- README.md is generated from README.Rmd. Please edit that file --> ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", ...
879a2ac9e70be9bad01be897777e1a8fb9bd2cad242353c9d6a828b00bdc126f
R
9,937
197
#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\\") setwd...
4fe4a298da53a2adba5c46aa0e49444989c4a9d8356a3d520ebbc522c45b171f
R
9,962
252
#!/usr/bin/env Rscript ## ## Differential gene expression with DESeq2. ## ## usage: Rscript --vanilla dge-deseq2.R genome_build genes.gtf counts.txt groups.csv ## # increase output width options(width = 120) # print warnings as they occur options(warn = 1) # java heap size options(java.parameters = "-Xmx8G") # get...
3074314066056ad4d77109f19c270a0bf68291eedb9577e3f34972febd195a2f
R
9,974
327
--- title: "Categorization of HCPEP COND based on VAR NM dynamic metrics" author: - name: "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 ...
24399239b406baab84399e179a41c960855291d60b353d83da066a5e17d558aa
R
10,004
209
.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)) { ...
879702379cece88b1bb2316072e1e3eae18f0b6dcc7c70a9b5b7440d6c556286
R
10,057
281
#====================# # Figure 2 # #====================# ## Set up ---- filepath <- "" setwd(filepath) ### Load libraries ---- library(dplyr) library(ggplot2) library(grid) library(gridExtra) library(gtable) library(ggtext) library(magrittr) library(openxlsx) library(tidyr) ## Figure 2a (module heatmap) ...
e583f85cf1927abcb73f318c51781745d475ad2ee24b46ae4c46f2ba3a316f97
R
10,080
225
library(readxl) library(tidyverse) library(reshape2) library(plyr) library(DescTools) library(abind) library(xlsx) library(ChIPpeakAnno) library(org.Hs.eg.db) setwd("/Users/philippehabets/Dropbox/Git/fMRI-transcriptomics-cortisol/data") ###define functions##############################################################...
21e18f29e4f5bbeaf645150de1dd6410574e6a1429f02208cbb5d4c1a5d3e8a9
R
10,103
177
source("utils_Florian.R") # behaviours <- c("rest", "walking", "antennal_grooming", "eye_grooming", "foreleg_grooming", "hindleg_grooming", "abdominal_grooming", "PER_event", "pushing", "CO2") behaviours <- c("rest", "forward_walking", "backward_walking", "antennal_grooming", "eye_grooming", "foreleg_grooming", "h...
52112958bd9bed0c6392bdb28022affd604093f8bffa76d74a91db3fdd5bf830
R
10,121
222
### Functions to perform the permutation test to validate the identified modules #' Shuffle protein labels #' #' @param FC Named vector with log2FC values. Names should be protein identifiers (e.g. UniProt IDs) #' @param P Named vector with P-values. Names should be protein identifiers (e.g. UniProt IDs). Should...
a77bc5d2473053c262eb079c0b4cc450ffa33ab30780c58900af6e3937f84b8b
R
10,181
344
--- title: "Cross validaiton of categorization of COND based on COBRE in HACEP dynamic metrics" author: - name: "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 o...
5e9d72ed14382b329adf011e6a6889a586837aed7f19b757752ef3218b1f2715
R
10,206
266
########################################################################################## ## Enrichment analysis for IGF2BP1-3 targets ## (1) overlap enrichment between IGF2BP1-3 targets vs. Satterstrom ASD genes ## (2) plot ASD common variant enrichment of IGF2BP1-3 targets (from MAGMA) ## (3) overlap enrichment betw...
1b028c763add84c868155eb1ffd4e4d02339bcabe907f7f34015117ba8600099
R
10,239
224
--- title: "Making Spearman correlation distributions" output: html_notebook --- I needed a way to quantify that the decreased correlation in expression between the combined pair bond and separation time points is "real." So I'm plotting a distribution of Spearman corrleation Rho and pvalues between the true combin...
6cab23a31fb490ad9334c8e3bd461ff1f66cf4f46b6d31e7cb27beb1d41c9929
R
10,260
207
library(gplots) ########### Identify the input arguments args <- commandArgs(trailingOnly = TRUE) jobID <- args[1] stringency <- as.numeric(args[2]) fitMode <- args[3] tempFolder <- paste("./tmp/",jobID,sep="") outputFolder <- paste("./out/",jobID,sep="") ########### read the exon and intron centered normalized rea...
608f134e17d9e2595cee58610e1a8effd89e8d0307511d9b0cd633d35aedf005
R
10,285
309
# code for analyze LC4 neurons and downstream target neurons # There are 3 .R files, run "LC4_startup.R" first. # Then "LC4_proc.R" and "LC4_target_proc.R" can be run independently. # To search for code for all plots, try "PLOT", # for a particular plot, try eg. "Fig.3g" or "ED Fig.5b" # library and cleanup ------...
f6d1de06af2a93157cca5663d72ff46eef125a90692b86004362756e88f0766a
R
10,287
251
#' Plot score distributions #' #' Plot the distribution of assignment scores across all cells assigned to each reference label. #' #' @param results A \link[S4Vectors]{DataFrame} containing the output from \code{\link{SingleR}}, \code{\link{classifySingleR}}, or \code{\link{combineRecomputedResults}}. #' @param show D...
349a943fe4467277845fa45c7fd5b4a2be194af1638ff19f6835770f077acc69
R
10,314
262
#' Optimize amplicon haplotype calling #' #' This function optimize amplicon haplotype calling and generate an amplicon haplotype sequence table. #' #' @param seq_ann_tbl (Required). The amplicon haplotype sequence table includes: sample_id, marker_id, sequence (haplotype sequence), count (read counts), status (haploty...
51183b70c16a8fc3fc43b4d1dda7179a960e2c86fe31bfcba5f7dc3de71feebd
R
10,317
302
--- title: "SPATA2_DMG1_use" author: "junwei 2048" date: "2022/3/30" output: html_document --- ```{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/12SPATA/") library(SPATA2) library(Seurat) library(magrittr) l...
9aef057e4d2800aec7ead9d8e84c3da895e509e0bbfd17160baf4fdb3b71eb01
R
10,352
225
# Title : create_seurat_object.R # Objective : # Created by: mvochteloo # Created on: 22/10/2020 # https://satijalab.org/seurat/v3.0/pbmc3k_tutorial.html # https://satijalab.org/seurat/v3.2/sctransform_vignette.html # install.packages('Seurat') library(Seurat) library(Matrix) library(ggplot2) work_dir <- '/group...
188352fa4b133a522b23b062ef30cf9d037c7b1fd0cd9951806fc7927b9ca4f1
R
10,400
364
# Contacts class ---------------------------------------------------------- #' @export #' @keywords internal print.contacts <- function(x, ...) { res <- attr(x, "res") res <- if (res %% 1e6 == 0) { paste0(res / 1e6, " Mb") } else if (res %% 1e3 == 0) { paste0(res / 1e3, " kb") } else { paste0(res, ...
5fa56ff523a08523504e7626203c3fc2f3c1e8525957af10fc4be17763b2d152
R
10,406
226
# Title : sn_rnaseq_analysis.R # Objective : # Created by: mvochteloo # Created on: 22/10/2020 # https://satijalab.org/seurat/v3.0/pbmc3k_tutorial.html # https://satijalab.org/seurat/v3.2/sctransform_vignette.html # https://www.nature.com/articles/s41586-019-1195-2.pdf # install.packages('Seurat') library(Seurat)...
c50c5660fa61d45995c49ceb8dc6a9d5ab59744d71b45b753e6c6dfd90144f3d
R
10,437
340
--- title: "Categorization of HCPEP COND based on VAR dynamic metrics - Internal validation" author: - name: "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 outp...
03e5429aeadfd2d2e3b9f034db8d76c4337fa6fb7b77cbdbc47182c3eee71fdd
R
10,466
217
--- output: github_document --- <!-- README.md is generated from README.Rmd. Please edit that file --> ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) ``` # scHumanNet Construction of cell-type-specific functional gene net...
88a033725e5dc977e8d5c2d942d8c623a6e8a34bc21e74c7bafa9bb8c3517d18
R
10,506
283
#conda activate HNv3 library(ACTIONet) library(SCINET) library(igraph) library(SingleCellExperiment) library(Seurat) #load data and convert to sce############################################################################# setwd('/home3/junhacha/HumanNetv3/Velemeshev2019/merged_celltype/') counts <- Seurat::Read10X(...
917a2f8cdb6db4d7a1a57fdc4a47579785d157722ff1e14df81498a793b76477
R
10,512
447
--- title: "Computational Scaling" output: rmarkdown::html_vignette: fig_width: 6 fig_height: 4 bibliography: ../inst/REFERENCES.bib link-citations: yes vignette: > %\VignetteIndexEntry{Computational Scaling} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ``` r library(galamm) ``` ...
3ddacadfe60dfc0bf1ffb3497f132563d33c73c4f8d3479051b6a381a5be9c53
R
10,599
301
# Entorhinal Cortex: Final Script # 2020-07-03 # Loading libraries { library(readxl) library(tidyverse) library(ggplot2) library(cowplot) library(scales) } # Writing folder directories (if not available) { dir.create("output") dir.create("output/shapiro") dir.create("output/baseline") dir.create("output/primary") dir...
540741f6ca79aef20a87afa9517bc91935ae4e0881f5f80fc5211d3db697f069
R
10,612
385
#' Set row-associated networks #' @return List of adjacency matrices #' @rdname rowNets #' @export setReplaceMethod("rowNets", "ACTIONetExperiment", function(object, value) { value <- as(value, "SimpleList") object@rowNets <- value validObject(object) object }) #' Set column-associated networks #' @r...
9672a217d695c8a5db9b0ad4731e66b8e23c3f834b56dd18c23856a64b0a0e2a
R
10,651
271
#' Plot a heatmap or profile of insulation scores #' #' Takes pre-calculated insulation scores around a set of genomic locations and #' plots these in a heatmap and/or profile. #' #' @inheritParams call_TAD_insulation #' @param bed A \code{data.frame} with 3 columns in BED format, containing #' genomic locations for ...
1eae1decc4af208576f8f758c9ce5995964595ba7eb80afb57561d6118954b97
R
10,679
301
library(tidyverse) library(patchwork) library(galamm) library(mgcv) options(bitmapType = "cairo") theme_set(theme_bw()) theme_update(panel.grid = element_blank(), strip.background = element_blank()) library(Matrix) mod <- readRDS("results/cognition_model/cognition_model.rds") dat <- readRDS("data/cognitio...
010740fcb4025b61d2ea0e1b2c8c8225117baee3ee082b53fd4b4d0bd7c38b36
R
10,737
339
#' removeSyntheticBaseline Removes a synthetic baseline from a tumour pure matrix #' #' @param count_mtx count matrix #' @param par_cores number of cores for parallel computing. #' #' @return relative matrix #' #' @examples #' removeSyntheticBaseline <- function(count_mtx, par_cores = 20){ d <- parallelDist::pa...
2cb70113be21115c835512c0e5c1863ae3ba4c8d1d49b8a5179bc36f7673902c
R
10,737
295
library(galamm) library(memoise) library(tidyverse) library(gamm4) library(furrr) dat <- readRDS("data/ses_model/dat.rds") base_formula <- "value_z ~ 0 + itemedu_father + itemedu_mother + itemedu_self + itemincome_father + itemincome_mother + itemincome_self + itemgrouphippocampus:(siteousAvanto + siteousPrisma +...
92ce79fe7b09bfcc9b9a63cb92570b4b969deb92cb0df5ddf2456bc9ff5ba0ff
R
10,751
415
--- title: "Computational Scaling" output: rmarkdown::html_vignette: fig_width: 6 fig_height: 4 bibliography: ../inst/REFERENCES.bib link-citations: yes vignette: > %\VignetteIndexEntry{Computational Scaling} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr...
2a96e00fd4d5c4eff69881a1466e998a5b1abc1218bfdc329899a64ffa447dd9
R
10,774
307
rm(list = ls()) library(Biobase) options(stringsAsFactors = FALSE); library(WGCNA); allowWGCNAThreads() library(flashClust); library(gplots) library(RColorBrewer) set.seed(12345) setwd(dirname(rstudioapi::callFun("getActiveDocumentContext")$path)) # use data from prior step or start from load data below eset<-readRD...
ca3f29c9e17dcc8793e684a2c6ab6cee2370f4afe273b7040c5aa106d91270bd
R
10,829
151
# Materials and methods **Word limit**: `r wordcountaddin::word_count("02-materials-and-methods.Rmd")` of 800. ## Study Design The Hong Kong Jockey Club would retrospectively collect and provide pre-import radiographic sets to us. We would select complete sets to use and no further selection criteria would be applie...
651f272d169dad1c0104f2f8112cb735bc0220c9a42342639165037b0122a9e0
R
10,836
233
--- title: "00_Count.C4" output: html_document --- ## Install packages # ```{r} rm(list = ls()) options(stringsAsFactors = FALSE) library(tidyverse) ``` ## Import C4 imputation results # ```{r} c4.imputed <- read.delim("../data/C4.imputed.multethnic.transposed.txt", header = FALSE, na.strings = c("", "NA")) c4.im...
b043d46a15556853a2f9fa0b1cd603e764b48bf298f3cf050d1495679303c3d5
R
10,897
269
options(stringsAsFactors=F) library(tidyverse) library(janitor) library(openxlsx) library(stringr) library(survival) setwd('~/d/sci/src/anle138b/') #### RML STUDY read.xlsx('received/promising/RMLinocGFAPlucDec2014.xlsx', sheet='Master') %>% clean_names() %>% filter(harvest_date=='age to endpoint') %>% mutate(...
fb77deaf9daeeaa5c8dfc13ac171e40f7cd2c6869d6b582723319d15bd047996
R
10,923
311
#' Signals Captured Conditions #' #' Captured conditions that meet the `include` and `exclude` #' requirements are signaled _in the order as they were captured_. #' #' @param future A resolved \link{Future}. #' #' @param include A character string of \link[base:conditions]{condition} #' classes to signal. #' #' @param ...
de78cc44a6b5a570ad98986c5f87ac978f8ad803a7889a7aa6c1cadf6bf2837d
R
10,964
327
rm(list = ls()) set.seed(12345) library(Biobase) options(stringsAsFactors = FALSE); library(WGCNA); allowWGCNAThreads() library(flashClust); library(gplots) library(RColorBrewer) setwd(dirname(rstudioapi::callFun("getActiveDocumentContext")$path)) # use data from prior step or start from load data below eset<-readRD...