sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
f7661898e1b2e7b64bbd79da5f5041d60329a5c15e0b5c3183f0e91fbcdfe9d5
R
5,085
114
--- title: "230623_depmap_drug_target" author: "Jennifer Fisher" date: "06/23/2023" output: html_document: default --- Goal/Purpose of operations: The Archilles’s project investigated essential genes in cancer cell lines via CRISPR-Cas9 lost of function screen. We download the “CRISPR (DepMap Public 23Q...
526e0f1b602cfe2a970f929752a0558e11d2f5d4584b2b2c10d291c9f08fe8cc
R
5,108
127
library(dplyr) library(gratia) library(janitor) library(magrittr) library(mgcv) library(purrr) library(rjson) library(tidyr) library(tidyverse) source("/cbica/projects/network_replication/manuscript/code/scripts/main_analyses/GAM_functions.R") ################## # Set Variables ################## args <- commandArg...
af6c1487c8a04afb339c006f31d1fb87c40d7d9727097b1af047f8bd1563d9a4
R
5,112
154
library("stars") library("xgboost") set.seed(1) ## MODEL TRAINING -------------------------------------------------------------- ## train model on whole dataset df = readRDS("data/dataset.rds") df$class = as.numeric(df$class) - 1 num_class = length(unique(df$class)) xgb_train = xgb.DMatrix(as.matrix(df[, -1]), label =...
360b839543a94e22084327707c4d66ac4f909de29b67496fc2791a1dbe7aa7a0
R
5,143
162
#!/usr/bin/env Rscript #' COVID-19 Multi-omics Immune Response Analysis Pipeline #' Dataset: Stephenson et al., 2021 (PMID: 33879890) #' Description: Multi-omics single-cell longitudinal analysis of COVID-19 patients #' Data: COVID-19 Portal (E-MTAB-10026) # 1. Setup and Configuration -------------------------------...
6bc8b03cc5085347233b9926449a12a24f5bda4384846a075529f5f467b45f90
R
5,177
136
--- title: "Bap1 Neuron Differential Gene Expression" author: "Kat Beigel (beigelk@chop.edu)" date: "`r Sys.Date()`" output: html_document --- # Neuron 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, includ...
661877ddb2d562239801cc99fc5cf6efba5ab12f0cf5449299b170ddff34ebac
R
5,190
130
source('/home/cesar/Dropbox/R/Network sufficiency/Modular_codes/community-based_nodal_metrics.R'); source('/home/cesar/Dropbox/R/Network sufficiency/Modular_codes/multi_scale_comm.R'); cbm_permutation2 <- function(df, memb, to_sample = c('signal', 'group') , seed=1987, resample=10000, m...
8247bf01276fd7e0c36c8e568d6ed65097814eb3d764de788fa0b19fa3647cc1
R
5,191
125
########################################@ ## Assess conservation of modules ---- rm(list=ls()) gc() library(CoReMo) library(randomcoloR) library(TBTools) library(RTBKM) library(here) library(parallel) library(tidyverse) library(DT) #*******************************************************************************@ ## ...
66bde1a61ac92abc9ab975393b08f128e4eddcdd419a057263c56560490bdf77
R
5,198
171
# Parallel computing supporting functions # Uses global options, refer to `edgeCounterOptions` #' Set parallel computing options of edgeCounter #' #' @description `ecParallel()` sets global parallel computing options. #' #' @param PSOCK.names `name` of [parallel::makePSOCKcluster]. #' If `NULL` is provided, paralle...
dfe78f325aff2bab1723a1651ae605ba7a102b17465adbe90833905912be3b4f
R
5,212
122
########################################@ ## Assess conservation of modules ---- rm(list=ls()) gc() library(CoReMo) library(randomcoloR) library(TBTools) library(RTBKM) library(here) library(parallel) library(tidyverse) library(DT) #*******************************************************************************@ ## ...
665dbcd52b40ad49be8df326aeb1403a27a40647556c6892d6d4d3b6c9cdc144
R
5,217
116
library(Seurat) library(ggplot2) library(dplyr) ferret_seurat_sub <- readRDS("/data/mayerlab/neuhaus/ferret_proj/final_results/01/ferret_seurat_clean_wDF_sub.rds") ferret_ref <- readRDS(file = "/datastore_share/Users/neuhaus/ferret_proj/data/Mustelaputorius_integrated.rds") ferret_ref <- FindVariableFeatures(ferret_r...
995959b43a710372fd04584c8e7c51c71617c007c92b91bda1a352c7207d3812
R
5,217
113
# File for cleaning and integration of d9 objects library(Seurat) library(dplyr) library(ggplot2) library(plotly) reticulate::py_run_string("import sys") # This has been replaced by the creation of sub objects in separate analysis # # Load in each object # D9RA <- Read10X("D9RA") # D9BMP <- Read10X("D9BMP"...
6be430525dd46df29df0228fab0d054d177b3b165eb6ab2ca1162d9a0054ae81
R
5,224
137
############### SYNOPSIS ################### # Create gene coordinate file compatible with CELLECT-LDSC and CELLECT-MAGMA ### DESCRIPTION # ... ### OUTPUT: # .... ### REMARKS: # .... ### REFERENCE: # GRCh37 assembly in Ensembl: https://www.ensembl.org/info/website/tutorials/grch37.html # https://grch37.ensembl.org...
5634ebf49f56821dc64bc0c2f3239dfa99687926054b2a7be9b068830c785bdb
R
5,231
165
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(...
339591a5a84ded26644e644f4c63bca867934b70577e7deaf518b9f18f1fba48
R
5,236
122
--- title: "Using UCell with SingleCellExperiment" author: - name: Massimo Andreatta affiliation: Department of Pathology and Immunology, Faculty of Medicine, University of Geneva, 1206, Geneva, Switzerland; Swiss Institute of Bioinformatics, 1015, Lausanne, Switzerland - name: Santiago J. Carmona affiliation: Depa...
75b1398b16b539d7b2875198c51439cae140d1cd04be6174d8d8884c4d96a534
R
5,250
157
# This script adjusts an ART error profile to increase the cumulative error # rate to a given value. ## Optimization of multiplier of counts vector to generate ## a distribution with (approximately) a given error rate q2p <- function(q) 10^(-q/10) cum_err <- function(p, counts) { s <- sum(counts) sum(p * count...
665ec515ea89a11dd6125d45c5a4dc5cc02b18ec0e2bbd0f9a84da45c8193100
R
5,258
139
# Plot the Accuracy and RTS of the Nav-Math Experiment library(ggplot2) library(ggforce) library(ggdist) library(gghalves) library(ggprism) library(dplyr) library(rstatix) library (lsr) library(lme4) library(effectsize) library(ez) library(lsmeans) library(lmerTest) ## Nav-Math Experiment # Accuracies ----- # Loa...
c62c9221a164ed23b57c57b0475aef032ed92c587aa2fd9b0c32b6b52cd5f798
R
5,285
120
--- title: "Salicylate Statistics" author: "Aaron Wong" date: "15 September, 2022" output: html_document: default pdf_document: default --- ```{r setup, include=FALSE} library(lme4) library(nlme) library(ggplot2) if(!require(here)){ install.packages("here") } library(plyr) if(!require(multcomp)){ install.packa...
63b7e068cb8a5aeb392cd18a8bef42fc1f157f2b532a6544fd6b8fc042b30407
R
5,346
167
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(...
987afb7108091bdfb7d7b2e78b71b0623f9548ab0870590154c13bb1adc83e69
R
5,355
118
library(openxlsx) library(ggplot2) #Figure 3A ## MS4A1 2,5-DMP File = "17 ms4a screening/20211203_Ms4a2,6D.xlsx" raw1 = read.xlsx(File, sheet = "20211203_well6_cd20") raw1 = raw1[,grep("cell",colnames(raw1)), drop = F] raw1 = raw1[-(1:329),] F0=apply(raw1[1:30,],2,mean) # generate F0 delF=sweep(raw1,2,F0,"-") ...
9c0f347a18d220226c9854ca546b12db9935d0d428739e5d84ad4ec59c0f4225
R
5,381
176
## ---Libraries ------ library(Signac) library(Seurat) library(GenomeInfoDb) library(EnsDb.Hsapiens.v86) library(ggplot2) library(dplyr) library(patchwork) library(rtracklayer) library(cowplot) library(BSgenome.Hsapiens.UCSC.hg38) library(JASPAR2020) library(TFBSTools) library(patchwork) ##--- Functions -------- howMa...
82785d7f3ac1131c17815e3c21593fbc693fb0a9d3976187927265972b4b8a4b
R
5,388
169
# perform the SIMLR clustering algorithm for large scale datasets "SIMLR_Large_Scale" <- function( X, c, k = 10, kk = 100, if.impute = FALSE, normalize = FALSE ) { # check the if.impute parameter if(if.impute == TRUE) { X = t(X) X_zeros = which(X==0,arr.ind=TRUE) if(length(X_zeros)>...
6bec987d3645f53e1f1f3fb514f56a4b1c3269568e5b81b714c5e48352e2dcd1
R
5,396
117
## Survival for gene library(plyr) library(dplyr) library(survival) library(surviplot) library(ggplot2) library(ggsignif) setwd("/home/bnovotny/proteomics/proteomics_analysis/CSF") ## Read in protein data features <- readRDS("data/00-csf_feature_data.rds") # Read in protein expression data and reconfigure log_readin...
9b5edace2c9ef68d79ac2afea8151e303945c641f3d4238c84b0b86cdde12014
R
5,399
147
# Initialise pacman::p_load('R.matlab','tidyverse','magrittr','emmeans','patchwork','multcomp','bbplot') set.seed(17) # Load and prepare the data ---- m <- readMat(here::here('data','PD_model_pars.mat')) m = m$cellV m = rbind(m[,,1],m[,,2]) m <- m[complete.cases(m),]#remove NaNs df_lba_par = as.data.frame(m) df_lb...
8b5f61aac878ead9dfd4f90704e98ea9e0d5dcd493a12206cfe267b2a8919572
R
5,402
132
# Load necessary libraries library(dplyr) library(Seurat) library(EnhancedVolcano) library(clusterProfiler) library(org.Hs.eg.db) library(enrichplot) # Set global options and paths dpi <- 300 # Function to perform differential expression analysis and generate plots analyze_clusters <- function(dat0, cluster1, cluster...
7de115ba60a1cea4e7f52eff01a79277dd523bcad0c357aeee0b84c3ae9aad73
R
5,417
157
#### code for Figure 6 library(Seurat) library(ggplot2) library(sctransform) library(dplyr) library(CellChat) library(patchwork) library(ComplexHeatmap) #### load the objects #### setwd("~/Downloads/Yi Huang et al objects/") fHFDcci <- readRDS(file = "fHFDcci.rds") fLFDcci <- readRDS(file = "fLFDcci.rds") mHFDcci <...
c87db05413ee344e6e726273c405c1ee8f53016d22bad9bec883b2ff3058b8db
R
5,424
180
--- title: "figure 2" author: "Pavitra Roychoudhury" date: "2023-07-16" output: html_document --- Panels for Figure 2 Import matrices ```{r} rm(list=ls()) library(Seurat) library(tidyverse) options(dplyr.width=Inf) library(cowplot); options(scipen = 999) all3<-readRDS('./seurat_analysis_all3.rds') ``` TSNE plot t...
18200a16725abd71178185a8c17ca4e8617ed52469fc186db67be3c26fb668ef
R
5,450
137
source('/home/cesar/Dropbox/R/Network sufficiency/Modular_codes/community-based_nodal_metrics.R'); source('/home/cesar/Dropbox/R/Network sufficiency/Modular_codes/multi_scale_comm.R'); cbm_permutation <- function(df, memb, to_sample = c('signal', 'group') , seed=1987, resample=10000, me...
1eec026421883c62ebe1c2904b28db41787013f8b2fff54454b90135870005d4
R
5,451
87
### Hong X. et al 2023 ### produce figure 3 ### hongxiaoning@outlook.com library("ggplot2") library("ggpubr") library("ggsci") #Figure3 A&b for (group in c("Young", "Aged")) { data<-read.table(paste0(group, "_Genomic_coverage.txt"), sep = "\t", h = T, check.names = F) data$Group <-factor(data$Group, levels =rev(...
31950215e0d3643f74c24ff2c77ca54efb0f3ddd7c584125b313d19b2168bd94
R
5,512
163
############################################################################################################ ########## R script for: ########## ########## Statistical indices of masculinity-femininity: A theoretical and practical framework. ########## ########## Marco Del Giudice ########## ########## Script for Fi...
cf7aa7703a265e18365a0c418c69ed780ff17f02ed84767e40b96ac68bbe3977
R
5,512
145
--- title: "Intro to the qqman package" author: "Stephen D. Turner" date: '`r Sys.Date()`' output: html_document: toc: yes --- <!-- %\VignetteEngine{knitr::knitr} %\VignetteIndexEntry{Intro to the qqman package} --> ```{r, include=FALSE} library(qqman) library(knitr) opts_chunk$set(comment=NA, fig.width=12, fig...
a434863bcbeea3bb4581bfa337287cbcc64e61b9f4a309813f311c01c12bd51f
R
5,514
127
## Packages required if (!('fda' %in% installed.packages()[,'Package'])){install.packages("fda")}; require(fda); ########################################################################################################### modularity_maximization <- function(g, gamma = 1, weighted = T, class = TRUE){ # # This functio...
e4312bffa0e4eb2dd084f97a6584e84ceabb813d91b6a890b88057ad5612ed8d
R
5,524
81
# Figure 1 rm(list = ls()) require("writexl") library("dplyr",quietly=T) library("ggplot2",quietly = T) library("ggtree",quietly = T) library("ggnewscale",quietly = T) library("ggtreeExtra",quietly = T) setwd("Source_Data/Figure_1/Figure_1A/") data.df<-read_excel("Figure_1A.xlsx") All.Sp = read.tree("Figure_1A.all.s...
4f9983896851b701f531db5988512b219818fcdc77e98c61ccf761ba12c52a8f
R
5,534
120
######### ## motif analysis MEIS/DLX library(plyranges) library(tidyverse) library(data.table) library("BSgenome.Mmusculus.UCSC.mm10") library(seqinr) library(ChIPpeakAnno) genome.mm10 <- getBSgenome("BSgenome.Mmusculus.UCSC.mm10") merged_peaks.df5 <- read_rds("./Table_S5_ChIP-seq.RDS") meis2_peaks.df <- merged_pea...
6ea65ab10212b53045797a9514e7b48b187d5e53bc0aafb07a51e34d4d1cb810
R
5,541
78
# Set directory to source file loaction setwd(paste0(figureDirectory, "Figure5-GOenrichment" ) ) load("resultGO.RData") load("numCandGens.RData") resultPlus <- resultGO[resultGO$Expression.direction == "Increased",] resultPlus <- resultPlus[1:20,] resultPlus$Description[resultPlus$Description == "calcium-dependen...
c5da1d7cb07e0cff1ca99fee5ba2aa5d602459af9e2dc1d330386ff566100258
R
5,544
118
data <- Read10X("/data1/zj_wt/outs/filtered_feature_bc_matrix/") wt <- CreateSeuratObject(counts = data, project = "wt", min.cells = 3, min.features = 200) wt[["percent.mt"]] <- PercentageFeatureSet(object = wt, pattern = "^mt-") VlnPlot(wt, features = c("nFeature_RNA", "nCount_RNA", "percent.mt"), ncol = 3) plot1 <- ...
3af9f714a74a43f6714129004f63f75a5b4d693f3db0a25c47b2b245bfe471de
R
5,569
170
#!/usr/bin/env Rscript #' COVID-19 Single-cell Atlas Processing Pipeline #' Dataset: Ren et al., 2021 (PMID: 33657410) #' Description: Large-scale single-cell atlas of COVID-19 immune features #' GEO: GSE158055 # 1. Setup and Configuration ------------------------------------------- suppressPackageMessages({ librar...
974739dc4e5cb880990724b0fcd6b7a97cef7de3a37fccade34d227a9cfb7acf
R
5,596
163
get_clusters_mat_kmeans <- function(path, nbins=40, min_frames=500, max_nc=20, nreps=20, override=F, clu...
b174c72c71f4e7f5ab26ee786ddc3dbc6d20bea4ec879360e6fc52f55126c84d
R
5,602
178
suppressPackageStartupMessages({ library(Seurat) library(stringr) library(sctransform) library(future) require(scales) library(RColorBrewer) library("readxl") library(dplyr) library(dendextend) }) # After alignment with cellranger, (see cellrangercount.sh) # the "filtered_feature_bc_matrix" per sam...
3fd9220b2c0d3081a4e4e70781139f20618bb99cb9beca4519a191880f8e2607
R
5,616
118
#check here for example on how to plot average across landscape: #https://gadm.org/download_country.html rm(list=ls()) #load required packages library(ggplot2) library(rgdal) library(tmap) library(dplyr) library(sf) library(raster) library(rnaturalearth) ############### Fig. 1A - P. muralis distribut...
69f1813109796567a65d2c26c15bdd6dbf019a76ba65bbef15c00213a9b791f3
R
5,618
132
## Prepare temporal variance and network connectivity for ABCD ## Network connectivity between 12 networks: # auditory (AUD) # cingulo-opercular (CON) # cingulo-parietal (CP) aka ParietoOccip? # default mode (DMN) # dorsal attention (DAN) # frontoparietal (FPC) # retrosplenial (RSP) aka MedialParietal # sensorimotor-ha...
1d2f3f1a1685b51c8d6d00575f6e89200bac606b35d562ad4cfe2262cb2c9202
R
5,636
179
source('/home/cesar/Dropbox/R/Network sufficiency/Modular_codes/nested_list_functions.R') source('/home/cesar/Dropbox/R/Network sufficiency/Modular_codes/consensus_community.R') source('/home/cesar/Dropbox/R/Network sufficiency/Modular_codes/signed_louvain.R') source('/home/cesar/Dropbox/R/Network sufficiency/Modular_c...
fbd2bf3ddf7957a5f18d5a570e7e652b588a4b9e0dba5d1d34f52ecb6d877c92
R
5,640
193
#!/usr/bin/env Rscript #' Description: Process and using Seurat v4 to label cell types #' #' Datasets: #' - PMID: 32514174 (Wilk et al., 2020) #' - PMID: 32651212 (Lee et al., 2020) #' - PMID: 32810438 (Schulte-Schrepping et al., 2020) #' - PMID: 32788292 (Arunachalam et al., 2020) #' - PMID: 33657410 (Ren et al., 20...
87cf48281e34a01c626aa1b3c1f064c7e0a9c6c6cb2b6d9e392f582bad4ac7ff
R
5,662
117
################################################################################ # AffectParametersSwath.R 2.0.2 # # Authors: Alexandre Sta (Institut Curie) # # Contact: alexandre.sta@curie.fr ...
b7852d6c8965a9123d6c97487b582fb06ae8487ccdce9ad11720a4fd4517fff8
R
5,675
190
if (!('aricode' %in% installed.packages()[,'Package'])){install.packages("aricode")}; require(aricode); source('/home/cesar/Dropbox/R/Network sufficiency/Modular_codes/consensus_community.R'); multi_scale_comm <- function(g, ALG = signed_louvain, gamma = seq(-1, 2, 0.05), R = 1, seed = 87, param_name = 'gamma', sec_pa...
8c7122496f856833c9812b8571a9ebb1ef258436bbfcdb5abbe2155b66dc0269
R
5,679
138
########################################@ ## Assess conservation of modules ---- rm(list=ls()) gc() library(CoReMo) library(randomcoloR) library(here) library(parallel) library(tidyverse) library(DT) #*******************************************************************************@ modAname <- "Correlated genes in H...
4553350692a9f976936065c5c6c1a175546070fba6c0557e03573eaafe3a5f73
R
5,683
124
#' Calculate module enrichment scores from single-cell data #' #' Given a gene vs. cell matrix, calculates module/signature enrichment scores #' on single-cell level using Mann-Whitney U statistic. #' UCell scores are normalized U statistics (between 0 and 1), and they are #' mathematically related to the Area under th...
ee4b51da68c480f7e860fe8c5286ae9a24280a1f2b9c732097e88c36d57a92f4
R
5,707
123
main = function() { extention = 1e2 # file = "~/Workspace/Datasets/ORM/allfiber_All.HeLa.async.gtf" # file = "~/Workspace/Datasets/ORM/allfiber_C.0.gtf" for(file in paste0("~/Workspace/Datasets/ORM/", c("D.20.gtf", "D.30.gtf", "D.45.gtf", "D.60.gtf", "D.90.gtf"))) { data_df = readr::read_tsv(file, col_na...
10d148e764d1aad70a943465a39491eca42f7a0c4399df505d29c652248ea968
R
5,719
217
--- title: "220427_transfer_learning_gene_label_testing" author: "Jennifer Fisher" date: "4/27/2022" output: html_document: toc: true theme: united --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # START Goal/Purpose of operations: For this analysis, GTEx Brain Frontal Cort...
6617b9f9afab9919bd027dff5cf0db33227568c2526e9a6ea9b07831cf4dac61
R
5,733
191
--- title: "top_markers_3perc_sporos" author: "T Attenborough" date: "05/04/2023" output: html_document --- Load packages ```{r} library(Seurat) #Seurat v4.0.2 library(dplyr) library(patchwork) library(here) library(ggplot2) library(clustree) library(ggrepel) library(tidyverse) #sessionInfo() ``` This saves today's...
fcf7d3f2dcd6aaa89a998bd0170536725257725c57204dba90d3ee78f9c0a35e
R
5,772
140
#!/usr/bin/env Rscript # plot-qq.R <stats TSV> <destination image file> [<comma-separated "aligner" names to include> [title]] filename <- commandArgs(TRUE)[2] # Install required packages list.of.packages <- c("tidyverse") if (endsWith(tolower(filename), ".svg")) { list.of.packages <- append(list.of.packages, "s...
430d0d8f6ca65e6ec2ab572d92bacc16fdf74700bc3f77da458bc1b7a9880f22
R
5,795
137
#' Plot a Patient Similarity Network #' #' Plot a Patient Similarity Network #' #' @param info Dataframe, two character columns, first has sample's IDs (have to match with column names of the count matrices), #' second has sample's groups (only two as a pairwise DE analysis, for example c(AD,AD,AD,HEALTHY,HEALTHY,HEALT...
8364479291dfc19f256f87d495e8afd7ea2ed05d567cecf257d9cdcaebce4a18
R
5,808
142
buildReference_on_UMAP <- function(exp_ref, metadata_ref, vars = NULL, sc2d, K = 100, verbose = FALSE, do_umap = TRUE, do_normalize = TRUE, vargenes_method = "vst", vargenes_groups = NULL, topn = 2000, tau = 0, theta = 2, ...
1ced4add8d795cb38a6cc8176ab61efb5abb7691ae55ed14baf0706f4627105e
R
5,809
203
# compute and returns the multiple kernel "multiple.kernel" = 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] KK =...
d13bf4150fbf7938337986eee3e6c2e80abc961894f3a693a98e7a228c2520ec
R
5,809
152
Dependency file generated on Sat Mar 2 15:13:30 2024 #################################################################################################### gruffi.optional.R #################################################################################################### $`c("package:Seurat", "package:SeuratObjec...
760e707e71f82ca17492279c551145f60a33de14188781ebb5dfacf5a9d8b932
R
5,819
205
--- title: "Compare eisaR spliced & ensembl transcriptomes" output: html_notebook --- ## Setup ### Load Libraries for import ```{r setup} library(Biostrings) library(BSgenome) library(eisaR) library(GenomicFeatures) library(tidyverse) library(rtracklayer) ``` ### File and Directory Setup ```{r} ## get file directo...
fc77d45f2ea1ef629ed80d4f51b02c8b1d9aac5e61438eec506c3f508d8835ea
R
5,851
141
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(Seurat) library(tidyverse) require(data.table) require(ggrepel) require(colorspace) library(circlize)...
3eeea07450e43f893ababcd887299213c78c64fd0a41e7febc58b240fa32642b
R
5,893
154
#' Load a VCF file #' #' This function loads a VCF file as a matrix. #' #' @param VCF_DATA loaded VCF file (read_vcf() output) #' @param SEQINFO the object with chromosome characteristics: load_chr() #' @param SAMPLE (optional) samples to plot (default is all samples in VCF file) #' @param VAR_FLAG (optional) the VCF v...
bc9c2ad952dd7e5f6e466cc4f195fd02ed2a4e0d4f2692f33421fc3c33f3964c
R
5,893
169
--- title: "Integration of WT and KO data with Glia and Neurons for RNA velocity of all cells" subtitle: "Following Seurat 4 Integration Methods (https://satijalab.org/seurat/articles/integration_introduction.html)" author: "Kat Beigel (beigelk@chop.edu)" date: "`r Sys.Date()`" output: html_document --- ```{r setup, i...
cd1b0137d34cbd7228dee1d507f43a31f845e49500aab3f8e8c233096978c220
R
5,930
109
################################################################################ # PCA.R 1.1.1 # # Authors: Patrick Poullet, Stephane Liva, Guillaume Arras (Institut Curie) # # Contact: myproms@curie.fr ...
03e5a54d1204332d6df9c0409b2589e679140219f25270991c56df1cd9a6413d
R
5,931
246
--- 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...
40da8edd8cfb46740af18fe2d82627cc22514d8864f71276f289d0e0e66d2da4
R
5,948
162
# Load packages renv::restore() library(lme4) library(lmerTest) options(scipen=10000) # Load data dat <- read.csv('../data/aggregated/concat/fpt-del.csv', header=TRUE) # Scale dat$length <- scale(dat$length) dat$prev_length <- scale(dat$prev_length) dat$count_ave_kika <- scale(dat$count_ave_kika) dat$prev_cont_ave_k...
d6086315839aaabf85343202f4e09e4ebb2e5dda98f0892877353426829b2358
R
5,955
234
--- title: "`r thetitle`" output: html_document: df_print: paged --- ```{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) l...
fa5674c179a343e4ab2c90cbb7c42651742b9b620a93a4ba2ed34a011fe89dee
R
5,972
132
#! /usr/bin/env Rscript rm(list=ls()) library(GenomicRanges) library(data.table) library(eulerr) options(bitmapType="cairo") Path <- "/path/" setwd(Path) ########################################### # point towards loci txt ########################################### t1 <- fread(paste0(Path, "results/T1/T1_mostest...
89f5f7dfe9400b6e118069c580a773773a73e01066d0decaece08ccd4a3599f2
R
5,991
145
#!/usr/bin/env Rscript # # plot-log-roc.R <stats TSV> <destination image file> [<comma-separated "aligner" names to include> [title]] # # plots a pseudo-ROC that allows the comparison of different alignment methods and their mapping quality calculations # the format is clarified in the map-sim script, and should be a t...
faa999dd8cd3b15c27627034e0de55110ddf9d5a91ec976c9bf3b22886379955
R
6,005
179
## infer clone IDs from sparse matrix ## library(readr) #library(philentropy) #library(dendextend) library(data.table) library(dplyr) library(tibble) library(igraph) library(ggplot2) library(ggrepel) ## function to create network from sparse matrix ## build_graph_from_sparse_mtx <- function(mtx) { ## init isolated ...
3990e0f1d21f8215c8fe64f7c019f02c257304b4632e22666d32b7c460942c5a
R
6,008
196
#!/usr/bin/env Rscript ################################################ ################################################ ## Fucntions ## ################################################ ################################################ # Helper function for NULL condition string_to_nul...
3db18736fcac6d753960a00149cfda69a2b7d14a70270a07081c2f697d7df7a0
R
6,011
132
library(base64enc) library(cifti) library(dplyr) library(gifti) library(magrittr) library(rjson) library(stringr) print("This script 1) creates a list of ciftis to extract timeseries data from, and 2) concatenates timeseries and makes connectivity matrices ") ################## # Set Directories ################## ...
b14bb7ab2ca0bf7a182381c27e16bec2887ccc18b2d532d68dd749463170215d
R
6,011
124
#' Calculate module enrichment scores from single-cell data (Seurat interface) #' #' Given a Seurat object, calculates module/signature enrichment scores at #' single-cell level using the Mann-Whitney U statistic. #' UCell scores are normalized U statistics (between 0 and 1), and they are #' mathematically related to t...
8848591151da77e51d5083f9e15708b9a49fb7e12e5b1681f9cca7033d051d0a
R
6,016
121
####################prep############### rm(list = ls()) options(stringsAsFactors = F) library(ggplot2) library(ggrepel) library(dplyr) candidate_genes = c('AKT1','APOE',"BDNF","CHRNA7","COMT","DAO","DAOA","DISC1","DRD2","DRD3", "DRD4","DTNBP1","GRM3","HTR2A","KCNN3","MTHFR","NOTCH4","NRG1","PPP3CC,...
f231a542721c16f735537cd4502e13330e23b9203dad71e1e7febfd42094a4f9
R
6,043
131
library(base64enc) library(cifti) library(dplyr) library(gifti) library(magrittr) library(rjson) library(stringr) print("This script 1) creates a list of ciftis to extract timeseries data from, and 2) concatenates timeseries and makes connectivity matrices ") ################## # Set Directories ################## ...
207040a64ada6e3f2cdb0196faa13eebfa890d1ad044be02b43c89c2fcc08ed7
R
6,044
211
suppressPackageStartupMessages({ library(Seurat) library(stringr) library(sctransform) library(future) require(scales) library(RColorBrewer) library("readxl") library(dplyr) library(dendextend) }) # After alignment with cellranger, (see cellrangercount.sh) # the "filtered_feature_bc_matrix" per sam...
8ca31dfee0436c6862531da24d3b0547e24897eccd80c62c9b46e34950651291
R
6,062
104
## Fig 3a library(tidyverse) #v1.3.1 library(plyranges) #v1.18.0 # import peak table merged_peaks_meis2.df <- read.table("./Table_S5_ChIP-seq.txt",header= T, sep="\t") %>% filter(meis2_peak == "y") %>% dplyr::select(12:17) %>% mutate(strand = "+") %>% dplyr::rename("seqnames" = "chr_meis2", start ...
d10369ed9ce64429e0930b2c936ad2af37973b2e8692e8b6c70d838d087567e3
R
6,067
150
## logistic regression: interneuron vs PN ## library(Seurat) library(dplyr) library(glmnet) library(ggrepel) library(MASS) library(bmrm) library(ggsignif) set.seed(4) ## helper functions ## train_model <- function(expr_mtx, target_vec, regr_model = "binomial", type.multinomial = "no") { ## account for balanced des...
fe56adae26e5014879a34b1f43a24424b925f11722e70d58fda398b35eebe83c
R
6,072
194
significant_comps <- function(metrics_list = NULL, comp_list, alpha = 0.05, trim = FALSE, coi = NULL){ # metrics_list List of network metrics # comp_list output of the cbn_permutation() or nodal_permutation_test() functions. # this output has to be from t...
1dad0e195bf5f78c49a889c9fcd649424908dad162a388c80923b235bee81a8f
R
6,096
133
# Plot summary of burst features # # Vinding, M. C., Eriksson, A., Low, C. M. T., Waldthaler, J., Ferreira, D., Ingvar, M., Svenningsson, P., & Lundqvist, D. (2021). Different features of the cortical sensorimotor rhythms are uniquely linked to the severity of specific symptoms in Parkinson's disease [Preprint]. medRx...
ddfc30ca73f8b76cc83751a720366f5dbab4b33ed7630c4139bdd3b4a8b4d8be
R
6,101
201
ResiliencyGeneticDistance <- function(ReadsTableName, expname, ComparisonMetaDataName, limit) { ReadsTable <- read.csv(ReadsTableName, row.names = 1) MetaData <- read.csv(ComparisonMetaDataName) if( length(which(MetaData$Sample == "")) != 0) {print("STOP!!!")} SampleNames <- MetaData$Sample[order(MetaData$G...
1cc865e00373c6a3adda4ee398773ecbffadb7ab0856c912be65adfe89d4c2c1
R
6,132
97
# Gene ontology of peaks that happen between 0-5, 5-10, 10-15, 15-20 library(gprofiler2) library(data.table) # Starting by just doing dI1 # THIS IS A LITTLE TRICKY AS THE MISSING DATA AT LOW PSEUDOTIME VALUES REALLY SKEWS THE RESULTS # IT PRACTICALLY STARTS AT 5 # Get marker genes from all dI1 clusters dI1...
f4d3a22019b8f36469f699be92e6f6db81b9df7b800fe9d6d68fa361a993f478
R
6,132
215
--- title: "MeniscusTrackingRefinement" author: "Tomas Pierce" date: "2022-10-23" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load libraries ```{r lib load, include=FALSE} require(ggplot2) require(dplyr) require(psych) require(sys) require(purrr) require(gridExtra) ```...
e0d9a749b42fe1c8f26e1f1e0c8bb1271f2f9098678a7325cf84427bf42556ad
R
6,147
173
#!/usr/bin/env Rscript #' COVID-19 Temporal Immune Response Analysis Pipeline #' Dataset: Liu et al., 2021 (PMID: 33713619) #' Description: Time-resolved systems immunology of COVID-19 progression and recovery #' Data: COVID-19 Cell Atlas (https://www.covid19cellatlas.org/) # 1. Setup and Configuration --------------...
468960653846e9a928130575dca5327a0e4c709a516593292bd7daa9fb1887c1
R
6,157
140
rm(list=ls()) library(openxlsx) library(tidyverse) library(Hmisc) library(corrplot) library(pcaMethods) library(dplyr) options(scipen=999) #Import the current new data set - this includes data up till 2018 data <- read.csv("Phenotype_data_final_June2023.csv") #Import lineage assignments per population...
1a18ddd8a87edb9f65143107a29a88eef0d62b2091e7914e1eea622685b255b7
R
6,162
247
--- 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...
746314cabf398a50cac82c0b270ad7daa71543c06c125dc2fc1d9c4b2c7ce697
R
6,167
138
library(base64enc) library(cifti) library(dplyr) library(gifti) library(magrittr) library(rjson) library(stringr) library(tidyr) print("This script 1) creates a list of ciftis to extract timeseries data from, and 2) concatenates timeseries and makes connectivity matrices ") ################## # Set Directories ##...
5c0c536f5cf4776f0eca0deb47e4cc568a0ba3732a526a885ddb7d64bf684f0a
R
6,183
130
## import package .libPaths("~/R/x86_64-pc-linux-gnu-library/4.2") library(Seurat) library(ggplot2) library(ggpubr) library(sctransform) library(harmony) library(dplyr) library(plyr) ## load all the objects Hypo_integrated <- readRDS("~/Yi_Huang/objects/Hypo_integrated.rds") AgRP_subclusters <- readRDS("~/Yi_Huang/obj...
ee21cc551f970a3f66bf313507fe8fc3725553a97047893efe487b50c3552d58
R
6,204
150
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # # Initial is copy and paste from other application. will adapt # PACKAGE LOADING ---- library(shiny) ...
d9be89040ed4b72748d219ddb54eb3f62fe17a9997540fde391df0a6e2a5b4f2
R
6,218
170
#!/usr/bin/env Rscript ################################################ ################################################ ## Functions ## ################################################ ################################################ #' Check for Non-Empty, Non-Whitespace String #' #...
ca2cf6a1af66f0e69b75afecdfc8c752e7e1376282047e1a879554f4d956bfd8
R
6,226
141
library(base64enc) library(cifti) library(dplyr) library(gifti) library(magrittr) library(rjson) library(stringr) library(tidyr) print("This script 1) creates a list of ciftis to extract timeseries data from, and 2) concatenates timeseries and makes connectivity matrices ") ################## # Set Directories ##...
7914e079e19e56df4f8f1165111f7b0801fa3cd73eca10b62cc30f0795112a91
R
6,240
111
tlx_read_paper_samples = function(annotation_path, data_path) { tlx_read_samples(annotation_path, data_path) %>% dplyr::filter( organism=="mouse" & celltype=="NPC" & sample!="VI035" & ( experiment=="APH concentration" | grepl("Nrxn1|Ctnna2 promoter/enhancer", experiment) & grepl(".*\\(...
4c2096481e8d959c08b48b50bb7c606e24d2a7bc3e581f00f2480d65bc0b46a6
R
6,259
138
#!/usr/bin/env Rscript ######################################################## # # Reusable evaluation containing typical columns # used in experiments using reading latency as a # dependent variable with memory and syntactic # predictors. # ######################################################## #################...
fbb35bfe0c56e574b154ba330692fb1b6db25b7c2f2cf10f783f4c92cbf06138
R
6,283
136
library(base64enc) library(cifti) library(dplyr) library(gifti) library(magrittr) library(rjson) library(stringr) print("This script 1) creates a list of ciftis to extract timeseries data from, and 2) concatenates timeseries and makes connectivity matrices ") ################## # Set Directories ##################...
ec0329629c42e3f3e2f182d52bb059d2f1ca6656a010064da53daab3bad2f19d
R
6,296
146
mosaick_ll <- function(varn=NULL, i, out.tif, in.path="./tt", out.path="/data/LandGIS/predicted250m", ot="Int16", dstnodata=-32768, dominant=FALSE, prj=NULL, resample="near", metadata=NULL, aggregate=FALSE, te, tr, only.metadata=TRUE, pattern=NULL){ if(missing(out.tif)){ out.tif <- paste0(out.path, "/", varn, "_...
1b3125eb1c7b7fea7f5ad10f211544907c9138d9f1f8babafc74afbbd767bf32
R
6,300
286
--- title: "Monocle RPCs T1 RGCs" 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.Hs...
5496e81dddd897e17fe1ee09c01759c280021dfc05a93b21aaa7077c588b640f
R
6,302
114
source('code/misc/miscfxns.R') lm.mask.ant.ret <- function(y,Xt.retro,Xt.antero){ # fit linear model: y = b0 + b.r*Xt.retro + b.a*Xt.antero + error # given Xt.antero and Xt.retro for a given set of time constants # return pearson r between y and y-hat (predicted vs actual path) # # INPUTS: # y: observed l...
d6658ac07d1ba3441fb9a167c359324f83872671ecac739843346ac254a31921
R
6,302
201
ResiliencyGeneticDistance <- function(ReadsTableName, expname, ComparisonMetaDataName, limit) { ReadsTable <- read.csv(ReadsTableName, row.names = 1) MetaData <- read.csv(ComparisonMetaDataName) if( length(which(MetaData$Sample == "")) != 0) {print("STOP!!!")} SampleNames <- MetaData$Sample[order(Meta...
1489cb1ad4879fe0f5f7b7095a471a31e435baa5298d1f38181a4437fdb3a61d
R
6,310
286
--- title: "Monocle RPCs T1 T3 - organoids" 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) librar...
b79a1b4cd50417b7271573ec7e2e9b27d8f1caeb1e337e014efbbf1815c24740
R
6,318
231
#!/usr/bin/env Rscript #' Platelet Classification Pipeline Using XGBoost #' Description: Predict cell outcomes using gene expression data # 1. Setup and Configuration ------------------------------------------- suppressPackageMessages({ library(xgboost) library(Seurat) library(caret) library(tidyverse) lib...
dbc01bf99333c03cbfc7030f6ef7bb2ed3e0f89aa4c0d894703601803d26ccc3
R
6,319
135
library(base64enc) library(cifti) library(dplyr) library(gifti) library(magrittr) library(rjson) library(stringr) library(tidyr) print("This script 1) creates a list of ciftis to extract timeseries data from, and 2) concatenates timeseries and makes connectivity matrices ") ################## # Set Directories ###...
5deae0158b0a4be8acff06a9966816d9090eb930f6abfc348d6441ad9d74ad05
R
6,327
243
#!/usr/bin/env Rscript #' Platelet Classification Pipeline Using Deep Learning #' Description: Classify cell outcomes based on gene expression # 1. Setup and Configuration ------------------------------------------- suppressPackageMessages({ library(reticulate) library(Seurat) library(keras) library(tensorfl...
89afc584a68500d3ae2eea4713a8b2618afe94289b133f6943b3385f3b6fcc3b
R
6,333
172
#!/usr/bin/env Rscript ################################################ ################################################ ## Functions ## ################################################ ################################################ #' Check for Non-Empty, Non-Whitespace String #' #...
9a8b5439ebfaa7fc505419e74c882419e9121d3fbbceb23f4c45564360432952
R
6,338
273
--- 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(Signac) library(Seurat) library(GenomeInfoDb) library(EnsDb.Hsapiens.v86) library(ggplot2) library(dplyr) li...
d48cf34e7dcc02a51b5aa65cd850bd19fc3aadf2491324bf5e6caab5b4ea604a
R
6,344
308
--- 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...