sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
54e16bb337b05b2e6b697062765ec1beda05b5b5a5b083e1f59cc36158e5384b | R | 8,117 | 235 | ###For NextSeq 1000, strengthRow = .02 and strengthCol = .01 worked well
###For Miseq, strengthRow = .01 and strengthCol = .005 worked well
GetNoHoppingTable <- function(ReadsTableName, SampleTableName, OutputFileName, strengthRow, strengthCol, Scale) {
ReadsTable <- read.csv(ReadsTableName, row.names = 1)
s... |
02aa0ecb1f2d494241c6e65f4608a20f57acc100a0088306dae46060706afcdc | R | 8,189 | 342 | ---
title: "Monocle pCM RPCs T1 T3 rods cones BPs - organoids"
output:
html_document:
df_print: paged
---
```{r global_options, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
```
```{r, libraries}
library(tidyverse)
library(Signac)
library(Seurat)
library(JASPAR2020)
library(G... |
7d0de020396cf1b72483637c20342a7667eefbb049d9ee47c800368820b3bffb | R | 8,247 | 204 | # Sex stratified regional age-sensitivity
# due to high computational costs, this was written out as stand-alone script
# 01.11.2023, Max Korbmacher (max.korbmacher@gmail.com)
#
# PREP ####
# packages
library(tidyquant)
library(afex)
library(effects)
library(dplyr)
library(reshape)
library(ggplot2)
library(tidyr)
libra... |
5275920a79c9153d30b469b8574566946605f8efad90414b032bb32c0be08c0d | R | 8,266 | 354 | ---
title: "Monocle RPCs T1 HCs ACs RGCs - organoids"
output:
html_document:
df_print: paged
---
```{r global_options, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
```
```{r, libraries}
library(tidyverse)
library(Signac)
library(Seurat)
library(JASPAR2020)
library(GenomeInfo... |
a6ba40616d5421f7198bd8259bb8752e53d54d41f9b62562ab4261f19a8ce4b4 | R | 8,305 | 209 | ---
title: "teg1_v_teg2_sporo"
author: "T Attenborough"
date: "2023-10-11"
output: html_document
---
Load packages
```{r}
library(Seurat) #Seurat v4.0.2
library(dplyr)
library(patchwork)
library(here)
library(ggplot2)
library(clustree)
library(ggrepel)
library(tidyverse)
library(topGO)
library(forcats)
#sessionInfo()... |
abf776453ff6c47d8337410fb7edd884c8c8b93114a77e58c1ece30191d32d44 | R | 8,338 | 231 |
pacman::p_load('R.matlab', 'magrittr','lme4','lmerTest','emmeans','tidyverse','bbplot','patchwork')
set.seed(17)
# Load and prepare the data ----
# m is 2 x 3D structure (Nsubj x 96rois x 4 conditions)
m <- readMat(here::here('data','beta_meanpow_roi_stat.mat'))
roi_table <- as.data.frame(read.csv(here::here('data... |
e734668a278ccd8c37dcdddec71b5cf8aa2e7a07df2db4ee3f8e8c0ab3dfdc6e | R | 8,342 | 237 | ## import package
.libPaths("~/R/x86_64-pc-linux-gnu-library/4.2")
library(Seurat)
library(ggplot2)
library(ggpubr)
library(sctransform)
library(harmony)
library(dplyr)
library(plyr)
library(viridis)
library(hrbrthemes)
## load all the objects
Hypo_integrated <- readRDS("~/Yi_Huang/objects/Hypo_integrated.rds")
AgRP_s... |
31ef2d7782df408bde9371794dfa7be6892a6090dee2daa021c748bb02092202 | R | 8,375 | 146 | #######################################################################################
############## Preprocessing snRNA from Mathy et al. #######################
#######################################################################################
library(CellChat)
library(ggplot2)
setwd("/Projects... |
cdd0c72c3a9183e040e209ffd93f9e91f26a76185df625c76755bce0d64ce2d6 | R | 8,377 | 279 | ---
title: "Bap1 fgsea Pathway Analysis"
subtitle: "Neuron DEGs KO vs. WT, across all clusters"
author: "Kat Beigel (beigelk@chop.edu)"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
# utility
library(tidyverse)
library(readr)
library(xlsx)
library(tool... |
c0d8598905b1c448bb4e8cb4cc2e93f1f1bfc29f1406a674164662ba995b4a34 | R | 8,397 | 142 | ### Code derived from https://satijalab.org/seurat/v3.2/pbmc3k_tutorial.html
### Reto B. Cola
rm(list=ls())
library(dplyr)
library(Seurat)
library(patchwork)
library(ggplot2)
library(svglite)
set.seed(200591)
outputFolder <- "Z:/data/r.cola/scRNAseq/15percentMT_analysis - Copy/OutputAll4/"
# Load the... |
5a526f4650124ec0dd7061c33d4e55f7f2b17342fab51fd0ce406d737a549d86 | R | 8,471 | 286 | ---
title: "Bap1 fgsea Pathway Analysis"
subtitle: "Glia DEGs KO vs. WT, across all clusters"
author: "Kat Beigel (beigelk@chop.edu)"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
# utility
library(tidyverse)
library(readr)
library(xlsx)
library(tools)... |
ca737114597d717128eb855dfd39061384a5d21a3b945126efb85bf9301ab722 | R | 8,478 | 208 | print("This script estimates AGE ASSOCIATIONS of ABSOLUTE regional brain asymmetries BY SEX.")
print("Date: 06.11.2023 ")
print("Author: Max Korbmacher (max.korbmacher@gmail.com)")
# PREP ####
# load packages
if (!require("pacman")) install.packages("pacman")
pacman::p_load(dplyr, marginaleffects, ggpubr, ggplot2, Rm... |
efacd76d51ef33ae36e7d6230cb5bedf036aa71cb78ce82692218ad21d5963c1 | R | 8,505 | 135 | library(readr)
library(dplyr)
library(ggplot2)
library(grid)
devtools::load_all("breaktools/")
source("00-utils.R")
rdc_published_overlap = function()
{
dir.create("reports/04-rdc_published_overlap", recursive=T, showWarnings=F)
rdc_df = readr::read_tsv("data/rdc.tsv")
rdc_combined_df = rdc_df %>%
dplyr::fi... |
b2447cb0ab0499ce3df449d4021ffa3e27df7b420baba1593833888e156f201b | R | 8,510 | 128 | library(Seurat)
library(harmony) #0.1.1
library(RColorBrewer)
library(ggplot2)
library(dplyr)
library(ggalluvial)
library(clustree)
packageVersion('Seurat') #4.2.0
setwd("/data2/deng/Aging/Ex/AllEx")
ExAll.integrated=readRDS("/Projects/deng/Aging/Ex/AllEx/ExAll.integratedTSNE.rds")
ExAll.integrated$rpcaClus... |
d860092239c22954918ac267a0fb0e49028483db4fee3aa7dee70bfe4a382fee | R | 8,516 | 122 | ---
title: "Spin Test Parcel Rotation Matrix"
author: "Audrey Luo"
output: html_document
---
This Rmd file using rotate_parcellation to generate 10k rotated permutations of a parcellation, given the coordinates of left and right hemispheres of this parcellation on the sphere.
The output is a vector of 1:Number_of_par... |
17c10a2410823ac0d99cb4daed1b5e2dcfd71d820aa3d734ae40593b8d493c38 | R | 8,526 | 267 | # Estimates the number of clusters by means of two huristics
"SIMLR_Estimate_Number_of_Clusters" = function( X, NUMC = 2:5, cores.ratio = 1 ) {
D_Kernels = multiple.kernel.numc(t(X),cores.ratio)
distX = array(0,c(dim(D_Kernels[[1]])[1],dim(D_Kernels[[1]])[2]))
for (i in 1:length(D_Kernels)) {
distX... |
14df93c88ef197a259ee05a3e9502b1a40cca4dddcf48e0a287710706bed47b6 | R | 8,530 | 177 | ---
title: "marker_genes_acroos_Stem"
author: "T Attenborough"
date: "2023-10-17"
output: html_document
---
Load packages
```{r}
library(Seurat) #Seurat v4.0.2
library(dplyr)
library(patchwork)
library(here)
library(ggplot2)
library(clustree)
library(ggrepel)
library(SeuratDisk)
library(ggpubr)
library(RVenn)
library(... |
74a902498362fdcaae36ff0872bd8bf7bcf9bd6ff88f0881e61bf88894787539 | R | 8,531 | 370 | ---
title: "Monocle ATAC all"
output:
html_document:
df_print: paged
---
```{r global_options, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
```
```{r, libraries}
library(tidyverse)
library(Signac)
library(Seurat)
library(JASPAR2020)
library(GenomeInfoDb)
library(EnsDb.Hsapie... |
6e90d57d51b99779c650c0274328a152af7e17b54832736835f0214476bcf3dd | R | 8,573 | 322 | ---
title: "RPCs_T1_T2_T3_final - to use"
output:
html_document:
df_print: paged
---
```{r}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
```
```{r libaries}
library(dplyr)
library(Seurat)
library("ggplot2")
library(monocle3)
library(patchwork)
library(SeuratWrappers)
library(harmony)
library(g... |
f3e0883f9048be072ff8fcfd34ee7f988c8194a3805e1d55c6ba1a43c7b1ed7b | R | 8,574 | 305 | setwd('/work/AnneSophiaHartebrodt#6698/ms-project/')
require(rhdf5filters)
require(rhdf5)
require(Rhdf5lib)
renv::activate('/work/AnneSophiaHartebrodt#6698/ms-project/r-single-cell')
renv::repair()
set.seed(11)
require(rlang)
require(Seurat)
require(data.table)
require(SingleCellExperiment)
require(ggplot2)
require(gg... |
106701a849a011dccfb8407074e2d16a64dc6f4bf692705ec947a514993db337 | R | 8,580 | 219 | #date: 10-March-2020
#Project: Basic QC for whole cells
################
#load libraries#
################
library(Seurat)
library(reticulate)
#conda_install("r-reticulate", "scrublet")
#######
#Usage#
#######
#filtered = wholeQC("your project directory")
#it will save the original seurat ("QC_object_pass_fail_all_... |
fefc4012a9337cb4acf414b4e590bf678da75f3930bcd196e8d370d467ebe60f | R | 8,603 | 293 | ####install libraries####
# {
# install.packages("nlme")
# install.packages("data.table")
# install.packages("emmeans")
# install.packages("lmerTest")
# install.packages("lattice")
# install.packages("plyr")
# install.packages("ggplot2")
# install.packages("Renext")
# install.packages("ggsn")
# ins... |
e9f155c8973da26411962d60255b8c620bf55a954f3676519818b984fac9d9bf | R | 8,609 | 198 | source('code/misc/miscfxns.R')
##################################
### Atlas conversion functions ###
##################################
map.v2.to.v3 <- function(df.vuln,region.names.gene,v2.to.v3.key){
#### NEED TO ENSURE ALL REGION NAMES ARE CORRECT ####
# Input:
# X.ABA: named matrix of values associated with... |
c5ee8427d9aaedc11d7dc3e6628f1903d6dd06cda51da89b60459979074c1689 | R | 8,623 | 284 | # Useful utility functions that satisfy the following criteria:
# 1. Wide applicability for testing/internal usage purposes
# OR
# 2. Useful for end-user to perform certain tasks
#' Simple wrapper for making GRanges
#'
#' @description `makeGRanges()` makes an artificial GRanges based
#' on user input. Useful for testi... |
f782f22425082bf5294071bfa0c6de5c558fd7bfd97549d28df3efab49042e45 | R | 8,662 | 191 |
library(dplyr)
library(rjson)
library(stringr)
library(tidyr)
##################
# Set Variables
##################
args <- commandArgs(trailingOnly = TRUE)
dataset = args[1]
##################
# Set Directories
##################
config_data <- fromJSON(file=sprintf("/cbica/projects/network_replication/man... |
b70a4eb3acf6e6b998434baf25425e2025553309624b94e382b9b0efbae12cde | R | 8,728 | 181 | #DLX and MEIS peaks in mouse
## overlap meis2 peaks with dlx-merged table form from Lindtner et al., 2019
####### keep nearest gene info just to compare for now
## do overlaps with Vista enhancers etc. afterwards, based on new merged peak coordinates
## in cases where several close peaks in dlx dataset overlap the sa... |
fd1df182a741f24ab230b0a93d70d8d3f522b749dd4f372ea20ff4164503b064 | R | 8,755 | 173 |
library(dplyr)
library(gratia)
library(magrittr)
library(mgcv)
library(rjson)
library(stringr)
##################
# Set Variables
##################
args <- commandArgs(trailingOnly=TRUE)
config_file <- args[1]
##################
# Set Directories
##################
config <- fromJSON(file = config_file)
data... |
a09792bd4c4ddf9a410d7a9201be2efdc6fd0d231938c57f88a722668ec06abf | R | 8,810 | 334 | ---
title: "10PCW_Retina"
output:
html_document:
df_print: paged
---
```{r global_options, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
```
```{r, libraries}
library(Seurat)
library(cowplot)
library(SCFunctionsV3)
library(dplyr)
library(tidyr)
library(stringr)
library(tidy... |
a71e9deeafe8f582d29afa8a2bb8937e0ac5566127e129a2f358f6ab46c1814c | R | 8,820 | 139 | ---
title: "Parcel Label Formatting"
author: "Audrey Luo"
output: html_document
---
```{r setup}
library(dplyr)
```
# 1. Schaefer 7 Network to 17 Network Reordering
## Schaefer200x7 to 17
```{r}
# reorder parcel labels
schaefer200x7.parcel.labels <- read.csv("/cbica/projects/network_replication/software/rotate_parce... |
493bfd1db800f994d24544aa31e09127d123ca0cc2a1b1c342df3c321e0a6d20 | R | 8,828 | 230 |
hummus_preset <- list(just_original_mat=T,
window_size=15,
preset=list())
reeses_preset <- list(type="lem",
knn1=0.025,
knn2=0,
ndim=6,
preset=list(name="Reeses",
... |
d368dce4d8145b0ddcc2e0fbc3df0cb82ac516ae3277828767af004bb3436f00 | R | 8,836 | 211 |
# Go through all learning unit files and check whether they are ok.
library(tidyverse)
# Identify learning unit files
all_files <- list.files("./category", full.names = TRUE)
learning_unit_files <- all_files[grepl("learning_units", all_files)]
learning_unit_files <- learning_unit_files[-length(learning_unit_files)] ... |
08bd6a9433be9a34a4b0475e03263915f877427e2f5b2fea82ead6406b75d925 | R | 8,843 | 211 |
# Go through all learning unit files and check whether they are ok.
library(tidyverse)
# Identify learning unit files
all_files <- list.files("./graph", full.names = TRUE)
learning_unit_files <- all_files[grepl("learning_units", all_files)]
learning_unit_files <- learning_unit_files[-length(learning_unit_files)] # t... |
80572128be46f55777a060b29695c8484c3e8fb50cd817feba15b27ebae39f37 | R | 8,869 | 168 | setwd("~/Workspace/DSB_Paper")
library(readr)
library(dplyr)
library(ggplot2)
library(cowplot)
library(stringr)
# library(plyranges)
devtools::load_all('~/Workspace/breaktools/')
proportions = function()
{
#
# Load genes
#
genes_df = gtf_read('~/Workspace/genomes/mm10/annotation/mm10.ncbiRefSeq.gtf.gz')
gen... |
05ded316d8599080332bacd45fe6eaa5ebbdfef2157dba817d350a58e4308976 | R | 8,921 | 196 | ---
title: "Intro_to_STew"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Intro_to_STew}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
This vignette outlines the steps of analysis and visualization of shared variations underlying sing-cell spatial transcriptomics for **10X Genom... |
2059b1c2ea17b28a54f20b014559cb67965cde5ddfa2feca489feab10fd4e729 | R | 8,928 | 233 | # This script estimates AGE SENSITIVITY of ABSOLUTE brain asymmetries
# It also compares linear and non-linear models using AIC and BIC
# Date: 30.10.2023
# Author: Max Korbmacher (max.korbmacher@gmail.com)
#
print("This script estimates AGE SENSITIVITY of ABSOLUTE regional brain asymmetries.")
print("It also compare... |
e955604bfc964f56fd53ff9bb29f9d60f2abe3000f177fd577d4f76c23fd2f6f | R | 8,947 | 280 | #!/usr/bin/env Rscript
#' Single-cell RNA-seq Processing Pipeline for ARDS and Sepsis Dataset
#' Dataset: Jiang et al., 2020 (PMID: 32554932)
#' Description: Analysis of ARDS and sepsis patient immune responses
#' GEO: GSE151263
#'
#' @author [Your Name]
#' @date 2024-11-07
# 1. Setup and Configuration -------------... |
8a194ea4fde686fe7908ddc65c56676f7be54bf46f657be72b72f6537190afe9 | R | 8,965 | 150 | get.raw.edges <- function(raw_edges, file, sep, header) {
if(!is.na(file) & dplyr::first(!is.na(raw_edges))) {
stop("Both raw_edges and file are specified, specify only one")
}
if(!is.na(file)) {
if(is.na(raw_edges)) {
raw_edges <- read.table(file = file, sep = sep, header = header, stringsAsFactor... |
df290df646377b8449bfd9d7d96e80b4e6014dfefa0ca96dfcf10c77d0bca3af | R | 8,981 | 371 | ---
title: "Monocle RPCs T1 T3 cones, rods, BPS - organoids"
output:
html_document:
df_print: paged
---
```{r global_options, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
```
```{r, libraries}
library(tidyverse)
library(Signac)
library(Seurat)
library(JASPAR2020)
library(Gen... |
5f2d0ae619986533d3802d1c2b42cfc9811134493929c09e56915665ff4510a6 | R | 9,054 | 192 | # Rscript preprocess_meco.R /fs/project/schuler.77/meco/joint_fix_trimmed.rda /fs/project/schuler.77/meco/joint_l1_acc_breakdown.rda en
# Language codes (wave 1): "du" "ee" "en" "fi" "ge" "gr" "he" "it" "ko" "no" "ru" "sp" "tr"
# Language codes (wave 2): "ba" "bp" "da" "en_uk" "ge_po" "ge_zu" "hi_iiith" "hi_iitk" "ic" ... |
6abb4092159b1d7191c8553536f0b2e802017d3fe4fac08fd028f1bc8f49f03c | R | 9,055 | 299 | ## ---Libraries ------
library(Signac)
library(Seurat)
library(GenomeInfoDb)
library(EnsDb.Hsapiens.v86)
library(ggplot2)
library(dplyr)
library(patchwork)
library(rtracklayer)
library(cowplot)
library(BSgenome.Hsapiens.UCSC.hg38)
library(JASPAR2020)
library(TFBSTools)
library(patchwork)
##--- Functions --------
howMa... |
aa7953f45028fc3a916cad727509110bc77737e2413a191b98f5fe40b1dc56c2 | R | 9,058 | 253 | library(fgsea)
library(data.table)
library(ComplexHeatmap)
library(scales)
library(DESeq2)
library(msigdbr)
library(babelgene)
library(tidyverse)
source("funcs/plotEnrichment2.R")
source("funcs/pretty_path_label.R")
source("funcs/p_star.R")
# Following msigdbr and fgsea vignettes ----
fname <- "data/003_m... |
bea3bb29c93cd58dd93956b9c5712b46cd1293b4c5fa629fe509bc7df1f349bb | R | 9,108 | 267 | ## ---Libraries ------
library(Signac)
library(Seurat)
library(GenomeInfoDb)
library(EnsDb.Hsapiens.v86)
library(ggplot2)
library(dplyr)
library(patchwork)
library(rtracklayer)
library(cowplot)
library(BSgenome.Hsapiens.UCSC.hg38)
library(JASPAR2020)
library(TFBSTools)
library(patchwork)
##--- Functions --------
howMa... |
691c672bb9cfe6b55063412cd931fd85b9f95f31e951ed7c00e2bee3320caca6 | R | 9,142 | 356 | ---
title: "Fig.2E. Principal sensory trigeminal nucleus"
author: "Evgenii O. Tretiakov"
date: "`r Sys.Date()`"
output:
workflowr::wflow_html:
toc: true
---
```{r setup, echo=FALSE, include=FALSE}
knitr::opts_chunk$set(
autodep = TRUE,
cache = FALSE,
cache.lazy = FALSE,
dev ... |
531471b0deef97b2030f72b8e7933a8bbef5e3efdfce710769333aa1f8c6079a | R | 9,148 | 336 |
suppressPackageStartupMessages({
library(Seurat)
library(stringr)
library(sctransform)
library(future)
require(scales)
library(RColorBrewer)
library(dplyr)
library(tidyverse)
library(cowplot)
library(patchwork)
library(Matrix)
library(ggplot2)
library(harmony)
library(WGCNA)
library(igrap... |
fe49be86834c68fafff8741357ce36c5da1b73360b75cb51fcd26f1a80220e9d | R | 9,189 | 265 | ---
title: "Human COVID microglia scRNA low-level processing"
output: html_notebook
---
# Setup
## Load packages etc.
```{r}
library(tidyverse)
```
# Run pipelines
## Set up environment
Add to ~/.bashrc
```{bash eval=FALSE}
# using pyenv in b1038
export PYENV_ROOT="/projects/b1038/tools/py... |
ea885e1a20f2f484ec4a2fecd41f178172e91a83aaaad7f8f3ad6df6c206d2c1 | R | 9,212 | 304 | ---
title: "go_terms_Neuron"
author: "T Attenborough"
date: "2023-10-11"
output: html_document
---
Load packages
```{r}
library(Seurat) #Seurat v4.0.2
library(dplyr)
library(patchwork)
library(here)
library(ggplot2)
library(clustree)
library(ggrepel)
library(SeuratDisk)
library(ggpubr)
library(RVenn)
library(readxl)
l... |
ff3d384b26b1bfcafad763b27eb96ab24bde340ab036d7a127bd5a88506f11a9 | R | 9,238 | 257 | library('minpack.lm')
#source('~/Desktop/Rhythmicity Code and Output/fitSinCurve.R')
expr.c<-read.csv("~/Desktop/Rhythmicity Code and Output/Example_data.csv", row.names = 1)
clin_ctrl<-read.csv('~/Desktop/Rhythmicity Code and Output/Example_clinical.csv', row.names = 1)
n<-nrow(expr.c)
Symbols<-row.names(expr.c)
obser... |
0acac8422a8e6017fc379bd989e21d1835f045ac5d33564a23f311b85dd41482 | R | 9,278 | 361 |
## set the directory -----------------IMPORTANT------------------
#### you need to set the working directory to R_codes first using setwd()
### first importing relevant libraries
library(readxl)
library(data.table)
#------------- Note: you need to install the ATool package probablu before importing it
... |
93ca45e006438fe3db583c68ff688bfb6e4da15bb21a8d2b4851053985688a45 | R | 9,322 | 188 | Sys.setenv(TZ='GMT')
library(readr)
library(dplyr)
library(ggplot2)
library(cowplot)
library(stringr)
devtools::load_all("breaktools/")
source("00-utils.R")
multiomics_examples = function()
{
dir.create("reports/07-multiomic_examples/bedgraphs", recursive=T, showWarnings=F)
params = macs2_params(extsize=1e5, extty... |
ed5a1a40b5af44ea71df1da6b4cbd2548c17a25893a93f3938d0e4d72fdbab14 | R | 9,331 | 233 | # Initialise ------
pacman::p_load('tidyverse','magrittr','patchwork','multcomp','emmeans','afex','ggpubr',
'R.matlab')
# set random seed for reproducibility
set.seed(17)
# define custom functions
My_Theme = theme(
axis.title.x = element_text(size = 25,vjust = -3),
axis.text.x = element_text(size... |
5560c0618d941ba8f5f30d3d64f9defae9d60a6d4e86595e2a7f4391b509a192 | R | 9,332 | 291 | #!/usr/bin/env Rscript
################################################
################################################
## Functions to handle Nextflow input ##
################################################
################################################
string_to_null <- function(x, val = "[]") if (x ==... |
fd49e4e37da9e5e3962956977240acb0361457a5f1b4bb99cfac29d278123bff | R | 9,344 | 285 |
suppressPackageStartupMessages({
library(Seurat)
library(stringr)
library(sctransform)
library(ggplot2)
library(ggpubr)
library(future)
require(scales)
library(RColorBrewer)
library("readxl")
library(dplyr)
library(dendextend)
library('conover.test')
})
# import the all_nuclei dataset, create... |
46912b4dd00faecdd4322f8fd8bb66cbcc16197644c41e3632dec58a632eca62 | R | 9,448 | 199 | ###########################################################################################
# Import data to R and save for further analysis and plotting. Subject metadata, clinical
# data, N events data per subject Arrange into dataframe with one subject per row.
#
# Vinding, M. C., Eriksson, A., Low, C. M. T., Waldt... |
c089983e5c0989ad934946ce0a90a35de9e2cb1c65fb0b3486544e8df4a80d10 | R | 9,458 | 321 | #!/usr/bin/env Rscript
library(Seurat)
library(DropletUtils)
library(argparse)
# for emptyDrops
parser <-
ArgumentParser("Parameters for Empty Drops cell identification")
parser$add_argument("--raw_hto_matrix_dir",
help = "A numeric/integer matrix-like object containing UMI counts prior to any filtering or cell ca... |
d1680f5a935bc3f6a743faae0c4cdbaa9575612a35aba9d77524cc29f18453bb | R | 9,462 | 201 | #########################
# Visualization of HOMER output
# Fig 3 c,d, S3 c
### density plot
library(tidyverse)
# import output from HOMER
meis2_all_density <- read.table("./input_data/motif_density_meis2peaks.txt", skip=1,header=F, sep="\t")
columns <- c("distance" , "hexa_total_sites" ,"hexa_pos_sites", "hexa_ne... |
fd96b64ec4b795e20a0b043f08cb5d1c90b0c67b526538799cf2b488b86a793e | R | 9,476 | 208 | #!/usr/bin/env Rscript
################################################
################################################
## Fucntions ##
################################################
################################################
# Helper function for NULL condition
null_to_strin... |
34abc72c5a42c000b242f7ac32bce5f5752b22a0c922f24499ea9c135aaae09a | R | 9,486 | 287 | ---
title: "Microglia pseudobulk deep analysis"
output: html_notebook
---
# Setup
## Import packages
```{r setup}
library(tidyverse)
library(ggsci)
library(Cairo)
library(biomaRt)
library(DESeq2)
library(parallel)
library(doParallel)
library(BiocParallel)
library(ggsignif)
library(fgsea)
#custom scripts
source(... |
1fdadffaa48ede4c031ab34c011cdfea9ba519dbddb64d8124427a8ef53335b7 | R | 9,497 | 193 | # change directory to example folder
rm(list=ls())
basedir <- '~/Dropbox/Neurodegeneration/TauSpread/tau-spread/'
ex.dir <- paste0(basedir,'example/')
setwd(basedir)
# load packages
source('code/misc/packages.R') # see for all of the dependent packages
# load functions
source('code/misc/plottingfxns.R') # I will use ... |
6179168eec677e4c41a4f12d24def0dbd3aad5fc117f82d0d60612ad3f2a4f8e | R | 9,532 | 222 | #' Filters out genes with no expression and low quality cells.
#'
#' @param raw.mat Matrix of raw gene expression data (genes X samples).
#' @param minCount Minimum number of reads in a cell. Default of 1000.
#' @param maxCount Maximum number of reads in a cell. Default of 100000.
#' @param minGeneReads Minimum number... |
0bb387f0f006f3a5d7da105dbf00b4d89db5a9922e4f163b25ba3bcbc3694f76 | R | 9,598 | 284 | ####install libraries####
# {
# install.packages("nlme")
# install.packages("data.table")
# install.packages("emmeans")
# install.packages("lmerTest")
# install.packages("lattice")
# install.packages("plyr")
# install.packages("ggplot2")
# install.packages("Renext")
# install.packages("ggsn")
# ins... |
14f478962efac9c845fb2d55d167968dda29a030b519e786d566144aba8ca801 | R | 9,675 | 235 | ---
title: "threeperc_figs"
author: "T Attenborough"
date: "05/07/2022"
output: html_document
---
Load packages
```{r}
library(Seurat) #Seurat v4.0.2
library(dplyr)
library(patchwork)
library(here)
library(ggplot2)
library(clustree)
library(ggrepel)
#sessionInfo()
```
his saves today's date for later
```{r}
st=forma... |
fab7280d70c059f49f34084836a043547b3f09a434917d4e50c2c59894bc9f02 | R | 9,766 | 200 | colorvis <- function(COL){
plot(NULL, xlim=c(0,length(COL)), ylim=c(0,1),
xlab="", ylab="", xaxt="n", yaxt="n")
rect(0:(length(COL)-1), 0, 1:length(COL), 1, col=COL)
}
plot.Xt <- function(Xt,t.){
# Xt: NxT matrix of nodal value (N) over time (T)
# t.: numerical values of time t
t. <- do.call('rbind',... |
1b9054207e74505cbed639e4551dbb9d523b4905ff9e162e8305cc6bf4be3172 | R | 9,781 | 268 | library(DESeq2)
library(tximeta)
library(AnnotationHub)
library(RColorBrewer)
library(ComplexHeatmap)
library(ggbeeswarm)
library(org.Mm.eg.db)
library(EnhancedVolcano)
library(tidyverse)
# Read in raw counts
dir <- "data/008/salmon/"
files <- file.path(list.files(dir, "_quant", full.names = T), "quant.sf"... |
a9ee2acaa61d8767dc0cb947df3e3ba6ce51021e48f57010675575eed52ae2b9 | R | 9,825 | 267 | library(tidyverse)
library(patchwork)
library(scico)
library(DescTools)
library(xtable)
library(magrittr)
library(latex2exp)
cifar <- read_csv('data/cifar.csv')
ici <- read_csv('data/iterative-convergence.csv')
digitclutter <- read_csv('data/digitclutter.csv')
# Indices of iterative convergence ======================... |
ceb0e88f969628f60e3c24f953f7d6f5a82d15762a53796b21e56554e979cc0e | R | 9,826 | 301 | ---
title: "Alevin-Fry Comparison of Resolution Modes"
author: "Ally Hawkins for CCDL"
output:
html_notebook:
toc: true
toc_float: true
---
In this notebook we are comparing the use of the `cr-like` resolution in alevin-fry to the `cr-like-em` resolution.
Previously in our benchmarking analysis we made the... |
6a24dfdd182af7cd0ccedc73038ef46125f3d7c1f9627b4165e938b5c16d9656 | R | 9,932 | 272 | ---
title: "Bap1 MSigDBOverlap Pathway Analysis: Top 10 gene sets"
subtitle: "Neuron DEGs KO vs. WT"
author: "Kat Beigel (beigelk@chop.edu)"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(readr)
library(xlsx)
library(ggplot2)
... |
21b469b5ef18601e2b925d367986b102f4cfc9a7c11e0228414c1c5bd2764019 | R | 9,985 | 256 | ---
title: "Methods"
author: "Evgenii O. Tretiakov"
date: "`r Sys.Date()`"
output:
word_document:
workflowr::wflow_html:
toc: true
toc_float: yes
theme: cosmo
highlight: textmate
code_folding: hide
df_print: paged
editor_options:
markdown:
wrap: 72
bibliography:
- "`r here::here(... |
1046707ac76a0638bd416b9e762021995496fa91b12a72924620772c090eb541 | R | 10,005 | 331 | #Analysis for "Turbidity drives plasticity in the eyes and brains of an African cichlid"
#Stats analysis
#Analyzed by Jai Tiarks
#E: tiarks.2@osu.edu
# data prep ---------------------------------------------------------------
##Pull necessary libraries
library('moments')
library('ggplot2')
library('ggpub... |
85af0de2decd220137dd250ccbea8b0c4d4fd07ac0e2ef7f678ffd2243eddf36 | R | 10,008 | 215 |
library(mvtnorm)
library(whitening)
library(Matrix)
### Simulation parameters
k = 10 # number of traits
beta.param = 4 # controls the strength of trait correlations
d.sd = 0.5 # SD of the distribution of univariate effect sizes (Cohen's d)
n.samples = 100 # number of samples
sample.size = 1000 # sample size (... |
cd5895fc7b2e6dcfe831469465ef0ff62f199fd7184c21d90dc308536dd2c870 | R | 10,014 | 280 | ---
title: "Bap1 MSigDBOverlap Pathway Analysis: Top 10 gene sets"
subtitle: "Glia DEGs KO vs. WT"
author: "Kat Beigel (beigelk@chop.edu)"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(readr)
library(xlsx)
library(ggplot2)
li... |
c3ecb71cc9bf19772204bc7574c05d79c3d9941f451531a576bfcbf336f0615f | R | 10,037 | 168 | library(Seurat)
library(ggplot2)
library(clustree)
#Preprocessing for snRNA from Mathys et,al can be found in snRNAPreprocessing.code.R
#cell type identification
MathyAllCtrl=readRDS("/Projects/deng/Aging/Ex/MathyEx/MathyAllCtrl.rds")
Idents(MathyAllCtrl)=factor(MathyAllCtrl$OldCellType,levels=c("Ex","Oli","In... |
3eb0cc7b46b4ec995ad9a81809121bec30d63d47b0c680fabb924abc4aace2e6 | R | 10,042 | 192 |
library(dplyr)
library(gratia)
library(magrittr)
library(mgcv)
library(rjson)
library(stringr)
##################
# Set Variables
##################
args <- commandArgs(trailingOnly=TRUE)
config_file <- args[1]
##################
# Set Directories
##################
config <- fromJSON(file = config_file)
da... |
d203fd62fe6839fee0de688760506bd60cf3125d80c7949c8746be4773871ea9 | R | 10,069 | 411 | ---
title: "220323_PLIER_LVs"
author: "Jennifer Fisher"
date: "3/23/2022"
output:
html_document:
toc: true
theme: united
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# START
Goal/Purpose of operations:
We investigated the centrality of the highest weighted genes from all... |
3399f5701bfbd94bfe0aa288a8e5a62cf575e3a11cee97bd87b50dd52f86fbbe | R | 10,147 | 204 | colorvis <- function(COL){
plot(NULL, xlim=c(0,length(COL)), ylim=c(0,1),
xlab="", ylab="", xaxt="n", yaxt="n")
rect(0:(length(COL)-1), 0, 1:length(COL), 1, col=COL)
}
plot.Xt <- function(Xt,t.){
# Xt: NxT matrix of nodal value (N) over time (T)
# t.: numerical values of time t
t. <- do.call('rbind',... |
5709f1e7c204f4eae25ef135424fb6303a5dec943ae21d158ab670625bcb3ed4 | R | 10,180 | 141 | # Fig 3e, S3d
####### plot enhancer & promoter overlaps
library(tidyverse)#v1.3.1
library(plyranges)#v1.8.0
library(UpSetR)#v1.4.0
library(ComplexUpset)# v1.3.3
merged_peaks.df5 <- read.table( "./Table_S5_ChIP-seq.txt", header=T, sep="\t")
#############################################################################... |
f63353cb9e3b8cc5baa5f3d714c8a7fcdd07f137f1fde265a26119b60ddd54b5 | R | 10,240 | 285 |
---
title: "Analyzing ATAC-seq samples with edgeCounter"
author: "Ye Yuan"
output:
html_document:
toc: true
toc_float: true
toc_depth: 4
theme: journal
vignette: >
%\VignetteIndexEntry{Analyzing ATAC-seq samples with edgeCounter}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
... |
eb28f0e2ad7581f66eec13f55013ae43cc13d36c2ec1e888695633122c1ea4a8 | R | 10,244 | 188 | library(RColorBrewer)
library(rcartocolor)
library(Seurat)
sccolp <- colorRampPalette(c(carto_pal(7, "Sunset"))) # gene expression colour scale
sccol <- sccolp(41)
clcol <- c(carto_pal(12, "Vivid")[1:10], brewer.pal(3, "Set1")[1], carto_pal(12, "Pastel")[1:5])
zscale <- function(y) { ifelse(y > 0, y/max(y), ... |
5610f64b03c9dec1bad0155637bd867f227a5cace7cae7ba46bcbb9e58328c8b | R | 10,342 | 240 | # This will be functions for the rest of the analysis
library(naniar)
library(tidyr)
library(dplyr)
library(plotly)
# 3D Plotting Functions
# original plotting basis from https://github.com/Dragonmasterx87/Interactive-3D-Plotting-in-Seurat-3.0.0
UMAP3D <- function(x, colors = "Set2"){
plot.data <- FetchData... |
56844111b1dc0771cbbc5f4dfa0ed964b9b0012b5037348c495fda9dd60a47be | R | 10,385 | 331 | ---
title: "Alevin Index comparisons"
author: "Joshua Shapiro for CCDL"
output:
html_notebook:
toc: true
toc_float: true
---
This notebook contains analysis of some initial benchmark in runs of Alevin using different index files, looking at mapping rates.
## Setup
### Load Libraries
```{r setup}
library(g... |
159025fc5f8ad29857952cf9d9c6eb2a209fe483a1bc419e357c38f1449d690a | R | 10,394 | 216 | source(file = "/datastore_share/Users/neuhaus/dorsal_ventral_comp/Paper/scripts/lib.R")
library(Seurat)
library(Matrix)
library(ggplot2)
library(dplyr)
out_path1 <- "/data/mayerlab/neuhaus/ferret_proj/final_results/01/"
out_path2 <- "/datastore_share/Users/neuhaus/ferret_proj/final_results/01/"
ferret_seurat <- readR... |
7ddb3bcd07153684310f095c830c2abb678414766c596410ba5c50fb1ad0d1d8 | R | 10,604 | 293 | ################################################################################
# GSEA.R 1.0.1 #
# Authors: Victor Laigle (Institut Curie) #
# Contact: myproms@curie.fr ... |
953f0dc079c72dfc902ef76227e6a0bd27c16b0270d5d06d9115416fd632505e | R | 10,614 | 191 | setwd('/home/data')
load('/home/eteleeb/scripts/Deconvolution_ml_model.RData')
library(CellMix)
library(ggplot2)
library(reshape2)
library(grid)
library(gridExtra)
library('NMF')
library(readxl)
library(ggsignif)
cohort <- 'MSBB'
r <- 'cerebellum'
## create analysis directory
#dir.create('Public_Data/bulkRNASeq/2018... |
bc4171ea1a6992dbef0cb9cd8ce13b55bc7043322df3c73b323ee482f4069fd4 | R | 10,658 | 220 | #function to determine detected pathogens in BAL data and code infections accordingly
code_pathogens = function(bal_data)
{
require(tidyverse)
#fix test columns
test_cols = colnames(bal_data)[c(which(colnames(bal_data) == "ASPERGILLUS_GALACTOMANNAN_ANTIGEN_NMH_LFH"):which(colnames(bal_data) == "RESPIRATORY_SYNCY... |
dc400f7a52b11184350755df607b8ef730ddf050bf17e95c28a8e3f8577ff2e9 | R | 10,695 | 270 | library(lubridate)
RV1=read.csv("revisits_12min_threshold with vedba2023_4_hour.csv")
RV1=RV1[,-1]
studaydays2=unique(RV1$day)
IDs=unique(RV1$ID)
RV2=read.csv("FFT Daily Path Length 2023.csv")
RV2=RV2[,-1]
UDs=list.files("C:/Users/salavi/Documents/Shapefiles",pattern=".shp", full.names=TRUE)
crown... |
b8288d4642ee8b23369e026ba72cdb86a3102cc411c5d77a25e81280212c5af8 | R | 10,717 | 189 | # setwd("/mnt/e/Workspace/Emily")
# library(randomForest)
library(dplyr)
library(reshape2)
library(readr)
library(GenomicRanges)
library(GenomicFeatures)
library(ggplot2)
library(tidyr)
library(baseline)
library(smoother)
library(dbscan)
library(ggpmisc)
library(rtracklayer)
library(ggbeeswarm)
library(Rtsne)
library(p... |
a640ac217cb8d6beeb82a0c81e21314d529d64cd750008445b561397c309a34c | R | 10,751 | 290 | ---
title: "with integration"
author: "Pavitra Roychoudhury"
date: "2024-01-15"
output: html_document
editor_options:
chunk_output_type: console
---
Repeating analysis with integrate instead of merge()
## Import data
Import Wang et al filtered matrices from https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE2... |
d57dbfb806aef7394a35ba95e346bb58e9e5f9d2d2de9e761edf1268a7fe3bca | R | 10,755 | 249 | ###############################################################################
##################### Testing for Cell Type Enrichment ########################
###############################################################################
library(tidyverse); library(data.table)
library(org.Hs.eg.db); library(limma);... |
1aaba4c37c9c2d033e4e8f695cea6ef33d256269ea1353d6c4340d677bae67d2 | R | 10,781 | 268 | # J. Taroni 2018
# Use with source() only
# Functions for testing differential expression of PLIER latent variables
# adapted from ADAGEpath::build_limma, Jie Tan (@tj8901nm)
TestLVDifferences <- function(b.matrix, phenotype,
use.bonferroni = FALSE) {
# This function tests for different... |
b98e6b74017e28dd434ebfdd8cd1736e84abe8cb3fc114203b890958bdc723f9 | R | 10,794 | 364 | ---
title: "SCRNAseq quantification comparisons: counts and correlations among callers"
author: "Joshua Shapiro for CCDL"
output:
html_notebook:
toc: true
toc_float: true
---
## Setup
### Load Libraries
```{r setup}
library(ggplot2)
library(magrittr)
library(SingleCellExperiment)
# set seed
set.seed(202... |
180aa89a63b2fe2483ddcde8a89ab1bc47a349a10c4aeae2eda4dad6fb16b1a6 | R | 10,847 | 311 | # Methods from singlecellmethods ---------------------------------
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
# RcppExports.R
exp_mean <- function(x, p, i, ncol, nrow, groups, group_sizes) {
.Call('_symphony_exp_mean', PACKAGE = 'symp... |
79192fc3146b23fb144616bca9c8ac7fb5ea0e25982d27ff9eef2a21e4a3f52e | R | 10,877 | 393 | ---
title: "hiRes"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
```
```{r}
library(Spaniel)
library(scran)
library(scater)
library(batchelor)
library(dplyr)
library(Seurat)
library(SCFunctionsV3)
library(cowplot)
library(RColorBrewer)
allData ... |
5b373bb790440a7553bf1025cd539b3ce38b11cd2e5e087462f66e9d67d49664 | R | 10,897 | 268 | ---
title: "PNC Sample Selection - for sensitivity analyses"
author: "Audrey Luo"
output: html_document
---
# Sample Selection process
1) original sample: N=1559, 4546 scans total, ages 8-23
2) exclude participants with medical conditions affecting brain function and gross neurological abnormalities: N=1413, 4136 sca... |
3a1fc62d0698b9afaf0e468b69edff19ccdfbd7f487f6e0be7826228332cae94 | R | 10,908 | 227 | ## import package
.libPaths("~/R/x86_64-pc-linux-gnu-library/4.2")
library(Seurat)
library(ggplot2)
library(ggpubr)
library(sctransform)
library(harmony)
library(dplyr)
library(plyr)
library(DAseq)
## load all the objects
Hypo_integrated <- readRDS("~/Yi_Huang/objects/Hypo_integrated.rds")
AgRP_subclusters <- readRDS... |
25bec2be11eb5f183b708c6ea45cc46eb62d82b8e8e4f1886090f2b31bd81a36 | R | 10,931 | 344 | setwd('/work/AnneSophiaHartebrodt#6698/ms-project/')
require(rhdf5)
require(rhdf5filters)
require(Rhdf5lib)
renv::activate('/work/AnneSophiaHartebrodt#6698/ms-project/r-single-cell-new')
renv::repair()
set.seed(11)
library(harmony)
require(data.table)
require(SingleCellExperiment)
library(cowplot)
library(rsvd)
librar... |
e1fbdb20dbb003e675ce5fbe6177fe717e0328c83a4ba5e24f63e1466562f7af | R | 11,070 | 376 | ---
title: "220405_limma_GBM"
author: "Jennifer Fisher"
date: "4/5/2022"
output:
html_document:
toc: true
theme: united
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# START
Goal/Purpose of operations:
Apply limma differential gene expression analysis to GBM and GTEx cont... |
2511155c06c5bc2c8af4c799631688ef5cf6f13c48ce47b8c75d6a173e5e5a7b | R | 11,072 | 246 | # Execute the supplementary analysis after the main analysis
source('main-analysis.R')
# Supp. Fig. 1 -------------------------------------------------------------------
pcrs <- read_csv('data/cifar-pcr.csv')
supp_fig_1_a <-
full_ici %>%
filter(convergence_constraint == 'proper', criterion == 'err') %>%
mutat... |
1f405c5327eed4242b4da9fc815eee3753ac519beb1d3ab1b0970b7082ea2007 | R | 11,163 | 491 | ---
title: "RPCs_T1_T3_BCs_PRs_October"
output:
html_document:
df_print: paged
---
```{r}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
```
```{r libaries}
library(dplyr)
library(Seurat)
library("ggplot2")
library(monocle3)
library(patchwork)
library(SeuratWrappers)
library(harmony)
library(gg... |
d0beb98c87e8b514f68d11861502483df9be353f7d46f15c9e327a2346146656 | R | 11,178 | 211 |
# based off of the analysis i did on the previous paper
# adding a few improvements
# Fixing issue where accessions map to multiple genes
# Fixing issue where dashes are replaced with dots
# Note: the cells are labeled as dl not dI
library(biomaRt)
library(Seurat)
library(RColorBrewer)
reticulate::py_ru... |
813ca22f07ffc9f0f714665cfc33ff563c9690c923510ef709a7433cebc7febc | R | 11,234 | 266 | #' PAM clustering over a range of k values.
#'
#' @param dist.mat A distance matrix for the data to be clustered.
#' @param kmin The minimum k to be used (default of 2).
#' @param kmax The maximum k to be used (default of 5).
#' @param verbose Switch to print status updates
#' @return A list of clustering object... |
850ac81f19c57322d1647b9226c7541acb65fb3f40607571a71c3a7bb26fb005 | R | 11,250 | 341 | suppressPackageStartupMessages({
library(Seurat)
library(stringr)
library(ggplot2)
library(ggpubr)
library(future)
require(scales)
library(RColorBrewer)
library("readxl")
library(dplyr)
library(dendextend)
library('conover.test')
library("devtools")
library(ggpmisc)
})
### figure 6 + suppleme... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.