sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
4d7280f4002a189cd89a371a2ef77fb26928dafa4d4a6c10c223e534a2762103
R
3,843
66
bedgraph = function() { samples_df = tlx_read_samples("~/Workspace/Datasets/HTGTS/samples/All_samples.tsv", "~/Workspace/Datasets/HTGTS") %>% dplyr::filter(celltype=="NPC" & tlx_exists) %>% dplyr::filter(grepl("promoter/enhancer", experiment) & alleles==2 | "APH concentration"==experiment & concentration==0.4...
5f31ceb2f1575b8c3034b5e9c87b220635aa56bdd924e5ec3435740e9cd9961d
R
3,858
81
#' Multiple variance Brownian motion estimation #' #' Computes rescaled branch lengths using multiple variance Brownian motion as described in Smaers et al. (2016) #' @param data a vector of tip values for species; should be in the same order as tiplabels in the tree #' @param tree an object of class "phylo". #' @para...
2dfd65ba5c42c064c38c02fd7fa09a8a29380db0f103d05f900d29381bc8c7d9
R
3,861
56
# Independent arithmetic verification using base R. No fitted health model. args <- commandArgs(trailingOnly=FALSE) script <- sub('^--file=', '', args[grepl('^--file=', args)]) root <- normalizePath(file.path(dirname(script), '..'), winslash='/') res <- file.path(root, 'results') cells <- read.csv(file.path(res, 'nativ...
11e355357ab0995439aecf042151339c1ffdf6c4227df8b16f6db9d1588e52a5
R
3,865
120
setwd('/work/AnneSophiaHartebrodt#6698/ms-project/') require(rhdf5filters) require(rhdf5) require(Rhdf5lib) renv::activate('/work/AnneSophiaHartebrodt#6698/ms-project/r-single-cell') renv::repair() set.seed(11) library(harmony) require(data.table) require(SingleCellExperiment) require(scDblFinder) require(scds) librar...
99aeccd4cf7eb06f01799a97655a0548b504d5056dda7beb528aa43090007f14
R
3,866
92
source ~/.bashrc #! /usr/bin/env Rscript #loadr4 rm(list=ls()) library(data.table) Path <- "/cluster/projects/p33/groups/imaging/ukbio" Batch="42k" BatchDate="160320" Date="051119" ################# # Prep DM GWAS # ################# ############### Add pop comps and genetic batch to demog file Demog <- fread(past...
a5cda8c3ecf5284688d1b0528c3cab272dcac7e866e3f71d65fcf05c5ed4577d
R
3,879
122
--- title: "Analysis of spatial information during common grid modes" author: "Harry Clark and Matt Nolan" date: "01/11/2023" output: html_document --- # Setup ```{r} library(tidyverse) library(lme4) library(emmeans) ``` # load data and create R friendly data tables ```{r} cells_data <- readRDS(file = "cells_df_singu...
12cb80b6ec38ca6b95a4caacf43e56e9f3c09a7031e29c86a3cb7c7be9b22c5e
R
3,894
139
library(tidyverse) library(DropletUtils) library(Seurat) dir.name <- list("/usr/users/mmnb1ngs/collab_work/workspace/ykbabal/Novaseq_Ferret/res_STAR/T1/Solo.out/Gene/raw", "/usr/users/mmnb1ngs/collab_work/workspace/ykbabal/Novaseq_Ferret/res_STAR/T2/Solo.out/Gene/raw", "/usr/users/mmn...
859048c201e47e32e5b4b54753e7fbac0632853fb2e594d63d513d24741b955f
R
3,898
176
--- title: "QC" output: html_document: df_print: paged --- ```{r global_options, include=FALSE} knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE) ``` ```{r, libraries} library(Seurat) library(cowplot) library(SCFunctionsV3) library(dplyr) library(tidyr) library(stringr) library(tidyverse) li...
167d1fba30e354ad763e4bcdf54f500926dbd87ac9c41df470cbbfc1bc32d8cf
R
3,901
111
load('/data2/zj/atac/second.Rdata') addArchRGenome("mm10") set.seed(42) addArchRThreads(threads = 30) ## prog1wt <- proj1[proj1$Sample%in%('WT-pcdhaq'),] prog1mut <- proj1[proj1$Sample%in%('MUT-pcdhaq'),] mouwt <- subset(mou.combined.sct,orig.ident%in%'wt') mouwt <- CreateSeuratObject(mouwt@assays$RNA@counts,'wt') ...
d1c267c675c92025f4be9fb6138c18c4b53bdaf8b1d7f8aa855ce6de0c5ce6ed
R
3,904
123
modularity_matrix <- function(g, gamma = 1, weighted = TRUE){ # # INPUT: # g, igraph or matrix object (to work as adjacency matrix) # memb, community membership # gamma, (optional) resolution parameter. Default is 1, which gives equivalent to Newman (2004) modularity # weighted, (optional)...
85f1b127cc89e49ba87b9706c1d77b26444f994e15875c86fbfc698a71dcc44a
R
3,913
105
--- title: "figure 1" author: "Pavitra Roychoudhury" date: "2023-07-15" output: html_document --- panels for Figure 1 Fig 1 shows effect of filtering ```{r} rm(list=ls()) library(Seurat) library(tidyverse) options(dplyr.width=Inf) library(cowplot); options(scipen = 999) all3<-readRDS('./seurat_analysis_all3.rds') pl...
6793bd40b1f5ad2d8eefc9b1e296d004af636bbe6b8aa6af919dd3c5f7a0df21
R
3,917
71
# This script assesses specificity of model to the actual seed site rm(list=setdiff(ls(),c('params','injection.site'))) basedir <- params$basedir setwd(basedir) savedir <- paste0(params$opdir,'nullmodels/seedspec_multi/',paste0(injection.site,collapse='-'),'/') opdir <- params$opdir dir.create(savedir,recursive=T) so...
6545f9d6514127e131afe906f0a5eb241d60b1ddf063a3dc07a96c51d56b5270
R
3,932
69
################# ### Load data ### ################# rm(list=setdiff(ls(),c('params','grp','treatment','injection.site'))) print(grp) basedir <- params$basedir setwd(basedir) savedir <- paste(params$opdir,'diffmodel/bidirectional/',paste0(injection.site,collapse='-'),'_independentfit/',sep='') dir.create(savedir,recu...
4b69f0815e2bb9bb971896be2ac72d6bf550a5ad45029ecf77468a763a129736
R
3,941
156
--- title: "Retina Samples" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE) ``` ```{r, libraries} library(Seurat) library(cowplot) library(SCFunctionsV3) library(dplyr) library(tidyr) library(stringr) library(tid...
4fba6980b9c37a9bd3b0b882a94cc8c79b36fe39993baa816d43c67d8e1dba89
R
3,947
158
#Analysis for "Turbidity drives plasticity in the eyes and brains of an African cichlid" #Allometric size standardization for each morphological trait (following Hendry & Taylor, 2004) #Analyzed by Jai Tiarks #E: tiarks.2@osu.edu ##Pull necessary libraries library('moments') library('ggplot2') library('gg...
b89ee5e33b5654e21ab5270327d5e7dd623bfda7985b741b5788864cd338f2d0
R
3,956
108
--- title: "Comparing task-anchored vs task-independent firing as a function of task performance on a single-trial level" author: "Harry Clark" date: "04/04/2023" output: html_document --- ```{r} library(sjPlot) library(lme4) ``` # subset the data acccording to trial type ```{r} spatial_firing <- readRDS(file="all_c...
f66f580177ed6998c216f3c2ed82e9dc6f38c038d202488dbae8e9c658f6d248
R
3,970
71
# KNN testing library(class) library(ggrepel) library(patchwork) # Fetch data and split it data <- FetchData(all.sub.integrated, c("UMAP_1", "UMAP_2", "UMAP_3", "orig.ident", "Type_step2")) data.vivo <- subset(data, subset = orig.ident == "briscoe") data.vitro <- subset(data, subset = orig.ident != "briscoe") ...
93731b7e083904959ddfee96601548bde5554575ccffd90de2f7565dc7f4ddf7
R
4,008
98
library(base64enc) library(cifti) library(dplyr) library(gifti) library(magrittr) library(rjson) library(stringr) print("This script 1) loads each subjects' timeseries, and 2) concatenates timeseries and makes connectivity matrices ") ################## # Set Directories ################## config_data <- fromJSON(...
2edbbe71ff32336426f9a2ef7073e069ab3ae8c24fea55abd5a914e6032bd483
R
4,009
126
library(dplyr) library(Seurat) library("ggplot2") library(monocle3) library(patchwork) library(SeuratWrappers) library(harmony) library(ggplotify) library(rmarkdown) sobjToCds <- function(sObj){ harmonyLoadings <- sObj@reductions[["harmony"]]@feature.loadings.projected sObj <- DietSeurat(sObj, graphs = "umap") c...
b2c220aa7e965effdc9a7866732d380648a8b13300081776db6bcd763233d9d7
R
4,014
27
# Barnes-Hut implementation of t-Distributed Stochastic Neighbor Embedding # # Wrapper for the C++ implementation of Barnes-Hut t-Distributed Stochastic Neighbor Embedding. t-SNE is a method for constructing a low dimensional embedding of high-dimensional data, distances or similarities. Exact t-SNE can be computed b...
a33e88ce67c309fc6e52e05bf4f21fe49918a16e9f51644a31331ca43388368e
R
4,015
109
--- title: "Comparing task-anchored vs task-independent firing as a function of task performance on a single-trial level using the ensemble classification method" author: "Harry Clark" date: "04/04/2023" output: html_document --- ```{r} library(sjPlot) library(lme4) ``` # subset the data acccording to trial type ```{...
9201761d1320cc66518c6502e21634fba9647c424e559bcd004fe29d60e936f7
R
4,035
90
rm(list=ls()) library(openxlsx) library(tidyverse) library(Hmisc) library(corrplot) library(pcaMethods) library(RRPP) library(dplyr) library(scales) options(scipen=999) #Import the current new data set - this includes data up till 2018 data <- read.csv("Input_files/Phenotype_data_final_June2023.csv") ...
1f0d48d23dd24a861bdb0edda19dc6ea935f651e69ecda0cfeb9ba6fd6798512
R
4,038
102
# Correlates Six Fold symmetry with the accuracy in the Clock Navigaiton task for Both groups # Investigate the possible correlation between accuracy and grid-like code: library('ggplot2') library("ggpubr") library(ppcor) library(rstatix) library(ggprism) library(car) # Load the accuracy table --- ClockNavExpAcc<-...
4a342c2a392473211dfea5fab4170c8c429f9ea1ee33f73a27f0119bb757bf59
R
4,064
117
##### Human ### DATA fix_name <- function(name){ tmp <- strsplit(name, "_") return(tmp[[1]][1]) } fix_type <- function(x) {as.numeric(as.character(x))} x1 = read.delim("GSE76381_ESMoleculeCounts.cef.txt", sep="\t", header=F) cellid = x1[2,] celltype1=x1[3,] timepoint1=x1[4,] x1 <- x1[-c(1:5),] rowname...
c4b01004a34512e199dd93173fb6c5dcaa782944f7e0e317a6c56f17fccf99c1
R
4,068
130
library("dorothea") library("DESeq2") library("limma") setwd("C:/work/publications/technologyPaper/Artificial-Signaling-Network/TF activities Ligand Screen") ## countData = read.table('filtered/counts.tsv', sep ='\t', stringsAsFactors = FALSE, header=TRUE, row.names=1) metaData = read.table('filtered/metadata.tsv', se...
2d410b4e1dc6dd77ce2166882ae18d1fce8451e2b6de96a315c2f2a244f95b7f
R
4,079
123
c25 <- c( "dodgerblue2", "#E31A1C", # red "green4", "#6A3D9A", # purple "#FF7F00", # orange "black", "gold1", "skyblue2", "#FB9A99", # lt pink "palegreen2", "#CAB2D6", # lt purple "#FDBF6F", # lt orange "gray70", "khaki2", "maroon", "orchid1", "deeppink1", "blue1", "steelblue4", "darkturquoise",...
5f093427b860c5e119667dd2503eff00502c1c3f1cbc3fc8ffff272987959783
R
4,084
162
--- title: "220808_PRISM_data" author: "Jennifer Fisher" date: "8/8/2022" output: html_document: toc: true theme: united --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # START Goal/Purpose of operations: Organize and filter PRISM data for downstream analysis. This creates ...
8a1491e0a11f52a82e24a66a9cfa5aaecc5162ae7cded7e1bf2da38df68d9a60
R
4,094
85
################# ### Load data ### ################# rm(list=setdiff(ls(),c('params', 'injection.site'))) basedir <- params$basedir setwd(basedir) savedir <- paste(params$opdir,'modelcomparison/traintest/',paste0(injection.site,collapse='-'),'/',sep='') dir.create(savedir,recursive=T) source('code/misc/modelcomparis...
d7f389df424a6148547c209c2d0ce7627b4e68eb9f7dc92b4500590beaf5d3de
R
4,134
134
setwd('/work/AnneSophiaHartebrodt#6698/ms-project/') require(rhdf5filters) require(rhdf5) require(Rhdf5lib) renv::activate('/work/AnneSophiaHartebrodt#6698/ms-project/r-single-cell') renv::repair() set.seed(11) require(data.table) library(cowplot) library(rsvd) library(Rtsne) library(Signac) library(Seurat) library(Ge...
9c2ea86cdcca7bacb7ecab30fddeb6b41ae5cbd206864660c9214a5f11ca995e
R
4,165
61
# Figure 1B rm(list = ls()) require("writexl") require("readxl") library("dplyr",quietly=T) library("ggplot2",quietly = T) library("ggtree",quietly = T) library("ape") library("aplot") library("ggsci") setwd("Source_Data/Figure_2/Figure_2A/") ERVK_proportion<-read_excel("Figure_2A.xlsx") Aves.Sp<-read.tree("Figure_2A...
6f6cedb3cf871987d95577b1e54b145949297ca6ed6a11e9fe99e70db6864915
R
4,175
112
#! /usr/bin/env Rscript rm(list=ls()) library(data.table) library(ggplot2) library(VennDiagram) library(DescTools) library(dplyr) library(eulerr) options(bitmapType="cairo") Path <- "/path/" setwd(Path) signif_thr = 0.05/18877 ########################################### # point towards loci txt and calc overlap # #...
ab7ae96cfb19125e39478b9ba827334be39fb9262e9b4c28f8dee22dfec6712d
R
4,175
115
# This script estimates slopes for the (linear) relationship between ABSOLUTE brain asymmetries and age # 30.10.2023 Max Korbmacher (max.korbmacher@gmail.com) # PREP #### # load packages if (!require("pacman")) install.packages("pacman") pacman::p_load(dplyr, marginaleffects, ggpubr, ggplot2, Rmpfr, mgcv) # load data ...
30d8e7bcc5b7a88bbd9fe59d415bd97af6e75c38aba406ead7c9bedf5683015a
R
4,181
121
#Analysis for "Turbidity drives plasticity in the eyes and brains of an African cichlid" #PCA #Analyzed by Jai Tiarks #E: tiarks.2@osu.edu # data prep --------------------------------------------------------------- ##Pull necessary libraries #library('moments') library('ggplot2') library('ggpubr') libr...
22ef2c51a5bb8c1c326a21c25a8ecb227d02654c4cc2a1944353932eeb5f2e43
R
4,186
138
# perform network diffusion of K steps over the network A "network.diffusion" <- function( A, K ) { # set the values of the diagonal of A to 0 diag(A) = 0 # compute the sign matrix of A sign_A = A sign_A[which(A>0,arr.ind=TRUE)] = 1 sign_A[which(A<0,arr.ind=TRUE)] = -1 # compu...
95b175a6a662f0fa5f5b1d18fdf54c4f94b4af629873335779a0661ca523e0f7
R
4,200
80
# Load required libraries library(Seurat) library(Libra) library(readr) library(ggplot2) library(forcats) library(EnhancedVolcano) library(grid) # Load Seurat objects and perform cell type assignment E16_CCA_inhib <- readRDS("/data/mayerlab/Github/Dvoretskova_et_al_2023-DATASETS/E16_CCA_inhib.rds") E16_CCA_inhib@meta....
ddd602a07d2e9fa377e043c312458cef9482b0cce1ecb1d52c621254718a1f2f
R
4,224
111
##' cca_main() #' #' @description Perform Sparse CCA using the optimal tuning parameters #' #' #' @param x Expression-driven adjacency matrix #' @param z Spatial-driven adjacency matrix #' @param penaltyx The penalty to be applied to the matrix x, i.e. the penalty that results in the canonical vector u. If typex is "st...
34b9b90be4457b1e983e624f4833ee7b5904239444842e290a54e12ed5c0673a
R
4,243
104
setwd('/work/AnneSophiaHartebrodt#6698/ms-project/') require(rhdf5filters) require(rhdf5) require(Rhdf5lib) renv::activate('/work/AnneSophiaHartebrodt#6698/ms-project/r-single-cell') renv::repair() set.seed(11) require(data.table) require(wesanderson) library(ggplot2) require(colorspace) require(stringr) requ...
fbcdd30817ba3012b2970d8276aeed2c804ecfec59931a5bb0862e20c757ca84
R
4,250
110
###################################################################################################### # Create_the_gruffi_Package_OLD.R ###################################################################################################### # source("~/GitHub/Packages/gruffi/dev/Create_the_gruffi_Package_OLD.R") # rm(li...
c613d98b9091d6668c66cf53ec993ba98db7363ec1cf5694a6cbf51387ae52ba
R
4,261
75
### Hong X. et al 2023 ### produce figure 5 ### hongxiaoning@outlook.com library("ggplot2") library("ggpubr") library("ggsci") library(lemon) #Figure5 b SEM_ebtop<-function(x){ return(mean(x)+(sd(x)/sqrt(length(x)))) } SEM_ebbottom<-function(x){ #return(mean(x)-(sd(x)/sqrt(length(x)))) return(mean(x)) } data <...
f5cffdb7f3629acaf1b6d3a720e9c25088ca20fb54247b866ebc9398cf166bd6
R
4,286
103
#Script for comparing random selection of proteins to organelle protein list of interest library(ggplot2) library(reshape2) library(dplyr) # Load data # Input file must contain a column with the Gene names, a column with log2 fold-changes for each experiment and # a column with the organelle/compartment annotation fi...
0158f2b69b03149dc31ded00f3bd13386cc046d0349611f89426b45953224aea
R
4,293
108
#!/usr/bin/env Rscript # Generate tAge parity fixtures from the authors' reference implementation # (https://github.com/Gladyshev-Lab/tAge). # # Run from the repo root: # Rscript clocks/generate_tage_fixtures.R <path-to-tAge-clone> tests/data/tage # # Missing R dependencies (edgeR, reticulate) are installed into a lo...
fc3ab7c8d9c77f9ae8a11f6a537384823b8913efc754d91db3e945f48cfafe5b
R
4,295
86
# Export lossless linear compositions and independent original-author predictions. # Only base R is needed. Original source files are checksum-verified by the builder. args <- commandArgs(trailingOnly=TRUE) source_dir <- args[[1]] out_dir <- args[[2]] options(digits=17) make_inputs <- function(reference) { n <- leng...
9f2c159ce13a194dda40974f552c63894b9cb6c96729826deda9e2aada007c1c
R
4,334
91
st = ls()) options(stringsAsFactors = F) library(fitdistrplus) library(dplyr) setwd('/work/cascades/bz10/VCU_human/data/HiC/new_chr/background') chr1 = read.table('chr1.bed') colnames(chr1) =c('chr_loci1','start_loci1','end_loci1','chr_loci2','start_loci2','end_loci2','read','num') head(chr1) f=list.dirs(path = '/wor...
a27d5a43a71a6a367f0f3e71874218dc53c0305445f40229494253005f1ea320
R
4,337
105
--- title: "HBN Covbat" author: "Audrey Luo" output: html_document --- # Perform CovBat Harmonization on GBC + network pair analysis ```{r setup_covbat, include=FALSE} library(ComBatFamily) library(dplyr) library(mgcv) atlases_GBC <- "schaefer200" # only include schaefer200 for sensitivity analysis in supplement d...
c71c9450e2564ed71d21c0ff549cd2562f231645372ef17daf658c46cb6a4e98
R
4,340
109
--- title: "HCPD Covbat" author: "Audrey Luo" output: html_document --- # Perform CovBat Harmonization on GBC + network pair analysis ```{r setup_covbat, include=FALSE} library(ComBatFamily) library(dplyr) library(mgcv) atlases_GBC <- "schaefer200" # only include schaefer200 for sensitivity analysis in supplement d...
4509d4e2ce9963f3f1f9c2c239dc8f165f0f69c2e91772fe29641633b82b1a4e
R
4,367
71
# Independent base-R verification of the added sensitivity analyses. args <- commandArgs(trailingOnly=TRUE) root <- if(length(args)) args[1] else '.' read <- function(f) read.csv(file.path(root,f),stringsAsFactors=FALSE,check.names=FALSE) out <- list() check <- function(label,got,expected) { stopifnot(length(got)==len...
3a6fca0902318d41ccc21002129a65cda4d44396eaf6117569ab0b66fb3d98b1
R
4,395
83
################################################################################ # cluster.R 2.0.3 # # Authors: Patrick Poullet, Stephane Liva, Guillaume Arras (Institut Curie) # # Contact: myproms@curie.fr ...
b81bfccd01f9719759b28dc1dda6014c903eed7f8e86bec02785a0dbb8a537d0
R
4,475
144
#!/usr/bin/env Rscript #' Single-cell RNA-seq Processing Pipeline for COVID-19 PBMC Dataset #' Dataset: Schulte-Schrepping et al., 2020 (PMID: 32810438) #' Description: Process and analyze PBMC dynamics in COVID-19 patients #' GEO: EGAS00001004571 # 1. Setup and Configuration -----------------------------------------...
3d9de8037b8bc8d9e43dbbc5c2023954f93889658ebd55347515897b25e2a86b
R
4,477
99
library(future.apply) options(future.seed = TRUE, future.globals.maxSize = 1024 * 1024 * 1024) CCA.permute.both= function(x,z,penaltyxs,penaltyzs,niter,v,trace,nperms,standardize,upos,uneg,vpos,vneg,outcome,y,cens, seed = 1234){ set.seed(seed) call <- match.call() if(standardize){ ...
c92a55f9e5c5bf78f7a1a1ee2cd9de820864f08fe89e66aaca8b7077b25b45a4
R
4,480
128
#!/usr/bin/env Rscript options(width=200) ######################### # # Loading Data and Libraries # ######################### args <- commandArgs(trailingOnly=TRUE) cliargs <- args[-(1:2)] options('warn'=1) #report non-convergences, etc library(lme4) # library(languageR) library(optimx) library(ggplot2) library(mv...
ec82cac14cc68c97525175b1faf85f2597fa0d7832f3ec89e3a0c8ecc3f82b82
R
4,507
168
#!/usr/bin/env Rscript #' Platelet Dataset Integration Pipeline Using Harmony #' Description: Integrate multiple platelet datasets using Harmony batch correction # 1. Setup and Configuration ------------------------------------------- suppressPackageMessages({ library(Seurat) library(harmony) library(tidyverse...
046787c7cca89f6910c073770844bf997926b9000e543befb5ae2b43270c4ea6
R
4,515
98
library(fgsea) library(msigdbr) library(ggrepel) library(ggpointdensity) library(tidyverse) atac_de <- read_csv("data/005.1c_ATAC_de.csv") dge <- readRDS("data/002_res_tbl.rds") point_plot <- atac_de |> inner_join(dge, by = c("gene_symbol" = "symbol"), suffix = c("_atac", "_rna")) |> m...
5cdd3a26962f13cfa01edd3fc97d451b3ab280db81393dc918331aaa0d62e64a
R
4,516
104
resamp_nodals <- function(df, to_sample = 'group', efficiency_loss = FALSE, local_eff = FALSE, metrics = c('signed_strength'), net_list_args = c(...), multi_net_measures_args = c(...)){ #shuffle the grouping labels if(length(to_sample) > 1){ df$labels$in...
3c62fa6797c1d4a275e55d93194c9d760586a9de946be7761ff262ad2553c497
R
4,518
135
--- title: "Modules" output: html_notebook --- ```{r} library(dplyr) library(tibble) library(stringr) ``` ### Perturbation effect on module scores Outputs **Fig.6i** ```{r} P7GE_neurons <- readRDS(file = '/data/mayerlab/Github/Dvoretskova_et_al_2023-DATASETS/P7GE_neurons.rds') ``` ```{r} # initialize dataframe qu...
7dcfe28e89cfd3f7fc55ba5f516070954b09636a17fdfd9b77074b82e8ccd28e
R
4,521
114
# Rscript build_meco_sentitems.R /fs/project/schuler.77/meco/joint_fix_trimmed.rda ee # Language codes (wave 1): "du" "ee" "en" "fi" "ge" "gr" "he" "it" "ko" "no" "ru" "sp" "tr" # Language codes (wave 2): "ba" "bp" "da" "en_uk" "ge_po" "ge_zu" "hi_iiith" "hi_iitk" "ic" "no" "ru_mo" "se" "sp_ch" "tr" args <- commandArgs...
cdf501c5725e7d7d44bc03fbdee40150dfa8575262d158751bf7f470d61dd3ef
R
4,521
85
################# ### Load data ### ################# rm(list=setdiff(ls(),c('params','injection.site'))) basedir <- params$basedir setwd(basedir) savedir <- paste(params$opdir,'modelcomparison/traintest/',paste0(injection.site,collapse='-'),'/',sep='') dir.create(savedir,recursive=T) source('code/misc/miscfxns.R') s...
72db58219d5edd2869d60e913777c29d3cef097c6416da991112dace04d81ef3
R
4,586
221
--- title: "Monocle ATAC all" output: html_document: df_print: paged --- ```{r global_options, include=FALSE} knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE) ``` ```{r, libraries} library(tidyverse) library(Signac) library(Seurat) library(JASPAR2020) library(GenomeInfoDb) library(EnsDb.Hsapie...
48c40b92ba13697e77b191e51e203351853e265a94f8f5d1c4c800817b2404f0
R
4,596
105
#============================================================================= #coloc.R #date: 2023-10-13 #by Judy Wang #============================================================================= library(data.table) library(dplyr) library(cowplot) library(foreach) library(Biobase) library(readxl) library(coloc) lib...
23149538d843151b92d73005f4c3256f29926d8d29c7d82c66ad036e2536f653
R
4,624
94
rm(list=ls()) basedir <- '~/Box/PD_Project/Quant_pathology_dataset/' setwd(basedir) params <- list(basedir=basedir, grps = c('NTG', 'G20'), # NTG are WT mice; G20 are mice with LRRK2 mutation injection.site = c('iDG', 'iCA1', 'iCA3', 'iVISam', 'iRSPagl'), # injection sites (using ABA nomen...
5e4ac3e4cafd8d629e3ca7d8547e125055905378b72f9c507ac65b9f45d200b7
R
4,629
174
# compute and returns the multiple kernel "multiple.kernel.cimlr" = function( x, cores.ratio = 1 ) { # set the parameters kernel.type = list() kernel.type[1] = list("poly") kernel.params = list() kernel.params[1] = list(0) # compute some parameters from the kernels N = dim(x)[1] ...
5d97cb18bfc60a5ba8a64411a9e4c0be77440d3ab23278011f9d72118a331040
R
4,637
162
searchPair(signaling = 'CX3C', pairLR.use = moucellchat$mut@LR$LRsig, key = "pathway_name", matching.exact = T, pair.only = T) cellchatgene <- function(data1,signal,data2){ print(signal) ligand <- unique(str_match(str_split(netAnalysis_contribution(data1, signaling = signal,return.data =T)$LR.contribution$name,"-"...
5abfb948be6af518862c72c202a780e24840d58fa464c433a0b47e0b4b9f0929
R
4,659
99
suppressPackageStartupMessages({ library(Seurat) library(stringr) library(sctransform) library(future) require(scales) library(RColorBrewer) library("readxl") library(dplyr) library(dendextend) }) ### figure 3 + supplements # import the Dopaminergic nuclei (mDA) dataset. sobj <- readRDS("/path/to/d...
fbd46f7def02d31f8c6e4993b4efb13d25d56bd809a7e23a6df46eaf96e92156
R
4,684
172
#Only needs BioCParallel and BRISC nnSVG <- function(input, spatial_coords = NULL, X = NULL, assay_name = "logcounts", n_neighbors = 10, order = "AMMD", n_threads = 1, BPPARAM = NULL, verbose = FALSE) { if (is(input, "SpatialExperiment"))...
8f40bfdc3e3fb56e31ac80da6ee986769cb1a3ff191e7a1414ee76652d7f4d17
R
4,715
204
--- title: "AD3 ATACseq - shared peaks" output: html_document: df_print: paged --- ```{r global_options, include=FALSE} knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE) ``` ```{r, libraries} library(tidyverse) library(Signac) library(Seurat) library(GenomeInfoDb) library(EnsDb.Hsapiens.v86) l...
346070747485e2a740000338dea41de0722fbdb41398479f29ffcb20a04a4056
R
4,721
156
--- title: "220805_network_differences_methods" author: "Jennifer Fisher" date: "8/5/2022" output: html_document: toc: true theme: united --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # START Goal/Purpose of operations: To compare the centrality metrics for the disease ge...
d17d7000030609d757b4f455d0ca39835c5fa9c1750e69d1f74f0c6064175f32
R
4,726
83
rm(list = ls()) options(stringsAsFactors = F) library(DiffBind) setwd("~/Documents/Virginia Tech/Project_4_VCU_postmortem_SCZ/diffbind/input_sheet") ######################################################################################################## H3K4me3 <- dba(sampleSheet = "SCZ_Control_glia_K4.csv") H3K4me3_bl...
4e1abdb7e850944b6cb72bf19945bca1479fe1835886192853ed169b4d2ccbd5
R
4,754
153
#!/usr/bin/env Rscript #' Gene Name Processing Pipeline #' #' This script processes and standardizes gene names from a Seurat object using HGNChelper. #' It handles special cases like AB- prefixes and dot notations, and resolves multiple symbols. # 1. Setup and Configuration -----------------------------------------...
21805afddb987ab8758335e4661cba9d9151cd9b92bb73e71de8cb88bad86f36
R
4,764
161
################################################################################## # Statistical analysis of Sholl profiles based on mixed-effect models # # Adrian Gabriel Zucco # Center for Translational Neuromedicine # University of Copenhagen # # Adapted from: # Wilson, M. D., Sethi, S., Lein, P. J. & Keil, K....
cf185951f154fe422bdfa47cebe46fa75df0349025791077f68e9c4df7ca6abf
R
4,771
91
library(readr) library(dplyr) library(ggplot2) library(cowplot) library(stringr) devtools::load_all('~/Workspace/breaktools/') main = function() { baits_df = readr::read_tsv("~/Workspace/Datasets/HTGTS/wei_pnas2018_baits.tsv") # # Read TLX files # samples_df = tlx_read_samples("~/Workspace/Datasets/HTGTS/sa...
d4f4f84e6b971ef95b5abcae717e5722de4337506920ab11bb7e8d398817e6a0
R
4,809
154
--- 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%" ) ``` # STew <img width="28%" align = "right" src="https://github.com/fan...
1a3d05cea1e703d3dc1ca17f46a089d8c7c7afbb6bf1868a100ad66f46252f4c
R
4,816
72
# Set directory to source file loaction setwd(paste0(figureDirectory, "Figure3-Genomic-Regions" ) ) library(ggplot2) library(cowplot) load(file = "barplotOverviewDF.RData") load(file = "pathwayGenePlotDf.RData") load(file = "immunePlotDf.RData") colorsExp <- c(rep("blue3",8),rep("forestgreen",6),rep("gold3",3),rep(...
75aee188cbbf2d206eb251ca0a224a56b9834d2cf72a995573e36b0a35cb8b43
R
4,816
91
### Prepare structural connectome matrix for network analyses rm(list=setdiff(ls(),'params')) basedir <- params$basedir setwd(basedir) savedir <- paste(params$opdir,'processed/',sep='') dir.create(savedir,recursive=T) source('code/misc/fitfxns.R') # read in raw pathology dataset to get region names path.data <- read...
a6c38de8945d13292d0debe449855187957382f2c7c6ee9d76f99c7219cdf885
R
4,820
122
library(base64enc) library(cifti) library(dplyr) library(gifti) library(magrittr) library(rjson) library(stringr) print("This script 1) loads a subject's cifti files, and 2) concatenates timeseries and makes thresholded / absvalue connectivity matrices") ################## # Set Variables ################## args ...
36eaa7155c8e1984a1533f01f290dd656e374441582b60620e4bdf0d4e901e7a
R
4,830
113
#' Make a gene-wise analysis #' #' This function generates the gene-wise plot starting from the VCF input file #' #' @param VCF_FILE Path to the input VCF file #' @param FASTA_FILE Path to the input FASTA file #' @param ASSEMBLY (optional) which assembly your VCF is (hg38/hg19) #' @param CENTILE percentile of genes to ...
68719fe541e6815b22a9c60753b3b613b47d0811e6fc8b02188c15cf35fc84cb
R
4,843
144
setwd('/work/AnneSophiaHartebrodt#6698/ms-project/') require(rhdf5filters) require(rhdf5) require(Rhdf5lib) renv::activate('/work/AnneSophiaHartebrodt#6698/ms-project/r-single-cell') renv::repair() set.seed(11) require(rlang) require(Seurat) require(data.table) require(SingleCellExperiment) require(scds) require(ggpl...
f8d1be4d581bf66727a5fb85f063b52de7bd17d1824bb0cf45b14ff45e843010
R
4,851
157
library(Seurat) library(cowplot) library(SCFunctionsV3) library(dplyr) library(tidyr) library(stringr) library(tidyverse) library(DoubletFinder) library(pheatmap) library(ggplot2) sObj_Filtered <- readRDS("rObjects/sObj_Filtered_all.rds") reference <- readRDS("/data/rachel/Linda_Lako/Retina/fetal_and_embryonic/rObjec...
3a06fc69eee0f6a0c567cce209f7a38b0e327bef5f809c0fbe4ce415173e755a
R
4,856
195
--- title: "`r thetitle`" output: html_document: df_print: paged --- ```{r} knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE) ``` ```{r libaries} library(dplyr) library(Seurat) library("ggplot2") library(monocle3) library(patchwork) library(SeuratWrappers) library(harmony) library(ggplotify) sobjT...
bdd9285d99b6ee0c833954814cfb1795bab68b848d4149b30666a1fd4e6387a0
R
4,860
132
#!/usr/bin/env Rscript options(width=200) ######################### # # Loading Data and Libraries # ######################### library(optparse) opt_list <- list( make_option(c('-t', '--title'), type='character', default='title', help='Title of "diamond" ANOVA (e.g. "X vs. Y").'), make_option(c('-l', '--left...
dca3de080a8403cdc85d442c28fd2f36a1244981f9356b9d5e22571287ef25f9
R
4,897
135
#!/usr/bin/env Rscript options(width=200) ######################### # # Loading Data and Libraries # ######################### args <- commandArgs(trailingOnly=TRUE) cliargs <- args[-(1:2)] options('warn'=1) #report non-convergences, etc library(lme4) library(languageR) library(optimx) library(ggplot2) #The below s...
96e9ab4ed3d5edaf6695b664cf017a24bec34d99c55b51866e073fad985b296a
R
4,902
113
#function to determine the true number of days on a ventilator #counts only days when intubated correct_vent_days = function(endpoints, bal_data) { require(tidyverse) #get colnames into standard form colnames(bal_data) = gsub("\\.", "_", colnames(bal_data)) #I like underscores colnames(bal_data) = gsub("_+$...
e6d4520a094c99ddbbf7d7b9cc3d9362c2ebbcd626acf4163f5353125018592c
R
4,920
141
# Plot the Accuracy and RTS of the Clock Navigation Experiment library(ggplot2) library(ggforce) library(ggdist) library(gghalves) library(ggprism) library(dplyr) library(rstatix) library (lsr) library(lme4) library(effectsize) # Clock Navigation Experimet ## Accuarcy ----- ClockNavExp<-read.csv('/Volumes/ROBBOT/Pro...
19b28e216342421f474937ec81aac724e1b09373832ffb0bf0354dd4c20ab4a3
R
4,930
186
--- title: "`r thetitle`" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE) ``` ```{r} library(Spaniel) library(scran) library(scater) library(batchelor) library(dplyr) library(Seurat) library(SCFunctionsV3) library(cowplot) library(RColorBrewer) ``...
1040e79f91ea8b431fe07c85e9ffbbb052828b23724d4954e1cb6bccee4ac650
R
4,933
183
--- title: "Kallisto bustools Processing" output: html_notebook --- This notebook is an example of processing a kallsto|bustools run as implemented in the `run-kallisto.nf` workflow. ```{r setup} library(magrittr) library(ggplot2) library(SingleCellExperiment) ``` First we will download a data set to work with from...
e621752a042317170dea93ff479e195c7175828fd42841dc918ade6d37e79651
R
4,937
173
--- title: "Bap1 Glia Differential Gene Expression" author: "Kat Beigel (beigelk@chop.edu)" date: "`r Sys.Date()`" output: html_document --- # Glia KO. v. WT by cluster, using Seurat v3.1.2 ```{bash, include=FALSE} wget https://github.com/satijalab/seurat/archive/refs/tags/v3.1.2.tar.gz ``` ```{r setup, include=TR...
ada93ae3df7dfc3bad7b3d4262dae6df1fc2cc9d875ba29d777ee675d136ed68
R
4,947
144
library(DESeq2) library(corto) library(babelgene) library(tibble) library(dplyr) brainexpmat <- readRDS("data/gtex_Brain_expmat.rds") descmatchr <- readRDS("data/002_res.rds") |> as.data.frame() |> filter(!duplicated(symbol)) rld <- readRDS("data/002_dds_rlog_normalized_agc1v2.rds") agc1expmat <- ...
0212fb1b250d655f58cb3e32648293d1784b86410b6996e1d9cdfd3912682374
R
4,955
88
# Sncg analysis # isolate sncg positive cells then do marker gene analysis library(gprofiler2) library(purrr) library(ggrepel) VlnPlot(data.combined, "Sncg") sncg <- subset(data.combined, subset = Sncg > 1) %>% subset(subset = seurat_clusters %in% c(16, 7)) %>% subset(subset = Pseudotime > 0.3) # the pseudo...
f544661c5bba481247699c2b498ffaa35a1fa6525b42ac7b2ccd167e346cc929
R
4,957
94
#!/usr/bin/env Rscript # Libraries library(Seurat) library(argparse) library(ggplot2) # Create a parser parser <- ArgumentParser("Parameters for HTODemux Visualisation") parser$add_argument("--hashtagPath", help = "folder where rds object was saved from the first part of HTODemux") parser$add_argument("--assay", help ...
43fbc8ffdbab6dcec91cc87735c441e4ba0eda2905a3f5a0b427a7082d069183
R
4,971
124
#########################################@ ## Assess conservation of modules - FCD 2b rm(list=ls()) gc() library(CoReMo) library(randomcoloR) library(TBTools) library(RTBKM) library(here) library(parallel) library(tidyverse) library(DT) #*******************************************************************************...
a67223add7017781edd3bdd0d8d52fbd3a217c17f45e2efae03b33684d1afb8a
R
4,975
88
################# ### Load data ### ################# rm(list=setdiff(ls(),c('params','grp','treatment','injection.site','goi'))) print(grp) print(treatment) basedir <- params$basedir setwd(basedir) savedir <- paste(params$opdir,'diffmodel/bidirectional_onelm/',paste0(injection.site,collapse='-'),'/',sep='') dir.creat...
cda3db3ce265661f23ca478354c17eba058d1b6146b9d45311c69c5936e549aa
R
4,986
128
--- title: "HCPD Covbat" author: "Audrey Luo" output: html_document --- # Perform CovBat Harmonization on Connectivity Metrics (GBC, BNC, WNC) Covbat for GBC, BNC, and WNC can be performed locally using this Rmd file. ```{r setup_covbat, include=FALSE} library(ComBatFamily) library(dplyr) library(mgcv) atlases_GB...
b08f76fec3c45732d1276fc23474ab72a10daa944ddb33d9d29a548d7ca7fc30
R
4,995
203
--- title: "QC - ATACseq" output: html_document: df_print: paged --- ```{r global_options, include=FALSE} knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE) ``` ```{r, libraries} library(tidyverse) library(Signac) library(Seurat) library(GenomeInfoDb) library(EnsDb.Hsapiens.v86) library(ggplot2...
b657dc61a8c49137271f42608a3f48febf9acaff1eb8e9c0b8004398cd3160a7
R
5,011
141
#!/usr/bin/env Rscript argoffset = 5 #this is the offset for sys.argv for running an rscript from cli ######################### # # Returns only the complexity lines that are shared between input files # Made for intersecting %.eyemodels # ######################### args <- commandArgs(trailingOnly=TRUE) write(pas...
58e21791bc415b32839e09cd3706fa087088fe95105d15f6057ddb4c5592775b
R
5,025
96
suppressPackageStartupMessages({ library(Seurat) library(stringr) library(sctransform) library(future) require(scales) library(RColorBrewer) library("readxl") library(dplyr) library(dendextend) }) ### figure 2 + supplements # import the Dopaminergic nuclei (mDA) dataset. sobj <- readRDS("/path/to/...
46eb4f2569520eca5e56e95ca527f644b3916bc7a8f6676b781e0d2e147e208e
R
5,028
162
library(beeswarm) library(BiocParallel) library(DT) library(edgeR) library(ggplot2) library(here) library(limma) library(MASS) library(openxlsx) library(plotly) library(RColorBrewer) library(readxl) library(scales) library(tibble) library(tximport) library(reshape2) library(WGCNA) library(CoReMo) library(lme4) library(...
668b367f37775f43dd9150bf30445b3f01754b13bac1dad73d208de92812ba00
R
5,029
143
# Install tidyverse if you haven't install.packages("tidyverse") # Load the tidyverse package library(tidyverse) # Load your data spheredata2 <- read.csv("Figure1-Figuresupplement1_SourceData1.csv") # Scatter plot between Migration and ISS, colored by Diagnosis ggplot(spheredata2, aes(x = `ISS`, y = Migrat...
4dc989688fb6bf55a9a92930fc37ca62c797ded03a9679cccdc24bc57afe577d
R
5,032
117
if (!('pracma' %in% installed.packages()[,'Package'])){install.packages("pracma")}; require(pracma) if (!('psych' %in% installed.packages()[,'Package'])){install.packages("psych")}; require(psych) #trocar esse nome por matrix_difference functional_effect <- function(df, to_sample = c('signal', 'group'), resamp = FALS...
0663d540610be33d3ad69b6825f4152b0e292d6c2cf9c8429f0dc67294b2bc58
R
5,047
163
library(beeswarm) library(BiocParallel) library(DT) library(edgeR) library(ggplot2) library(here) library(limma) library(MASS) library(openxlsx) library(plotly) library(RColorBrewer) library(readxl) library(scales) library(tibble) library(tximport) library(reshape2) library(WGCNA) library(CoReMo) library(lme4) library(...
31660d01586536d99c89287b331d9d1620b24249fdc0c3238f9bd34c6472135a
R
5,067
129
--- title: "HBN Covbat" author: "Audrey Luo" output: html_document --- # Perform CovBat Harmonization on Connectivity Metrics (GBC, BNC, WNC) Covbat for GBC, BNC, and WNC can be performed locally using this Rmd file. ```{r setup, include=FALSE} library(ComBatFamily) library(dplyr) library(mgcv) atlases_GBC <- c("s...
bfdc0575aa5585a15679b2681f709f5cd4ca6b66106f27871dd59328a8b7e10c
R
5,080
117
#' Make a chromosome-wise analysis #' #' This function generates the chromosome-wise plot starting from the VCF input file #' #' @param VCF_FILE Path to the input VCF file #' @param METHOD how to count (and plot) variants for each chromosome ("RAW"=raw number, "LEN"=n/chr-length(ratio), "COD"=n/chr-coding-length(ratio)...
2ee511382231758d33232b076c631e0db1f96620f4c367064f62dd236ac064a2
R
5,081
101
library(msigdbr) library(fgsea) library(ggpattern) library(tidyverse) # Import metabolite table metab_orig <- read_delim("data/metabolites_quantitative_values_siagc1_vs_control.csv", delim = ";") metab <- metab_orig |> rename_with(~gsub("Err_", "Err.", .x), .cols = starts_with("Err")) |> rename_with(~pa...