sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
bc05dda9ac91ebd5e97ed23a3f93168f2bdb150c5fcd8dcb0adce05c70c1035d | R | 15,412 | 392 | require(optparse)
require(tidyverse)
require(ggpubr)
require(cowplot)
require(extrafont)
# variables
RANDOM_SEED = 1234
# formatting
LINE_SIZE = 0.25
FONT_SIZE = 2 # for additional labels
FONT_FAMILY = "Arial"
PAL_DARK = "darkgreen"
PAL_DRIVER_TYPE = c(
#"Non-driver"="lightgrey",
"Tumor suppressor"="#6C98B... |
0994d3d471d2b3e7a5a049cb31fe86c1bd71d507d32087e7b786a2883767b31c | R | 15,437 | 297 |
## Enrichment of genic features within EWAS results ##
library(data.table)
library(dplyr)
# prenatal bulk cortex
resultsFile <- paste0(AnalysisPath, "ageReg_fetalBrain_EX3_23pcw_annotAllCols_filtered.rds")
res <- readRDS(resultsFile)
pThresh <- 9e-8
colP <- 'P.Age'
colBeta <- 'Beta.Age'
# postnatal bulk cortex
res... |
8156f8a203e0b0d40ebc606f2e9ca7b3e73cbf5229c3ccb6e1479523be34f96c | R | 15,447 | 326 | library(tidyverse)
library(openxlsx)
library(TwoSampleMR)
source("/mnt/data/lijincheng/mGWAS/result/02MRBMA/MRBMA_function/function/local_clumb.R")
##-----------{BBB & immune}---------
immune <- openxlsx::read.xlsx("/mnt/data/lijincheng/mGWAS/result/01UVMR_immune_BBB/lindbohm_immune_BBB_127.xlsx",sheet=4)
BBB <- ope... |
04c930cdd91cd315154018c81afdb5eeba238b286c316bc2df53e3b14a5514ac | R | 15,463 | 399 | library(Seurat)
library(Signac)
Astrocytes_blacklist <- c("BTRC_218_BTRC_218",
"BTRC_272_BTRC_272",
"BTRC_142_BTRC_142",
"BTRC_7_BTRC_7",
"BTRC_291_BTRC_291",
"BTRC_261_BTRC_261",
... |
9e5b5cd6e473482604ff14b710d822f83eb20635b4168d0413e0f671de5997f6 | R | 15,474 | 350 |
## Analyses the FANS lifecourse EWAS results ##
#1. Load libraries & define functions ===========================================================================================
library(scales)
library(stringr)
library(viridis)
library(data.table)
library(gridExtra)
'%ni%' <- Negate('%in%')
orderRes <- function(r... |
a735cd78eae4e5eeb64305f99b367eee031a98728d2d2d3f6be174071dd4f0bb | R | 15,478 | 382 |
library(DESeq2)
library(GenomicRanges)
library(apeglm)
library(dplyr)
library(ggplot2)
library(gplots)
library(gridExtra)
#library(Rtsne)
library(reshape)
library(scales)
#library(VennDiagram)
#library(Seurat)
library(graphics)
#library(MultiPhen)
library(stringr)
### NOTE: THIS ASSUMES THAT THE GENE... |
d89b07a1816d5e57ecd529faef34d733baa3bde3041e789272260beac56f56c2 | R | 15,479 | 312 | # libraries ---------------------------------------------------------------
library(Seurat)
library(tidyverse)
library(scales)
library(ggrepel)
# read the data -----------------------------------------------------------
# read in the dataset
data.combined <- readRDS("../../out/object/data.combined_harmonySkipIntegrati... |
1d9b1e7864fc49f6e69d80535df9e821aca45a7469744326ac5827c9a0c4af53 | R | 15,561 | 409 | ---
title: "R Notebook"
output: html_notebook
---
Load standard packages
```{r, message=FALSE, warning=FALSE, include=FALSE}
rm(list = ls())
library(tidyverse)
library(scales)
library(broom)
library(tidyheatmaps)
library(clusterProfiler)
library(org.Hs.eg.db)
library(scales)
library(ggdendro)
library(ggrepel)
library(l... |
096d1629dcae224fa55f06371019ca3e5950fb69df10b87332b161a28717e428 | R | 15,593 | 474 | library(nichenetr) # Please update to v2.0.4
library(Seurat)
library(SeuratObject)
library(tidyverse)
library(clusterProfiler)
library(org.Hs.eg.db)
library(CellChat)
load("dat_filt_PD.Rdata")
sobj=dat_filt_PD
head(sobj@meta.data)
table(sobj@meta.data$classcell)
table(sobj@meta.data$Disease)
sobj@meta.data$cond=sob... |
2af14aafa539305fbd2df5951cedca362ef25030e113e9003e10ea7a4b293d0f | R | 15,636 | 456 | library(nichenetr) # Please update to v2.0.4
library(Seurat)
library(SeuratObject)
library(tidyverse)
library(clusterProfiler)
library(org.Hs.eg.db)
library(CellChat)
load("sobj_AD_IKAP.Rdata")#"Brain_organoid/PD/
cond_labs = rep("Control",length(sobj$orig.ident))
cond_labs[grep("61|63",sobj$orig.ident)] = rep("AD_ser... |
8466a5fc1345ea18506bb26d7baeeb490e971c3a6f8ee0edd5933062b7c19f8c | R | 15,701 | 329 | library(qs)
library(Seurat)
library(ggplot2)
library(gridExtra)
library(dplyr)
library(viridis)
library(stringr)
library(cowplot)
library(DESeq2)
library(scran)
library(pheatmap)
library(ggrepel)
library(radiant.data)
library(writexl)
library(readxl)
library(BiocParallel)
library(AnnotationHub)
library... |
cb0d18158582ab4bd48339a686f66bf8fda55821e1382b0deba1e0e734cf5c0a | R | 15,732 | 492 | # Extract Microglia , use syn52368912
{
library(stringr)
library(Seurat)
library(parallel)
library(future)
library(glmGamPoi)
library(edgeR)
library(data.table)
library(readr)
library(readxl)
library(stringr)
library(ggplot2)
library(scales)
library(reshape2)
library(RColorBrewe... |
e7696d1bb2d4709208256eccdb8088a440592be57c1232af6755fc2fa66a7358 | R | 15,738 | 146 | libs <- c("dplyr", "readr", "ggplot2", "tidyr", "circlize", "ComplexHeatmap", "correlation")
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... |
19acc86029a6ed0fa47440d1b5700da1b98077df5fe47e7358db708bb057b16e | R | 15,743 | 394 | # function for plotting rs16966337 site
# revised from plot_anywhere
# Use OverlayTrack to combine data tracks
# chr16:9939960
# init #####
library(Gviz)
library(rtracklayer)
library(BSgenome)
library(BSgenome.Hsapiens.UCSC.hg38)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
library(ensembldb)
library(org.Hs.eg.db)
li... |
d0085ec5d58ca28dada9f0af88407a81362fbd267352c6a488016031e6a22ebe | R | 15,758 | 304 | library(dplyr)
library(Seurat)
library(ggplot2)
library(clusterProfiler)
library(org.Mm.eg.db)
library(readxl)
# Set up directory
setwd("/project/Campbell_Lab/yl7mfw/Data Analysis/20250318_Revision/HTM_GO")
# Only keep the homologous genes across three species in the HTM data
# Remove potential NA in the homologous ... |
e590052ce98a3b5468fd01215fec634a48cdc8c7f8b111501cac690dc7e4c66d | R | 15,764 | 498 | ---
title: "CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project - Volcano plots"
author: "Isabel Castanho"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
---
---
# Differential expression analysis using Seurat
Statistical m... |
9e08300330bb8f5d41b71f0666b956e04672b04e4e8d693f0af3ad7f3f4bf3fc | R | 15,946 | 474 | ---
title: "Cross-species comparisons for genes with peaks"
author: "lecook"
date: "2022-02-23"
output: workflowr::wflow_html
editor_options:
chunk_output_type: console
---
# Set-up
```{r setup, include = FALSE}
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
... |
13f60182ce791884b0f374336b54a56fa45960a561e52374cb0db74ba535b138 | R | 15,953 | 344 | # 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... |
a5061636cc7ebdb305291edb07999c4e999db8c467b4ae5ea253ee7cb752102c | R | 16,036 | 472 | # Siwei 13 Jan 2025
# lookup projID
{
library(stringr)
library(Seurat)
library(parallel)
library(future)
library(glmGamPoi)
library(edgeR)
library(data.table)
library(readr)
plan("multisession", workers = 3)
# options(mc.cores = 32)
set.seed(42)
options(future.globals.maxSize = 42949672... |
cd77d660ad447778cddf8f466641eb31a7df5882f67162cbd1cacebd8b61e374 | R | 16,053 | 587 | # Author: Stacey L. Kigar
# 20230923
# set-up ------------------------------------------------------------------
# load packages
library(tidyverse)
library(magrittr)
library(ggpubr)
library(ggplot2)
library(rcompanion)
library(report)
library(showtext)
#import data
setwd("/data/")
# import data for LysM mice:
all <... |
dfb83a553e91a92539e3a642e67af3b1c99e707fa8a373c2ce35c375c47743f1 | R | 16,082 | 289 |
library(here)
library(ggplot2)
library(SummarizedExperiment)
library(tidyverse)
library(sessioninfo)
#################################################################################################################
## Measurements of wobble in neuron predicted proportions
############... |
0468d747f70317d51640366939fcbfae63529fc06df50f86cd5611addaccbfed | R | 16,151 | 425 | ---
title: "R Notebook of rV2 manuscript figure 3 trackplot panels"
output: html_document
---
```{r Packages, message=FALSE}
library(tidyverse)
library(Seurat)
library(Signac)
library(qs)
library(rtracklayer)
library(gUtils)
library(DBI)
library(GenomicRanges)
source("local_settings.R")
```
```{r DB connection}
con.o... |
9a9a49980d0ac344b0c1fd90855ef0a52321970c148eab669989f51633bd93ce | R | 16,207 | 314 | ```{r}
# gene panel includes cell type and neuromodulator genes on sagittal slices
# whole-brain BAR-seq data registered to the Allen Common Coordinate Framework version 3 (CCFv3)
# data is quality controlled by keeping cells with genes/cell >= 5 and reads/cell >= 20
# load libraries
suppressPackageStartupMessages(li... |
0df4074aa8038ffd0b71a16d4a5fb0a4893a19db250f8c5f8bb1de1923d26d36 | R | 16,413 | 505 | library("tidyverse")
library("scales")
library("ggrepel")
library("patchwork")
library("broom")
library("here")
library("sessioninfo")
# library("DeconvoBuddies")
#### Dir Set-up ####
plot_dir <- here("plots", "03_HALO", "02_spatial_size_QC")
if (!dir.exists(plot_dir)) dir.create(plot_dir)
data_dir <- here("processed... |
991d170f146d41fe89654b881ee862db9e55a053141267f5bf3fb6bc31edae96 | R | 16,567 | 647 | # Siwei 27 Jan 2025
# plot Fig. Ex 5h
# init ####
{
library(readxl)
library(stringr)
library(ggplot2)
library(scales)
library(reshape2)
library(RColorBrewer)
library(ggpubr)
library(ggridges)
library(dplyr)
library(data.table)
library(DescTools)
library(multcomp)
library(gridExtra)
l... |
674c06159e5d2fcdb91ed5c0c21415167a71466d9fdda9f94380417ca6688304 | R | 16,641 | 537 | #S4
# Create network using highly confident TE:KRAB-ZNF
In this script, we draw the cluster 1 and cluster 2 network in human. We also highlight the young pair of TE:KRAB-ZNF.
{width="649"}
{width="597"}
Multivariate regr... |
5cf89c86f8f4b50af4f6e77993fe371d9103c351298f5f27054104ce9e5aa45c | R | 16,645 | 538 | #S5
#S4
# Create network using highly confident TE:KRAB-ZNF
In this script, we draw the cluster 1 and cluster 2 network in human. We also highlight the young pair of TE:KRAB-ZNF.
{width="649"}
{width="597"}
Multivariate ... |
4a22d13a1a8421f4a6d66f35b8e29510b3b7026849542d23a212c79b8a1140c1 | R | 16,663 | 221 | ---
title: "tables"
author: "LL"
date: "2025-02-24"
output:
html_document: default
word_document: default
pdf_document: default
---
# Table 3
```{r echo=FALSE}
library(flextable)
library(tidyverse)
set_flextable_defaults(font.family = "Times New Roman", font.size = 12)
# set working directory and read in the r... |
6f74963a40a203e0f5489a596d8549a9e594cac49cb4dd1dd79deaef5b9c258c | R | 16,669 | 446 | library(tidyverse)
library(ggrepel)
library(ggrastr)
# library(ggupset)
set.seed(123)
#' Convert dataframe of median delta usages for signficiant events into df reading for scatter plot
#' Can label genes of interest with vector of gene_names (pass as 2nd argument)
#' Optionally labelling only cryptic events (label_al... |
317da858e6ae4355fd58c5922c6f2fb6ce5072f907c8316b248ac8b9c12f1b6a | R | 16,690 | 357 | # Run EWCE to explore rare variants identified by Dmmitry Propopenko - Entorhinal cortex (EC) - all cells
# CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# January 2023
# Annotated genes from union of SNVs and regional rare variants ide... |
4976afb135d2afd1918f80bd98f142e991a16b1978358661e87e7fb6170305b3 | R | 16,722 | 357 | # Run EWCE to explore rare variants identified by Dmmitry Propopenko - Prefrontal cortex (PFC) - all cells
# CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# January 2023
# Annotated genes from union of SNVs and regional rare variants id... |
7f2f77cdd2882df7a529e0dc95785bef70414d624c9abcac8ab3b72d30939500 | R | 16,762 | 476 | ---
title: "R Notebook"
output: html_document
---
```{r, message=FALSE}
library(tidyverse)
library(DBI)
library(readxl)
library(writexl)
library(GenomicRanges)
library(qs)
source("local_settings.R")
```
```{r DB conection and loading objects, message=FALSE}
con <- DBI::dbConnect(RSQLite::SQLite(), dbname = paste(db.p... |
c388bccf22482406f66ff49fd1e396edbc16921f41f3b07ea350309ae248fb8d | R | 16,762 | 447 |
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)
library(stringr)
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
#s... |
4ebe69d1003beb3e00e57fff08ad4c2a791042d9860d9e5beee0170dfa5b3e4c | R | 16,797 | 286 | # this script runs (weighted) GAMMS on the imputed datasets
# 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 whether SES-weighted or unweighted models should ... |
22c9052841fcba0cc1e8914fa9ae10e1b9cd5e7d7bbfc1e5b7541d709bb7b25e | R | 16,798 | 357 | # Run EWCE to explore rare variants identified by Dmmitry Propopenko - Hippocampus (HC) - all cells
# CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# January 2023
# Annotated genes from union of SNVs and regional rare variants identifie... |
b5e178039119e92476ca5997d6b6ab468cb3827c7f4885129cf334e322c277c2 | R | 16,937 | 508 | # Siwei 13 Jan 2025
# lookup projID
{
library(stringr)
library(Seurat)
library(parallel)
library(future)
library(glmGamPoi)
library(data.table)
plan("multisession", workers = 3)
# options(mc.cores = 32)
set.seed(42)
options(future.globals.maxSize = 429496729600)
}
Immune_cells <-
readRDS(... |
410af120c6baf115688940479e2f644c81cab3943c2c2b7a19618c3a26e9ee38 | R | 16,969 | 530 | library(ggplot2)
library(ggrepel)
library(dplyr)
library(data.table)
library(plotly)
library(htmlwidgets)
library(sessioninfo)
library(ggpubr)
library(tools)
library(GGally)
library(tidyverse)
library(patchwork)
data.table::setDTthreads(threads = 1)
# Sourcing Data/Inst. Vars. ####
load("rda/twas_exp_ranges.Rdata")
#... |
44079f0daa72e08c9e603a720e072b9a3392288bec84c4f185e26170f906e502 | R | 17,042 | 365 | # 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... |
0df151eb36c0f7611441e6a5a27c45a88018a6e75523f92a8f0ec04f0407cea3 | R | 17,109 | 553 | #### Oligodendrocytes analysis - SCENIC/GENIE3 ####
library(Seurat)
library(SeuratObject)
library(ggplot2)
library(doParallel)
library(future)
library(cowplot)
library(patchwork)
library(SeuratWrappers)
library(Nebulosa)
library(dplyr)
library(SCENIC)
library(GENIE3)
library(doRNG)
library(SCopeLoomR)
se... |
3ebe8dde2d120b0003820eb31fe1cda9f025015c3392b0032f61dc330efde347 | R | 17,111 | 376 | # libraries ---------------------------------------------------------------
library(Seurat)
library(tidyverse)
library(scales)
library(ggrepel)
library(cowplot)
# read the data -----------------------------------------------------------
# read in the dataset
data.combined <- readRDS("../../data/schirmer.rds")
# make s... |
e1e2f1523399cd3c97abc044efcf008a13cc1bb0ec5c411589b59e392a9109fd | R | 17,117 | 561 | # Pathogenicity evaluation of SNPs within UCRs and control fragments
# organize SNPs within UCRs and control regions to VCF files
# obtain all pathogenicity score respectively
setwd(dir = "D:/R_project/UCR_project/")
options(stringsAsFactors = FALSE)
rm(list = ls())
library(tidyverse)
library(ggplot2)
library(tidyr)
... |
69a4fcb43b0b95f995b037d622d21240de9df9e733a4b54f371259e45236485e | R | 17,123 | 413 | # Siwei 25 Jun 2024
# plot rs2027349 using the bw files from
# https://personal.broadinstitute.org/bjames/AD_snATAC/bigWig_TSS6/
# and their epitope sites;
# init #####
{
library(Gviz)
library(rtracklayer)
library(GenomicFeatures)
library(BSgenome)
library(BSgenome.Hsapiens.UCSC.hg38)
library(TxDb.Hsapien... |
475ccc81a122129f3849d96db05c4dc16b6413c99682990edd169a0051dbecf2 | R | 17,127 | 382 | #==============================================================================#
# AAC: GLOBAL / LOCAL VERSION
#==============================================================================#
# remotes::install_github('m-clark/mixedup')
source("_Common.R")
pacman::p_load(R.matlab, tidyverse, here, weights, flextab... |
27c74cab5832997e11dd50f9e5dfd91e71ebb610da9ca761afc2837f9b49014e | R | 17,141 | 469 | ---
title: "Danionella_numerosity"
author: "Mirko Zanon"
date: '2025-01-20'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(ggplot2)
library(readxl)
library(tidyr)
library(plyr)
library(dplyr)
library(ggbeeswarm)
library(permuco)
library(tidyr)
```
```{r}
r... |
3392dbfb3320d1d43b92810ad6872a2e224f9576ac8796f268d0ddc7caec75aa | R | 17,152 | 439 | # libraries ---------------------------------------------------------------
library(Seurat)
library(tidyverse)
library(GGally)
library(cowplot)
library(ComplexHeatmap)
library(scales)
library(circlize)
library(DESeq2)
library(RNAseqQC)
library(limma)
library(ashr)
library(magick)
library(UpSetR)
# read in the final ob... |
e9ad9b8014d846b5b15b16405cb0a63d63cb412a20a21b4c1faecf8fc0c8a27a | R | 17,161 | 308 |
library(dplyr)
library(Seurat)
library(ggplot2)
library(clusterProfiler)
library(org.Mm.eg.db)
library(readxl)
# Load TM data
sSC.integrated <- readRDS("/project/Campbell_Lab/yl7mfw/Data Analysis/20240620_TwoSpecies_OtherPlot/20240728_Species and Cluster markers/20240729_Orthologous_sSCintegrated.rds")
DEG.Species <-... |
05e73505248535ea186d681863f070a2583ab65c76aff77cf9f25b18b0946f9d | R | 17,224 | 439 | # libraries ---------------------------------------------------------------
library(Seurat)
library(tidyverse)
library(GGally)
library(cowplot)
library(ComplexHeatmap)
library(scales)
library(circlize)
library(DESeq2)
library(RNAseqQC)
library(limma)
library(ashr)
library(magick)
library(UpSetR)
# read in the final ob... |
e8467ba15155d49cf6927e4626fe22a229dda2290d80c0d0d36e52e843dd384e | R | 17,228 | 564 | # Siwei 29 Sept 2023
# plot PCA of Alena's microglia with iPS-derived microglia + human
# Analyse Alena's RNASeq results in-house
# init ####
{
library(edgeR)
library(readr)
library(readxl)
library(Rfast)
library(factoextra)
library(dplyr)
library(stringr)
library(ggplot2)
library(RColorBrewer)
... |
f3704e62bd9f21e4118d5021dfb8c0935b6e28db76a271a5ad652715b64a3414 | R | 17,328 | 292 | ##file path context
library(tidyverse)
library(openxlsx)
#-----------{00.00 prepare datainput}--------------
##-----------------{FR}-----------------
FRsp213 <- openxlsx::read.xlsx("/mnt/data/lijincheng/mGWAS/result/02MRBMA/species213_inputdf.xlsx",sheet=1)
FRlist <- list.files("/mnt/data/lijincheng/mGWAS/da... |
82e66f0c5ef4758dc714bcde987ff18ac81a065a23677cf1ba342c75374b381c | R | 17,453 | 547 | # Siwei 01 Mar 2024
# plot insert sumstats of 5 cell types
# init ####
library(readr)
library(ggplot2)
library(RColorBrewer)
library(stringr)
library(dplyr)
# load a file list of all fragment files
frag_file <-
dir(path = "insert_sumstats",
pattern = "*.txt",
full.names = T,
recursive = T)
# se... |
3cd4f86dad968d1dc96892bb9a031606c16a4a4006558e9e753d2a93348e013c | R | 17,512 | 342 | ## Load plink before starting R
# module load plink/1.90b6.6
# R
## Now run R code
library("data.table")
library("SummarizedExperiment")
library("here")
library("recount")
library("sva")
library("sessioninfo")
dir.create("rda", showWarnings = FALSE)
## To avoid issues with running this code on qsub
data.table::setDT... |
bb642d9a64cb205150785bc00647a07b7dd34bd31b61e36df045746045dea67c | R | 17,621 | 413 | library(tidyverse)
source("scripts/fncs_plot_peka.R")
source("scripts/fncs_plot_iclip.R")
#' Save a list of ggplots to pdf file, with one plot per page
plot_list_to_pdf <- function(plot_list, path, width, height) {
pdf(path, width = width, height = height)
# Loop through each ggplot object and print it to th... |
fb59b1ea2ad9fdb43d280efd57715c986ff3e0cc0e46f13b5d0b40dc9bd3c233 | R | 17,696 | 399 |
library("SummarizedExperiment")
library("tidyverse")
library("EnhancedVolcano")
library("here")
library("sessioninfo")
library("ggrepel")
library("jaffelab")
# library("UpSetR")
library("ComplexUpset")
#### Set up ####
## dirs
plot_dir <- here("plots", "09_bulk_DE", "10_DREAM_plots")
if(!dir.exists(plot_dir)) dir.cr... |
eb0edd4dcda8394aacd74868ea5a4312f6d9e420d2b3816cfe7652888467fbc9 | R | 17,730 | 425 | ### MNT 10x snRNA-seq workflow: step 04
### **Region-specific analyses**
### - (2x) DLPFC samples from: Br5161 & Br5212
### - Setup and comparison to Mathys, et al (AZD snRNA-seq paper)
#####################################################################
library(SingleCellExperiment)
library(EnsDb.Hsapiens.... |
1910edcbf9d8d399cbac3d0dfebd1cac748180b838ccd88fd9f726148f658839 | R | 17,734 | 402 | ```{r}
# enucleation data for controls and experiments
suppressPackageStartupMessages(library(xfun))
pkgs = c("SingleCellExperiment","tidyverse","data.table","dendextend","fossil","gridExtra","gplots","metaSEM","foreach","Matrix","grid","spdep","diptest","ggbeeswarm","Signac","metafor","ggforce","anndata","reticulate"... |
1520f0fcbe93eee2be015b34afd6b443d571f1deca8ae8a6a32291696e81e368 | R | 17,774 | 366 | ---
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... |
cd7e5fe228c4d1d1a03de92b810547d37d4cb36d4398b1517a1a5be1c9ef8e2d | R | 17,850 | 529 | /lijincheng/mGWAS/result/02MRBMA/hyprcoloc/")
rm(list = ls())
library(tidyverse)
library(openxlsx)
#get the significant me
##get significant result
LOAD_med <- openxlsx::read.xlsx("/mnt/data/lijincheng/mGWAS/result/02MRBMA/mediation_MR/mirobe_circulator_AD.xlsx",sheet = 1)
LOAD_med_sig <- LOAD_med %>% dplyr::filter(... |
596acede7e234ec1bddc801e89e28d1286d176d89b74d96a42d92692827af396 | R | 17,863 | 402 | #!/usr/bin/env Rscript
#### Make inferCNV plots for selected samples
library(Seurat)
library(infercnv)
library(ggplot2)
library(pheatmap)
library(grid)
library(rlist)
library(stringr)
makeIndividualPlots = TRUE
makeCombinedPlot = FALSE
if (makeCombinedPlot) {
#patslist = list(c("MBM05_sn","MBM06_sn","MBM07_sn","MB... |
80a6e12abbed7788754bfeea0c6e3fdb75a3ac927e6a2e9f7d7c41842e6c4ee7 | R | 17,929 | 439 | ### MNT 10x snRNA-seq workflow: step 04
### **Region-specific analyses**
### - (2x) DLPFC samples from: Br5161 & Br5212
### - Setup and comparison to Mathys, et al (AZD snRNA-seq paper)
#####################################################################
library(SingleCellExperiment)
library(EnsDb.Hsapiens.... |
696be1d67667d68d95963f0a91219ad758838186f32336c95250fe175cf72600 | R | 17,979 | 409 | # SNP density & SNP site density
setwd(dir = "D:/R_project/UCR_project")
options(stringsAsFactors = FALSE)
rm(list = ls())
library(ggpubr)
library(patchwork)
library(ggsci)
library(tidyverse)
library(ggplot2)
library(reshape2)
library(showtext)
library(gginnards) # ���������Ա�ǵ������... |
248f3422c8b2ee7d545732278e7922dadd3fe9e74b4d132b354e5a7bb5bdd18c | R | 18,027 | 381 | #### Data analysis - Xuan's EM data ####
## Loading required info
library(ggplot2)
library(car)
library(openxlsx)
library(dplyr)
#devtools::install_github("coolbutuseless/ggpattern")
library(ggpattern)
library(coin)
set.seed(0)
#### Comparison of myelinated axons per area ####
as.data.frame(read.xlsx("CNPc... |
3168bcd323d4bf7a095bf8b109bc46d77e079c76b295bf50bafe32467160b490 | R | 18,107 | 382 | #### Data analysis - Xuan's EM data ####
## Loading required info
library(ggplot2)
library(car)
library(openxlsx)
library(dplyr)
#devtools::install_github("coolbutuseless/ggpattern")
library(ggpattern)
library(coin)
set.seed(0)
#### Comparison of myelinated axons per area - CC ####
as.data.frame(read.xlsx(... |
6585b88c99e9403a07ad41a16ae0c52d5415335480df443bd2ae82283b876f71 | R | 18,156 | 411 | ---
title: "3. Case study: colocalization analysis in prostate cancer"
date: "2023-05-01"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Colocalization_analysis_with_xQTLbiolinks}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
lang: en-US
---
```{r, include = FALSE}
knitr::opts_c... |
37425441d0a30e020e0b612e42d24c64e27d518788b7063ca5839b9e61708892 | R | 18,180 | 522 | rm(list = ls())
print("Finding DE genes")
options(StringAsFactors = F)
## Load required libraries
#devtools::install_github('th1vairam/CovariateAnalysis@dev')
library(CovariateAnalysis) # get the package from
library(data.table)
library(plyr)
library(dplyr)
library(tidyverse)
library(psych)
library(limma)
library(... |
10fe8a4988dee6069b98ec5858eb374534c6a2fd858614abe26548243f0e846d | R | 18,431 | 485 | #https://www.biostars.org/p/18211/
#MSeifert: additional modification enabling colored column axis labels
heatmap.3 <- function(x,
Rowv = TRUE, Colv = if (symm) "Rowv" else TRUE,
distfun = dist,
hclustfun = hclust,
dendrogram = c... |
945d8a34c57a005ece92e1e5f90bcbe6bdf18b186d4186d2ddfd75160482a033 | R | 18,514 | 494 | # libraries ---------------------------------------------------------------
library(Seurat)
library(SeuratData)
library(ggplot2)
library(patchwork)
library(dplyr)
library(tidyverse)
library(hdf5r)
library(limma)
library(future)
library(ComplexHeatmap)
library(Matrix)
library(data.table)
library(gt)
library(SPOTlight)
l... |
3e1b0c6fa49dc228bd6c5b69ba9c7cdf434edd4fe9e664bb5ea28c6e8a447d5a | R | 18,580 | 579 | # Siwei 29 Sept 2023
# plot PCA of Alena's microglia with iPS-derived microglia + human
# Analyse Alena's RNASeq results in-house
# init ####
{
library(edgeR)
library(readr)
library(readxl)
library(Rfast)
library(factoextra)
library(dplyr)
library(stringr)
library(ggplot2)
library(RColorBrewer)
... |
c6ebbc984c3aa867dfb43e2f70bf0ead452e745fcc1d7c26b619f0814f11a22b | R | 18,592 | 546 | Sys.setenv("VROOM_CONNECTION_SIZE"=500000000)
require(optparse)
require(tidyverse)
require(viper)
require(pROC)
require(clusterProfiler)
##### FUNCTIONS #####
as_regulon_network = function(regulons){
regulators = regulons[['regulator']] %>% unique()
regulons = sapply(regulators, function(regulator_oi){
... |
c9d3548050930dc3475ae53a46a9a17f99bf65c4e7d8ebdbd7a452fd27ff7e6b | R | 18,597 | 412 | #' Script: Beta-Diversity
#' Version: 1.1
#' Last modified on 05/7/2022
#' Author: Ilias Lagkouvardos
#' Contributions by: Thomas Clavel, Sandra Reitmeier
#'
#' Calculate beta-diversity for microbial communities
#' based on permutational mulitvariate analysis of variances (PERMANOVA) using multiple distance matrices
#'... |
6c7bdf3510f3e12772a5aa4cc2a026f5583e86015a10615674292d5814e6cd7d | R | 18,672 | 622 | # Siwei 22 Jan 2025
# plot new Fig. 5b
# init ####
{
library(readxl)
library(stringr)
library(ggplot2)
library(scales)
library(reshape2)
library(RColorBrewer)
library(ggpubr)
library(dplyr)
library(data.table)
library(DescTools)
library(multcomp)
}
# CD04 ####
df_raw <-
read_excel("Batch_... |
d5bc7e401f025a24cad246f909c2acdb73a3d57e4a78ab12d258df54b1c2e5bf | R | 18,731 | 591 | if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("edgeR")
library(edgeR)
setwd("E:/005---ThirdProject/ThirdObject/0.RealData/")
##### DEG Identification with edgeR #####
# Step 1: Read matrices (genes as rownames, samples as columns)
NAT_CD8T_... |
5cc35ebb1414a073fc718926600669c4bbfa5962a1db34ca369cc89acf9a8a9d | R | 18,734 | 369 | options(stringsAsFactors = FALSE)
library(ggplot2)
library(reshape2)
library(dplyr)
library(stringr)
library(lme4)
library(lmerTest)
library(RColorBrewer)
library(ggpubr)
library(MutationalPatterns)
library(readxl)
library(ggsci)
library(GenomicRanges)
library(rtracklayer)
ref_genome="BSgenome.Hsapiens.UCSC.hg19"
chr_o... |
47da582c8c5100898acb96530bf257d7bbe6211dc85d5a7af987895ce291e008 | R | 18,834 | 586 | # Siwei 29 Sept 2023
# plot PCA of Alena's microglia with iPS-derived microglia + human
# Analyse Alena's RNASeq results in-house
# init ####
{
library(edgeR)
library(readr)
library(readxl)
library(Rfast)
library(factoextra)
library(dplyr)
library(stringr)
library(ggplot2)
library(RColorBrewer)
... |
e4bcf45c8a8b666d463aaa7f96d694f8da71c4e8f16af60f8ae7d8a8a3789ad9 | R | 18,856 | 260 | # libraries ---------------------------------------------------------------
library(Seurat)
library(SeuratData)
library(ggplot2)
library(patchwork)
library(dplyr)
library(tidyverse)
library(hdf5r)
library(limma)
library(future)
# setup parallel ----------------------------------------------------------
# library(futur... |
603a810980aadca8ce0f50ef38ea9a2954e556927131449bb32337f9ac808415 | R | 18,895 | 477 | # libraries ---------------------------------------------------------------
library(Seurat)
library(tidyverse)
library(scales)
library(ggrepel)
library(cowplot)
library(DESeq2)
library(RNAseqQC)
library(limma)
library(ashr)
library(magick)
library(UpSetR)
# read the data ----------------------------------------------... |
b60eea63f012f30e42d5088925588cee55a45ff44f9d11f21c70f2e0fde7670a | R | 18,966 | 653 | # Siwei 30 Mar 2023
# Re-analyse Alena's data using Kallisto pseudocounts
# init
library(tximport)
library(readxl)
library(EnsDb.Hsapiens.v86)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
library(stringr)
library(edgeR)
library(sva)
library(factoextra)
library(ggplot2)
library(ggrepel)
###
kallisto_tsv_files <-
... |
2164a753020c07e8707075ec76ac1c6c2153be192531c595ff0b7235fc9d265e | R | 19,037 | 331 | ## This script was used to produce Figure 1.
salloc -A def-sfarhan --time=0-8 -c 1 --mem=50g
module load StdEnv/2020
module load r/4.2.2
R
r_lib = '/lustre03/project/6070393/COMMON/Dark_Genome/R/x86_64-pc-linux-gnu-library/4.2'
library(Seurat)
library(ggplot2, lib="/lustre03/project/6070393/COMMON/Dark_Genome/R/... |
f27458354730b37170285a8962a054300080d3b6ffe597122be9f9285b3f6652 | R | 19,142 | 520 |
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)
#install.packages("cowplot")
library("cowplot")
#install.packages("patchwork")
libr... |
e2a794363eda62eaebca41ca3fd599699f89b60625e3fcdbe6362da7e8bea30e | R | 19,242 | 457 | library(magrittr)
library(data.table)
library(dplyr)
library(tidyr)
library(ggplot2)
library(ggrepel)
library(Hmisc)
library(cowplot)
library(DescTools)
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
read_dat <- function() {
#files <- list.files(paste0('../results_without_compound_embedding/training/'... |
96cd41f40971014acaa594c3703e6c7978947e9a97799cd7027168ac3458b94c | R | 19,276 | 506 | # Script to make box plots for cell subpopulations showing differences in proportions in the EC - resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# Jul 2023
################################################################################################
# Setup
######################################... |
61837d52c99a5d6f87c746d14f11d2866f87144d404abfd8750b4c5e66dbbf14 | R | 19,395 | 494 | # figureÖеÄÅäÉ«
custom_palette <- c("#000000", "#E60212", "#083490", "#751384", "#007A34", "#D85F00", "#f1f1f1")
save(custom_palette, file = "D:/R_project/protocol/custom_palette.Rdata")
# "#000000" ת»»Îª RGB(0, 0, 0)
# "#E60212" ת»»Îª RGB(230, 2, 18)
# "#083490" ת»»Îª RGB(8, 52, 144)
# "#751384" ת»»Îª RGB(117, 1... |
b2feafefcb67923c5288658aa4a51ce6a2fe384352300f39a5df0cb8b242a80b | R | 19,434 | 643 | # Siwei 29 Sept 2023
# plot PCA of Alena's microglia with iPS-derived microglia + human
# Analyse Alena's RNASeq results in-house
# init ####
{
library(edgeR)
library(readr)
library(readxl)
library(Rfast)
library(factoextra)
library(dplyr)
library(stringr)
library(ggplot2)
library(RColorBrewer)
l... |
47073285bca20450fb7f3697dd11e996b64a42a90038538f6a38d777dd20925a | R | 19,450 | 460 | # libraries ---------------------------------------------------------------
library(Seurat)
library(SeuratData)
library(ggplot2)
library(patchwork)
library(dplyr)
library(tidyverse)
library(hdf5r)
library(limma)
library(future)
library(ComplexHeatmap)
library(Matrix)
library(data.table)
library(gt)
library(SPOTlight)
l... |
502e53acc73a4779a498d62346c2c63d460628198fde720a69809beb37a20ff4 | R | 19,468 | 588 | # Peak Alpha Frequency
# Author: E. Pedapati
# Version: 3/27/2022
source("_Common.R")
pacman::p_load(tidyverse, weights, flextable, nlme, emmeans, ggthemes, broom.mixed, ggsignif, ggsignif, units)
pacman::p_load_current_gh("LCBC-UiO/ggsegDefaultExtra", "ggseg/ggseg")
# LOAD OTHER RDATA ===================... |
ef3e0a1676d67d69d88bb2a05ab0ed4b05fdeedb501a4fae2ef41e8ff26b7c61 | R | 19,491 | 515 | # identify the change of NUCR genes in GBM and LGG
setwd(dir = "D:/R_project/UCR_project/")
options(stringsAsFactors = FALSE)
rm(list = ls())
library(tidyverse)
library(easyTCGA)
library(ggplot2)
library(ggprism)
library(sysfonts)
library(showtext)
library(ggview)
library(cowplot)
library(ggrepel)
library(survival)
l... |
f97f18b132c0c3e645aa68aa1c096657bd0e89ef70a710c9632de9ac121e1c3c | R | 19,544 | 408 | ### MNT 10x snRNA-seq workflow: step 02
### ** Across-regions analyses **
### - (n=24) all regions from up to 8 donors:
### - Amyg, DLPFC, HPC, NAc, and sACC
### Initiated MNT 07Feb2020
###
#####################################################################
library(SingleCellExperiment)
library(EnsDb.Hsap... |
a1fbd0d37a7a8eecc13076a56c50f8115f33f2e10ec04aad4492bb87149f28f2 | R | 19,569 | 590 | #' Retrieve and format top differentially abundant proteins for a specific condition
#'
#' Filters and formats the top 100 proteins (by adjusted p-value) for a selected condition label.
#' Merges protein-level statistical data with associated metadata, and formats key numeric columns
#' for clean table presentation.
#'... |
5a950fcec2c17f133606dec5d82ec08dbdf58f1f3d547a7aafe1d09f98e326c2 | R | 19,577 | 460 | library("mice")
library(vegan)
library(VIM)
library(reshape)
library(ggplot2)
library("GUniFrac", lib="/usr/local/lib/R/site-library")
library(rptR)
do_dataPrep <- FALSE
do_PERMANOVA <- FALSE
do_rptR <- FALSE
# cleaning labels
labels <- read.csv("data/Labels_21032024.csv") # varialble and test labels
labels[labels$Hy... |
5b3e2c1a642a1f0c41f6092b301829da4667c73ead469b86a2e6872c73666041 | R | 19,628 | 511 | #
# https://mp.weixin.qq.com/s/LB5qqUShvm87xQ_hz7IM1g
setwd(dir = "D:/R_project/UCR_project/")
options(stringsAsFactors = FALSE)
rm(list = ls())
library(WGCNA)
library(tidyverse)
library(stringr)
library(forcats)
library(openxlsx)
library(edgeR)
library(limma)
lwd_pt <- .pt*72.27/96
# data preparation -------------... |
703afedfc663d434bf59c1cb10f6af08310acfafa2c53016468f23cd120db232 | R | 19,720 | 430 | ### MNT 10x snRNA-seq workflow: step 03 - marker detection
### **Region-specific analyses**
### - (3x) HPC samples from: Br5161 & Br5212 & Br5287
### Initiated MNT 13Mar2020
#####################################################################
library(SingleCellExperiment)
library(EnsDb.Hsapiens.v86)
library(sca... |
2edf9c5cb707240b7a99ae1cfedb9ebe66630417225c5b0ae9078a685de311e2 | R | 19,776 | 432 | ```{r}
# BAR-seq coronal data
# data is shrunk by removing image stitching-related artefacts (cf. Xiaoyin's email)
# data is quality controlled by keeping cells with genes/cell >= 5 and reads/cell >= 20
# data alongside CCF and slide coordinates are saved and can be used for analysis
# load libraries
suppressPackageS... |
a264d495d23effff68b6270715920b79ad36ba743574215a1e90a5b5f76bd105 | R | 19,788 | 313 | ---
title: "Using the **dplyr** frontend for MIMIC-III"
author: "Jason Cory Brunson"
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
#html_document
#pdf_document
md_document
---
## Introduction
This tutorial shows how MIMIC-III can be queried using **dplyr**. Only several basic queries are performed, though ... |
4c95a67605a6ea5e952f6b8d9aadb0b869937bd49c331b113dc2d47242bd0215 | R | 19,894 | 494 | require(optparse)
require(tidyverse)
require(ggpubr)
require(cowplot)
require(extrafont)
require(ggrepel)
require(clusterProfiler)
# variables
RANDOM_SEED = 1234
THRESH_FDR = 0.05
FIBROBLASTS = c("BJ_PRIMARY","BJ_IMMORTALIZED","BJ_TRANSFORMED","BJ_METASTATIC")
# formatting
LINE_SIZE = 0.25
FONT_SIZE = 2 # for addit... |
68317bc39f2b5d51857573956e7b46fc4d1e115b6e310d4f2d8ae32e67e5e166 | R | 19,899 | 497 | ```{r}
# MERFISH brain receptor map
suppressPackageStartupMessages(library(xfun))
pkgs = c("SingleCellExperiment","tidyverse","data.table","dendextend","fossil","gridExtra","gplots","metaSEM","foreach","Matrix","grid","spdep","diptest","ggbeeswarm","Signac","metafor","ggforce","anndata","reticulate","scales",
... |
535fdf952188782bbfc1b7aa648d77049d8f3c8427289521717ab19bfa4389e6 | R | 20,159 | 457 |
### MNT 10x snRNA-seq workflow: step 02
### **Region-specific analyses**
### - (2x) DLPFC samples from: Br5161 & Br5212
### Initiated MNT 12Feb2020
### LAH 27Apr2021: add expansion samples (n=3)
#####################################################################
library(SingleCellExperiment)
library(EnsDb.Hsa... |
49faf9712722aab622a770bf39bb0fd2631c6c7414fb4fbab27125c779fefbf8 | R | 20,161 | 373 | ---
title: "QC_Check"
output: html_document
date: "2024-06-20"
---
### Necessary library
```{r}
suppressMessages(library(readr))
suppressMessages(library(tidyr))
suppressMessages(library(textshape))
suppressMessages(library(wheatmap))
suppressMessages(library(dplyr))
suppressMessages(library(ggplot2))
```
## knee plo... |
db39c218afdf817185cee379f4c0762787bec081b3fea8a292810c96513e732a | R | 20,187 | 344 | # AIM ---------------------------------------------------------------------
# single sample processing of the control sample using senmayo
# Load the required libraries ---------------------------------------------
library(patchwork)
library(tidyverse)
library(CellChat)
library(Matrix)
library(NMF)
library(ggalluvial)... |
c6e7bf22f9cd3899b96c8a32db0eb763102618620e25ba196fc12364275c305e | R | 20,198 | 512 | # 04 Visualizations.R
# 04 Visualizations.R
#######################################
# Make volcano plot usig DE dataframe #
#######################################
#---------------------------------#
# Font setup
#---------------------------------#
font_add("tnr", regular = "C:/Windows/Fonts/times.ttf")
showtext_auto... |
66534fb05dddef39b82c18272ffb5986b6961f71d5454f7bcfed512a62dd47f6 | R | 20,206 | 502 | library(tidyverse)
library(ggupset)
facet_heatmap <- function(df,
plot_title = "Cryptic event deltas across datasets",
plot_subtitle = "** = cryptic criteria, * = padj < 0.05, blank = padj > 0.05",
plot_x = "Dataset",
... |
0c0b7c805ff699c875ae6e4d01ef27ad2cf173c560045ef7c0839224924f2b95 | R | 20,210 | 455 | # 10 Nov 2023 Siwei
# sample GABA, nmglut, and npglut neurons
# Use 2000 cells per type each
# project 2000 cells, do not integrate
# init ####
{
library(Seurat)
library(Signac)
library(readr)
library(future)
library(parallel)
library(ggplot2)
library(RColorBrewer)
library(stringr)
library(gridExtra)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.