sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
a64a0bf270be24ca2d245eef79bc41e7aa7e07aa4932cbadd12394a224fb350c
R
8,557
252
#####cell lysates from my BV2 polarization experiment Data Analysis - Aditya Natu - Rangaraju Lab ##################Setting the work space################## cat("\014") rm(list = ls()) dev.off() library(M3C) setwd("/Set/Your/Working/Dir") getwd() options(stringsAsFactors = FALSE) ##################Loading | Inspec...
3f494f3bc565dd5ab706e198ec0ed603efb3441db43156d8d7f58c81f76ece1c
R
8,569
220
#Quality control metrics per cluster #supplementary figure #run locally on Ayushi's laptop #load required packages library(Seurat) library(dplyr) library(ggplot2) library(grid) library(gridExtra) library(cowplot) #set all directory paths basedir <- "~/Dropbox (Gladstone)/YH_MN02/" indir <- paste0(basedir, ...
ee24b8cf7d56e1b87661b1dffa68883a8e3fa6d7e33b1554cbe6994a297c70dd
R
8,604
246
#Load necessary packages library(dplyr) library(lme4) library(lmerTest) library(emmeans) library(DHARMa) library(tidyverse) library(MCMCglmm) # Read data and transform factor variables dat<- read.delim("Sociability_heritability.txt") dat[, c("animal", "sex", "rep", "line", "family", "testnr", "genera...
a83f4741e9ea0fbb264c10587742f90803c17738c5910c6ff9e0f491f1e3fc7a
R
8,638
310
# This code is to plot the Fig.S6 # a. mean values of brain volume # b. ranked brain regions according to the brain volume # c. percentage changes along IQMs # d. percentage changes along the daylight length # WANG. 27-Mar-2024 # Remove all objects created before to prevent clash rm(list = ls()) library(dplyr) lib...
0eeb3b92e9cf53f06451f8f917f4d7f683ef7bc60366b5057e469a8f0e58975b
R
8,639
309
# This code is to plot the Fig.S4 # a. mean values of brain area # b. ranked brain regions according to the brain area # c. percentage changes along IQMs # d. percentage changes along the daylight length # WANG. 27-Mar-2024 # Remove all objects created before to prevent clash rm(list = ls()) library(dplyr) library(...
161a567ccd96621320daf88645693c350e339203813ab80bc8f9b5cd8346424b
R
8,643
135
source('scripts/config.R') source('scripts/aux_functions.R') source('scripts/plot_functions.R') source(paste0(main_dir,'results/mm10/hic/config.R')) source(paste0(main_f,'scripts/main_functions.R')) source(paste0(main_f,'scripts/aux_functions.R')) source(paste0(main_f,'scripts/plot_functions.R')) source(paste0(main_f,...
0ce99ce00ac83ce2cc03def4a098cb49b13303737d34694ed69d9a7f297c3aff
R
8,683
254
--- title: "R Notebook" output: html_notebook --- # Set Up ```{r setup} knitr::opts_knit$set(root.dir = normalizePath("../..")) ``` # Imports ```{r} library(finalfit) library(mice) library(purrr) library(dplyr) library(lavaan) library(ggplot2) library(gplots) source('functions/heatmaps.custom.R') ``` # Load Data ```...
7f66515f0fc603544a76114e49d35f6962667fd6eae5b07563324c4cb84d67a6
R
8,688
272
################################################ # LC analyses: Mulvey et al. (2018) rodent genes # Lukas Weber, Oct 2022 ################################################ # module load conda_R/4.2 # Rscript filename.R # file location: # /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/ library(SpatialExperiment) l...
f2a2f4abc1c778bcc80901dfb9e7e0ecc7a90c4af5821804a56624f7191fafb5
R
8,690
258
redefineEnumeration <- function(enumerationName, the.function) { current.enum <- get(paste(".__E__", enumerationName, sep = "")) the.names <- names(current.enum) values <- sapply(the.names, the.function) if (any(values== -99)) { warning("Some enumeration names are not recognised\n") } ...
28dd434fad223d7899f9e250a0fdc4406aa64060e4fd78df1e67f55ef3b6b182
R
8,730
298
# ============= # # 8. Figure 3 # # ============= # ## Set up ---- filepath <- "" setwd(filepath) ## Load libraries ---- library(cowplot) library(ggstance) library(grid) library(tidyverse) ## Format data ---- # List of antigens antigens <- c( "HSV1 (1gG)", "HSV2 (2mgG)", "VZV (gEgI)", "EBV (VCA)*", "CMV ...
6a43baffbdb543bcfc274e5491e08dacd6e3429c35ec6a46e8a03f150858f2c6
R
8,730
303
############################################# # LC analyses: batch correction using Harmony # Lukas Weber, Oct 2022 ############################################# # module load conda_R/4.2 # Rscript filename.R # file location: # /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/ library(SpatialExperiment) library(he...
4a3eea6758bcf6351bd80585ebd88cefe91fe5bd0e631f791c09a18c6be81bc2
R
8,740
329
# install.packages("ggplot2") # install.packages("tidyverse") # install.packages("ggsignif") # install.packages("RVAideMemoire") # install.packages("lawstat") # install.packages("ARTool") # install.packages("rcompanion") library(ARTool) library(lawstat) library(ggplot2) library(tidyverse) library(ggsignif...
4c255db7de261950e50e6b19718d1e820c17763d214ef798130cc8ef3d26a4e2
R
8,769
299
LaminarDepth <- function(obj){ #compute laminar depth obj[['laminar_depth']] <-NA #compute laminar depth #create intervals to prject depth values onto. r<-seq(0, sum(unique(obj$GeneralLayers) != ''),1) intervals<-lapply(r,FUN=function(x){ if(x != sum(unique(obj$GeneralLayers) != '')){ ...
5a5c0915989357d2b91486ffc8effe6b0845fbf0a44384b5e790e9239200c075
R
8,775
201
#' @rdname mapping #' @title map the vertices between two graph #' @name map_graph #' @param cluster_distance a data.frame with unique cluster names as index and columns, which #' contains a distance adjacent matrix for clusters, representing the dissimilarity between clusters #' @param color_distance a data.frame with...
e3d28da060c1c9b506149b2d0f09d0e2927e420e92f99a5359a869a81963936c
R
8,802
182
--- title: "Model Evaluation for 410 N2a TRAP Data" author: "Stephen P Plassmeyer" date: "7/29/2020" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = FALSE) source('../../../code/mpra_tools/mpra_tools.r') ``` # Load and Format Data ```{r} compiled_counts <- fread('../../../data/comp...
9deeb4aaf2ee0255cfa07eebf681514042078f38f6b6393c6234a526fac1133a
R
8,805
178
#' Function for building a Symphony reference starting from expression matrix #' #' @param exp_ref Reference gene expression (genes by cells) #' @param metadata_ref Reference cell metadata (cells by attributes) #' @param vars Reference variables to Harmonize over e.g. c('donor', 'technology') #' @param K Number of soft...
32cd9c8a016351aa5e6a0848371d17a5f2d034968de12e8af9491abd3f86e829
R
8,825
277
#analysis of ABIDE QC metrics library(plyr) library(dplyr) library(tidyverse) library(tidyr) library(ggpubr) library(stringr) library(purrr) #read in and format FSQC ratings abide_SB_fsqc <- read.csv('path/to/ratings') #if done in batches, read in multiple csvs and combine with rbind #rename back from MD5 hash n...
9a97b54935ef2c0b9672ef4767737d0f2e8beb915fe07cecbe8e8593c27db296
R
8,830
187
required_packages <- c("shiny", "ggplot2", "cowplot", "viridis", "R6", "reshape2", "gifski", "av", "RCurl", "httr", "remotes", "shinyWidgets", "gganimate", "expm") # Install any missing packages installed <- rownames(installed.packages()) to_install <- setdiff(required_pac...
a758c9ad04e58a11250222e233d91684541607d26aae716367269354b6efdcb1
R
8,834
200
## 1. Install and load libraries BiocManager::install("biomaRt") install.packages("Hmisc") BiocManager::install("DESeq2") install.packages("NMF") BiocManager::install("BiocParallel") install.packages("knitr") library("biomaRt") library("Hmisc") library("DESeq2") library("BiocParallel") register(MulticoreParam(20)) libr...
332ba0e7e622de849b7eccfc8caf7c5e57a68c09aedc4f19ca57cc95c973193e
R
8,838
248
library(Seurat) library(Signac) library(cicero) library(tidyverse) library(data.table) library(Matrix) library(monocle3) library(SeuratWrappers) ######## Create Seurat object for neuronal cells ######## load('obj_all_processed_v3.rda') ## Select only neuronal cells # 22635 cells in total neurons <- rownames(obj_al...
5c00a8199f605ab4da7a85adf61b2be67812a8c7238cf8ba7e92b5d925bcba05
R
8,844
271
library(patchwork) library(tidyverse) library(ggvenn) library(data.table) library(ggforce) library(fastmatrix) library(ComplexHeatmap) library(Matrix) library(future) options(future.globals.maxSize = 5e9) Sys.setenv("_R_USE_PIPEBIND_" = TRUE) projdir <- here::here() packdir <- file.path(projdir, "package/R") import::...
725ba1a198fc4c7c112e2933458d5ec0865963c6d53bf5c5378dec44e8824b68
R
8,863
134
--- title: "How to use the BIDSconvertR" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{How to use the BIDSconvertR} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = FALSE ) ``` ```{r ...
94c465f35c556dc8f40fdbff2ab8570ca8666871a8a8a7c34b8327ca9cc38b31
R
8,882
272
library(patchwork) library(tidyverse) library(ggvenn) library(data.table) library(ggforce) library(fastmatrix) library(ComplexHeatmap) library(Matrix) library(future) options(future.globals.maxSize = 5e9) Sys.setenv("_R_USE_PIPEBIND_" = TRUE) projdir <- here::here() packdir <- file.path(projdir, "package/R") import::...
20e6b10d7aca3adadc4950d950de94415ec54489b95d75ec10f6c5d78180762f
R
8,903
159
# This code is to plot fig.3 # WANG. 26-Mar-2024 # Remove all objects created before to prevent clashing rm(list=ls()) library(dplyr) library(ggseg) library(ggplot2) library(tidyr) library(patchwork) # Set the working directory to the path where your files are located setwd("/Users/wang/Desktop/Research_projects/...
5b9304c4d16c3073f88fd88f7d8cc747ab83bbd287725c83b4c1263907964d02
R
8,905
255
############################################### # LC snRNA-seq analyses: DE testing comparisons # Lukas Weber, Jul 2023 ############################################### library(here) library(dplyr) library(tidyr) library(readr) library(ggplot2) library(ggVennDiagram) library(ggrepel) dir_plots <- here("plots", "sing...
3a73cd4e5802550ad23f333c4a2f1e2393270c6df3dca0f72510413bd3dfe744
R
8,925
243
#Classify Cells: #This script executes the following stages of analysis # - Cluster cells iterativly, checking at each stage for DE genes and stopping if clustering criteria fail (see recursive clustering) # - Validate that clustering with random forest classification, allowing some cells to be reclassificed from o...
d26f3e08197a16c2f9b0def529706529fab86d7b72653b6964a25078c21ecb4d
R
8,926
231
library(Seurat) setwd("/gpfs/data/awebb/dyu20/cell2location/MLAging/data/svz_10x/") # train_y57o57 <- readRDS('../svz_processed/train_y57o57.RDS') #####-----------preprocess-------- files <- list.files("./", recursive = FALSE) object_list <- c() for (i in (1:length(files))) { print(files[i]) data <- Read10X(past...
89c45bc9ce5e0cc3dab7276f437d30efeb05b299e54eab252987096eb465c505
R
8,940
225
--- title: "R Notebook" output: html_notebook --- --- ```{r} library(ggplot2) library(pheatmap) library(RColorBrewer) library(tidyverse) library(ggpubr) library(ggsignif) library(openxlsx) library(viridis) library(jcolors) library(stringr) ``` ```{r} setwd("//atlas.uni.lux/users/isabel.rosety/GBA/GCase activity/Plots"...
78d59c36c8dccd11dbcb36b82d99e7580a3fc8ba12ed640e0c0b5ba94c3ee4fe
R
8,948
126
#!/usr/bin/R suppressPackageStartupMessages(library("stringr")) suppressPackageStartupMessages(library("dplyr")) suppressPackageStartupMessages(library("tidyverse")) # * function concatAllenAnnot1 <- function(allenAnnot, space2="_", slash2="-") { r <- gsub("/", slash2, allenAnnot) r <- gsub(" ", space2, r) r <...
87a823c321cc60b8607791df5cd0318df37ef91967e8125bd856fa2fa8f31ed6
R
8,964
286
library(data.table) library(Matrix) library(ggplot2) library(stringr) library(ggpubr) packdir <- file.path(here::here(), "package/R") import::from(.from = "cembav2env.R", .directory = packdir, cembav2env, cluSumBySa2, loadL2Resos) import::from(.from = "sa2Leiden.R", .directory = packdir, LeidenSum, newLeidenSu...
5ccc61818e16376a117bfd1bfb3f3fd714ee2e042a5e0f168d10c138d5710438
R
8,978
159
# This code is to plot fig.4 # WANG. 26-Mar-2024 # Remove all objects created before to prevent clashing rm(list=ls()) library(dplyr) library(ggseg) library(ggplot2) library(tidyr) library(patchwork) # Set the working directory to the path where your files are located setwd("/Users/wang/Desktop/Research_projects/...
bb8880f4e8012528eb80a3011317d03392593200a4b987ec9374f8d3ab511ec8
R
8,980
171
## Author: Youtao Lu <luyoutao@sas.upenn.edu> ## Copyright (c) 2017-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania ## Copyright (c) 2017-2023, James Eberwine, Perelman School of Medicine, University of Pennsylvania ## All Rights Reserved. ## This Source Code Form is subject to th...
3a794c371987483d2059bf3025eac1cc8eb251bceed8c1e6d5fb74f55490a311
R
8,995
153
#' Converts ICGC Simple Somatic Mutation format file to MAF #' #' @description Converts ICGC Simple Somatic Mutation format file to Mutation Annotation Format. Basic fields are converted as per MAF specififcations, rest of the fields are retained as in the input file. #' Ensemble gene IDs are converted to HGNC Symbols....
936d4d1f2af76a57e112e71cc2150ca7f6876d54e5ff943c9309126bdd43466a
R
9,012
236
require(R.matlab) rm(list = ls()) ecgpath='/data/p_02186/TMS_ECG2/analyses/EKGdata/' setwd(ecgpath) fdipath='/data/p_02186/TMS_ECG2/analyses/EEGtms/FDIdata/' bigdata=c() subids=c('VP01', 'VP02', 'VP03', 'VP04', 'VP05','VP06', 'VP07', 'VP08', 'VP09', 'VP10', 'VP11', 'VP12', 'VP13', 'VP14', 'VP15', 'VP16', 'VP17...
3487e36b555647c7f2a58f9f1adc52ae3dd1ddd3f5b6fe405fac33cb579149cd
R
9,066
196
#' @title Volcano plot #' @description Perform differential expression and create a volcano plot. #' @param m A matrix of features (e.g. genes) by observations (e.g. cells). Default: NULL #' @param group The group (of observations) to test. This should be a character vector or a two-level factor in which the first le...
8c4a8aa8bca9df38030ff3313cc9a66e29e1ae8f9c8a25a95c3a116afed7dccb
R
9,098
242
library(Signac) library(Seurat) library(ggplot2) library(harmony) library(dplyr) options(future.globals.maxSize = 50000 * 1024^2) load('../data_processed/obj_all.rda') ######## Quality control to filter cells ######## ## Filter cells # RNA-seq: nCount_RNA, percent.mt # ATAC-seq: nCount_ATAC, nucleosome_signal, TSS...
8e01f523002f6344600384836210248f87aae7beed19e3d66708975d8a0a3679
R
9,102
256
#' Deprecated function: Run EWCE with control for GC content and transcript #' length. #' #' This function is deprecated on account of major changes to EWCE (see EWCE #' news: \url{https://nathanskene.github.io/EWCE/news/index.html}), which also #' include development of #' [MultiEWCE](\url{https://github.com/neurogeno...
e62d3b2e57adb300cd5659caf1c86d2b26919d8bc0f0a59f1ecdf4bcdcc63282
R
9,104
159
# This code is to plot Fig.2 # WANG. 26-Mar-2024 # Remove all objects created before to prevent clashing rm(list=ls()) library(dplyr) library(ggseg) library(ggplot2) library(tidyr) library(patchwork) # Set the working directory to the path where your files are located setwd("/Users/wang/Desktop/Research_projects/...
17c0129e662cee854b791fa14d4e19398c3f259f4c10b41c4c03e42a70ccde2b
R
9,108
323
# This code is to plot the Fig.S2 # a. mean values of brain thickness # b. ranked brain regions according to the brain thickness # c. percentage changes along IQMs # d. percentage changes along the daylight length # WANG. 27-Mar-2024 # Remove all objects created before to prevent clash rm(list = ls()) library(dplyr...
ffdbb051391969bb66cffe72574807e02dc6a29cf28e98c8a073971832d05efd
R
9,132
288
#This script uses P10 scRNAseq data from Mayer et al. 2018. We use a random forest model to classify the data into #cell types. Model 2 is the one we use for final labels. # # Mayer, C., Hafemeister, C., Bandler, R. et al. Developmental diversification of cortical inhibitory interneurons. Nature 555, 457–462 (2018)....
67f6531c3d4c91840172c7362e0979609a8adab496faedd01eb51ab27a2eb690
R
9,143
164
# Exercise input matching and volume calculations using synthetic data only. # No Bayesian fitting is needed; temporary images and tables are removed on exit. file_arg <- commandArgs(FALSE)[grepl("^--file=", commandArgs(FALSE))] test_file <- gsub("~+~", " ", sub("^--file=", "", file_arg[1]), fixed = TRUE) test_dir <- d...
3e495432ea1f715e3c2318930a3306b26e2a1de26c702fe97e71202af2c5e9e0
R
9,171
347
--- title: "LC analyses: white matter" author: "Lukas Weber" date: "`r Sys.Date()`" output: html_document: toc: true number_sections: true toc_depth: 3 toc_float: collapsed: false --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Introduction Analyses for LC project: w...
bdb2cb641d4cef8f9c8146450b0b0dc5cebd6101766605d912ac17868a46fa22
R
9,233
382
--- title: "LC analyses: features per sample" author: "Lukas Weber" date: "11/11/2020" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## Introduction Analyses for LC project: features per sample. ```{r} # to run on cluster # module load conda_R/4.0 # R ``` ## Load da...
4a6250b0d9d5e5f27f085f3aec806c06d9bc98b122aa55d142736ee75dc024b9
R
9,290
149
## Author: Youtao Lu <luyoutao@sas.upenn.edu> ## Copyright (c) 2017-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania ## Copyright (c) 2017-2023, James Eberwine, Perelman School of Medicine, University of Pennsylvania ## All Rights Reserved. ## This Source Code Form is subject to th...
8856a1471e2e5faea8596e84f330a341c645403fdb78608071bcc7fe5cc8e631
R
9,321
356
set.seed(321) # mock up some single-cell, mixture & marker data sce <- mockSC(ng = 200, nc = 10, nt = 3) spe <- mockSP(sce) mgs <- getMGS(sce) # Create SpatialExperiment spe1 <- SpatialExperiment::SpatialExperiment( assay = list(counts = SingleCellExperiment::counts(spe)), colData = SummarizedExperiment::colDat...
02ea2450c7f02c7def8a6444c2ba61a94997ea9630bc9f66cb8a8a8514b64194
R
9,325
196
library(tidyverse) # used to determine correlation between interchromosomal Hi-C contacts between OR genes and deposition of histone maks # Supp Figure 2D # input is dumped Hi-C contacts (50kb resolution) and file with quantification of ChIP deposition over OR cluster bins at 50kb resolution (using HOMER) # each OR c...
9e1f5a536464cae5dbe466d10fd8c186c5678b619e3c4aca4688e07156f9d6ec
R
9,329
241
--- title: "R Notebook" output: html_notebook --- # This markdown will be used to compare S-A axis rank to prediction accuracy within each PFN # We'll do this analysis in fsaverage5, since this downsampled version allows us to run spin tests # Load in the libraries ```{r} library(gifti) library(R.matlab) library(RNi...
131fa3d6f87141cc1ff7d88a2ec7c23962fd2b1a03d96656be421d96ec4e72f5
R
9,331
203
rm(list = ls()) ############################## # Load relevant Libraries ---- ############################## require(ggplot2) require(stringr) #################################################### ## Read in demographics and data quality measures ## #################################################### # harms_QA <- re...
e59183b3a94aeae18ca3248dab5320b4d33b7c6a868b8c14ecce2419daf51b1c
R
9,343
310
library(tidyverse) library(rlang) library(R6) Sys.setenv("_R_USE_PIPEBIND_" = TRUE) library(data.table) library(GenomicRanges) library(S4Vectors) library(BSgenome) rdir <- file.path(here::here(), "package/R") import::from(.from = "cembav2env.R", .directory = rdir, cembav2env) import::from(.from = "peak.R", .direct...
7947e56c1fbdba5ce711f4ce775190e6c757e83b546690964f3bc705e7089d62
R
9,353
286
--- title: "Gut atlas MENS projection" output: html_document --- ```{r check_interactive} if(interactive()){ print(date()) print("This was run interactively. Please run with rmarkdown::render") }else{ print(paste0("This notebook was compiled on ", date())) } ``` ```{r load, message = F, results= 'hide', warni...
3d8ecb68bbb8e05673b15a0134bbe39fa6ba7612f3137f6296270ff1c91de28c
R
9,373
379
############################################################################ # LC project # Script for downstream analyses: pseudobulk differential expression testing # Lukas Weber, May 2022 ############################################################################ # adapting code by Leonardo Collado-Torres, Abby Sp...
5ba45ecd9d5330c7c5a79e04c8c3de1a05801bcc899fb15d74e239d6ca119aa9
R
9,373
243
# install.packages("ggplot2") # install.packages("tidyverse") # install.packages("ggsignif") # install.packages("RVAideMemoire") # install.packages("lawstat") # install.packages("ARTool") # install.packages("effsize") library(ARTool) library(lawstat) library(ggplot2) library(tidyverse) library(ggsignif) ...
dc4a08a6b58352cd41519e3e95b90c416591ff887e083610d9908317943aacfe
R
9,378
149
## Author: Youtao Lu <luyoutao@sas.upenn.edu> ## Copyright (c) 2017-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania ## Copyright (c) 2017-2023, James Eberwine, Perelman School of Medicine, University of Pennsylvania ## All Rights Reserved. ## This Source Code Form is subject to th...
4adeed1caa2d660a4b883eceaaad23e8127812aedbe1084914d9b3e2b2e0caac
R
9,399
275
--- title: "Copy number analysis" author: "Anand Mayakonda" date: "`r Sys.Date()`" output: html_document: toc: true toc_depth: 3 toc_float: true number_sections: true self_contained: yes css: corp-styles.css highlight: pygments vignette: > %\VignetteIndexEntry{04: Copy number analysis} ...
93179e91b7d14942d478af92f8178b393673a57ca045246ad9987fdef31c5da9
R
9,410
220
#!/bin/env Rscript args = commandArgs(trailingOnly=TRUE) main_f <- as.character(args[5]) source(paste0(main_f,'config.R')) ins_window <- as.numeric(args[1]) k=as.numeric(args[2]) cell=args[3] near_cis <- as.numeric(args[4]) eigenBin <- as.numeric(args[6]) expand_cis <- as.numeric(args[7]) work_dir <- paste0(main_f,...
d7c29fba86e098c74a5f9c904945c0d0a6817f932f0491338b69f853fefc4b5c
R
9,410
220
#!/bin/env Rscript args = commandArgs(trailingOnly=TRUE) main_f <- as.character(args[5]) source(paste0(main_f,'config.R')) ins_window <- as.numeric(args[1]) k=as.numeric(args[2]) cell=args[3] near_cis <- as.numeric(args[4]) eigenBin <- as.numeric(args[6]) expand_cis <- as.numeric(args[7]) work_dir <- paste0(main_f,...
3ef7151500be90f50d1974fbffb2f24e17fe96c0f16255b1c99dab1f2db67aed
R
9,414
316
# this script will analyze degs for pathway enrichment # to run locally: # SCRATCH1=/mnt/g/scratch # docker run -it --rm \ # --workdir $HOME \ # -v /mnt/g/reference:$HOME/reference \ # -v /mnt/g/cellranger_atac_counts:$HOME/cellranger_atac_counts \ # -v /mnt/g/cellranger_multi_counts:$HOME/cellranger_multi_counts \ # -...
089aa6ecdc69ebf017293b6b39f9ad884618187824d1505c53b71daf4a5c8c81
R
9,416
228
--- title: "R Notebook" output: html_notebook --- ```{r} library(ggplot2) library(pheatmap) library(RColorBrewer) #display.brewer.all() library(tidyverse) library(ggpubr) library(stringr) library(ggsignif) library(openxlsx) library(viridis) library(xgboost) library(data.table) library(readxl) library(janitor) library(...
72cf805be61bdf88a9f3477b887f26f5563b5aa6cc89c93fc7bb1607211ce564
R
9,417
208
library(stats) library(purrr) library(dplyr) load("bulk_dev_RNAseq.RData") load("Cel_dup_N4Cel.RData") load("Single_copy_genes.RData") load("genes_dNdS.RData") load("genes_Cel_Cinop_dNdS.RData") load("cluster_1_2_3.RData") load("PSG.RData") load("pi_H_pNpS.RData") load("divergent_genes.RData") load("Genes19...
26be5a8fb8fc9973a34ea8193f6a76cb238c392a803319704f8264cc8bf03a52
R
9,429
457
# ================== # # 2. Meta-Analyses # # ================== # ## Set up ---- filepath <- "" setwd(filepath) ## Load libraries ---- library(data.table) library(dplyr) library(magrittr) library(metafor) library(purrr) ## Read in data (serostatus & PBI) ---- nshd <- read.csv("results/nshd_serostatus.csv") nshd_p...
d018b576d6ffcf6a518a38969b8fb50af024cf8bf052b347d8ac865ced9dc4bb
R
9,432
376
################################################################### # LC snRNA-seq analyses: secondary clustering of inhibitory neurons # Lukas Weber, Jul 2023 ################################################################### library(here) library(SingleCellExperiment) library(scater) library(scran) library(bluster...
bc0048025baa337ee85d4b3aad6d40ec2ad0e85e7b2057b0f054e86e26cc7f7e
R
9,434
194
--- title: "SeparateSamplesCognitionPCA" output: html_document date: '2023-02-02' --- # Load in libraries ```{r} library(mvtnorm) library(tableone) library(parallel) library(rstan) library(loo) library(gamm4) library(Hmisc) library(FactoMineR) library(nFactors) library(reshape2) library(psych) library(data.table) libr...
bf55c658c1e8cb0ea4e211e643c24631778910fd20f9a8194b82db4a644157ee
R
9,436
204
# cortical depth library(Seurat) # merFISH_integrated = readRDS(file = "./RDS/merFISH_final.0827.RDS") corticalDepth = merFISH_integrated@meta.data corticalDepth = corticalDepth[!is.na(corticalDepth$ABA_PFC),] corticalDepth = corticalDepth[corticalDepth$ABA_PFC == "In", ] ggplot(na.omit(corticalDepth[corticalDepth$Ce...
0696270c3a1da49131811792445444b2ad8e9e94e2bc5c2053a7a92755ab2856
R
9,452
247
#!/usr/bin/env Rscript # this script will preprocess aggregated snATACseq data # counted and aggregated by cellranger-atac v2.1 without library normalization # # to run locally # counts=/mnt/g/cellranger_atac_counts # project=/mnt/g/ckd # SCRATCH1=/mnt/g/scratch # docker run -it \ # --memory 100g \ # --cpus 4 \ # --wor...
6b36c2f9743627d5e0e65ee2b9b462cc32766fba9e61707978738303459da753
R
9,456
206
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(RColorBrewer) library(rcartocolor) ## main Seurat package snRNA-seq pacakges library(Seurat) library(SeuratDisk) library(future) ## gene expression heatmap plots library(Nebulosa) ss <- function(x, pattern, slot = 1,...
edc88d441f2b252ce91305216d0e1015b3fa44943ec0ac6be339d7e8f9c7e3c7
R
9,468
341
--- title: "Data_prep_for_fastcormics2" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` --- title: "Gene_activity" author: "Alise" date: "2019 M09 16" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} #BiocManager::insta...
fd211efb58b74860ab223e3dd2b2e2974300cb39fb2d925c834ad1e8ea690631
R
9,476
238
############################################################# # Generate Figure 5C,5D,5E and Supplementary Figure 25 # Plot 3D plots of genes in RA ############################################################# library(plot3D) library(plotly) setwd("../") InputFile <- ".\\Data\\Manuscript_3D_RealData_Pattern\\"...
78826f91c705d7c17e1abd201a18d2ec75124dc8bad90d124db6c8ada63e1d3d
R
9,498
184
#' Transform 'HUMAnN' metagenomic results to 'microtable' object. #' #' @description #' Transform 'HUMAnN' metagenomic results to microtable object, reference: Franzosa et al. (2018) <doi:10.1038/s41592-018-0176-y>. #' @param feature_table file path of 'HUMAnN' output abundance table; Please see the example. #' @param ...
dad260cadd406d17ac5ebf1d12eb96b02cac13e32a87d104af3a82e9326ae0be
R
9,503
181
library(tidyverse) library(ggplot2) library(ggpubr) library(ggridges) library(patchwork) ### Load performance results for different prior regularization-------------- results_stateLoss_normal <- data.table::fread('../results/PriorLossAnalysis/translation_results_normal_mselike_U2OS.csv') colnames(results_stateLoss_nor...
1ea947cdaa1ac1727ab6284d32e3dcf7137ace999bad5042580e2cf35936c9c5
R
9,536
216
## conda activate r4 ## packages for data table processing suppressPackageStartupMessages(library(here)) suppressPackageStartupMessages(library(tidyverse)) suppressPackageStartupMessages(library(rlang)) suppressPackageStartupMessages(library(optparse)) ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x ...
303a792f972e6c2fd2cd269e2d818bcfc72b47b94a44e3103c19188a8a7c782e
R
9,563
238
### Between -cluster comparison #For this analyses, we will use the **lme4** package in R to fit generalized #linear mixed effects models. We are going the model the change in the chance #(or more formally the odds) of cells from a given mouse belonging to a given #cluster from the 3 genotypes to the fE4 genotype. T...
52916c2a063d65d9024acb1c22baa105acc066343bc93bebd42337d96c559fb2
R
9,568
219
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) ## for plot library(RColorBrewer) library(rcartocolor) library(ggpubr) ## statistical analyses library(tidymodels) library(lme4) library(broom.mixed) library(lmerTest) ss <- function(x, pattern, slot = 1, ...) { sapply(st...
696e11ea7843376d9561fb05ca17b62c7566a20f4dcc4862e4e5808d8abadaf6
R
9,576
340
--- title: "LC analysis pipeline: preprocessing" author: "Lukas Weber" date: "`r Sys.Date()`" output: html_document: toc: true number_sections: true toc_depth: 2 toc_float: collapsed: false --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Introduction Computational an...
565af4b6244934514b903cfcc253eaeb46de9f3efc902162412203bd8aec7612
R
9,577
236
library(stats) library(purrr) library(dplyr) load("bulk_dev_RNAseq.RData") load("Cel_dup_N4Cel.RData") load("Single_copy_genes.RData") load("genes_dNdS.RData") load("cluster_1_2_3.RData") load("PSG.RData") load("pi_H_pNpS.RData") zscore = function(x){ x = (x - mean(x))/sd(x) } mean2 = function(x){ ...
fbc0eccd4282814cc3c114dc148ec3ebb2be1a1957e764f75a931081c9ec6c65
R
9,601
206
# This code is to # 1. calculate the CV of different brain apartments # 2. add NA to even the session numbers of all subjects # 3. plot the percentage changes of brain apartments derived from long and normal pipelines # WANG. 20-Feb-2024 # Remove all objects created before to prevent clustering rm(list=ls()) # Load...
b4176298a5fb1284022e1729051efc431907987ef05946cdbf2fd694c443e299
R
9,602
288
library(dplyr) library(stringr) load("sc_exp.RData") load("celltype.RData") load("cluster_1_2_3.RData") load("cell_type_num.RData") ### all lineage cells tissue_lin = list() tissue = c("AB","MS","D","C","E","P4") for(i in 1:length(tissue)){ lin_2 = filter(cell_num_lineage, lin2 == tissue[i]) lin_type =...
f4543dd035b4b90ba544eeecb8c5ef4a129902a96fa88cdbbf93d6130487a343
R
9,634
212
### ---------------------------------- ### # Two important additional data checks # N. Magielse, 2022 ### ---------------------------------- ### # We are using R version 4.1.0 (2021-05-18) ### ---------------------------------------------------------------------------- ### # PART I: # Testing parametric assumpti...
fad3181b4c33f78067848608b6ce66499f77d742e139fd37ff23c8ba784febf3
R
9,634
207
library(tidyverse) library(gridExtra) # input is file with quantification of ORs within a specific distance in particle radii for every OR locus (produced by pairwise_distances.sh) cells = read_tsv(file="../good_cells.txt", col_names=c("cell_name", "sex")) ######## LOAD IN ZONAL ANNOTATION get_noGI_ORs<- function(fn...
339cb0f98d5e8ee03a5ab6548a82eed764088e410c4ebee25034887e4f7d00e9
R
9,649
191
source('scripts/config.R') source('scripts/aux_functions.R') source('scripts/plot_functions.R') source(paste0(main_dir,'results/hg38/hic/config.R')) source(paste0(main_f,'scripts/main_functions.R')) source(paste0(main_f,'scripts/aux_functions.R')) source(paste0(main_f,'scripts/plot_functions.R')) source(paste0(main_f,...
c502495a73506223d21b7da01be1cdff52ad989f1b04197c5e59de83141c0a2b
R
9,651
309
# Figure 1 neuroPN # SP | 2022 | sebastian@pechmannlab.net library(ggplot2) library(reshape2) library(ggdendro) library(cowplot) setwd("M2/neuro/") # Figure 1A ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ umap_data <- as.data.frame(read.table("data/processed/umap.txt", header=T)) colnames(umap_data)...
ed2d5aae28e8123342ae6a134a07717d3343d323b676e91b3304ca1a53e50a8d
R
9,679
286
--- title: "Setting3_balloonplot" author: "Hao Huang" date: "03/11/2022" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## load packages ```{r} suppressPackageStartupMessages({ library(SingleCellExperiment) library(Seurat) library(caret) library(kknn) library...
37f4d94724664f85b30a0f43da72bad967d6e9b0e94f2dd624f29ddc36b76795
R
9,682
245
# This code is to do analysis on surface area # 1. calculate, plot, save the CV with ggseg # 2. calculate, plot, save the percentage change of each region with box plot # WANG. 26-Feb-2024; updated 01-OCT-2024 # Remove all objects created before to prevent clash rm(list=ls()) library(dplyr) library(ggseg) library(g...
70082ae5ab3662e7a686c01ea3ea81034e4c0235b74cb06bc4182678b369456e
R
9,692
140
library(Seurat); library(dplyr); library(ggplot2); library(patchwork);library(RColorBrewer) library(ktplots); library(pheatmap); library(viridis); library(tidyverse) library(CellChat) ################################## ### CellChat for 10 cell types ### ################################## pk <- readRDS("pk_all...
01d8fedfd9b01000aa4d5afb6e77809eb7ec97a6d85818dbc8b4d107ac5903d0
R
9,713
242
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) ## for maddie ## main Seurat package snRNA-seq pacakges library(Seurat) library(SeuratDisk) library(SeuratWrappers) library(future) ## packages for QC metric computation library(SingleCellExperiment) library(scds) library(fl...
b370417c52c39db1cf198f48d60ac32fa89650dd2413847532c71d180f2239ba
R
9,714
317
--- title: "Customizing oncoplots" author: "Anand Mayakonda" date: "`r Sys.Date()`" output: html_document: toc: true toc_depth: 3 toc_float: true number_sections: true self_contained: yes css: corp-styles.css highlight: pygments vignette: > %\VignetteIndexEntry{02: Customizing oncoplots...
548d703313069171da21100b0d467c57b05bd83bd7c37acf23ce41dc64068e7d
R
9,741
257
library(Seurat) flexsplit <- function(dat,char){ test=strsplit(as.character(dat),char,fixed=TRUE) n.obs <- sapply(test, length) seq.max <- seq_len(max(n.obs)) mat <- t(sapply(test, "[", i = seq.max)) mat } subplots <- function(sobj,colName,filename,raster=FALSE){ classes = unique(sobj@meta.data[colName])[,1] pdf(file...
3055c69b70097879d5b61753de6fec19fddeddf1d585b5332d4001795208059d
R
9,749
214
ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } options(stringsAsFactors = F) ## packages for data table processing/plotting library(tidyverse) library(rcartocolor) library(data.table) library(ggsci) library(here) library(readxl) library(Matrix.utils) DATADIR=...
db4d8a17c9d0c196dd53cddb0c7cbd87f1a4eecc98dfd661f5f0f52ebdf1096c
R
9,753
290
############################################### # Setup for MAGMA with LC snRNA-seq populations # code from Matthew N Tran # adapted by Lukas Weber, Sep 2022 ############################################### # module load conda_R/4.2 library(rtracklayer) library(GenomicRanges) library(liftOver) library(jaffelab) libra...
bb6d7f548d5d54b93ed9112e62c795ba619d0d2c95a2603363938457d4076b2c
R
9,787
298
## ----receive input from nextflow---------------------------------------------- #Get parameters args <- commandArgs(TRUE) #If running locally, redefine path<-args[1] markers<-args[2] print(markers) print(class(markers)) #Load standard package list source(paste0(path,'/bin/auxiliary/DirectoryChecker.R')) source(pa...
b720c52e31f9d0768e7d6e46050aa154d42954d9e4b0c7708a22ef319fab1471
R
9,788
229
####Required packages in the following. Please uncomment if you need to install them. #install.packages('xml2') #install.packages('neat') #if (!requireNamespace("BiocManager", quietly = TRUE)) #install.packages("BiocManager") #BiocManager::install("biomaRt") #####Description###### #This script runs a diagnostic and ...
0ee70a1b69bc5beed8d808cddc3d99d4ffcb9799c310936817f5fb8cba81112f
R
9,803
241
# This code is to do analysis on cortical volume # 1. calculate, plot, save the CV with ggseg # 2. calculate, plot, save the percentage change of each region with box plot # WANG. 26-Feb-2024; updated 01-OCT-2024 # Remove all objects created before to prevent clash rm(list=ls()) library(dplyr) library(ggseg) librar...
ce95c427a63672ef96d50966ede4b88fc4f46ace7c5b5c268c0ee8f0eca163d5
R
9,810
181
# !/usr/bin/env Rscript ## created by Yun Hao @MooreLab 2021 ## This script uses visNetwork package to visualize the flow of relevance along VNN paths of interest between query compound, hidden pathway modules, and the outcome of interest ## functions library(visNetwork); library(RColorBrewer); ## 0. Input argume...
01a92f68f647cff654b235fa3f1cd366d3855fb8a638897f0638e65ade33c850
R
9,815
267
#' Merge multiple microtable objects into one. #' #' @description #' Merge multiple \code{microtable} objects into one unified \code{microtable} object (e.g. combining 16S bacteria data with ITS fungi data). #' This is especially useful when performing cross-domain analysis. #' #' @param ... two or more \code{microtab...
5a85f04a9d23dffd38eb0b0b57402d24680b94fe4be785e7ef18e6d5f98575ee
R
9,816
241
#' Compare two lollipop plots #' @details Draws lollipop plot for a gene from two cohorts #' @param m1 first \code{\link{MAF}} object #' @param m2 second \code{\link{MAF}} object #' @param gene HGNC symbol for which protein structure to be drawn. #' @param AACol1 manually specify column name for amino acid changes in m...
4dc7c6c1e48fdc6ebddd92652283c20ec196f409249965729d59ea06994fd2d8
R
9,820
207
dashboard = function(maf, color = NULL, rmOutlier = TRUE, log_conv = FALSE, titv.color = NULL, sfs = statFontSize, fontSize = fs, n = 10, donut = pie, rawcount = TRUE, stat = NULL, titleSize = NULL, barcodes = NULL, barcodeSize = NULL){ if(is.null(color)){ #hard coded color scheme if user doesnt provide any ...
9bc2c19a7efc7df449b49f5c3ff93f048ede98452af2f08091a2e610b5935fe1
R
9,830
222
########### PLOTTING FUNCTIONS FOR FIXEL PAPER ############### # This script contains plotting functions to generate scatterplots and age related changes for figures 4 and 5. #### Load packages #### library(gratia) library(dplyr) library(svglite) library(cowplot) library(scales) library(grr) #### Define network col...
c908d5dd91a0d3d55cda79e90e8afd66b5f8ff98c6ad010d67f1ed970b452cd6
R
9,835
322
############################ # LC analyses: nnSVG results # Lukas Weber, Oct 2022 ############################ # module load conda_R/4.2 # Rscript filename.R # file location: # /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/ library(here) library(SpatialExperiment) library(dplyr) library(tidyr) library(ggplot2) ...
144dea5bb664819fd178db7bfc53c5ec3e0be63d5075e0da25884246daea30dc
R
9,839
242
library("readr") library("ggplot2") library("modelr") library("parallel") library("RColorBrewer") library("tidyverse") library("fuzzySim") library("smplot2") library("ggrepel") library("scales") library("colorspace") library("ape") library("geiger") library("caper") setwd("your directory") ##########...
a295322fffadf859a58a573588b85b71e566bd53c720075b3e8e516bd1aaa62e
R
9,851
236
### Between -cluster comparison #For this analyses, we will use the **lme4** package in R to fit generalized #linear mixed effects models. We are going the model the change in the chance #(or more formally the odds) of cells from a given mouse belonging to a given #cluster from the 3 genotypes to the PS19-fE4_Saline...
26b3ec450396761adcd85a56d6cb90b839b7b2225a60f441475ef4b25f5a907d
R
9,857
234
#' Subset MAF objects #' #' @description Subsets MAF based on given conditions. #' @param maf an MAF object generated by \code{\link{read.maf}} #' @param tsb subset by these samples (Tumor Sample Barcodes) #' @param genes subset by these genes #' @param fields include only these fields along with necessary fields in th...