sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
fd1c2fa0651f58aef871b12f2ef001b701ec61e07ab3c79589c285cb794b606a
R
5,467
146
#' Joint Principal Trend Analysis (JPTA) of two high-dimensional longitudinal datasets. #' @param x A N * P * T longitudinal data tensor. N is the number of subjects, P is the number of features, T is the number of time points. #' @param y A N * Q * T longitudinal data tensor. Q is the number of features. #' @param ni...
9b390ea9dbbb20d51f8280d76df4cd62474bcde7699375211a4b1ebaf8f0c42f
R
5,477
146
#!/usr/bin/env Rscript source(here::here("src/shared/R-helpers/get_settings.R")) library("GeneTonic") library("topGO") library(DESeq2) library(pcaExplorer) library(dplyr) library("ggplot2") run_gene_tonic = function(de_tab, female_dds, cat, fname, organism, foldchange, padj) { rownames(de_tab) = de_tab$gene_id ...
0f331a9cf6d6205ca016cc9babf6206c3767bf5967b4e4605edcb3f3d87f9f72
R
5,479
77
| | SCD (N=125) | Control (N=197) | p value| |:---------------------------|:-------------:|:---------------:|-------:| |**lh_parahippocampal** | | | 0.664| |   N-Miss | 0 | 1 | | |   Mea...
67b77557a7158d71797aea064e97bc810ca71d605ee420c6d1eaa5b556095e1a
R
5,491
76
#' @title Hierarchical Bayesian Modeling of Decision-Making Tasks #' #' @name hBayesDM-package #' @aliases hBayesDM hBayesDM-package #' #' @import methods #' #' @description #' Fit an array of decision-making tasks with computational models in a hierarchical Bayesian framework. Can perform hierarchical Bayesian analysi...
dec6c50a94d82fe43cd60f4667163d552b0d17e9466ebfd095dcb649dd848204
R
5,491
149
##' @title Parse metadata ##' @description Parse metadata either by providing the \emph{.json} ##' file that is downloaded from GDC cart or by parse metadata ##' automatically by providing the projct id and data type ##' @param metafile metadata file in \code{.json} format download ##' from GDC cart. If ...
66ec7d0780fd8b9f7038b0ad8515ad48af8efbc69b99cfaedc44007fdccb3d5d
R
5,505
204
.libPaths(c("/maps/projects/scarball/people/chg306/R_libs", "/opt/software/R/4.2.2/lib64/R/library", "/maps/projects/scarball/apps/Modules/software/R-packages/4.2.2")) library(limma) library(edgeR) library(DESeq2) library(magrittr) library(tidyverse) library(Cairo) library(MetabolAnalyze) libra...
a96bcfc8171fcd5770231f06d6f7aba9d6c31efe1967c753e62316bb5e26e868
R
5,513
132
source('~/scripts/single_cell/atac.R') source('~/scripts/single_cell/wrapper.R') source('~/scripts/single_cell/markers.R') source('~/scripts/single_cell/celltype.R') source('~/scripts/single_cell/de.R') source('~/scripts/single_cell/graphs.R') source('~/scripts/grn/models.R') setwd('~/projects/cutntag/') marks <- re...
89dfa1e5cc51e5fc411f3a38307755f85268a3227acf317c785c0aa0be27accc
R
5,516
144
#'################################################################################# #'################################################################################# #' Evaluate correlation between GSE179848 measurements and scores #'################################################################################# #'...
77e6866db76f6e3dee58b753a5c026e7728581267ff88b87607c753eebab2466
R
5,528
133
library(lme4) library(multcomp) library(BayesFactor) library(lmeresampler) library(svglite) library(ggplot2) library(readxl) # ----------------------------------------------------- # Load in the data # ----------------------------------------------------- data <- read_excel("/Users/jkosnoff/Library/CloudStorage/Box-Bo...
c0dd31b0bba0c59c821a69e4792277b1fd8a1d9c4ad4fa427c621fe8eaa84455
R
5,535
161
# setup GRanges gr1 <- GenomicRanges::GRanges( seqnames = "1", strand = rep("+", 2), ranges = IRanges::IRanges( start = c(1, 501), end = c(100, 600) ) ) gr2 <- GenomicRanges::GRanges( seqnames = "1", strand = rep("+", 3), ranges = IRanges::IRanges( start = c(1, 201, 501), ...
e1065555b7df6678ee4cff9157018229e6a3984fa7108ff22d3730b530a9e44b
R
5,540
163
#' Imputation of quadratic terms #' #' Imputes incomplete variable that appears as both #' main effect and quadratic effect in the complete-data model. #' #' @aliases mice.impute.quadratic quadratic #' @inheritParams mice.impute.pmm #' @param quad.outcome The name of the outcome in the quadratic analysis as a #' charac...
75732cbcf7e3020ca142a44e6ee385795b584132b7fc064cbea79fee6953bed8
R
5,545
95
#!/usr/bin/Rscript library(tidyr) library(dplyr) library(readr) library(purrr) library(tibble) library(stringr) library(forcats) library(ggplot2) gtf_new_from_known_start <- read_tsv("../../data/processed/other/meme_annotation/new_exon_START_boundaries_from_new_transcripts_in_known_genes.tsv", col_types = "cccddccci...
48167a69c25642ac98e9bb078488eb6456a863b367704c981588ba3683b7c521
R
5,549
148
#'################################################################################# #'################################################################################# #' Representativity of GSAS #'################################################################################# #'##################################...
2339576355f1b77310c77b0d5b8cc5af44e920a78f1e642970eda47e797b8781
R
5,567
130
##' @title Kaplan Meier plot ##' @description Plot Kaplan Meier survival curve ##' @param gene an Ensembl gene id ##' @param rna.expr \code{\link[limma]{voom}} transformed expression data ##' @param metadata metadata parsed from \code{\link{gdcParseMetadata}} ##' @param sep a character string specifying which point sho...
f0630382aa57fc7f80551b81d3c36ef0cacf5b960aa5a082e3be6f2330969063
R
5,574
192
#' Imputation by a two-level normal model #' #' Imputes univariate missing data using a two-level normal model #' #' Implements the Gibbs sampler for the linear multilevel model with #' heterogeneous with-class variance (Kasim and Raudenbush, 1998). Imputations #' are drawn as an extra step to the algorithm. For simula...
25aae8b1e092bc99870fdfc5c93e2e35526fd8a1931fcc2c59a6b114b1a7945c
R
5,604
188
source('~/scripts/single_cell/de.R') source('~/scripts/single_cell/atac.R') source('~/scripts/perturbator/de.R') source('~/scripts/perturbator/enrichment.R') library(Pando) library(SeuratWrappers) library(harmony) library(future) plan('multiprocess', workers=36) filter <- dplyr::filter select <- dplyr::select setwd...
9b3dd87f27d518cb80bd14edfe9ceccee182ddbfe8462e76f4e012a60da1ad33
R
5,617
204
#' Check whether object is a data tree #' #' @param x Object to test for tree structure #' #' @return (logical scalar) TRUE or FALSE isTree <- function(x){ any(class(x) == "Node") & any(class(x) == "R6") } parse_abi_hierarchy <- function(abi){ abi_list <- fromJSON(file = abi)$msg[[1]] tree <- recursive_b...
053f882f10c7f4ead0f2a4522f10498715a6b89866bcba92d04746538d25e624
R
5,629
123
#!/usr/bin/env Rscript library('clusterProfiler') library('ggplot2') library(tibble) ############ PREPARATIONS ############ source(here::here("src/shared/R-helpers/get_settings.R")) source(here::here("src/shared/R-helpers/memoise_decorator.R")) source(here::here("src/shared/R-helpers/enrichGO_memoise.R")) settings <...
f7243c138e22f001e3e0e35cddc1fae95a1e1e17df8dad24635862e619d8cb30
R
5,634
162
# package ----------------------------------------------------------------- library(dplyr) library(lme4) library(MuMIn) library(GWmodel) library(car) # data set ---------------------------------------------------------------- data_output_2 = data_output %>% filter(!is.na(Volume)) # corr --------------...
2fedbd499606afd248e89348c9c8ac66364b8625f93ec321ce6b6daa8d5c262c
R
5,642
135
## This script calculates model statistics across N folds. suppressPackageStartupMessages({ library(ggpubr) library(dplyr) }) save_plot <- function(p, fn, w, h){ for(ext in c(".pdf", ".png", ".svg")){ ggsave(filename=paste0(fn,ext), plot=p, width=w, height=h) } } extract_rank <- function(...
1af5dcaac588b4560ba9e4542e6bd198237657d1515fd9e92a4d1078ef263f38
R
5,662
152
--- title: "3CT" output: word_document: default html_document: default pdf_document: default date: '2022-12-02' --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load data ```{r} setwd("~/Documents/Systemic ESYT1 project locomotion, behavior, survival, anatomical data/Behavioral paradigms d...
7a01a6ae2c59feb28c3548daa0450dc8c8f3d4efceb0eecd60019f6e9f9a6eb4
R
5,663
152
--- title: "3CT" output: word_document: default html_document: default pdf_document: default date: '2022-12-02' --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load data ```{r} setwd("~/Documents/Systemic ESYT1 project locomotion, behavior, survival, anatomical data/Behavioral paradigms ...
99370f264cb1a1c30fc2838de76720f2a58521762b9a2ae668de2c3737006064
R
5,668
135
######################## # FindAllMarkers + ClusterGVis visualization + GO enrichment ######################## library(Seurat) library(dplyr) library(ggplot2) suppressPackageStartupMessages(library(ClusterGVis)) if (!require("ComplexHeatmap", quietly = TRUE)) BiocManager::install("ComplexHeatmap") library(ComplexHeat...
c706ef0219ce7d57cac9edd314aa2131469fb79013a6fb65f52b12e0a070bdc2
R
5,672
166
# GTEx analysis # setup-------------------------------------------------------------------------------- rm(list = ls()) ; gc() ; gc() set.seed(1234) wdir <- 'set your working directory' setwd(wdir) save.path <- 'object folder path' # load library easypackages::libraries(c('recount3','edgeR','tidyverse','org.Hs.eg.db...
ea60851b60c8319bda7edb435fb2ec50de1c4f88668d3998179c695a7eb39531
R
5,673
126
#!/usr/bin/env Rscript ############################### ## TO BE RUN AFTER emma_model.R ############################### ##load data e.keep = readRDS('filtered_expression_matrix.rds') keep.genes = readRDS('keep_genes.rds') meta = readRDS('cayo_bulkbrain_combined_metadata.rds') meta = meta[order(match(meta$LID, colnam...
93bcfac4febd1331d23be7fcd24d09f4d92202b5e30120222bef671472535c09
R
5,710
170
#' Imputation by random forests #' #' Imputes univariate missing data using random forests. #' #' @aliases mice.impute.rf #' @inheritParams mice.impute.pmm #' @param ntree The number of trees to grow. The default is 10. #' @param rfPackage A single string specifying the backend for estimating the #' random forest. The ...
383380b48525699b3e76f36aec965d4b9f2af8a844bf0020554f59b9bc9785c4
R
5,711
183
### modified from ComplexHeatmap packages ### see https://github.com/jokergoo/ComplexHeatmap/blob/master/R/grid.dendrogram.R for details. #' @importFrom stats as.dendrogram as.hclust is.leaf nobs order.dendrogram #' @noRd dend_tbl <- function(dend, bcols = NULL, direction = "to...
4424641e5eb314bdebe3460cd440552f37be1bc5aeb00a2c8ad0786ea9877b30
R
5,717
138
#4 select ROIs # Setup--------------------------------------------------------------- rm(list = ls()) ; gc() ; gc() set.seed(1234) wdir <- 'set your working directory' setwd(wdir) save.path <- 'object folder path' # load library easypackages::libraries(c('Seurat','tidyverse','SPATA2')) # create SPATA object--------...
a526665caa90eba5ecb951407d9c2145b4be6b5a4ebef2d2c7eab317688dc623
R
5,718
155
#! /usr/local/bin/Rscript #'################################################################################# #'################################################################################# #' Run methylation QC data #' This code performs quality control to methylation data. #' Input: #' - path to config file wi...
2b4695571128ef8f4245a66277c4da208ff920cbcbac8d15877fe91aef32c2b7
R
5,742
132
#### Code for plotting volcano plot for Lam, Ndayisaba et al 2024 Neuron FIGURE 8C showing depletion of essential genes in 3K-sfGFP sample #### Note that the 3 genotypes used in the U2OS CRISPR/Cas9 genome-wide screen were: SNCA-3K-sfGFP (referred to as "E3K" here), SNCA-WT-sfGFP (referred to as "WT"), and sfGFP contro...
eca80f7746adcfe52ae05d124faa402baa16d1596339c14ac160f1674829aa0b
R
5,743
167
################################################### # ~~~ FramebyFrame package ~~~ # functions to import RAWs.csv # Francois Kroll 2022 # francois@kroll.be ################################################### # function averageFramerate(...) ------------------------------------------ #' Calculates average framerate ...
318f6c8a50c77e3fc821d209f795413e91ad2d0bb24dcf1abe96a29bd2c02ecf
R
5,749
177
#!/usr/bin/env Rscript source(here::here("src/shared/R-helpers/get_settings.R")) source(here::here("src/shared/R-helpers/gseGO_memoise.R")) source(here::here("src/shared/R-helpers/gseKEGG_memoise.R")) suppressPackageStartupMessages({ library("AnnotationDbi") library("dplyr") library("purrr") library("ggplot2...
a6d9760958309b730be34677128caf14a89ea58ac4681c26384b2707e33dc6cd
R
5,765
139
#'################################################################################# #'################################################################################# #' Explore gene sets included in the model #'################################################################################# #'###################...
315efe382d028b1ffd1ab7623ea5ef154a6163bdd40d4e7f86da3756493ae271
R
5,780
91
library(ggpubr) library(ggplot2) library(ggsci) library(ggsignif) library(gghalves) library(tidyverse) # Donor1 new clone fraction pred_donor1 = read.table('donor1/pred.tsv', header=TRUE, sep='\t') test_donor1 = read.table('donor1/test.tsv', header=TRUE, sep='\t') Hetero_donor1 = left_join(test_donor1, pred_donor1, by...
a83d9869dc3f2a47daba58f911258a92935d923dcb090a2df1cbddb7d1bc4c82
R
5,794
152
--- title: "Compare Enrichement Results" author: "Emma Jones" date: "2023-12-13" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## Compare Enrichment results across DGE, DTE, and DTU. The purpose of this script is to get real statistics and values for directly comparing ...
f3a1a00be08beec2804002078b426d5ac1084b326120b6c313745823e039fc2e
R
5,798
151
options(warn=-1) suppressPackageStartupMessages({ library(tidyverse) library(RColorBrewer) library(optparse) }) option_list = list( make_option(c("-a", "--abundance"), type="character", default=NULL, help="input abundance file: gene_normalised_abundance.txt or filteres_transcripts.txt [REQUIRED] [default= %de...
c297e101206062b43d1e01ad4c5a087a6e3dfd5caf0049d64d8afdacb7c016a1
R
5,813
88
#### Code for plotting graph in Lam, Ndayisaba et al 2024 Neuron, Figure S7F #### Plotting total neuritic inclusion length per well (microns) across 4 conditions: #### (1) pi-N A53T-sfGFP (no PFFs) #### (2) pi-N A53T-sfGFP (with PFFs) #### (3) pi-N deltaNAC-sfGFP (no PFFs) ("NoNAC) #### (4) pi-N deltaNAC-sfGFP (with P...
00f97c2a04072125bc7ddb99a8023c1862c3ab3497a464a5e065e05f926f6db4
R
5,817
165
## Differential expression with limma (permutation, subsampling) suppressPackageStartupMessages({ library(SummarizedExperiment) library(optparse) library(dplyr) library(limma) library(edgeR) library(here) library(sva) }) ## Functions extract_de <- function(contrast, label, efit, seed_int)...
bae7a624c111c2aa5f9eab4d16172f2cb14b4b35a1c2270f3a986e2d99d2e8b9
R
5,822
132
#!/usr/bin/env Rscript # --------------------------------------------------------------- # 差异基因 TPM 矩阵,分肠段 edgeR 差异分析 # 比较组: (1) D30C vs D0 (2) D30T vs D30C # 统计各肠段上/下调基因数,绘制双向柱形图: # - x 轴上方 = 上调,下方 = 下调 # - 颜色区分比较组(红 = D30C vs D0,蓝 = D30T vs D30C) # - 上方 = 上调,下方 = 下调;坐标轴置于底层,无柱边框 # 输出: # 1) DEG_summary_by_se...
3a697143fc322747b07671b52e216447ce4e35ab96f1f0afa42bd179dc693981
R
5,823
165
## Differential expression with limma (permutation, subsampling) suppressPackageStartupMessages({ library(SummarizedExperiment) library(optparse) library(dplyr) library(limma) library(edgeR) library(here) library(sva) }) ## Functions extract_de <- function(contrast, label, efit, seed_int)...
cbf7104141d45c7d0cf2c1a017aed71b78fee2079191995ff4db180d9a435c06
R
5,823
165
## Differential expression with limma (permutation, subsampling) suppressPackageStartupMessages({ library(SummarizedExperiment) library(optparse) library(dplyr) library(limma) library(edgeR) library(here) library(sva) }) ## Functions extract_de <- function(contrast, label, efit, seed_int)...
81bfb412b52ea8eebfb44c9605ff9f529c9e9f2365ea459503c384fcca596765
R
5,826
178
# set working directory setwd("~/Desktop") maindir <- getwd() datadir <- file.path("~/Desktop/") # load packages library("readxl") library("ggplot2") library("ggpubr") library("reshape2") library("emmeans") library("hrbrthemes") library("umx") library("interactions") library("car") library("ggscatter") # import data:...
2e1acb40e6a4c4ef57c02cb0dff790b0499ba9298fb8f648f9b1e10aac754849
R
5,850
177
install.packages("gdata") install.packages("lme4") install.packages("ggplot2") install.packages("reshape2") install.packages("LMERConvenienceFunctions") install.packages("parallel") install.packages("viridis") install.packages("readr") install.packages("lmerTest") install.packages("multcomp") install.packages("tidyr") ...
e025c9a0d3ea6c1cf05ca775a2167f39e5b738e1ab213092c0099254de9adb2a
R
5,882
143
#' Quick selection of predictors from the data #' #' Selects predictors according to simple statistics #' #' This function creates a predictor matrix using the variable selection #' procedure described in Van Buuren et al.~(1999, p.~687--688). The function is #' designed to aid in setting up a good imputation model for...
4901a756a5d15a678a365af02153c614a3536a7c18bef88c419c272a2953d4fe
R
5,896
169
#' Plot Correlation Matrix Quickly #' @description quickcor is convenient wrapper for creating a number of different types #' of correlation matrix plots because of adding some extra settings by default. #' @param x,y matrix, data frame or quickcor object in \code{print()}. #' @param mapping NULL (default) or a list of...
06485ce91d5a307c16139cd0e777b7364cde5e2ee17c6f625700a9a058a71496
R
5,897
146
##' @title Plots for enrichment analysis ##' @description Bar plot and bubble plot for GO, KEGG, ##' and DO functional enrichment analysis ##' @param enrichment a dataframe generated from ##' \code{\link{gdcEnrichAnalysis}} ##' @param type type of the plot, should be one of \code{'bar'} ##' and \code{'bu...
12d9c8e0b4e8ad2534150d1cb87583e0fbd826d08cdcd8bd35b35933361cf3c0
R
5,905
231
# Load libraries ---------------------------------------------------------- # as ggtranscript is in development during the creation of this script # i have included the code to install the exact version using (0.99.2) # based on the commit SHA # devtools::install_github("dzhang32/ggtranscript@88d23b43b42de3e49a67dc81...
02738c1b2319cb52cb639098c327fa488f8ffa0c3eaedeb142b3872e3e5e3abf
R
5,909
155
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 Bisection <- function(egvalues, q, xmin, xmax) { .Call(`_STAAR_Bisection`, egvalues, q, xmin, xmax) } Bisection_Binary_SPA <- function(muhat, G, q, xmin, xmax, tol) { .Call(`_STAAR_Bis...
149ca896a09f634af42006fcbf4ed69087e8c1b92264c06cbc953d199b16342d
R
5,925
168
#' Matrix of Correlations, P-values and confidence intervals #' @description \code{correlate} uses \code{cor} to find the correlations and use \code{cor.test} to find #' the p values, confidence intervals for all possible pairs of columns ofmatrix. #' @param x,y a matrix object or NULL. #' @param cor.test logical, if T...
415a2065fad3b7cbab5e77429ca39f5da2e29c88bd71c8efec8e29b176bfd496
R
5,930
216
#' \code{mipo}: Multiple imputation pooled object #' #' The \code{mipo} object contains the results of the pooling step. #' The function \code{\link{pool}} generates an object of class \code{mipo}. #' #' @param x An object of class \code{mipo} #' @param object An object of class \code{mipo} #' @param mira.obj An object...
8d7ecefad6276cdda4306db64cfa07663d90c20414255af8f5a9fb6699366d43
R
5,943
236
# Load libraries ---------------------------------------------------------- # as ggtranscript is in development during the creation of this script # i have included the code to install the exact version using (0.99.2) # based on the commit SHA # devtools::install_github("dzhang32/ggtranscript@88d23b43b42de3e49a67dc81...
4b2d3491b9306ed17607bc34caee7670b99974f469d214b25ff57b3a1a713b27
R
5,954
156
--- title: "NOR" output: word_document: default html_document: default pdf_document: default date: '2022-12-05' --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load data ```{r} setwd("~/Documents/Systemic ESYT1 project locomotion, behavior, survival, anatomical data/Behavioral paradigms d...
e1bccfafa1d8e2a02c441236d8caeb6a4804ecb610de1ba055007c54e1a4a336
R
5,955
156
--- title: "NOR" output: word_document: default html_document: default pdf_document: default date: '2022-12-05' --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load data ```{r} setwd("~/Documents/Systemic ESYT1 project locomotion, behavior, survival, anatomical data/Behavioral paradigms d...
5c0dffa596f5e503ad968eecaefe1432bf1d91b0fa04c4a70a9c359844876f55
R
5,956
165
##Bulk rnaseq data propcessing ##ROSMAP setwd('F:/deconbench/rosmap/raw/bulk') load('ROSMAP_rawcounts_38704genes.RData')##raw count matrix and metadata tmp<-read.table('rosmap_sn_ihc_sample.txt',header=T,sep='\t') mrna<-bulk[,bulkmeta$projid%in%tmp$projID] mrmeta<-bulkmeta[bulkmeta$projid%in%tmp$projID,] ...
f0241b6bd5b69b58b834a072e50159c35594bcb97eaf1d6161dd2c72efcf0ecf
R
5,973
172
## This script analyzsis gene set enrichment with permutation suppressPackageStartupMessages({ library(DOSE) library(here) library(dplyr) library(biomaRt) library(org.Hs.eg.db) library(clusterProfiler) }) get_biomart <- function(){ ensembl <- useMart("ensembl", dataset = "hsapiens_gene_ense...
38cdede659ec9ae5c19a7a696d0aa876a99beb7d15af31d6f9dc13a366b5bbd9
R
5,984
153
library(limma) library(edgeR) library(tidyr) library(reshape2) library(plyr) library(dplyr) library(grid) library(gridExtra) current = getwd() folder = "2_calculate_residuals_and_DE_analyses" setwd(current) system(paste0("mkdir -p inputs/",folder,"/corrected_expression/")) system(paste0("mkdir -p outputs/",folder,"/2_...
c2dae5fa7c5d27e855fa04e8aed3ab7fef1898a7ec9211c1882a1d172818d8c2
R
6,010
230
#' Multivariate Imputation by Chained Equations (Iteration Step) #' #' Takes a \code{mids} object, performs \code{maxit} iterations and #' produces a new object of class \code{"mids"}. #' #' @details #' This function enables the user to split up the computations of the Gibbs #' sampler into smaller parts. This is usefu...
5a992aacda8427d87fd60739fa16b9e0b0a3a3b8fd175544c16dfbd2a7e05e5d
R
6,021
241
--- title: "DESEq2 within brain region by sex" author: "Emma Jones" date: "2023-05-30" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## DESeq across and within brain region DE across sexes The purpose of this script is to compare expression at the gene and transcript le...
efb855be3e63965cedc581867aa1514d9956e7fe52178791df2a51e5ff45d8a3
R
6,050
152
#!/usr/bin/env Rscript source(here::here("src/shared/R-helpers/get_settings.R")) suppressPackageStartupMessages({ library("dplyr") library("tidyr") library("readr") library("tibble") library("ggplot2") requireNamespace("forcats") library("preprocessCore") library("protti") # framework used for QC plot...
11daa99dd678854ab9fcf9afea39faaee07eda4855a6ccf4baa05051e42c185f
R
6,058
139
--- title: "Figure 5. DEG counts across intestinal segments (bulk RNA-seq, edgeR)." date: "2026/9/16" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) # Clean workspace rm(list=ls()) # Load setting and functions source("../script/stat_plot_functions.R") # Set output directory ou...
385a29186ca461571cf6675111cc5e55752ef5f438bfacfe0c1d1df6cf4886a1
R
6,078
127
##################################################################################################################################### ################## R-script to read YAML DTS dataset files, visualize and statistically evaluate data. Reports in HTML ############## ####################################################...
f8cca72d6a86332be2dd7f0768c815f8b1082f809657c252874d29230bdf0094
R
6,091
204
#' Box-and-whisker plot of amputed and non-amputed data #' #' Plotting method to investigate the relation between the data variables and #' the amputed data. The function shows how the amputed values are related #' to the variable values. #' #' @method bwplot mads #' @param x A \code{mads} (\code{\link{mads}}) object, ...
819df06214328cdfc62dfd9b1a6e803e681effdf8c94c292fc50b6a6ef22018f
R
6,108
187
--- title: "Reprocessing and demultiplexing of G1-G13" author: "Luis Montano" date: '2023-07-19' output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Processing of samples G14-G27 on cellranger These samples from 10X Genomics were obtained in 2020. They are subject to a comp...
2b9e782c51a41203447279b77dfcceadd636d6a35915f86d66e4c5efcc77d9ae
R
6,122
118
library(proBatch) library(readr) library(dplyr) library(ggplot2) library(ggpubr) library(png) source('../lib/plot_themes.R') #load the data: sample_annotation_AgingMice = read_csv("data_AgingMice/3_data_for_plots/sample_annotation_AgingMice.csv") normalized_df_AgingMice = read_csv(file = "data_AgingMice/3_data_for_plo...
34c8656d3c4a53203f3a583d79d289d8cf562a0b9b4c5de64384f37e5474087e
R
6,127
170
rm( list=ls(all=TRUE ) ) # Load and install necessary packages load_required_packages <- function(packages){ new.packages <- packages[!(packages %in% installed.packages()[,"Package"])] if(length(new.packages)) install.packages(new.packages) invisible(lapply(packages, library, character.only = TRUE)) } requ...
566945134a0d58ece12994f0fc8f08b59419a7f24f754046af45c5eb85bb887b
R
6,130
170
rm( list=ls(all=TRUE ) ) # Load and install necessary packages load_required_packages <- function(packages){ new.packages <- packages[!(packages %in% installed.packages()[,"Package"])] if(length(new.packages)) install.packages(new.packages) invisible(lapply(packages, library, character.only = TRUE)) } requ...
732f6aaada02b7344eba321c3566db470f52c15f89841a698bdc282f5d6e472a
R
6,137
159
##' @title Univariate survival analysis of multiple genes ##' @description ##' Univariate Cox Proportional-Hazards and Kaplan Meier ##' survival analysis of a vector of genes ##' @param gene a vector of Ensembl gene ids ##' @param rna.expr \code{\link[limma]{voom}} transformed expression data ##' @param metad...
1ec40b9bdfd09156af9d9d27bbb770002b16de7375f06c9bbece714106f9a0c2
R
6,146
142
#Deantoni et al. 2024 #Circadian rapid eye movement sleep expression is associated with brain microstructural integrity in older adults #https://doi.org/10.1038/s42003-024-06415-y #Load packages library(dplyr) library(tidyr) library(ggplot2) library(fitdistrplus) library(glmmTMB) # Load data files ---- data_SE <- rea...
8c29526c41301664e7d087aad4f6fae48d3d3bf852f4f4078e4774ffdf582e1a
R
6,148
167
source('~/scripts/single_cell/de.R') source('~/scripts/single_cell/atac.R') source('~/scripts/perturbator/de.R') library(Pando) filter <- dplyr::filter select <- dplyr::select setwd('~/projects/cutntag/') #### Read data #### marks <- read_rds('data05/all_marks_list_v3.4lines.rds') rna <- read_rds('data05/RNA/RNA_a...
25d554abad913f251cd108d981f958ea0b4b2c5486e3793d19a5fc97ec9b21d8
R
6,159
169
options(warn=-1) suppressPackageStartupMessages({ library(tidyverse) library(optparse) }) option_list = list( make_option(c("-a", "--abundance"), type="character", default=NULL, help="input NORMALISED abundance file: gene_normalised_abundance.txt [REQUIRED] [default= %default]", metavar="character"), make_opt...
305938f368f3bf343411d4f11fa5f723d896dbf5cb98a2e4e071db611ae2f7e8
R
6,164
142
########################################################################### ## Author: Youtao Lu <luyoutao@sas.upenn.edu> ## ## Copyright (c) 2021-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania ## Copyright (c) 2021-2023, James Eberwine, Perelman School of Medicine, University of ...
946082cf9a74ad80efa60c6463827db60cbefd425a956c65f122a56e47344a14
R
6,168
188
#----load scripts and libraries---- #load libraries liblist = c('parallel', 'doSNOW', 'stringr','MASS', "nleqslv", "data.table", "deSolve") sapply(liblist, library, character.only = TRUE) setwd("C:/STUDIES/RESEARCH/neural_ODE/ground_truth_simulator/code") #import simulator code source('Classes.R') source('...
8f00a63f1eaf90180401893e09b73e7ad7e9252a274540c22c3efd3d2dc07e68
R
6,175
145
--- title: "Figure 2. Marker genes and GO enrichment visualization per cell type (ClusterGVis)." date: "2026/9/16" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) # Clean workspace rm(list=ls()) # Load setting and functions source("../script/stat_plot_functions.R") # Set output...
3f2a5feb62654f58357875b7094f55f14fc4f84dcdf3471a03ea44e10613a028
R
6,183
109
setwd("~/Documents/Microarray Gen/Angela_HRLR_EE_Stress/NAcc_Remove2outliers/11_FGSEA/UpdatedGMT_20210325/GMTs_toMakeRat") GMTfiles_ToMakeRat<-list.files() #Original read-in code - it turned out that this was actually problematic (see notes below): # c2.all.v7.3.symbols<-read.delim("c2.all.v7.3.symbols.gmt.txt", sep=...
f994d0262de83f07c5632a2969de8e67a9e312a22a102a2c4ea0e86ddd54ab6c
R
6,199
220
--- title: "RR3_brain_ST_data_clustering_analysis" output: html_document date: '2022-12-17' --- ## Loading packages, creating seurat object ```{r, echo=FALSE, include=FALSE} library(Matrix) library(magrittr) library(dplyr) library(ggplot2) library(Seurat) library(patchwork) library(STutility) library(Rcpp) library(phe...
9ee63d808ac65a86632cd7fb0eceb8a53ce8457d8bb3702e593e23b4f7e34e25
R
6,202
189
--- title: 'Saldana, Montano, et al. -- ATAC-seq: Annotation with NB super-enhancers' author: 'Florian Halbritter' date: '`r format(Sys.time(), "%B %d, %Y %H:%M:%S %Z")`' output: html_document: toc: yes toc_float: yes code_folding: show highlight: pygments df_print: paged --- # Intro In this ...
93e6516e2cf24701508bee6b52ccc5ab9b55b3db149ec79f6ed19d5989ac58b7
R
6,220
142
########################################################################### ## Author: Youtao Lu <luyoutao@sas.upenn.edu> ## ## Copyright (c) 2021-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania ## Copyright (c) 2021-2023, James Eberwine, Perelman School of Medicine, University of ...
1e7594482382d860e65ae344e184319389081371e7b6aceec277f5c888d755a9
R
6,247
168
.addExonstoTx <- function(x, y, drop.unmodified = FALSE, allow.external.exons = FALSE) { # check for length of x and y if (length(x) != length(y)){ rlang::abort("x and y are not of the same length") } # drop all metadata first S4Vectors::mcols(x, level = "within") <...
d85271a502d7d2d2fd55098c2e87387445f47efc54675ec71a6c0c6356548d92
R
6,258
184
#' Extracts the completed data from a \code{mids} object #' #' Takes an object of class \code{mids}, fills in the missing data, and returns #' the completed data in a specified format. #' #' @aliases complete #' @param data An object of class \code{mids} as created by the function #' \code{mice()}. #' @param action A n...
0d7c1f1e93b815bb6f0f3fb039b20e79c1c0b21026625daf6483975316326417
R
6,318
149
source('~/scripts/single_cell/de.R') source('~/scripts/single_cell/atac.R') source('~/scripts/perturbator/de.R') library(Pando) filter <- dplyr::filter select <- dplyr::select dist <- stats::dist setwd('~/projects/cutntag/') #### Read data #### marks <- read_rds('data/CT/all_marks_list_v3.3motifs.rds') rna <- read...
cb12278f086430a20d7ae2713611d3c77bbf05a9915dbdd0f0b58b4473ea22ae
R
6,324
197
#' Imputation at level 2 by predictive mean matching #' #' Imputes univariate missing data at level 2 using predictive mean matching. #' Variables are level 1 are aggregated at level 2. The group identifier at #' level 2 must be indicated by \code{type = -2} in the \code{predictorMatrix}. #' #' @aliases 2lonly.pmm #' @...
259e39c8635432ce9eab82ce41b02a57e142ec597161dc8899dd4370f3ef0ced
R
6,327
177
library(ggplot2) library(scales) library(ggthemes) library(patchwork) library(kableExtra) library(data.table) source('utils.r') # fig 1 results_fnames <- list.files('results/', full.names = T) results_fnames <- results_fnames[grepl('ys.csv', results_fnames, fixed = T)] results_dummy <- results_fnames[grepl('dummy',...
10f7a322a138fcdc5012c60e0b4c6627b355c86b8d2d2d8379a9ba253ce54ec5
R
6,334
192
#' Creates a \code{blocks} argument #' #' The `make.blocks()` helper function generates a suitable #' \code{blocks} argument for the \code{[=mice]{mice}} function. #' #' @param x A `data.frame`, character vector with #' variable names, or `list` with variable names. #' @param partition A character vector of length 1 us...
933db897761efc9c7995cda7a038a06a29dbcc8af84a13036dc2179dbfe0ada9
R
6,359
153
##------------------------------------------------------- ## LOAD MODULES AND LIBRARIES #------------------------------------------------------- # module purge && module load shared slurm python/3.7.x-anaconda # module load gcc/8.3.0 # module load hdf5_18/1.8.17 # module load R/4.1.1-gccmkl rm(list = ls()) suppressP...
225083f4a0621b040abf9f5599c8c265e1d31dfae3ff432583641b3244cc9e43
R
6,375
98
library(TCGAbiolinks) library(SummarizedExperiment) #mRNA mRNA_query <- GDCquery(project = "TCGA-BRCA", data.category = "Transcriptome Profiling", data.type = "Gene Expression Quantification", workflow.type = "STAR - Counts") GDCdownload(mRNA_query, method = "api",d...
a8931ca08ac6e51f5b4badbc252e48c12b2dc422aef6a94997665e446d7816de
R
6,378
194
--- title: "Supplementary Information for: Organ systems of a Cambrian euarthropod larva" author: 'Martin R. Smith\*, Emma J. Long\*, Alavya Dhungana, Katherine J. Dobson, Jie Yang, Xiguang Zhang' date: "`r Sys.Date()`" output: word_document: reference_docx: "Character_report_template.docx" toc_depth: ...
fe186536cae227445b33335379dde490aa5a8fc9504da836ff36accbd56409f3
R
6,388
147
##### Code to look for coordinates of gene hits in FIGURE 8D plot from Lam, Ndayisaba et al 2024 Neuron. ##### Labels were then added manually to the plot. #7/12/22: Add labels manually to volcano plots: 3K-WT differential log2 fold change load("/Users/isabel/Dropbox (Partners HealthCare)/Isabel-Lindquist:Khurana:Vi...
d834ea8ec737f18f154e4c49d52df4eafa457f420ac0b01149b4ef05d2ec797a
R
6,400
215
# This script reads in the seurat object, checks normalization and makes summary HC and PCA plots suppressPackageStartupMessages({library(org.Hs.eg.db) library(tidyverse) library(Seurat) library(clusterProfiler) library(Libra) library(DESeq2) library(magrittr) library(ggrepel) library("pheatmap") lib...
ea583997a4ba29a6f7880a60df71757b73c557d100d65905ae630187877aac48
R
6,405
194
--- title: "Supplementary Information for: Digestive, vascular and nervous systems of a Cambrian euarthropod larva" author: 'Martin R. Smith\*, Emma J. Long\*, Alavya Dhungana, Katherine J. Dobson, Jie Yang, Xiguang Zhang' date: "`r Sys.Date()`" output: word_document: reference_docx: "Character_report_templ...
bbc09db6c62d9182320b1b26447647544e8e1361f894411e2e4ef52272251778
R
6,412
152
#!/bin/R library(data.table) library(optparse) option_list <- list( make_option(c("-g", "--gitdir"), help="Absolute path to motrpac-atac-seq-pipeline repository, e.g. '~/ATAC_PIPELINE/motrpac-atac-seq-pipeline'"), make_option(c("-j", "--json"), help="Global JSON parameters"), make_option(c("-m", "--dmaqc"), hel...
380d8a1c49aa57943a15b10f8bd22e6eb48ca6c9da9df926f8390f79e5b82480
R
6,416
205
#' Imputation by a two-level normal model using \code{lmer} #' #' Imputes univariate systematically and sporadically missing data using a #' two-level normal model using \code{lme4::lmer()}. #' #' Data are missing systematically if they have not been measured, e.g., in the #' case where we combine data from different s...
858e0fd57deed41f9f392fa440807e548b123fd7e9e2d02f947dd13b5987766e
R
6,418
183
suppressPackageStartupMessages({ library(clusterProfiler) library(enrichplot) library(DOSE) library(org.Mm.eg.db) library(org.Hs.eg.db) library(ggplot2) library(pathview) library(tidyverse) }) make_go_enr = function(genelist, prefix, folder, orgDB, pvalueCutoff, qvalueCutoff, pAdjus...
6e4bb6e16d67e556798be30cdcb4fd775a05ac106e912d781ae59134328b8cce
R
6,458
154
##------------------------------------------------------- ## LOAD MODULES AND LIBRARIES #------------------------------------------------------- # module purge && module load shared slurm python/3.7.x-anaconda # module load gcc/8.3.0 # module load hdf5_18/1.8.17 # module load R/4.1.1-gccmkl rm(list = ls()) suppressP...
21537d733ba8a456ea43862b4ad1e8a3815b62596baef606a4b0f0a2d991a69d
R
6,461
216
## Compare expression between control and treatment across all non-placenta tissues library(limma) library(edgeR) library(DESeq2) library(magrittr) library(tidyverse) experiment_data <- snakemake@input[['expression_results']] %>% readRDS() %>% {DGEList( counts = assays(.) %>% extract2("counts"), sample...
a4b9a0e1c075268af0580de811df53c413f654e4ea6ab3efd35b2190213bc847
R
6,480
178
## Create a CWAS gene set: Step 2 rm(list = ls()) library(tidyverse) gm0 = read.delim('~/Dropbox/gene-mat-recipe_v2/my_gene_matrix_231123.txt') head(gm0) gm0 = gm0 %>% dplyr::select(gene_id, gene_name, ProteinCoding, lincRNA = Long.ncRNA) gm0$tmp_id = do.call(rbind.data.frame, strsplit(x = gm0$gene...
d3b6b2816086c4236f45575295d71ddb6a54cb91ce097c409daa2904f5f520b7
R
6,505
197
#' Converts an imputed dataset (long format) into a \code{mids} object #' #' This function converts imputed data stored in long format into #' an object of class \code{mids}. The original incomplete dataset #' needs to be available so that we know where the missing data are. #' The function is useful to convert back op...
07e04bd7dceb34bfb59d4434f703dc3f1276c9ebc59d9938fdf06a613ed7af24
R
6,517
178
--- title"BrainAge_VidalPineiro_Tests of equivalence (superiority) (early life v. aging) (XGB & LASSO)" author: "dvp" date: "11/2/2020" output: html_document: default pdf_document: default --- # Setup ```{r setup, include=FALSE} #install.packages("~/R/imported_packages/3.6.0/itsadug_2.3.tar.gz", repos = NULL, type...
96120e2aa0315c3f28e7e5fe0a14029ed4d87ebd71dc83bebfab3d9ca0ab7a9b
R
6,518
162
#'################################################################################# #'################################################################################# #' Select GO and KEGG features for model #'################################################################################# #'#########################...
1dea72dfe8f1083c92d79a4078d4d44424b32af6500444f147e370094fa68980
R
6,520
186
#' Wrapper function that runs MICE in parallel #' #' This function is included for backward compatibility. The function #' is superseded by \code{\link{futuremice}}. #' #' This function relies on package \code{\link{parallel}}, which is a base #' package for R versions 2.14.0 and later. We have chosen to use parallel f...
83925bfe2b479cfabdb59940d523c70adf41bdf9694021336de0eb69b3b59c8b
R
6,541
131
#Notes for when I come back to this: #Reformat Dropviz (+Zeisel), StressGenes, and Psychiatric genes into .gmt format and combine them. DropViz_HC_Mouse_Temp<-list() DropViz_HC_Rat_Temp<-list() DropViz_HC_Human_Temp<-list() names(table(DropViz_HC_CellTypeClusterMarkers_Concise_RatOrthologs$CellType)) for(i in c(1:...