sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
e1f3343575c40b926717098aa1905b989f37a522705d86cd0272ebd724c54e19
R
11,048
272
#!/usr/bin/env Rscript #### Fine cell type annotation of myeloid cell subset for MBM_sc #### Author: Jana Biermann, PhD library(dplyr) library(Seurat) library(ggplot2) library(gplots) library(viridis) '%notin%' <- Negate('%in%') path.ct <- 'data/cell_type_DEG/MBM_sc/myeloid/' filename <- 'MBM_sc_myeloid' seu <- rea...
ea58a05658a998fba3c044cb37fa1640f664c373b6f9fe8df8a5c1f28d03044b
R
11,088
268
# CIRCUITS Multiregion Single Cell RNA-seq - single cell resilience # Cell proportions using DirichletReg (cell subtypes - subclusters) BY MAJOR CELL TYPE # Isabel Castanho (icastanh@bidmc.harvard.edu) # September 2022 # activate conda environment in ITHACA # conda activate use_seurat_r4 # Open R # R setwd("/home/D...
40b7722f5417479f2a77546f039b2a430052755dea716cba5435f3a71c9fe3f0
R
11,100
222
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # Main pipeline. # Study title: "Characterising distinct subgroups of very preterm born children and # exploring differences in neonatal structural and functional brain patterns" # Date: 19/11/2021 # Author...
57a6be0c81a1b2745b9726ba7a671f22d2b78ad50626fed3011625791a8f33ab
R
11,100
227
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # Bootstrap code - to run on an HPC cluster (we used the King's College London Rosalind computing interface: https://rosalind.kcl.ac.uk/) # Study title: "Characterising distinct subgroups of very preterm born ...
3bfc53bac261c2e229024b2fa9e73b2b38b2cd0e7887211383676eb2bb16f5a4
R
11,103
243
# AIM --------------------------------------------------------------------- # this is the initial step for the counting of senescent cells. In this step I generate the signatures score. # libraries --------------------------------------------------------------- library(tidyverse) library(ggrepel) library(lemon) # rea...
d563045437362fb592b81413a62ab18172c4265dafc80b5b03e09ff4dce926b5
R
11,104
270
suppressPackageStartupMessages(library(tximport)) suppressPackageStartupMessages(library(dplyr)) suppressPackageStartupMessages(library(stringr)) suppressPackageStartupMessages(library(tidyr)) suppressPackageStartupMessages(library(glue)) # option_list <- list(make_option(c("-s", "--sample-table"), # ...
ff74d2d914c258e11bf35aff6485428b9928e08b7e2ed0eb1a35c0aa625d09bc
R
11,104
245
# AIM --------------------------------------------------------------------- # this is the initial step for the counting of senescent cells. In this step I generate the signatures score. # libraries --------------------------------------------------------------- library(tidyverse) library(ggrepel) library(lemon) # rea...
df86edad8320b8309adb43f530017c11ee802346706fd9862191ac09240774a9
R
11,108
202
# this script runs weighted GAMMS on the imputed datasets producing one partial effect of LSNS per gender # load required packages library("mgcv") # version 1.9-1 library("mgcv.helper") # version 0.1.9 library("gamm4") # version 0.2-6 library("mice") # version 3.17-44 library("tidyverse") # version 2.0.0 # define whe...
f2011d027ae503ad46524f08e76fb982f109b81a182472a26b1d6a0d248d8307
R
11,121
261
# libraries --------------------------------------------------------------- library(Seurat) library(tidyverse) library(scales) library(ggrepel) library(cowplot) # read the data ----------------------------------------------------------- # read in the dataset data.combined <- readRDS("../../out/object/revision/120_WMCX...
45d707d482ec035d0edaa8287429925b4333c10260c7dc91b9dc3305f54caa4c
R
11,126
223
--- title: "Hypothesis testing H&E" author: "Gerard Baquer" date: "2024-09-09" output: html_document --- ```{r} # Libraries library(rhdf5) library(dplyr) library(tidyr) library(ggplot2) library(ggrepel) # Remove non-biological pixels he.rename_labels<-function(img,labels=c("background","CMC","viable tumor","infiltrat...
9068c89a928c8b26ad414b1e4a9bf8137aef259213b5f394266cf1a51baf34e6
R
11,192
363
### Integrate stages' data from Four data-sets where consider gene names in combination setwd("/home/Fatemeh/0--ThirdProject") ##### Load Data ##### ##### Integrate NAT Data ##### ##### NAT CD4 ##### MAD_NAT_CD4T <- read.table("DATA/Gastric/CellTypeStage/MAD_nat_CD4T_matrix.txt", header = T) dim(MAD_NAT_CD4T) ...
42f170457354cb7d29555b6251c73733ce9ecb6ff4d3202074434242a9e2b6ab
R
11,238
250
--- output: html_document: default pdf_document: latex_engine: xelatex editor_options: markdown: wrap: sentence --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ######################################################################################################## # Integratin...
4bd68eb3f7cc170742babf72433a3b745defb1ef9c85beb3a5525c6c6c577067
R
11,265
285
#!/usr/bin/env Rscript #### Fine cell type annotation of myeloid cell subset for MBM_sn #### Author: Jana Biermann, PhD library(dplyr) library(Seurat) library(ggplot2) library(gplots) library(viridis) '%notin%' <- Negate('%in%') path.ct <- 'data/cell_type_DEG/MBM_sn/myeloid/' filename <- 'MBM_sn_myeloid' seu <- rea...
df74cc2c3e4cd9c42553f9ccc3000c2fa8e20273a4f862bef1a99a37cbfc39d2
R
11,304
260
library(qs) library(DEP) library(limma) library(readxl) library(dplyr) library(SummarizedExperiment) library(ggplot2) library(pheatmap) library(stringr) library(ComplexHeatmap) library(GOSemSim) library(simplifyEnrichment) library(rrvgo) library(wordcloud) library(pathfindR) library(tidyr) library(radia...
1913ffeaa7e654b9fdce1f11f2be4c7394b9ae6e2b4e7c6c8e4e5dada78e5d59
R
11,309
403
# make figures for Alena PICALM paper, additional data # Siwei 23 Apr 2024 # init #### { library(readxl) library(stringr) library(ggplot2) library(scales) library(reshape2) library(RColorBrewer) library(ggpubr) } ## Fig_5I #### df_raw <- read_excel("tables_4_plot_v4.xlsx", sheet ...
5ebdecb01358616789079b78be2192785209950ba208371861c5bdb4182ed394
R
11,355
259
require(ggplot2); require(scales); require(reshape2); #install.packages("dplyr") require(dplyr) #require(Hmisc) library("readxl") library(RColorBrewer) library("ggsci") #install.packages("ggrepel") library("ggrepel") library(ggpubr) setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #setwd('/Users/admin/D...
4199943add14eb23efdcf235c449b148c143bc944065caee3477cb6e29ad4a80
R
11,393
173
#prepare files for scDRS/FUMA/MAGMA ##### 1. load packages and data####### ###load packages if (!require("here")) { install.packages("here") library("here") } if (!require("magrittr")) { install.packages("magrittr") library("magrittr") } if (!require("tidyverse")) { install.packages("tidyverse") library(...
984594cb0182460c080828377a136a2b20cb86119d0dfc94f8818b82e1a35523
R
11,399
199
options(stringsAsFactors = FALSE) library(ggplot2) library(reshape2) library(dplyr) library(stringr) library(lme4) library(lmerTest) library(RColorBrewer) library(ggpubr) httr::set_config(httr::config(ssl_verifypeer = FALSE)) library(goseq) #### GO enrichment #### ##Adapted from (https://gitlab.aleelab.net/august/ad-...
ce796630523d44b032e826633cd90f3db315b34f71c129c27f8d35cbeb616f5b
R
11,399
385
### MNT 10x snRNA-seq workflow: step 02b ### **Region-specific analyses** ### - (3x) DLPFC samples from: Br5161, Br5212, Br207 ### **Comparing to Spatial Transcriptomics data ### Taken/adapted from /dcl02/lieber/ajaffe/SpatialTranscriptomics/HumanPilot/Analysis/Layer_Guesses ### Initiated MNT 17Feb2020 ### Upda...
9c8b1db5cdc9783fe823d48bfe0a00941da6a4227cbd5c29c61d282356f93ca9
R
11,467
256
# coding UCRÏà¹Ø»ùÒòÔÚbrainµ±ÖÐÓÐÌØÊâpattern # ÀûÓÃÊý¾Ý¿âÊý¾Ý²é¿´coding UCRÏà¹Ø»ùÒòÔÚcerebellum¡¢heart¡¢kidney¡¢liver¡¢ovary¡¢testisµ±Öеıí´ï setwd(dir = "D:/R_project/UCR_project/") options(stringsAsFactors = FALSE) rm(list = ls()) library(dplyr) library(pheatmap) library(readxl) library(stringr) library(tidyverse)...
c02712ea6c6336e8ffb9d81d550536ef67cdbfe0d26ac5ef1b7eeab6f4dbd6f6
R
11,490
263
library(KFAS) # library(rucm) options(digits=10) dta <- read.csv('datasets/macrodata/macrodata.csv') # Irregular (ntrend) mod_ntrend <- SSModel( dta$unemp ~ -1 + SSMcustom(Z=matrix(0), matrix(0), matrix(0), matrix(0)), H=matrix(NA)) res_ntrend <- fitSSM(inits=c(log(var(dta$unemp))), m...
2c254f23613225ede59a50de56b77f68e73e2d55b4b5ad050368795c86225e9a
R
11,493
250
#plot for the simulation results ##### load packages and results #### if (!require("here")) { install.packages("here") library("here") } if (!require("tidyverse")) { install.packages("tidyverse") library("tidyverse") } if (!require("magrittr")) { install.packages("magrittr") library("magrittr") } if (!requi...
7309bf1b4008ffe4b646c560a11dbe700c1d3e58b3a9af8e28d4f5c2da6fedc6
R
11,510
273
# comparison to differentially expressed gene candidates of former bulk RNA-Seq studies # # Chen et al. 2015 # Molecular Profiling of Patient-Matched Brain and Extracranial Melanoma Metastases Implicates the PI3K Pathway as a Therapeutic Target # https://pmc.ncbi.nlm.nih.gov/articles/instance/4216765/ # Suppl. Table S...
262a684d6526ba351f6be6fa9a1df726ba1e3a973a0a2e0b7e5546e8297d0cba
R
11,535
339
```{r} library(Seurat) library(dplyr) library(biomaRt) library(svglite) ``` ```{r} # Download Human NAC data from CELLxGENE: https://cellxgene.cziscience.com/collections/283d65eb-dd53-496d-adb7-7570c7caa443 obj <- readRDS('Human_NAC.rds') obj <- CreateSeuratObject(obj[["RNA"]]@data,meta.data=obj@meta.data) ``` ```{r...
c25e19e356d20e8a3eefa690b3982cf15186b65c186ab60882908e90a8f54185
R
11,583
255
# AIM --------------------------------------------------------------------- # this is the initial step for the counting of senescent cells. In this step I generate the signatures score. # libraries --------------------------------------------------------------- library(tidyverse) library(ggrepel) library(lemon) # rea...
830018d19f52ab60a1edc25babbbbc467536deec59f12f05b096dd46e6c3c46d
R
11,592
256
## Functions to calculate PCA and plot ## #1. screePlot() = calculates variance explained by principle components of pca results. Option to plot barplot. #2. pca.Gene() = runs PCA on betas. [...] = additional arguments such as scale=TRUE to be supplied to prcomp. #3. plotPCA() = scatter plots of 2 PCs. Uses screePlo...
551245d13bfc2abf7482c320b2a9b0627128bae12ca41a9794548553f3aadc3e
R
11,593
240
#################################################################################################### ## Package : CARD ## Version : 1.0.1 ## Date : 2021-1-7 09:10:08 ## Modified: 2021-5-20 15:25:07 ## Title : Spatially Informed Cell Type Deconvolution for Spatial Transcriptomics by CARD. ## Authors : Ying Ma ## Co...
58e89a2fb168994719d9cd842f39bff24b55ac1a6e8afd569482a580c17fd863
R
11,594
420
# Siwei 19 Jun 2024 # match RNASeq count matrices to individual and genotype data # install.packages("LDlinkR") # init #### { library(readr) library(edgeR) library(ggplot2) library(RColorBrewer) library(stringr) } # load data #### df_gene_names <- read_csv("freshmicro_counts/RNAseq_GeneInfo.csv") df_r...
5d76cad28a15c73c8412bb961887fe55e795b2e3a0206277b98a31630b89179d
R
11,622
282
#!/usr/bin/env Rscript # Author: Tim Sterne-Weiler, Ulrich Braunschweig 2014-2024 # u.braunschweig@utoronto.ca # Copyright (C) 2014 Tim Sterne-Weiler, Ulrich Braunschweig # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Softwa...
d4090c6140970fc56373ffc9bf67209dc7537bd05956e5db6ac5449f62e5dfba
R
11,629
263
#' doubletThresholding #' #' Sets the doublet scores threshold; typically called by #' \code{\link[scDblFinder]{scDblFinder}}. #' #' @param d A data.frame of cell properties, with each row representing a cell, as #' produced by `scDblFinder(..., returnType="table")`, or minimally containing a `score` #' column. #' @par...
ae1419fd12d1af40decb2f8af6941bd2513a22e6c3a0aecbc07170e648e91975
R
11,643
221
options(stringsAsFactors = FALSE) library(ggplot2) library(reshape2) library(dplyr) library(stringr) library(lme4) library(lmerTest) library(RColorBrewer) library(ggpubr) library(parallel) library(MutationalPatterns) ref_genome="BSgenome.Hsapiens.UCSC.hg19" chr_orders=c(paste("chr",1:22,sep=""),"chrX","chrY","chrM") li...
6ccbb8a38caa35826918dbc0b3948dc3e48066d1f1aaad41e6b80710d7d64026
R
11,651
195
library(RColorBrewer) library(Matrix) col2<-brewer.pal(n=12, name="Paired") col1<-brewer.pal(n=9, name="Set1") col<-c(col2,col1) plot_cell_ID<-function(data, cutoff=100, sample="NA", ...){ plot(rev(sort(data)), pch=19, cex=0.5, col="grey", xlab="# of Cellular Barcodes", ylab="# of Reads", log="xy", main=sample) fi...
a979c26342bf6e0114a4483594979da7825ef9bb896cf651e551efccb24e38e6
R
11,657
243
# libraries --------------------------------------------------------------- library(harmony) library(Seurat) library(dplyr) library(cowplot) library(tidyverse) library(ggrepel) library(scales) library(RColorBrewer) library(SeuratWrappers) # # read in the data -------------------------------------------------------- da...
e5a083a95d9bdf4bc3ee9b65d2ed49b162eb839ab9bccd3891dff043e8e93d6b
R
11,657
271
library(GenomicRanges) library(readxl) setwd("ATAC") astro <- read.csv("Astrocytes_classification_AUD_vs_Control_all_peaks_anno.csv") oligo <- read.csv("Oligodendrocytes_classification_AUD_vs_Control_all_peaks_anno.csv") micro <- read.csv("Microglia_classification_AUD_vs_Control_all_peaks_anno.csv") opcs <- rea...
39405ed3af68c61c81ada91538bb84596d1918df5845fca5cf74350945217c68
R
11,661
249
#generate 4 basic functions showing possible gene expression shifts low <- function(x) { 0 + runif(1, 0, 0.7) } high <- function(x) { 2.3 + runif(1, 0, 0.7) } up <- function(x) { exp(x/2)-1 + runif(1, -0.4, 0.4) } down <- function(x) { 1/x + runif(1, 0, 0.4) } library(ggplot2) library(patchwork) #m...
f6913d0474d4e8c05b4aa383c6ef081c49d6d115e55297088bcb5934df3ee528
R
11,663
293
# Load required packages library(TwoSampleMR) library(ieugwasr) library(data.table) library(dplyr) library(stringr) library(tidyverse) # Custom function for string concatenation '%+%' <- function(x, y) paste0(x, y) # -------------------------- 1. Set Up Directories -------------------------- # Replace wit...
33306873d2f221053d785258e322635a8016e95d1bb1fb672b3883f3389937a1
R
11,670
287
library(data.table) library(ggplot2) library(arrow) setwd("[Please replace with your working directory path]") # -------------------------- 1. Initialize Parameters & Load GWAS Data -------------------------- # Load GWAS data and generate standardized variant IDs gwas_path <- "[Please replace with path to novel...
5c51505f073e38233bdc1c9c7d1f276000c587ed42fb428a2a9d8756e342afdd
R
11,692
365
--- title: "R Notebook" output: html_document: df_print: paged editor_options: chunk_output_type: console --- View DE results for neutrophils and the neutrophil subclusters ```{r} setwd("/Users/mary/non_dropbox/exps/exp042_meninges_stress_dropseq/") library(ggplot2) library(kableExtra) library(RColorBrewer) l...
d3b5a6f393cfa58f501758abfb54c4028a99369789ae9a08c4af372a17feba22
R
11,713
278
# ============================================================================ # # Script: CCA and Correlation Analysis for Imaging Data (IDoct Version) # # Description: # This script performs a canonical correlation analysis (CCA) between modelled # cognitive data (IDoct version) and brain imaging metrics. It begi...
c63c0f1419609d78d05a1c6fb901603bdd79c2d4cbf047cd679b6ed862cb7416
R
11,732
252
## Enrichment of chromosomes within EWAS results ## library(data.table) library(dplyr) resultsFile <- paste0(AnalysisPath, "ageReg_fetalBrain_EX3_23pcw_annotAllCols_filtered.rds") res <- readRDS(resultsFile) colP <- 'P.Age' colBeta <- 'Beta.Age' #1. Load results & annotate =======================================...
403bdbb53586d1f540acd36321b3614a24da8386bb451dbafa86e0e94c3d9616
R
11,770
259
#!/usr/bin/env Rscript ### title: Compare copy number alterations among TCGA, Davies, and MBPM datasets ### author: Yiping Wang date: 09/27/2021 library(copynumber) library(stringr) library(infercnv) library(grid) library(rlist) library(matrixStats) library(dplyr) tcga_clinical = read.table("gdc_download_skcm_clinic...
eb7a0df49fffe3b6686c6e7529fed12f10d78093c1a9b0a1b5a858308d32397e
R
11,847
234
library(dplyr) library(Seurat) library(monocle) library(ggplot2) library(RColorBrewer) library(cowplot) library("viridis") library(reshape2) MTN.color = brewer.pal(8,"Dark2")[1:3] names(MTN.color) = c("E","T","M") load("../CNVfiltered_11561cells_combine_BGI500DipseqSeed30res017.updatemeta.RData") EPI = subset(embryo.i...
1fa907ffd583d558db1b10928eddc3a99aeb3eaa26a14d5980a313c3708d6749
R
11,855
200
# this script produces composite plots of the partial effects of LSNS on our outcomes comparing them to the effect of age and between imputations library(tidyverse) # version 2.0.0 library(gratia) # version 0.10.0 library(patchwork) # version 1.3.0 library(MetBrewer) # version 0.2.0 library(waffle) # version 1.0.2 #...
a48937bfee13ba0384066252d1ee32295588acf6027ac4fbdebe4634342b9a39
R
11,864
263
# protein-protein/protein-link community/protein complex # condensates setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(dbplyr) library(tidyverse) library(biomaRt) # ÔÚʹÓÃbiomaRtµÄʱºòdbplyrµÄ°æ±¾²»ÄÜÌ«¸ß library(curl) rf_neighboring_protein_coding <- read.table(file = "02-analysis/13-Network_analys...
1447ae37dd7958c8623b0cbd6c562febb7fc6bfd422f6c7872bb69f90c5c9b5f
R
11,869
255
--- title: "OD histogram analysis" author: "C-M Svensson" date: "2023-02-23" output: pdf_document --- ```{r setup, include=FALSE} rm(list = ls()) knitr::opts_chunk$set(echo = TRUE, fig.width = 12, fig.height = 12) library(dplyr) library(latex2exp) library(tidyverse) library(ggplot2) library(readxl) lib...
e056b1904b924c155326f40f471a64803e109146bebfe3cdbfa48c058ebc76a9
R
11,870
310
rm(list = ls()) options(StringAsFactors = F) library(limma) library(dplyr) library(psych) library(tidyverse) library(CovariateAnalysis) library(clusterProfiler) library(org.Hs.eg.db) library(broom) library(VGAM) library(foreach) doParallel::registerDoParallel(10) source("codes/00-02-functions2.R") # Loading covar...
7e4936424f9f76e914768cb617a730a2889a141bfee81ac582aef7c919a8465e
R
11,881
295
#!/usr/bin/env Rscript # # Author: Tim Sterne-Weiler, Ulrich Braunschweig 2014-2024 # u.braunschweig@utoronto.ca ## Check that columns of INCLUSION... table are what we think they are checkHeader <- function(x, replicateA, replicateB) { reps <- c(replicateA, replicateB) sampInd <- unlist(sapply(reps, FUN=funct...
c78ae879977603a4fd75ab766313ed58d787652d1d0562ea17be54dc8c9987de
R
11,915
295
## This script inputs the raw and mapped microbiome data and produces tables on # 1) A table with all taxonomies and mapping information # 2) A table with all species level reads. # 3) A table with # a) mean+sd of relative abundances for each species # b) mean+sd of relative abundances after filtering on spe...
76e6d3e5c6822d348cfc762db56eedecfc40da00f6ab206973a2ad4e745a9646
R
11,920
288
library(tidyverse) library(fgsea) library(dorothea) library(decoupleR) source("scripts/helpers.R") set.seed(123) # target genes with an ELK1 chIP seq peak within 1kb of TSS chipatlas_elk1 <- read_tsv("data/chip_atlas/2023-11-15_chipatlas_tss_1kb_ELK1.tsv") ferguson_deseq <- read_csv("data/tdp43_kd_collection/deseq2_ou...
d99dfc7b5861a3c8560873378664ebb2d053e4291c7b52bd728e4c8bb407a9a6
R
11,925
293
# libraries --------------------------------------------------------------- library(tidyverse) library(ggrepel) # read in the data -------------------------------------------------------- folder <- "../../out/table/modules_SENESCENCE/" file <- dir(folder) %>% str_subset(pattern = "^Module_score_") df_modules <- l...
30e592d256c3da7c98bd0907d1d101f600b91b936646561f3aad5dba036f68f2
R
11,926
304
--- title: "Smoothed heatmaps for Figure S5" output: html_document date: '2023-06-20' --- ```{r} library(Signac) library(Seurat) library(dplyr) library(tidyverse) library(RColorBrewer) library(ComplexHeatmap) library(GenomicRanges) source("AuxFunctions.R") ``` Continue here after VIA pseudotime (associated jupyter n...
39e56913a6d16fd9cc8f80e5982604d914e1f979574c46edce3a991182a0f1b9
R
11,930
355
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("edgeR") library(edgeR) setwd("E:/005---ThirdProject/ThirdObject/0.RealData/") ##### Read Data ##### ESCC_UMI<- read.table("ESCC/GSE199654/GSE199654_scTDN_UMI_matrix_epithelial_cells.txt/scTDN_UM...
3f47baa4f9126f9748d1811a9cc9ba616f96f66364f34797cadeb3bf67244c24
R
11,947
334
# Siwei 09 Oct 2023 # Make bubble plot of Alena's PICALM MAGMA result # init ##### { library(readr) library(ggplot2) library(RColorBrewer) library(stringr) library(scales) } # load data ##### df_raw <- read_table("assembled_MAGMA_results.txt") df_to_plot <- df_raw df_to_plot$`-logP` <- 0 - log10(df_...
5225a6ccbc75ff2eb06a224ed6ed20ba7db47ca7d5f105b6bb858d3b9e219ad0
R
11,954
172
# this script's purpose is to summarise the results of our models library(tidyverse) # version 2.0.0 library(gratia) # version 0.10.0 library(qvalue) # version 2.38.0 "%not_in%" <- Negate("%in%") # define not in operator # define whether SES-weighted or unweighted results should be used weighted <- 1 # set to 0 for u...
d55b9c1c2e0b6464f3be300f7a79b9691f6778606f9a6908580aa84371c13b61
R
11,959
406
# ====UI==== output$tendencyConfirmedRegionPicker <- renderUI({ if (input$selectTendencyConfirmedMode == "一般") { return( pickerInput( inputId = "regionPicker", label = i18n$t("地域選択"), choices = regionName, selected = defaultSelectedRegionName, options = list( ...
df83a04511260476567e0c4e4676751fe9a01a37a2e3afe16bbe64a69bab024e
R
11,963
315
## Based on: # https://github.com/LieberInstitute/brainseq_phase2/blob/master/twas/read_twas.R # https://github.com/LieberInstitute/brainseq_phase2/blob/master/twas/explore_twas.R # https://github.com/LieberInstitute/brainseq_phase2/blob/master/twas/explore_twas_psycm.R library("readr") library("purrr") library("dply...
55fcbb33f970abbc16f4d08715e6f34ca4502aa2a5dcffd00b239973306d3ccc
R
12,034
253
#' Version 2.0 #' This script was last modified on 20/01/2020 #' Script Task: Normalize OTU-tables #' Author: Ilias Lagkouvardos #' Contributions by: Thomas Clavel, Sandra Reitmeier #' #' Normalize abundance values of the input OTU table #' Calculate relative abundances for all OTUs based on normalized values #' Calcul...
158721bdbfc4b912a8af5c76988cf6300feba4f0fe0172083e01885254886a53
R
12,058
293
# Run CellChat to explore cell-cell communication - major cell types (continued) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # March 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github...
228fa586c3e53d49685b4ff818aeaaa19f37447da3c02295077bf3388926dfa0
R
12,058
293
# Run CellChat to explore cell-cell communication - major cell types (continued) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # March 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github...
9ab8b098444d9945582dc4f05c9080f846f4736595d1a9954196d4eeb0f33d8f
R
12,068
293
# Run CellChat to explore cell-cell communication - major cell types (continued) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # March 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github...
cd5cbf7e31241c6ec9245165306642104a055ddfc4ba8ba05f62082c4345e77b
R
12,068
293
# Run CellChat to explore cell-cell communication - major cell types (continued) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # March 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github...
0d1bec53a9b16f1454d1dd7c287dcac5127d8daeef780826aff472640ab64de3
R
12,072
293
# Run CellChat to explore cell-cell communication - major cell types (continued) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # March 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github...
04c7b789f2f6a169ba024b26b5198ffc28c3ce3585a84585579d5da021a8dc2b
R
12,078
293
# Run CellChat to explore cell-cell communication - major cell types (continued) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # March 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github...
d31d106f3469f96300bc2db2d9caf5bf2af4bc1bcdc74905748b746fa70d9588
R
12,078
293
# Run CellChat to explore cell-cell communication - major cell types (continued) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # March 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github...
393fa2bce7181c1f80753c37d5369dfdd01f3fba4fa92f9a064d7ba2b01423d6
R
12,082
293
# Run CellChat to explore cell-cell communication - major cell types (continued) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # March 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github...
3e7fe16ec139762b1f8326c5b468514efa296a85f152635ced6f8c9bf9f81f74
R
12,092
293
# Run CellChat to explore cell-cell communication - major cell types (continued) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # March 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github...
868190c0a0c2ea3f7d1db8fb168829cb9866d3ca0c8ba903b220d089afb4d35d
R
12,124
432
# Siwei 02 Feb 2025 # plot new Fig 6f # init #### { library(readxl) library(stringr) library(ggplot2) library(scales) library(reshape2) library(RColorBrewer) library(ggpubr) library(dplyr) library(data.table) library(DescTools) library(multcomp) library(gridExtra) } # load raw data #### ...
69e64a70eed7c2c935f49f9dbae991e840b6d8e063ec3a3744b06e7d2d5f2c94
R
12,183
293
#!/usr/bin/env Rscript # Author: Kevin Ha, 2014 # k.ha@mail.utoronto.ca # Copyright (C) 2014-2017 Kevin Ha # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including w...
59d56d7a341c0975563d366fe61e89b1052be80cbec0d22758707aca390912fc
R
12,224
411
observeEvent(input$sideBarTab, { if (input$sideBarTab == "world" && is.null(GLOBAL_VALUE$World$PositiveAndDeath)) { # GLOBAL_VALUE <- list( # World = list( # Summary = NULL, # SummaryTable = NULL # ) # ) # TEST GLOBAL_VALUE$World$Summary <- fread(paste0(DATA_PATH, "FIND/worldSu...
f03a6bdf1f614ecf406ee84877972f36f079ee8e4e14b6cd3179f526292c7710
R
12,243
341
#### library(readxl) library(jaffelab) library(readr) library(pracma) library(RColorBrewer) dir.create("circle_pdfs") ## read in reference data ref = read_excel("raw_data/Circle_expected_expression_revisionMNT.xlsx") ref = as.data.frame(ref[,1:5]) ref_mat = as.matrix(ref[,2:5]) rownames(ref_mat) = ref$Population ## ...
870c53cdff63eaa4656f92d182bad8e06d4ac624d9b46f2dd845e27d97bcb315
R
12,267
218
libs <- c('dplyr', 'readr', 'ggplot2', 'tidyr', 'brms') sapply(libs, require, character.only = TRUE) source("Scripts/utils.R") # read in the data starts <- read_csv("Data/starts.csv") |> mutate(MouseID = stringr::str_extract(NetworkFilename, "[0-9]{6}")) |> filter(!NetworkFilename %in% omit_videos) bins <- read_csv("...
bdb7e9bfc7b376ebde9e8e0a9644791735507b01e256a68629b1f9769bc1ef85
R
12,325
312
--- title: "OD histogram analysis" author: "C-M Svensson" date: "2023-02-23" output: pdf_document --- ```{r setup, include=FALSE} rm(list = ls()) knitr::opts_chunk$set(echo = TRUE, fig.width = 12, fig.height = 12) library(dplyr) library(latex2exp) library(tidyverse) library(ggplot2) library(readxl) lib...
b5f89e4ff9aa6a08965373d2371977daaba5851bb7a9b9bc994e9da705be08ce
R
12,335
351
library(tidyverse) library(data.table) plot_junction = function(junc,plotin_table = spliced_counts_ale){ vals = c(`ALS-TDP` = "#E1BE6A", Control = "#40B0A6", `FTD-TDP` = "#E1BE6A", `ALS\nnon-TDP` = "#408A3E", `FTD\nnon-TDP` = "#408A3E") gene_name = plotin_table[paste_into_igv_junction == junc,uni...
c02a632d5918eaea7a2e496b889fc032c3f7f9a6a02ce5bab824a6fad5e71eb5
R
12,335
414
# 20 Dec 2023 Siwei # Will integrate as instructed in their github code # https://github.com/velmeshevlab/dev_hum_cortex/blob/main/snRNAseq_integration # Subset the reconstructed Velmeshev object into Ex and IN subsets # Need to make the plots separately # init #### { library(Seurat) library(Signac) library(re...
f05ca55d04611af673eaa4ac888b9381aa1b7696d6f55b6aebe8c281d6966ef5
R
12,347
227
#generate plots for results of the Saunders data set ##### load packages and results from scdrs/ours/fuma/magma ##### if (!require("here")) { install.packages("here") library("here") } if (!require("tidyverse")) { install.packages("tidyverse") library("tidyverse") } if (!require("magrittr")) { install.package...
3c80646c3f08116bb531632effd52d4262cdc9a31d2dafe6ee5df372f54c4010
R
12,348
250
## Dissociation of Clinical Outcomes and CSF Proteinopathy Biomarkers in Parkinson’s Disease: ## ## Cognitive–Affective Dissociation with Specificity for Tau ## #Disclaimer: As the PPMI database is always evolving, it is possible that the code may not work if the database has changed since the date the code was create...
3f53ce765f9436e2ea4e6538494e4b9f6dba8402ba4c777b2d000a27328e62be
R
12,375
293
# simulate_data.R # ----------------------------------------------------------------------- # Simulates heritable gene expression and GWAS summary statistics for # TWAS validation. # # Model: # expr_i = G_causal_i %*% w + eps_expr (h² = hsq) # y_i = sum_g( beta_g * expr_g_i ) + eps_y (for causal gene...
c36d43c0dcf2f4b57b98c8dcc24dbbbefd38e9303460224d742c5e6ebc406c85
R
12,390
349
library("tidyverse") library("SingleCellExperiment") library("here") library("sessioninfo") library("here") library("broom") #### Set-up #### plot_dir <- here("plots", "03_HALO", "07_TREG_boxplot") if (!dir.exists(plot_dir)) dir.create(plot_dir) data_dir <- here("processed-data", "03_HALO", "07_TREG_boxplot") if (!d...
5a51dc4bea497bdc36298150379b2390f6dae658adc0653e471fab3fba733ceb
R
12,511
428
library(Seurat) library(Matrix) library(dplyr) library(ggplot2) setwd("E:/005---ThirdProject/ThirdObject/0.RealData/") # Load full matrix and annotation mtx <- readMM(gzfile("GSE234129/GSE234129_count_matrix.mtx.gz")) features <- read.delim(gzfile("GSE234129/GSE234129_features.tsv.gz"), header = FALSE) ba...
3a067d446d33160fc0adce76f540e6f016d2764a5315bcff766e4b91d34d8195
R
12,512
286
# AIM --------------------------------------------------------------------- # correlate the autophagy scores with the senescence scores. # libraries --------------------------------------------------------------- library(Seurat) library(tidyverse) library(scales) library(ggrepel) library(cowplot) library(ComplexHeatma...
5fd33d6bc0c4723c25449933457e62c98395357fd4e872b253b77d53995a5443
R
12,545
464
# Siwei 26 Jan 2025 # plot new Fig 5c-f # init #### { library(readxl) library(stringr) library(ggplot2) library(scales) library(reshape2) library(RColorBrewer) library(ggpubr) library(dplyr) library(data.table) library(DescTools) library(multcomp) library(gridExtra) } # load raw data ###...
f9344a84bdd8478810842793854f66dc27423beaf2bf8690542a12d30b35ccad
R
12,556
428
# Siwei 02 Jun 2024 # plot 5 western blot-confirmed genes at transcript level # and their epitope sites; # init ##### { library(Gviz) library(rtracklayer) library(GenomicFeatures) library(BSgenome) # library(BSgenome.Hsapiens.UCSC.hg38) # library(TxDb.Hsapiens.UCSC.hg38.knownGene) # library(ensembldb) ...
9ccbcadf47b4104e1e9a8ccac20a2506910c2e6f39949e3b44fb15eb847c7e0e
R
12,558
341
library(tidyverse) long <- read_tsv("/Volumes/LaCie/Drosophila/drosophila_nanopore/DRS_compairison/results/squanti_short_long/corr_filtered_control_pooled_Nanopore_stg_classification.txt") #long_counts <- read_tsv("/Volumes/LaCie/Drosophila/drosophila_nanopore/DRS_compairison/results/squanti_short_long/filtered_contro...
b0be6348f1107d83015119a1fb6c6fd774c91d64fc54f0a89869d3ac747fc7a4
R
12,558
370
#!/usr/bin/env Rscript ## ## Parse a VCF file and generate a table compatible with ANNOVAR output. ## ## usage: Rscript --vanilla vcf-table.R sample_name in.vcf out.txt ## # increase output width options(width = 120) # print warnings as they occur options(warn = 1) # get scripts directory (directory of this file) ...
4c84bd9c3828e5e58cb91cc2e8c0ef6c6294a673a6326b3ed278bb364e35f863
R
12,559
288
# Authors: Lauren Rylaarsdam, PhD; Stephen Coleman, PhD # 2024-2025 ############################################################################################################################ #' @title clusterCompare #' NEEDS UPDATING #' @description Correlates average percent methylation over 100kb windows aggregate...
8c47d78ba1ec8d9785ea4400cfda8a24f5116f04c9af7b50b23cf570ce1d6bd6
R
12,569
218
library("SingleCellExperiment") library("rafalib") library("iSEE") library("lobstr") library("here") library("whisker") library("usethis") library("withr") library("rsconnect") library("sessioninfo") load(here("rdas", "revision", "regionSpecific_NAc-n8_cleaned-combined_MNT2021.rda"), verbose = TRUE) source(here("shin...
95429fa665682155eb7de9d78992981de4f0acf15d103658246440eaec1e7cba
R
12,575
373
library(reticulate) library(ggplot2) library(Seurat) library(bulkAnalyseR) library(ComplexHeatmap) library(dplyr) library(plotly) library(MASS) library(rgl) library(processx) source_folder <- expr_folder <- file.path(source_folder, "07.Expr_matrix") bulk_folder <- file.path(source_folder, "08.Bulkanalyser") output_fo...
a7d9643ae5d19646df62f6d8351e3a58cb439f605efd8cc2f6a646f82e142de6
R
12,592
280
suppressPackageStartupMessages(library(optparse)) option_list = list( make_option(c("-c", "--circRNA.targets"), type='character', help="circRNA targets (ciri2)"), make_option(c("-g", "--genes"), type='character', help="Prepared gene database (bed)"), make_option(c("-e", "--exons"), t...
2cfa929869bf9e94c79dc08b42e918a2a26e4ce24a8a6cd8d3d78cfb965832cf
R
12,629
422
rm(list = ls()) library(stringr) library(ggplot2) library(RColorBrewer) library(patchwork) library(dplyr) library(DirichletReg) library(tibble) cell_counts <- read.csv("Qupath_EC/annotations_processed_V2.csv",) cell_counts[is.na(cell_counts)] <- 0 temp <- as.data.frame.matrix(cell_counts) #temp <- temp[temp$Group !=...
969f37ebfb8bd0d5b93d6a47890f011f9bb0154197070fb3273255120067d98b
R
12,634
117
libs <- c("dplyr", "readr", "ggplot2", "tidyr", "stringr", "ordinal", "patchwork") sapply(libs, require, character.only = TRUE) source("Scripts/utils.R") # read in the data starts <- read_csv("Data/starts.csv") |> mutate(MouseID = stringr::str_extract(NetworkFilename, "[0-9]{6}")) |> filter(!NetworkFilename %in% omi...
06db57f7a2d9be1676f9f52c5840ef233f86a51db056248d7bffd6655fb7a939
R
12,680
294
# libraries --------------------------------------------------------------- library(Matrix) library(data.table) library(Seurat) library(SeuratData) library(dplyr) library(gt) library(SPOTlight) library(igraph) library(RColorBrewer) # old function spotlight -------------------------------------------------- SPOTlight_o...
fd1293d32522e0e66c276e5a9e569d4abae7833af4c5a3f7299d9b8cd1d664d9
R
12,683
229
#### Oligodendrocytes analysis #### ### Pre work #### library(tidyverse) library(Seurat) library(SeuratObject) library(ggplot2) library(doParallel) library(future) library(cowplot) library(patchwork) library(monocle3) library(monocle) library(SeuratWrappers) library(Nebulosa) library(dplyr) library(edgeR...
7139e7e4f18edeed4035d720c49bf825c7ec0eaea78dab98f995fd3b816afd74
R
12,700
319
#!/usr/bin/env Rscript ### title: Integrating TCR output from Cell Ranger vdj (v6.1.1) and ### visualization of TCR distribution ### author: Jana Biermann, PhD print(Sys.time()) library(Seurat) library(dplyr) library(ggplot2) library(gplots) library(viridis) library(scales) library(stringr) library(reshape2) librar...
d371bfaa88bdb1a5139c69a58d725b7dbacc7aa9d622b49a84b8c26d20a83905
R
12,734
308
--- title: "OD histogram analysis" author: "C-M Svensson" date: "2023-02-23" output: pdf_document --- ```{r setup, include=FALSE} rm(list = ls()) knitr::opts_chunk$set(echo = TRUE, fig.width = 12, fig.height = 12) library(dplyr) library(latex2exp) library(tidyverse) library(ggplot2) library(readxl) lib...
6ba7d8122cdc936214efd00d6e679f28432ea195a7f4b28b5511c682ffbb444e
R
12,815
268
# Run EWCE to explore common variants reported in Bellenguez et al 2022 - prefrontal cortex (PFC) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # Feb 2024 # The list of genes from Bellenguez et al. 2022 was produced as follows: ## All...
7b7d805498072e3cf2db0e7fa3f4edd37bf3969e5fe5a47cf6aa2e7570c039b5
R
12,816
268
# Run EWCE to explore common variants reported in Bellenguez et al 2022 - prefrontal cortex (PFC) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # Feb 2024 # The list of genes from Bellenguez et al. 2022 was produced as follows: ## All...
84d7afce1879428eb77cb75deb60e2bf1f0f32187126b1db4dc38297de77f8e1
R
12,830
440
library(dplyr) library(twice) library(TEKRABber) library(ggplot2) library(viridis) library(ComplexHeatmap) data("hmKZNFs337") #337 KRAB-ZNFs in human data("hg19rmsk_info") # 1. create meta data df_meta <- metadata %>% left_join(brain_meta, join_by(brain_region == region)) # 2. do TPM conversion in human and NHP...
a6d09291ebb887d997a496b3176031dfbbcc1b4ede56d4fc84f701d7ea8fef11
R
12,848
245
--- title: "Gene Expression Analysis_TM integrated data_Cluster Markers & Species-Enriched Genes" author: "Yuanming Liu" date: "2024/8" output: nl_document --- # Load packages library(dplyr) library(Seurat) library(ggplot2) library(readr) library(clusterProfiler) library(org.Mm.eg.db) # Load homologous gene conve...
77813e00838e879af3c78d61c6a8700e6cefadf551b2445c7176e3b05abf88c0
R
12,853
280
--- title: "de view" output: html_document --- Code for scRNAseq pathway analysis related to neutrophils ```{r} setwd("/Users/mary/non_dropbox/exps/exp042_meninges_stress_dropseq/") library(Seurat) library(ggplot2) library(tidyverse) library(magrittr) library(here) ``` Get out_preneut, out_neut, out_A .... F (neut ...
78d80f44e108b13056abd4c3ef9690df9ffc9ebe1e058864aa80a45c7075c8f5
R
12,895
294
#' Detect doublet clusters #' #' Identify potential clusters of doublet cells based on whether they have intermediate expression profiles, #' i.e., their profiles lie between two other \dQuote{source} clusters. #' #' @param x A numeric matrix-like object of count values, #' where each column corresponds to a cell and e...