sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
5d149f9c5898d234cdb2fb30c2e14ee3a5c52a11efe70d6251e1b18b92882939 | R | 20,233 | 448 | ---
title: "Different integration methods: SCTransform, rPCA Integration, Harmony Integration, and label transfer annotation"
author: "Yuanming Liu"
date: "2024/8"
output: nl_document
---
library(dplyr)
library(Seurat)
library(ggplot2)
library(hdf5r)
library(reshape2)
library(googleVis)
library(patchwork)
library(sc... |
f1b2adcf367957e6a02a26c046bea52fa1643be52f67fddbb8397e7395e486c2 | R | 20,291 | 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)... |
9dca1b1686dcc5f1f4121cd4ea2de6b67a34bc830ef536430fd4ad54fdb88216 | R | 20,295 | 435 | ### MNT 10x snRNA-seq workflow: (step 04?:)
### Miscellaneous lookings-into / finalizing graphics for manuscript
### - Brief neuron-specific clustering for DLPFC (Maynard-Collado-Torres et al.)
### - 10x pilot snRNA-seq paper (Tran-Maynard et al.)
####################################################################... |
69667f7f26175bfa4a6aa32ec6da60f43e517e8d513607f8af6e621ad47c8c6b | R | 20,303 | 427 |
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)
require(plyr)
require(tidyr)
setwd(dirname(rstudioapi::getActiveDocumentContext()... |
046220eee19a8b2db55db58ebeee01b1c8d7c02c2ccc7e12307c6e83c925db23 | R | 20,312 | 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)... |
1b7f4082955f39a45b395a57223655782d299cd1eccdb278b848c103392b16ff | R | 20,315 | 507 | Packages <- c("Seurat", "ggplot2", "dplyr", "reshape2", "PRROC", "WriteXLS", "rpart", "stringr", "sctransform","rpart.plot", "openxlsx")
lapply(Packages, require, character.only = TRUE)
library(data.table)
# Function to check and install packages
install_and_load_package <- function(package_name) {
if (!requireNamesp... |
ef448b0d1fb7ebebbcf7d7475393b46c42fde8a6c3b7dc5ea0dae6974db1c4ea | R | 20,340 | 491 | suppressMessages(library("here"))
suppressMessages(library("optparse"))
source(here("utils","plink_utils.R"))
option_list = list(
make_option("--sumstats", action="store", default=NA, type='character',
help="Path to summary statistics (must have SNP and Z column headers) [required]"),
make_option("--... |
cd71cd3977d1cfe3deac07612c83dc32c670e05217fd1de20d34acffc9eb371a | R | 20,383 | 590 | # TODO こちらのページの内容ではないから別のところに移動すべき、厚労省もまとめてくれないので、削除するのもあり
output$detail <- renderDataTable({
datatable(
detail,
colnames = lang[[langCode]][37:48],
rownames = NULL,
caption = "データの正確性を確保するため、厚生労働省の報道発表資料のみ参照するので、遅れがあります(土日更新しない模様)。",
filter = "top",
escape = 11,
selection = "none",
op... |
ddbab7fd549b225219d0c8b9bd70584b41a5fc7ba8da1d1402d73b96646223d9 | R | 20,416 | 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)... |
f7c4d2b53ff8cccfe153e7d3c76f56c1df1d63da1dbe3ee7567dad3de709c966 | R | 20,416 | 531 | library("SummarizedExperiment")
library("tidyverse")
library("sessioninfo")
library("here")
library("readxl")
library("ggrepel")
library("jaffelab")
library("scuttle")
library("GGally")
library("patchwork")
## prep dirs ##
plot_dir <- here("plots", "02_quality_control", "01_check_bulk_qc_metrics")
if (!dir.exists(plot... |
af14d49eaca24a680c3eac5fcb7d1a962868fad92e56813bae757173a9b32540 | R | 20,640 | 418 | ### for MAGMA with LIBD 10x pilot analyses
# - plotting Results_rev/heatmaps
# UPDATE: re-running with new v1.08
# MNT 14Jul2021: plotting all stats from GSA tests with 102 revision
# cell class markers ================================
library(readr)
library(stringr)
library(RColorBrewer)
li... |
cd623e72afafc380a2b948fe50ba1e28cc09f8d7190b910046fdb326ddc72e81 | R | 20,642 | 491 | #=====================================================================================
#
# Code chunk 1 Load Proteome data for missing imputation
#
#=====================================================================================
# Display the current working directory
getwd();
# If necessary, change the... |
98de4a3748562f27696f71f19d240bf93d3f6d80bda754835ac3e119d4cd140f | R | 20,692 | 445 | # WGCNA identify key gene module
# https://mp.weixin.qq.com/s/fCvLizKQNWDQKeWBuSG3UQ
# https://mp.weixin.qq.com/s/5OUY5KDwgi05MlFrV_7Qjw
setwd(dir = "D:/R_project/UCR_project/")
options(stringsAsFactors = FALSE)
rm(list = ls())
library(WGCNA)
library(tidyverse)
library(stringr)
library(forcats)
lwd_pt <- .pt*72.27/9... |
4b41305714018e993b64f560e22fff119748374f4ed99c6cc0cf5c8f3da90192 | R | 20,898 | 579 | ---
title: "Custom bar plots for EWCE results from bulk DEGs"
author: "Isabel Castanho"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float:
collapsed: false
toc_depth: 4
code_folding: hide
---
---
CIRCUITS Multiregion single-nucleus RNA-seq data
single cell resilienc... |
77e616886696688f57d0f66f2a2ea7f515f8be8801e89f0992266a574a5c9558 | R | 20,930 | 457 | library(Seurat)
library(ggplot2)
library(dplyr)
library(harmony)
# ------------------------------------------------------------------------------
# CTE scRNAseq CRN00217300
# ------------------------------------------------------------------------------
cellranger_data <- Read10X(data.dir = "cellranger_count_CRN002173... |
88c151ad4098735c9de60af00add8781b30d0ecc90bf924f01bc60d0f14b1d07 | R | 20,948 | 391 | # libraries ---------------------------------------------------------------
library(Seurat)
library(Azimuth)
library(SeuratData)
library(patchwork)
library(tidyverse)
library(ComplexHeatmap)
library(cowplot)
# read in the dataset -----------------------------------------------------
# data.combined <- readRDS(file = "... |
05c0fca036c221f637725922d6af83be4ee93ab069bd19a81b0f167063ceb3fa | R | 21,047 | 648 | ---
title: "sainfoin seed imaging data analysis"
author: "Bo Meyering"
date: "2023-08-22"
output:
html_document:
df_print: paged
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
### Analysis
```{r library import, message=FALSE}
library(tidyverse)
library(data.table)
library(readxl)
librar... |
03e7097f4ef87062f4661606f942b6694811df8f17671a1f685cd5e70c61eff7 | R | 21,071 | 434 |
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)
require(plyr)
require(tidyr)
setwd(dirname(rstudioapi::getActiveDocumentContext()... |
8eae1e761f9f7a36214addd50cd73c95a99c9f5a00823a0f012bfcfb19ecd7fc | R | 21,073 | 642 | ---
title: "recount3 queries for DLPFC deconvolution project"
output: html_notebook
---
# Overview
This notebook shows by example how to query `recount3` for datasets of interest
for the deconvolution RO1 project.
# Setup
Manage dependencies.
```{r}
# BiocManager::install("recount3")
library(recount3)
```
Manage... |
8c30570e3f9f8329638ef90f8847c0085bb9a09e5ad9d724cc1056603178a5d9 | R | 21,193 | 394 | library(tidyverse)
library(here)
# defaults ----
cluster_color_table <- read.table(here("data/HARs_hCONDELs_HAQERs", "colors_for_figure.txt"), sep="\t", header=FALSE)
cluster_colors <- cluster_color_table$V3
names(cluster_colors) <- cluster_color_table$V1
cluster_names <- cluster_color_table$V2
names(cluster_names) <-... |
a40d3bc47a4ea4cbddbb5b80475254689f7566163ac9a185b4f0e16e90142b2d | R | 21,233 | 508 | library(tidyverse)
library(rstatix)
library(ggprism)
normed_counts_npc <- read_tsv("processed/fracseq/2024-04-30_summarised_pas.counts.normalised.npc.tsv")
le2name <- read_tsv("../postmortem/processed/2023-06-22_cryptics_plus_decoys.decoys_full_fix_tx2le.le2name.tsv")
sample_tbl <- read_csv("data/fracseq/ritter_short_... |
375deb6274349403546571fd3fdd9ec6f16d2279aadc6dee8b77e9f07a41c09b | R | 21,272 | 481 | ### for MAGMA with LIBD 10x pilot analyses
# MNT Jul2021 update ===================
### Set up annotation === === === === === === === === === === === ===
library(rtracklayer)
## get annotation
map = read.delim("/dcl02/lieber/ajaffe/SpatialTranscriptomics/HumanPilot/10X/151675/151675_raw_feature_bc_matrix__feature... |
a92177c93f4f76bf810cd325b0278550556626595d109a1c402205d36fcfd06f | R | 21,273 | 440 | library(here)
library(ggplot2)
library(SummarizedExperiment)
library(reshape2)
library(tidyverse)
library(rlang)
library(ComplexHeatmap)
library(sessioninfo)
#################################################################################################################
## Cell type m... |
3c1c5c84f09cd3a3a9521f8ae73c1b8166da6195b614678b7b9804c5fb34c135 | R | 21,278 | 507 | ---
title: "de view"
output: html_document
---
Code to view marker genes, gene modules, cell cycle scores, and differential expression results
```{r}
setwd("/Users/mary/non_dropbox/exps/exp042_meninges_stress_dropseq/")
library(ggplot2)
library(kableExtra)
library(RColorBrewer)
library(here)
library(scran)
library(... |
de82648e79a8b2e3387875a46d2969138b6918474794bc5ebabc911b3840ce61 | R | 21,343 | 413 | get_MVinput_for_MRBMA<- function(exposure="",
outcome="",
outpath=""
)
{
message("exposure='mibio','FR02','pathways','metabolites' ")
message("outcome='LOAD','abeta42','ptau' ")
message("Author: jincheng li")
... |
3d2b20d340d76f6b82238f7d51993f0fdcd7313470c413fdbf36ee2c11ce905e | R | 21,559 | 610 | #----------------------------------------------------- Lipidomics utilities ----
plotbox_switch_ui_lips = function(selection_list){
ui_functions = c()
for (plot in selection_list) {
ui_functions = c(ui_functions, switch(EXPR = plot,
"select_class_distribution" = class_... |
75de7ba54243355274936b9a4435b2d1b361c980b8aab7435900cdaa17db2bee | R | 21,594 | 456 | ```{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... |
b58d9ce48e8f808b0fe1015b5f6bfd86a8bef3cb795b14c9aeaa343eb7cdc5a1 | R | 21,623 | 517 | # run_twas.R
# -----------------------------------------------------------------------
# End-to-end TWAS validation pipeline using the ACTUAL FUSION scripts:
#
# Stage 1 — FUSION.compute_weights.R
# For each simulated gene, extracts the window genotypes via PLINK,
# writes the simulated expression as a phenot... |
126f93672fdde45ad323dcc63fa283b631d5aa661f83139aa4212811a9d90308 | R | 21,684 | 611 | ---
title: "R Notebook of rV2 manuscript figure 2A"
output: html_document
---
```{r Packages, echo=FALSE}
library(tidyverse)
library(Seurat)
library(Signac)
library(qs)
library(rtracklayer)
library(gUtils)
source("AuxFunctions.R")
```
```{r Set parameters}
cores <- 6
```
```{r Load qs object}
rV2.data <- qread("../s... |
a0bcd37044c732dc64cf3d00db45f8aea7a87a319d5f45fd1284f0a2fb7b8e79 | R | 21,728 | 520 | # ÕâÀï²»Ö¹ÓлñÈ¡SNP£¬»¹°üÀ¨Á˵ÚÒ»²½V1µÄ¹ýÂË£¬Ò²¾ÍÊÇ´æÔÚevidence
# snp»ñÈ¡ -------------------------------------------------------------------
# first methods to obtain snps --------------------------------------------
rm(list = ls())
setwd(dir = "D:/R_project/UCR_project/02-analysis/03-SNP_INFO_Retrieval")
library(... |
634eada4a858525ca400c1f41da24a805e671c58e4e630200c57055f1525e63b | R | 21,814 | 490 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
library(readr)
library(GenomicRanges)
library(plotrix)
library(stringr)
library(data.table)
library(BSgenome.Hsapiens.UCSC.hg38)
genome = BSgenome.Hsapiens.UCSC.hg38
revCompl = function(seq) {
return(chartr("ATGC", "TACG", reverse(seq) ))
}
getCGContent ... |
5528a69fc03cd1d67e7664f806d44665d741fa07f422e45d8a4c1f4308d22fbc | R | 21,846 | 499 | #=====================================================================================
#
# Code chunk 1 Load Metabolome data for missing imputation
#
#=====================================================================================
# Display the current working directory
getwd();
# If necessary, change t... |
92bfc4b693a50c9d526e04314b192c84b0f20a55a89955979f33c7494c6a5d78 | R | 21,874 | 613 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
list2env(rjson::fromJSON(file = "00_configs.json"), envir = .GlobalEnv)
library(ClustAssess)
library(Seurat)
library(ggplot2)
library(dplyr)
library(reshape2)
ca_folder <- file.path(project_folder, "objects", "R", "clustassess")
ca_app_folder <- file.path(pro... |
5f32c2498039f816e074edf010cda450382bfbb1d68e3be78430082064f7c358 | R | 21,900 | 348 | # Author: Lauren Rylaarsdam, PhD
# 2024-2025
############################################################################################################################
#' @title amethyst-class
#' @description An S4 class to store and manipulate single-cell methylation data
#'
#' @slot h5paths Path to the hdf5 file c... |
25b3dbfef535d6bd1519a5cdd5d54996b0ec1ee7d8ff3416180cffb8e1833e94 | R | 22,006 | 539 | #' Version 1.2
#' Last modified on 25/02/2016
#' Script: Correlation
#' Author: Ilias Lagkouvardos
#'
#' Calculate correlations between continuous meta-variables and taxonomic variables
#'
#' The script requires three obligatory actions from users (below, L41):
#' 1. Set the path to the directory where the present scr... |
a69a745868f762184b0db58e35cb308a84fad5cf4155e9b57bb3668c289cef5b | R | 22,077 | 542 | # Helper functions for Figure 5 analysis
# Function to compare any two models with paired statistical tests
compare_models_multiple <- function(data, models,
title = NULL,
model_names_map = NULL,
organism_colors... |
8005b0d0be8405ad4db007f6b221b1b1f1b55cc2877310dfa4947b4c1e7ad864 | R | 22,376 | 441 | # Analysis of protein data
# Lea Zillich
# last update 20.01.2025
setwd("/path/to/")
library(readxl)
library(readr)
library(biomaRt)
library(org.Hs.eg.db)
library(ggplot2)
library(data.table)
library(dplyr)
library(clusterProfiler)
library(enrichplot)
library(rstatix)
library(colorRamp2)
library(ggpubr)
col_fun_rna... |
5d7cad33b018f64bf3cad5f265f35c90ba7d6d5fc20f1b452edc745c36933a6e | R | 22,590 | 720 | # Siwei 13 Jan 2025
# lookup projID
{
library(stringr)
library(Seurat)
library(parallel)
library(future)
library(glmGamPoi)
library(data.table)
library(limma)
library(edgeR)
library(ggplot2)
library(RColorBrewer)
}
plan("multisession", workers = 3)
# options(mc.cores = 32)
set.seed(42)
opti... |
bd9c1f3d04296b96d153ee9d51e93a5572ce5795afb645dfb5a7d7f3795bfcb3 | R | 22,739 | 539 | ## This script was used to produce Figure 2.
salloc -A def-sfarhan --time=0-5 -c 1 --mem=40g
module load StdEnv/2020
module load r/4.2.2
R
library(Seurat)
library(ggplot2)
library(tidyr)
library(stringr)
library(dplyr)
library(ggrepel)
library(RColorBrewer, lib="/lustre03/project/6070393/COMMON/Dark_Genome/R/x86_64... |
41674f88f8dd7f7d9054590b5e513e65492c6316944f10a127ed23e6a8966147 | R | 22,779 | 591 | library(magrittr)
library(data.table)
library(dplyr)
library(tidyr)
library(ggplot2)
library(ggrepel)
library(Hmisc)
library(cowplot)
library(pROC)
library(stringr)
library(RColorBrewer)
library(netresponse)
library(igraph)
#genes that are relevant across drugs? sensitivity genes? essentiality?
setwd(dirname(rstudioa... |
a11d2fd8afef061f79ebc343cc6f4aa15a649d3342c87363f166e0dc22b0d130 | R | 22,903 | 462 |
#' Run PAWS analysis on a full set of CSVs in batch
#'
#' This function is used to run PAWS analysis either in a custom script or in the
#' dashboard. `paws_analysis` will use custom parameters to group all tracked data
#' into a single CSV containing pre- and post-peak metrics.
#'
#' @param csv_directory Path to the ... |
842fb8713323743194d023528f48e8aa186d30414f54a50d5be03d072f66d080 | R | 23,049 | 555 | ```{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... |
76a6880421c46b8315c62d49adcab1e1366bd855cf13383c50dcd7774cbe7c57 | R | 23,059 | 550 | ---
title: "Incorporating temporal gene expression into analysis of genes with peaks"
author: "lecook"
date: "2022-02-23"
output: workflowr::wflow_html
editor_options:
chunk_output_type: console
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
knitr::opts_chunk$set(echo = T... |
51c05a24d6e737a7121e9db22aed9022c63995afd4484a114a241a055f03157b | R | 23,079 | 801 | # Siwei 20 Mar 2023
# Use tximport and EnsDB for gene name translation
# init
library(readr)
library(readxl)
library(stringr)
library(tximport)
library(EnsDb.Hsapiens.v86)
library(AnnotationDbi)
library(edgeR)
library(variancePartition)
library(factoextra)
library(sva)
library(ggplot2)
library(ggrepel)
# library... |
0d17f2192a64ee511d870e47d253afdf39fd7c64041743b4ad3112c1fb9613ad | R | 23,084 | 461 | # libraries ---------------------------------------------------------------
library(tidyverse)
library(Seurat)
library(SeuratData)
library(ggridges)
library(ComplexHeatmap)
library(SeuratWrappers)
library(cowplot)
# read in the data --------------------------------------------------------
# in this case I want to use ... |
64fe89c4220872ed8d6d6f9d0dff06f983477274093a62ee247ebf0b9475ad9e | R | 23,087 | 482 | # @title download gtf files and extract gene info from attribute column:
#
# @param gencodeVersion "v26" or "v19"
#
# @return create .rds file
#
# @importFrom utils download.file
# @importFrom data.table fread rbindlist setnames as.data.table data.table
# @importFrom stringr str_split
gtfSubsGeneInfo <- function(gencod... |
16ea9df7182e98cac00218f56c0356944b1430e93795e26abbc9cc7f3f3a440a | R | 23,088 | 525 | library(rjson)
library(jsonlite)
library(data.table)
library(sparkline)
# library(gsheet)
source(file = "01_Settings/Path.R", local = T, encoding = "UTF-8")
source(file = "00_System/Generate.ProcessData.R", local = T, encoding = "UTF-8")
# ====けんもデータ====
# positiveDetail <- gsheet2tbl("docs.google.com/spreadsheets/d/... |
8bcf26e41b54fa39683ab3deba7e5772408bea0659834ff630252d89f971cefe | R | 23,110 | 493 | ### MNT 10x snRNA-seq workflow: step 03 - marker detection
### **Region-specific analyses**
### - (2x) sACC samples from: Br5161 & Br5212
### Initiated MNT 12Feb2020
### MNT 24May2021: add expansion samples (n=3, incl'g 2 female)
#####################################################################
library(Singl... |
c6895adfd86766dcef5c8cb0dac85f46ddc66f517cb4f9a27ffb8b348425430b | R | 23,129 | 1,030 | ---
title: "CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project - DEGs"
author: "Isabel Castanho"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
---
---
# Differential expression analysis using Seurat
Statistical model: Gen... |
f67dff6e50f88eb13e293a7c162051027a8d32fbee9333bc6113ee3b0884a108 | R | 23,274 | 742 | # Siwei 10 Feb 2025
# use 425 samples
# make new plots for Alena's revised paper
# init ####
{
library(ggplot2)
library(stringr)
library(lsr)
library(RColorBrewer)
library(ggpubr)
library(readr)
library(readxl)
library(stats)
library(rstatix)
library(agricolae)
library(DescTools)
# library
... |
ddb95af7ec489b1e729198551aa9a2a3b5c9dde88d00c1e94bea42fd2845dbf3 | R | 23,291 | 627 | # Siwei 19 Feb 2024
# make peak file contains ASoC SNPs
# init ####
{
library(Seurat)
library(Signac)
library(EnsDb.Hsapiens.v86)
library(GenomicFeatures)
library(BSgenome.Hsapiens.UCSC.hg38)
library(GenomicRanges)
library(org.Hs.eg.db)
library(stringr)
library(future)
library(readr)
# libra... |
ca285c2c9e9482f14a3b5478c42100870b7463fff6770710e4e3d80137de1353 | R | 23,392 | 705 | ---
title: Integrate sn- and scRNA-seq data of melanoma brain metastatis
author: "M. Andreatta <massimo.andreatta at unil.ch> and S. Carmona <santiago.carmona at unil.ch>"
knit: (function(input_file, encoding) {
out_dir <- 'docs';
rmarkdown::render(input_file,
encoding=encoding,
output_file=file.path(dirname(inpu... |
c39ecbda90c99512c9c6b5b6b53a0d9945212e745b1e3b0376e6d99840be967b | R | 23,528 | 565 | 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/'... |
bbd4ebc4d2bbb4ca5c0894f5f229ace108d2d33c4abca4a1bace5346809355c0 | R | 23,543 | 638 | library(tidyverse)
library(fgsea)
library(ggrepel)
library(ggrastr)
source("helpers.R")
set.seed(123)
normed_count_mtx <- read_tsv("processed/2023-05-08_i3_cortical_riboseq_sf_normed_count_matrix.tsv")
deseq_res_df <- read_tsv("processed/2023-05-08_i3_cortical_riboseq_deseq2_results.tsv")
papa_cryp_et <- read_tsv(... |
6aa800e2642a943387a55eb0e3f6df34bd24fc7d99b0a9a9299cbe291d66ec22 | R | 23,665 | 621 | # Script to make box plots for cell subpopulations showing differences in proportions in the PFC - resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# Jul 2023
################################################################################################
# Setup
#####################################... |
ea3b5f12818318d6d917403d6ccf5774b36405bfda7d45c57e90e20aad721f91 | R | 23,668 | 504 | # Comparison analysis of multiple datasets using CellChat - cell subtypes (continued)
# CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# April 2024
# https://github.com/sqjin/CellChat
## Tutorial: https://htmlpreview.github.io/?https://g... |
d46f008995b67cfe00bc3d059c1cd8211cca7b4152b2e2f4a04780b232e366e6 | R | 23,671 | 504 | # Comparison analysis of multiple datasets using CellChat - cell subtypes (continued)
# CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# April 2024
# https://github.com/sqjin/CellChat
## Tutorial: https://htmlpreview.github.io/?https://g... |
616587e2e794e3c5cd16d4929f709f6e2f4c41aca4be18c14f9c7f52f75a4fda | R | 23,689 | 766 | ```{r}
## whole-brain BAR-seq data is registered to the Allen Common Coordinate Framework version 3 (CCFv3)
## 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 coor... |
2b8865860f18b34101f6f2947693177ea9651ac05a5489aec8ac9e38bd4eae5a | R | 23,698 | 715 | library(tidyverse)
library(magrittr)
library(RColorBrewer)
library(rstatix)
library(ggbeeswarm)
library(GGally)
library(ggVennDiagram)
theme_set(theme_bw())
#### Figure 2 ####
to_plot <- readRDS("data/downsampled_subclass_spearman_corr.RDS")
# Figure 2D. Subclass expression correlations
to_plot %>%
filter(spec... |
6d634389c2ecdd6d94c53d9ceb0684c80191e1379d533d78216ec787732f36d7 | R | 23,698 | 766 | ```{r}
## whole-brain BAR-seq data is registered to the Allen Common Coordinate Framework version 3 (CCFv3)
## 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 coor... |
1b35247c5cface0ad7ead3546d9cc740db71ead8f373bef17efb90ea9a356564 | R | 23,703 | 504 | # Comparison analysis of multiple datasets using CellChat - cell subtypes (continued)
# CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# April 2024
# https://github.com/sqjin/CellChat
## Tutorial: https://htmlpreview.github.io/?https://g... |
a3dbc3317ac2dea3e87de4a486e23af795235e89d3508bfeb1d36ae7bfacbaf3 | R | 23,712 | 622 | # Script to make box plots for cell subpopulations showing differences in proportions in the HC - resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# Jul 2023
################################################################################################
# Setup
######################################... |
6b2e8e28a092167f3e8c870568698f6cea97e365227a5fbbf4623c7c3942762c | R | 23,932 | 679 | # Fixation Manuscript Analysis Code
# Author: Jeryn Chang
# Last Updated: 05/08/2025
# R version: 4.4.0 (See sessionInfo.txt)
# Load libraries and data
library(readxl)
library(ggplot2)
library(patchwork)
library(dplyr)
library(officer)
library(Seurat)
library(viridis)
library(lme4)
library(report)
libra... |
6b6204a4f3b80e0ecacbb0643aa65201745582e321b7c9022c5ae6f3cbab2edc | R | 24,097 | 514 | ### MNT 10x snRNA-seq workflow: step 03 - marker detection
### **Region-specific analyses**
### Initiated MNT 12Feb2020
### For revision 2021: (5x) amygdala samples
#####################################################################
library(SingleCellExperiment)
library(EnsDb.Hsapiens.v86)
library(scater)
library(... |
5fb8fafbb9064555c497ae7aa6e7415562caa04b9910cfd7f1d014501cb25e3b | R | 24,287 | 370 | ---
title: "S2: Neuroimaging preprocessing and interpreting results"
author: "I S Plank"
date: "`r Sys.Date()`"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(knitr)
library(tidyverse)
library(ggpubr)
library(ggrain)
library(BayesFactor)
library(rstatix)
library(effect... |
969dc1038d1764e0f62e12a241811bb5f32ae3636d8ef3c43ea23f57071d81dd | R | 24,395 | 444 | ```{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",
"matrixS... |
d12d650657960f33a98eeec694a1835d26708e66512dfba6e776fe37e64e114e | R | 24,396 | 490 |
#' Plot a given trajectory under all available filters
#'
#' This function loads a CSV containing tracking data. Given a particular body-part,
#' axis, and level of smoothing, the function plots the trajectory of the body-part
#' along that axis.
#'
#' @param csv_or_path Either a csv loaded as an R object, or the full... |
94daa59fc7bc38ecdefb9fbb5385288c0eca038230eeca751edad6a27434b765 | R | 24,492 | 587 | #' Get UK Biobank participant diagnosis data
#'
#' @description For a list of diagnostic codes get the HES, GP, cancer registry, operations, and self-reported illness data, matching the provided codes.
#'
#' Valid code vocabularies are:
#'
#' - ICD10 (for `hesin`, `death_cause` and `cancer_registry` searches) - fuzzy ... |
d9747aca5c4ee0d814c65b12b8912dbb47a62b9d027aaf5a4b485e969eee36b1 | R | 24,618 | 420 | options(stringsAsFactors = FALSE)
library(ggplot2)
library(reshape2)
library(dplyr)
library(stringr)
library(lme4)
library(lmerTest)
library(RColorBrewer)
library(ggpubr)
library(readxl)
library(ggsci)
library(Seurat)
library(pheatmap)
##set up analysis
source("enrichment_helper.R")
mutation_type <- "snv"; group_num ... |
547ccb28ba343bb46830c02ba8490ec055814ce5a5f4a3718c0caaabd43dc8b6 | R | 24,669 | 570 |
###################################
# #
# Bilingual Re-analysis #
# ABCD 5.1 release #
# #
###################################
#### Load libraries
library(mosaic)
library(ggplot2)
library(WRS2)
library(lm.beta)
library(gamm4)
lib... |
b2a28143a7909b9be32a890c93be9ec00b4fba20c20b797795c21fd4b3f9d2b2 | R | 24,764 | 852 | #' @title Function to plot prediction accuracy for each clustering type
#'
#' @param results_dir Output results folder as produced from a single run of run.bash
#' @param tablename Name of object assigned to the global environment
#'
#' @return
#' @export
#'
#' @examples
plot_performance <- function(results_dir, tablen... |
076f0ddef21d6cb6405e9a5d7b8317d1184ea972d1d772354a40d126f7104f7d | R | 24,785 | 525 | ### MNT 10x snRNA-seq workflow: step 02
### **Region-specific analyses**
### - (3x) HPC samples from: Br5161 & Br5212 & Br5287
### Initiated MNT 07Feb2020
### MNT 23Apr2021: Updated QC'd SCE (no add'l donors)
#####################################################################
library(SingleCellExperiment)
libr... |
27e96a7b18f1f9531576d105c3a1b3119e649740ba88b6bc2f7de42879fd1d50 | R | 24,911 | 447 | #generate plots for results of the Tabula Muris FACS dataset
##### 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... |
09d6772cf40700aca838a0405b41ce872b0c1da932044463282459406e5c5e12 | R | 24,985 | 674 | .tablevec <- function(x){
if(!is(x, "table")) x <- table(x)
y <- as.numeric(x)
names(y) <- names(x)
y
}
.getMostLikelyOrigins <- function(knn, known.origins=NULL){
origins <- t(vapply( seq_len(nrow(knn$orig)), FUN.VALUE=character(2),
FUN=function(i){
if(all(is.na(knn$orig[i,... |
0ce601dc2f019a454fb5c161dbc256b8c781dc581cb196b7178e2661d1e7e658 | R | 24,997 | 693 | # Siwei 19 Feb 2024
# make peak file contains ASoC SNPs
# ! calculate npglut peaks ! ####
# init ####
{
library(Seurat)
library(Signac)
library(EnsDb.Hsapiens.v86)
library(GenomicFeatures)
library(BSgenome.Hsapiens.UCSC.hg38)
library(GenomicRanges)
library(org.Hs.eg.db)
library(stringr)
library(fu... |
7aee337b5392a3a9e4c3f78d0f28a9c065cd0b1b19bab2eef433869327565304 | R | 25,163 | 894 | # make figures for Alena PICALM paper
# Siwei 19 Mar 2024
# init ####
{
library(readxl)
library(stringr)
library(ggplot2)
library(scales)
library(reshape2)
library(RColorBrewer)
library(ggpubr)
library(lme4)
library(lmtest)
}
# library(seqLogo)
## Fig_Ex_5F ####
df_raw <-
read_excel("t... |
a032e62a0f029335100a2be0f76ad9f0f71660c20e7c3bb2779c46d7f2ed2a9d | R | 25,336 | 588 | # ͳ¼ÆÔÚ²»Í¬ÎïÖÖµ±ÖÐгöÏÖµÄUCR
setwd(dir = "D:/R_project/UCR_project/")
rm(list = ls())
library(tidyverse)
library(stringr)
# human -------------------------------------------------------------------
human <- read.table(file = "01-data/26-Evolution_newly_emerging_UCR_distribution/human_results.xls",
... |
7fead9017f524336fc8cf6f8bc7108cf6a43163cdf0926015eac939b8c753a64 | R | 25,388 | 620 | # ------------------------------------------------------------------------------------------------------------------------ #
# Prediction of patient-specific recovery based on early clinical data #
# --------------------------------------------------------------------... |
5c8067023a0a42c874964e58782a9894889226706d771465be4e9171d2711fd2 | R | 25,475 | 496 | library(here)
library(SummarizedExperiment)
library(reshape2)
library(rlang)
library(ggplot2)
library(UpSetR)
library(cowplot)
library(spatialLIBD)
library(sessioninfo)
#################################################################################################################
## ... |
612fb79845fc2c190fd0bc6717ce8ad25311abd89832dcc3322264f00873cc43 | R | 25,602 | 739 | library(tidyverse)
library(rstatix)
library(ggpubr)
library(ggprism)
set.seed(123)
norm_control_by_batch <- function(df, value_col, conds = c("CTRL", "TDP43KD")) {
# group by batch
rep_grpd <- fish_counts %>%
group_by(replicate)
rep_grpd %>%
#list of dfs
group_split() %>%
#set names to bat... |
117d66adb0df5b8c754652d020add2f2fd4cf4643de840bb8753f3c53343c85b | R | 25,609 | 511 | ### MNT 10x snRNA-seq workflow: step 02
### **Region-specific analyses**
### - (2x) sACC samples from: Br5161 & Br5212
### Initiated MNT 29Jan2020
### MNT 29Apr2021: add expansion samples (n=3, incl'g 2 female)
#####################################################################
library(SingleCellExperiment)
li... |
90d14f9ed7d025a2485cc83e0407efb0e86d09132a602b6af577f9e726e03c38 | R | 25,651 | 582 | ### MNT 10x snRNA-seq workflow: step 04
### **Region-specific analyses**
### - (3x) HPC samples
### - Setup and comparison to Habib, et al (DroNc-seq paper)
### Updated for revision MNT 2021
#####################################################################
library(SingleCellExperiment)
library(EnsDb.Hsap... |
61c668f9a77722f4cf33560ea491ebb78569b3c34597869514486e7ab0c7d0d0 | R | 25,767 | 563 | ## This script was used to produce Figure 5.
salloc -A def-sfarhan --time=0-8 -c 1 --mem=40g
module load StdEnv/2020
module load r/4.2.2
R
library(Seurat)
library(ggpubr, lib="/lustre03/project/6070393/COMMON/Dark_Genome/R/x86_64-pc-linux-gnu-library/4.2")
library(ggplot2)
library(tidyr)
library(stringr)
library(d... |
39a2a57be037c8d823baee7f555d394e6ed9b18402b73e8a2d33a09375d97575 | R | 25,788 | 350 | ---
title: "Analyzing rhythmic data with compareRhythms"
author: Bharath Ananthasubramaniam
date: 15 Jul 2025
output:
rmarkdown::html_vignette:
self_contained: true
vignette: >
%\VignetteIndexEntry{Analyzing rhythmic data with compareRhythms}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
bib... |
359abfb4e970a595df27c1b06c1abc6b8901eb084fe90d790cd6ac72e670f744 | R | 26,061 | 522 | #----SI_Plot_data_from_different_experiments_together---------------------------
#-------------------------------------------------------------------------------
# Additional script for plotting data from the locomotor activity analysis for
# Reinhard et al. 2025 (10.1073/pnas.2506164122)
# This is not part of the ... |
79a498f979828bb576911d8b691297e3c1c704320fca6a6cd03e8a6af2767d84 | R | 26,188 | 853 | library(ClusterGVis)
library(ggplot2)
library(org.Hs.eg.db)
library(org.Mm.eg.db)
library(SeuratData)
library(Seurat)
library(monocle)
library(monocle3)
load("data/pbmc.markers.rda")
load("data/diff_test_res.rda")
load("data/modulated_genes_ft.rda")
function(input, output, session) {
# file upload limit
options(... |
4195e1de6cfdc4250c45c6e71881d1f3e34592878e121d2bbab9cadb4e27ab3f | R | 26,196 | 858 | # Siwei 15 Jan 2025
# make new plots for Alena's revised paper
# init ####
{
library(ggplot2)
library(stringr)
library(lsr)
library(RColorBrewer)
library(ggpubr)
library(readr)
library(readxl)
library(stats)
library(rstatix)
library(agricolae)
library(DescTools)
# library
library(data.ta... |
d650027dbacf58e0315353b39efc0a386ce00a8c8f7cc673f10d4028403a89ec | R | 26,230 | 547 | ### LAH 10x snRNA-seq workflow: step 03 - marker detection
### **Region-specific analyses**
### - (3x) DLPFC samples
### 25May2021
#####################################################################
library(SingleCellExperiment)
library(EnsDb.Hsapiens.v86)
library(scater)
library(scran)
library(batchelor)
libr... |
99f4bb89a50ac1358a5d1345963af0e7d5e4efbf785539b9dad2f4346a459673 | R | 26,248 | 686 | library(tidyverse)
library(openxlsx)
library(TwoSampleMR)
library(data.table)
#----------------{00 load functions}-----------------------
source("/mnt/data/lijincheng/mGWAS/result/02MRBMA/MRBMA_function/function/local_clumb.R")
source("/mnt/data/lijincheng/mGWAS/result/02MRBMA/MRBMA_function/function/harmonise_data_mo... |
a2e833efa4d697ecc51c1a563ce2854d639642fc3714a1e3a3975e19583831b3 | R | 26,322 | 670 | library(magrittr)
library(data.table)
library(dplyr)
library(tidyr)
library(ggplot2)
library(ggrepel)
library(Hmisc)
library(cowplot)
library(pROC)
library(stringr)
library(RColorBrewer)
library(netresponse)
library(igraph)
#genes that are relevant across drugs? sensitivity genes? essentiality?
setwd(dirname(rstudio... |
bb2b15b085c242a1f18e4d4e9553b9deb6cb59444d488bdbde9a3ba9da05aa5f | R | 26,405 | 679 | library(magrittr)
library(data.table)
library(dplyr)
library(tidyr)
library(ggplot2)
library(ggrepel)
library(Hmisc)
library(cowplot)
library(pROC)
library(stringr)
library(RColorBrewer)
library(netresponse)
library(igraph)
library(ComplexHeatmap)
#genes that are relevant across drugs? sensitivity genes? essentiality?
... |
74f145ef111c629ab2626fc4d278bd49a9cc62f975969b1bfffdb30248a8df3f | R | 26,467 | 687 | ---
title: "kolabas"
output: html_document
date: "2024-12-10"
---
Author: Mary-Ellen Lynall 2024
AIM: Test how similar the stress vs control meninges neutrophils and preneutrophils are to neutrophils from different locations (blood, various marrow samples)
Kolabas dataset:
Dataset downloaded from https://www.ncbi.nlm... |
84aba2cdf7e882e6adcdb66759293eb5e4f68765e23c7c827636ab807dbe74a9 | R | 26,596 | 816 | #' @include zzz.R
#' @include helpers.R
#' @include ui.R
#'
NULL
#' @inheritParams RunAzimuth
#' @param reference Name of reference to map to or a path to a directory containing ref.Rds and idx.annoy
#' @param annotation.levels list of annotation levels to map. If not specified, all will be mapped.
#' @param umap.name... |
4f815fe6703b10f889e45b35620f07668fb77cfbc0f884aee682349bc731c50c | R | 26,630 | 700 | #' Create Volcano Plots for Differentially Abundant Proteins
#'
#' Generates faceted volcano plots for each comparison in the dataset,
#' highlighting significantly differentially abundant proteins.
#'
#' @param data A data frame containing at least `log2FC`, `adj.pvalue`, and `LabelFactor` columns.
#' @param fdr_cutof... |
161444e286117f0e2241b0323968d3c53166608413aff845dbfecb721003bb05 | R | 26,783 | 843 | # 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)
... |
50d0abef19b1356d02950bd7f0881d17dfd1fbfbc4913cdfd4bdf398423adc17 | R | 26,867 | 597 |
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... |
7033c3faf34e86eb6f0b54e4ad4e2a22969f573b5627c38ddf70b74b8d980b41 | R | 27,212 | 580 | ################################################################################
### LIBD 10x snRNA-seq [pilot] revision (n=10)
### STEP 01: Read in SCEs and perform nuclei calling and QC
### Initiated: MNT 25Feb2021
################################################################################
library(SingleCellExp... |
15687c5f64727fd08e690bf03675a1e6cf1eeaccfa7b635887caeeb79aa02817 | R | 27,228 | 664 | ---
title: "L. variegatus Cell Culture - scRNA-seq wit Seurat - 15% FBS"
output:
html_document:
fig_width: 10
fig_height: 10
date: '2022-03-10'
name: Kate Castellano
editor_options:
chunk_output_type: inline
---
#https://satijalab.org/seurat/articles/merge_vignette.html
#https://satijalab.org... |
6b1e9f858efb1e1af6118b3b08a007ffe06f4d9e6ed09b2a5da272a919257f84 | R | 27,330 | 596 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
library(readr)
library(GenomicRanges)
library(plotrix)
library(stringr)
library(data.table)
library(BSgenome.Hsapiens.UCSC.hg38)
genome = BSgenome.Hsapiens.UCSC.hg38
revCompl = function(seq) {
return(chartr("ATGC", "TACG", reverse(seq) ))
}
getCGContent ... |
2b1c7a6c24c5614531e03768da69cf5c0055e1fdac7e2eada3c529577f09ecb8 | R | 27,372 | 654 | ---
title: "R Notebook of Figure 3"
output: html_document
---
```{r Packages, message=FALSE}
library(Signac)
library(Seurat)
library(dplyr)
library(tidyverse)
library(RColorBrewer)
library(ComplexHeatmap)
library(qs)
library(circlize)
library(GenomicRanges)
library(patchwork)
library(factoextra)
library(ggnewscale)
li... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.