sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
a0d44d78dc56b940d060b9e726fb80c5886894084cb3894d667e243cdfb27406 | R | 3,028 | 45 | rm(list = ls())
options(stringsAsFactors = F)
candidate_genes = c('AKT1','APOE','BDNF','CHRNA7','COMT','DAO','DAOA','DISC1','DRD2','DRD3',
'DRD4','DTNBP1','GRM3','HTR2A','KCNN3','MTHFR','NOTCH4','NRG1','PPP3CC',
'PRODH','RGS4','SLC6A3','SLC6A4','TNF','ZDHHC8','CTNND2','NRXN3','PT... |
730280125f05b1525d64fc168ea5c83628f60ab9c4f20b5ea415e9885b5cd79a | R | 3,040 | 61 | ### Create matrix of interregional distance data for null models
rm(list=setdiff(ls(),c('params')))
dist <- read.csv("Ohetal_2014_distance_mat.csv")
dist2 <- dist[,-1]
row.names(dist2) <- dist[,1]
# read in raw pathology dataset to get region names
struct_lab <- read.csv(paste(params$opdir,'processed/W_labeled.csv'... |
f8f961599fcb9fbabaef1f0c2f408bc1ad652b43877b70e5f940871274220081 | R | 3,045 | 102 | #!/usr/bin/env Rscript
#' Load H5AD Data and Convert to Seurat Object
#' Description: Read AnnData h5ad file and convert to Seurat for ML pipeline
# 1. Setup -------------------------------------------------------------
suppressPackageMessages({
library(Seurat)
library(SeuratDisk)
library(tidyverse)
})
#' Conv... |
68dbad352bb8b993771c73bccc94ad207fe62e2714262fb7c8469f7fbdad172d | R | 3,049 | 77 | #' Copy samples from AWS S3 to a local directory
#'
#' @param local_dir Path to local directory where quants files will be copied to.
#' @param s3_dir S3 bucket where quants files are stored.
#' @param samples List of samples to include when copying over quants files.
#' @param tools List of tools used for producing q... |
38e3f545bea77471336ffc041927547c42694515b0773e520e734b554b37c355 | R | 3,050 | 55 | ui <- shiny::shinyUI(shiny::fluidPage(
shiny::titlePanel(
paste(
"Threshold proposals",
if (!is.null(stress.ident1)) paste0(.parse.GO(stress.ident1), "= ", round(thresh.stress.ident1, 2)),
if (!is.null(stress.ident2)) paste0(.parse.GO(stress.ident2), "= ", round(thresh.stress.ident2, 2)),
... |
baf26f0e37729fc3a51ccf1f2894aa3db7b5ed5ee0d3f8b911d4a37414a71bd4 | R | 3,067 | 93 | BiocManager::install()
BiocManager::install('AnnotationHub')
library(biomaRt)
library(AnnotationHub)
#library(Homo.sapiens)
## Load the annotation resource.
ah <- AnnotationHub()
###### GRCh38
## Query for available H.Sapiens EnsDb databases
ahDb38 <- query(ah, pattern = c("Homo Sapiens", "EnsDb"))
### latest version... |
b50fc286ce34bf21545381222c65c4227ef1cef0bc7c6bc581a8555ce57a4a44 | R | 3,072 | 68 | ### This code generates fig. S12a-c
dev.off()
rm(list=ls())
library(DESeq2)
library("vsn")
library("pheatmap")
library(ggplot2)
library(tidyr)
library("RColorBrewer")
#Read in sample sheet (metadata) and counttable
sampletable <- read.csv2("colData_all.csv", header=T, sep=",")
rownames(sampletable) <- sampletable$ta... |
4243416c0c81e284f311a3968526ae5aa42b1f4110e0fd540281d9907e9c7b1c | R | 3,078 | 135 | # compute the eigenvalues and eigenvectors
"eig1" <- function( A, c = NA, isMax = NA, isSym = NA ) {
# set the needed parameters
if(is.na(c)) {
c = dim(A)[1]
}
if(c>dim(A)[1]) {
c = dim(A)[1]
}
if(is.na(isMax)) {
isMax = 1
}
if(is.na(isSym)) {
isSym =... |
5925d2dd7c15bf91d04873fa3453c5e32026c856105b2dae310d4601e459a4a1 | R | 3,092 | 90 | library(dplyr)
library(magrittr)
library(rjson)
library(stringr)
atlas = "schaefer200x7"
##################
# Set Directories
##################
config_data <- fromJSON(file="/cbica/projects/network_replication/manuscript/code/config_PNC.json")
data_root <- config_data$data_root
conn_matrices_dir <- paste0(data_ro... |
286c966bfea5014ec941a6481554b2a238b83d8fa8930bb665b31a1e403aad68 | R | 3,097 | 104 | library("stars")
library("xgboost")
library("yardstick")
set.seed(1)
folds = 5
files = list.files("data/raster_maps/", pattern = ".tif", full.names = TRUE)
variables = list.files("data/variables", pattern = ".tif", full.names = TRUE)
var = read_stars(variables, proxy = TRUE)
names = c("elevation", "slope", "stdev", "... |
a6793e8407da9f9e45f5a57dbc132b215c85fa161214f992a0f6a0a07e3f3424 | R | 3,100 | 74 | # perform covbat-gam on edges
library(ComBatFamily)
library(dplyr)
library(mgcv)
args <- commandArgs(trailingOnly = TRUE)
dataset = args[1]
# function for performing CovBat on connectivity metrics output for all atlases
apply_covbat_edge <- function(atlas, dataset) {
subxedge <- readRDS(sprintf("/cbica/projects... |
7d7b5d4bf823db03174608ac71e2ecbd830d56635ea6136eab5bde14a5a28f64 | R | 3,119 | 85 | rm(list = ls())
options(stringsAsFactors = F)
library(ggplot2)
library(stats)
library(car)
setwd("~/Documents/Virginia Tech/Project_4_VCU_postmortem_SCZ/ChIP-seq_differential/enhancer_count/differential_peaks/")
SCZ_1 = read.csv('All_trt_SCZ_Control_2_neuron_enhancer.csv')
# SCZ_1 = all_matrix
pvalues = data.frame(SCZ_... |
1bbc141981b7d0698e0efe48e7e7193b31dd16b33283e9f687d0a62ae1978403 | R | 3,131 | 64 | ### This code creates fig. S13
dev.off()
rm(list=ls())
library(tidyverse)
library(gridExtra)
library(dplyr)
library(Hmisc)
options(scipen=999)
Data_chr1 <- read.table("LD_decay_chr1.ld_decay", header=T)
Data_chr2 <- read.table("LD_decay_chr2.ld_decay", header=T)
Data_chr3 <- read.table("LD_decay_chr3.ld_decay", hea... |
430d24254a42f2513ff2aea31b7bb996d5b7409df84260e99fa8b6d1dbaf3818 | R | 3,147 | 58 | #!/usr/bin/env Rscript
# Libraries
library(Seurat)
library(argparse)
# Create a parser
parser <- ArgumentParser("Parameters for Seurat object: Pre-processing")
parser$add_argument("--fileUmi", help = "Path to file UMI count matrix.")
parser$add_argument("--fileHto", help = "Path to file HTO count matrix.")
parser$add... |
1c68945cc04cfdbbd721c023c50187e2cd95e26e306699d29ec9ed0565957f68 | R | 3,152 | 52 | #################
### Load data ###
#################
rm(list=setdiff(ls(),c('params','grp','treatment','injection.site')))
basedir <- params$basedir
setwd(basedir)
savedir <- paste(params$opdir,'diffmodel/bidirectional_onelm/',paste0(injection.site,collapse='-'),'/',sep='')
dir.create(savedir,recursive=T)
source('co... |
cbeacf68afefd2c052d6925d4948ecf4c06010cb5058dfa323c1da878e8fdc90 | R | 3,153 | 84 | ################################################
#File Name: DerivedAlleleFreq_bootstrap.R
#Usage: Do bootstrap of the DAF and Draw plot
#Example of length DAF
################################################
#!/bin/env Rscript
#input data with constant format
data <- read.table('DAF_byLen.bed3+',
... |
8b93d05f088a54767329ecbf06c9ba01f24b3d4b6768464a8cec7ff320365e19 | R | 3,180 | 80 | # functions for computing global brain connectivity (GBC) for rest-only sensitivity analyses
library(cifti)
library(dplyr)
library(magrittr)
library(rjson)
library(stringr)
# Function for Computing Global Brain Connectivity
# @param subject rbcid of subject of interest
# @param atlas A character string, name of atl... |
8d135d74c7e8b69113777a7acec8e85114d00c412792954973088c7d79fff032 | R | 3,197 | 83 | ### This code creates fig. S6b and c
#dev.off()
rm(list=ls())
library(ggplot2)
library(tidyr)
library(gridExtra)
library(plotLD)
library(data.table)
library(LDheatmap)
library(tibble)
library(hrbrthemes)
library(dplyr)
Data <- read.table("1mb_pairwise_ld.ld", header = T)
Data <- Data[,-c(1,3,4,6)]
s <- min(Data[,1])... |
a6c806e5740487caa3e17a0f9f9d42c4e5beaed3fdd36fd45d6221e4cbc12be5 | R | 3,215 | 74 | library(data.table)
library(tidyr)
library(Matrix)
library(Seurat)
library(DropletUtils)
# Use demuxlet tutorial dataset to simulate hashing and rna expression matrix
# The simulation based on the classification of demuxlet
test_data_barcode <- fread("jurkat_293t_demuxlet.best")
test_data_barcode <- test_data_barcode[,... |
b839eb97ac352080520c832857c2a21b57240363b2d4ba5c747e56af2ba45925 | R | 3,216 | 77 | #' Read a VCF file
#'
#' This function read a VCF file and return the readVcf() object
#'
#' @param VCF_FILE Path to the input VCF file
#' @param SEQINFO the object with chromosome characteristics: load_chr()
#' @param ASSEMBLY (optional) assembly of the VCF file (default hg38)
#' @param SAMPLE (optional) samples to pl... |
6a532a5eac14bb659ce258d43e2fc37bb477ecae7cc2504b489979177ef8eb14 | R | 3,218 | 105 | library(Signac)
library(Seurat)
library(GenomeInfoDb)
library(EnsDb.Hsapiens.v86)
library(ggplot2)
library(dplyr)
library(patchwork)
library(rtracklayer)
library(cowplot)
# Read in individual atac seq samples
# Create seurat object
# Add metadata
# Compute QC metrics
# create sample info with numbers of cells before ... |
df7db8316c004dbfbf17cfb0f68bb504321b15353ca2957fbbac2efcc09a0c24 | R | 3,221 | 92 | 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)
library(harmony)
require(data.table)
require(SingleCellExperiment)
library(cowplot)
library(rsvd)
library(Rt... |
4d964912a55c4500bb2e5e9742238ef6680b1a1a0579cd3eb8b68f691ffca82a | R | 3,222 | 69 | ################################################################################
# visualisation.R 2.0.2 #
# Authors: Alexandre Sta (Institut Curie) #
# Contact: myproms@curie.fr ... |
5a29c68819021cf3a4ecfa558c6d756c960f6d9930d504f2fe58cb704da2f1fa | R | 3,232 | 78 | #' GLS confidence intervals
#'
#' Computes confidence intervals for a GLS regression. When the variance covariance matrix is based on a phylogeny, this computes the confidence intervals for a phylogenetic regression (PGLS).
#' @param Y Dependent variable.
#' @param X Independent variable.
#' @param Sigma Matrix describ... |
908d7463cf04acc5e5e9b5f08123ea04dbcc0229ac299357ce417f0e7e86a384 | R | 3,237 | 90 | ---
title: "ConvertPickletoRda"
author: "Harry Clark"
date: "04/04/2023"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
### ----------------------------------------------------------------------------------------------- ###
## This code loads dataframes with spatial firi... |
753f13226883feef29fa0fe058ed267f72f52dd6d6faec201ba1f96d7f049fa0 | R | 3,252 | 74 | ```{r, include=FALSE}
library(qqman)
library(knitr)
opts_chunk$set(comment=NA, fig.width=12, fig.height=9, message=FALSE)
```
# qqman: an R package for visualizing GWAS results using Q-Q and manhattan plots
Three years ago I wrote a [blog post on how to create manhattan plots in R](http://gettinggeneticsdone.blogspot... |
588d9d5b6e88ad2f4a79039d576fc299c631054511334461ea81281736bab00a | R | 3,259 | 82 | ## ---- include=FALSE-----------------------------------------------------------
library(qqman)
library(knitr)
opts_chunk$set(comment=NA, fig.width=12, fig.height=9, message=FALSE, tidy=TRUE, dpi=75)
## ----generatedata, eval=FALSE, echo=FALSE-------------------------------------
# # This code used to generate the te... |
f35cd8d007da792ff3fe0f4ef9987b2d48b9d99b1b2db59921861d6af4e7d096 | R | 3,265 | 59 | library(monocle) #local monocle2
packageVersion("monocle")
library(Seurat)
####################################################################################
############ monocle analysis ##############
#############################################################################... |
cb8e14edb04bf8f4c28cd4398ea12762ea2825be783a3a6e98e6478db4b75d08 | R | 3,269 | 61 | ################################################################################
# goQuanticluster.R 1.0.0 #
# Authors: Patrick Poullet, Stephane Liva, Guillaume Arras (Institut Curie) #
# Contact: myproms@curie.fr ... |
e8a175ef85456090ded7d7128b465f2faba7a1fff8457d59d6642a7dcfd0f721 | R | 3,295 | 58 | # Figrue_4B
# A plotting R script produced by the Revigo server at http://revigo.irb.hr/
# If you found Revigo useful in your work, please cite the following reference:
# Supek F et al. "REVIGO summarizes and visualizes long lists of Gene Ontology
# terms" PLoS ONE 2011. doi:10.1371/journal.pone.0021800
# The axes in... |
399e3139c0da912fef665ca52edf2bf168a3b45c745efb567756da7c5804401c | R | 3,300 | 76 | rm(list = ls())
options(stringsAsFactors = F)
library(fitdistrplus)
library(dplyr)
args <- commandArgs()
chrdir=args[6]
filedir=args[7]
setwd(chrdir)
chr1 = read.table('chr1.bed')
colnames(chr1) =c('chr_loci1','start_loci1','end_loci1','chr_loci2','start_loci2','end_loci2','read','num')
head(chr1)
f=list.dirs(path =... |
f648e26a1c191cdfd96f41bf04c9805d5d8bf5e3aa28fd89f9ed6e71e1463b46 | R | 3,304 | 78 | # rm(list = ls(all.names = TRUE)); try(dev.off(), silent = T)
#### 1. Setup ------------------------------------------------------------
require(gruffi)
devtools::load_all(path = "~/GitHub/Packages/gruffi/")
go1 <- "GO:0006096" # Glyco
go2 <- "GO:0034976" # ER
go3 <- "GO:0042063" # Glia
ensembl <- biomaRt::useEnsem... |
b0a2a395c66392a7311381e120274c3063b250ba4aef1b6b79bf0444f89c78f0 | R | 3,310 | 103 | #!/usr/bin/env Rscript
options(width=500)
df = read.csv(file('stdin'), header=TRUE, comment.char = '', quote = '', sep = ' ')
dfw = reshape(df, timevar='subject', idvar='sampleid', direction='wide')
subjs = levels(df$subject)
rois = colnames(df)[grep('^bold', colnames(df))]
cat('=====================================... |
24c7afba4110a32941cc0196a30ed3941e4392b0375ca8ea124541ea4eb35bbf | R | 3,311 | 67 | ######################################
#code to create a color bar with black background
###############################
library(grid)
library(ggplot2)
#create black theme - skip to bottom
#from http://docs.ggplot2.org/dev/vignettes/themes.html
theme_black <- function(base_size = 12, base_family = "Helvetica") {
the... |
51aa2ecb81a43ad7689131e890b86ef91d6ad64e9ffc470b2a84cc815978c7bd | R | 3,312 | 63 | #!/usr/bin/env Rscript
# Libraries
library(Seurat)
library(argparse)
library(ggplot2)
# Create a parser
parser <- ArgumentParser("Parameters for MultiSeqDemux")
parser$add_argument("--seuratObjectPath", help = "Seurat object or the folder containing the seurat object")
parser$add_argument("--quantile", help = "The qua... |
5bc5c5c4b9152021389bf16e809112a29bb2e7ec44dc36ece8161fc1cdb5c925 | R | 3,316 | 79 | #' GLS prediction intervals
#'
#' Computes prediction intervals for a GLS regression. When the variance covariance matrix is based on a phylogeny, this computes the prediction intervals for a phylogenetic regression (PGLS).
#' @param Y Dependent variable.
#' @param X Independent variable.
#' @param Sigma Matrix desc... |
c7bae1d194d6b9480b087145239642af20f27f1a08a643d241ed1978a8c0b4c5 | R | 3,320 | 99 | library("stars")
library("ggplot2")
library("cowplot")
variables = list.files("data/variables", pattern = ".tif", full.names = TRUE)
names = c("slope", "stdev", "multitpi", "convexity", "entropy", "openness")
var = read_stars(variables[-c(1, 8, 9)], proxy = TRUE)
var = st_downsample(var, 15) # downsample to 480 m
var... |
df3ee48f6f8cb05749a1a3b84b72864f90cc48616e7156dd13b9fa37f0c819d2 | R | 3,322 | 90 | #' create_avg_plots()
#'
#' Create Average Plots
#'
#' This function creates average plots based on the mean and variance data.
#'
#' @param mean_var A data frame containing the mean and variance data.
#' @param obs_mean_var A data frame containing the observed mean and variance data.
#' @param models A character vecto... |
8623496c53cea8ec62b1b25c7e0fbad6ba6c112c33959a0bcf4d75d763bb565b | R | 3,326 | 103 | library(cifti)
library(dplyr)
library(rjson)
library(stringr)
library(magrittr)
##################
# Set Variables
##################
args <- commandArgs(trailingOnly = TRUE)
dataset = args[1] # only PNC
conn_type = args[2] # thresholded or absvalue
##################
# Set Directories
##################
confi... |
1aff8b9970223b758568d2b10195ea0754398a3b43f8c1da18d63e5897d29b96 | R | 3,327 | 92 | ---
title: "Comparing task-anchored vs task-independent firing as a function of task performance on a session-level"
author: "Harry Clark"
date: "04/04/2023"
output: html_document
---
```{r}
library(sjPlot)
library(lme4)
```
# subset the data acccording to trial type
```{r}
spatial_firing <- readRDS(file="all_cells_f... |
0fc3dd4568fa5eaaebe5c124f5ebc8eaceadbe1c2cbaa3335050d8b4a8d836ae | R | 3,347 | 54 | #################
### Load data ###
#################
rm(list=setdiff(ls(),c('params','grp','treatment','injection.site')))
print(grp)
print(treatment)
basedir <- params$basedir
setwd(basedir)
savedir <- paste(params$opdir,'diffmodel/bidirectional_onelm/',paste0(injection.site,collapse='-'),'/',sep='')
dir.create(save... |
a6d5605879a7e9fe3c25ac7078eb3ae7127eeb2222ab51fd9ac289fe738ea106 | R | 3,352 | 116 | library(Spaniel)
library(scran)
library(scater)
library(batchelor)
library(dplyr)
library(Seurat)
library(SCFunctionsV3)
library(cowplot)
library(RColorBrewer)
library(SCFunctionsV3)
library(harmony)
library(rmarkdown)
tissue <- "D45"
projDir <- "/data/rachel/Linda_Lako/Spatial/AD3/"
outputDir <- file.path(projDir, ... |
e1487d3968997bbc0cdfa9a876211c43ae1211cfa3ca8b4b15633854eb387214 | R | 3,356 | 88 |
# the essentials ----
# this chunk contains the minimal essential code from this script. Simply uncomment the lines below and run the code.
library(tidyverse) # provides access to Hadley Wickham's collection of R packages for data science, which we will use throughout the course
library(tximport) # package for getting... |
1659ebdbf8a67d8f7bb714ef3e95c64dfa207525baff68fe40ec0af5d80b6c1c | R | 3,360 | 122 | # perform fast pca
"fast.pca" = function( X, K ) {
X = t(X)
tmp_val = as.vector(colSums(X)/nrow(X))
X = X - t(apply(array(0,dim(X)),MARGIN=1,FUN=function(x) {x=tmp_val}))
res = fast.rsvd(X,K)
U = res$U
S = res$S
K = min(dim(S)[2],K)
diag_val = sqrt(diag(S[1:K,1:K]))
diag_mat = array... |
6995a5a15c8d4976fbcdae834b18a9e823ddcd8eef27cdd31d9af03ca35f4ede | R | 3,364 | 112 | library(cowplot)
library(tidyr)
library(ggplot2)
library(stringr)
library(rstatix)
library(Seurat)
library(dplyr)
library(ggplot2)
library(ggpubr)
dat01 <- read.delim2('per_cell_type_annotation.tsv')
dat <- dat01 %>%
filter(label != "")
dim(dat)
n_cells_01 <- dat %>%
dplyr::group_by(Sample_ID, label) %>%
dplyr::... |
95c2f52a3ef362c8b7667e209bf2f0b1fb39abc996a9b4ef7ef1e3738f8a9015 | R | 3,367 | 116 | library(Spaniel)
library(scran)
library(scater)
library(batchelor)
library(dplyr)
library(Seurat)
library(SCFunctionsV3)
library(cowplot)
library(RColorBrewer)
library(SCFunctionsV3)
library(harmony)
library(rmarkdown)
tissue <- "10PCW"
projDir <- "/data/rachel/Linda_Lako/Spatial/fetal_retina/"
outputDir <- file.pat... |
4627e9882b5101179a6994ac0c9d504016915be7cfa515c6e8d306e0d7adca4b | R | 3,369 | 119 | library(Spaniel)
library(scran)
library(scater)
library(batchelor)
library(dplyr)
library(Seurat)
library(SCFunctionsV3)
library(cowplot)
library(RColorBrewer)
library(SCFunctionsV3)
library(harmony)
library(rmarkdown)
tissue <- "11PCW"
projDir <- paste0("/data/rachel/Linda_Lako/Spatial/", tissue)
allData <- file.p... |
c85f5d50d8d55e964d39c7aaaf4ad9d7ba81fee897ec41614935e49b7644cba6 | R | 3,369 | 49 | ### load required packages
library(data.table)
library(Gviz)
library(GenomicFeatures)
setwd("D:/scRNASeq-2023reanalysis/")
myChr = "MN136524.1"
myStart = 1
myEnd = 152000
### READ IN GENE MODELS ###
gtrack<-GenomeAxisTrack(col="black") ##Adds genome axis
modelsPos<-makeTxDbFromGFF("../HSV-1/Annotatio... |
df3dc6e5a2f932783c137bd3fe27761e912d3dad19e18be0227a9525aa33eeaa | R | 3,382 | 63 | #' UCell: Robust and scalable single-cell gene signature scoring
#'
#' UCell is an R package for scoring gene signatures in single-cell datasets.
#' UCell scores, based on the Mann-Whitney U statistic, are robust to dataset
#' size and heterogeneity, and their calculation demands relatively less
#' computing time and m... |
b2c7016ce43a699e5f57731f9f6272db2d5460778ba229910f0674ad55ce496e | R | 3,388 | 102 |
# Go through all localizer files and check whether they are ok.
library(tidyverse)
# Identify localizer files
all_files <- list.files("./graph", full.names = TRUE)
localizer_files <- all_files[grepl("localizer", all_files)]
# There are five files per participant. Identify participant IDs.
participants <- str_extrac... |
45e029f4db20b2eac0289f8cb847172e43fd9782871ecdc33e2cdd9e858d083d | R | 3,390 | 101 |
# Go through all localizer files and check whether they are ok.
library(tidyverse)
# Identify localizer files
all_files <- list.files("./category", full.names = TRUE)
localizer_files <- all_files[grepl("localizer", all_files)]
# There are five files per participant. Identify participant IDs.
participants <- str_ext... |
a99232f3069614c011969c06d477f87e139ee3d6e40ed055471b7d482facc5ba | R | 3,396 | 109 | setwd('/work/AnneSophiaHartebrodt#6698/ms-project/')
renv::activate('r-single-cell')
renv::repair()
set.seed(11)
require(data.table)
require(readxl)
require(tidyr)
require(dplyr)
require(stringr)
rna.results.dir<-file.path('/work/AnneSophiaHartebrodt#6698/ms-project/submission/results-final/ms-rna/')
lesions<-c('AL... |
eb86a1da1a5949759313f72630deb7c3f00c48da561f479d54c06b408832b244 | R | 3,401 | 61 | # Set directory to source file loaction
setwd(paste0(figureDirectory, "Figure4-histologicalRegions" ) )
library(stringr)
library(dendextend)
library(RColorBrewer)
library(ggpubr)
load("valuesManhD2PVPairs.RData")
patientColorManhD2 <- valuesManhD2PVPairs$hclust$labels[valuesManhD2PVPairs$hclust$order]
patientCol... |
79ea290576dcc69766f7b6a5bfeed7fc35f3e0bee9b6e93418a4b96fd30da3f7 | R | 3,412 | 107 | library(Signac)
library(Seurat)
library(GenomeInfoDb)
library(EnsDb.Hsapiens.v86)
library(ggplot2)
library(dplyr)
library(patchwork)
library(rtracklayer)
library(cowplot)
howManyCells <- function(sObj){dim(sObj)[2]}
set.seed(1234)
# filter data
# add after filtering to sampleInfo
# cluster each sample
#sObj_List <- ... |
786dc548b580b7b1064993a8627a4642c31901ff215009739b1f782945ba0c77 | R | 3,422 | 81 | ###########################################################################################
# Import data to R and save for further analysis and plotting. Subject metadata, clinical
# data, event length, peak amplitude and time until next event (tue) data per individual
# event. Arrange into data frame with one event... |
fc5ce0f689a14d3a79fd8263769aa1b28ccd68a03aa79bb3959da5a9b3fff267 | R | 3,425 | 113 | library(dplyr)
library(Seurat)
library("ggplot2")
library(monocle3)
library(patchwork)
library(SeuratWrappers)
library(harmony)
library(ggplotify)
library(rmarkdown)
seuratObj <- readRDS("../rObjects/seuratObj_retina_eye_annotated.rds")
subsets <- list()
annotation <- read.csv("../csvFiles/retina_eye_annotations.... |
219dc34bf030ee4d554e425cd9d72b360aabe0465df7d74353cc6a002d5e14bb | R | 3,431 | 91 |
# Investigate correlaiton between IPC activity in the Clock Navigation experiment and the 4-Fold magnitude
library('ggplot2')
library("ggpubr")
library(ppcor)
library(rstatix)
library(ggprism)
library(cocor)
# SC ----
# Load the DF
SC_AGFour<-read.csv('/Volumes/ROBBOT/Projects/GridMagination/Tables/03_Correlati... |
82ff48c698441390cb04b03b9db74def0ad8e75adfeaf1c9535e5000700bcf8e | R | 3,439 | 90 | ##################################################################################
### USER INPUT ###
### define working directory
setwd("~/Desktop/current_lab_members/Ian/STAMP/V2 20210413/20200915_CR240STAMP_5d_new/add master")
### define input sequenc... |
376c1dc7240cf994ec071e71cbffff79c3e1563ede7d8aeaa27eb7633eeb12a9 | R | 3,440 | 95 | ---
title: "Figure 3"
author: "Pavitra Roychoudhury"
date: "2023-07-16"
output: html_document
---
panels for figure 3
```{r}
rm(list=ls())
library(Seurat)
library(tidyverse)
options(dplyr.width=Inf)
library(cowplot); options(scipen = 999)
all3<-readRDS('./seurat_analysis_all3.rds')
```
```{r}
pdf('./figures_for_ppr/... |
e1884cbf19cfa4d03e44c313b8b17514d09893815f8fc467e327459cd561a6d2 | R | 3,443 | 49 |
#################
### Load data ###
#################
rm(list=setdiff(ls(),c('params','grp','treatment','injection.site')))
basedir <- params$basedir
setwd(basedir)
savedir <- paste(params$opdir,'diffmodel/bidirectional/',paste0(injection.site,collapse='-'),'_independentfit/',sep='')
dir.create(savedir,recursive=T)
... |
d1319a557fabe76784d6559a14d20b574d02a557d442a53f40c1d84221c7cdc8 | R | 3,450 | 104 | library(ggplot2)
library(RColorBrewer)
library(clusterProfiler)
library(enrichplot)
library(dplyr)
library(org.Hs.eg.db)
library(stringr)
library(ggnewscale)
library(DOSE)
library(dplyr)
library(ggupset)
library(AnnotationHub)
library(MeSHDbi)
library(meshes)
library(enrichplot)
# AnnotationHub setup
ah <- AnnotationH... |
6e11808c9675c4ff8b92a56763f3429ed5cfb6cf2b2e313fe42f84756a61881f | R | 3,456 | 82 |
.libPaths("/data/user/jfisher7/.conda/envs/DR_Methods/lib/R/library")
#make sure the environment is clean
rm(list=ls())
library(MASS)
library(parallel)
library(signatureSearch)
library(tidyverse)
meta42 <- readr::read_tsv("/data/project/lasseigne_lab/JLF_scratch/Transfer_Learning_R03/data/LINCS_2020/siginfo_beta... |
1aea8fcf7277c40eda0bb521447bbe47968b2c0fc83e854b1b29b954137acc0f | R | 3,458 | 110 | # if (!require("BiocManager", quietly = TRUE))
# install.packages("BiocManager")
# BiocManager::install("clusterProfiler")
# install.packages("org.Hs.eg.db", repos="http://bioconductor.org/packages/3.2/data/annotation")
library(clusterProfiler)
library(enrichplot)
library(ggplot2)
d = read.csv(file="~/Documents/proj... |
addda0b5d3bffc66b91d7231dd3149f983905afbae5fc734f02733f2c84988bd | R | 3,473 | 103 |
# Go through all localizer files and check whether they are ok.
library(tidyverse)
# Identify localizer files
all_files <- list.files("./sequences/category_graph", full.names = TRUE)
localizer_files <- all_files[grepl("localizer", all_files)]
# There are five files per participant. Identify participant IDs.
partici... |
27a0eed9b98dcd6d2bcd8c6d9848e25c5dd540232aef3b2a4723638e85030d2a | R | 3,475 | 92 | # This is for adding monocle analysis to the integrated dataset
library(monocle3)
library(SeuratWrappers)
library(patchwork)
# Load in data here if necessary
# Create monocle object
m <- as.cell_data_set(data.combined)
m <- cluster_cells(m, reduction_method = "UMAP")
m <- learn_graph(m,
... |
b208b65a573832187cf5cd37957ea702c21fc73f107fdb07531c55e323027e11 | R | 3,486 | 84 | ################################################################################
# motifEnrichment.R 1.0.0 #
# Authors: Stephane Liva #
# Contact: myproms@curie.fr #
#######################################... |
8b76695b5f74f1424ee75bd937b9f3f0b9ef55336f266d74775888bdb917b7c4 | R | 3,488 | 101 | # Investigate difference in everyday life navigatin abilities in the teo groups
library(ggplot2)
library(ggforce)
library(ggdist)
library(gghalves)
library(ggprism)
library(lsr)
# Load the df
#SC
SC_QOS<-read.csv('/Volumes/ROBBOT/Projects/GridMagination/Tables/04_Questionnaire/CONT_QOS.csv')
SC_QOS$SubjectID<-facto... |
e364e2377af65e601d1682abe99b1aba8545d5eb610fa08bdeda3e9f5c1d873b | R | 3,488 | 78 | ################################################################################
# correlation.R 1.0.0 #
# Authors: G. Arras,P. Poullet (Institut Curie) #
# Contact: myproms@curie.fr ... |
ac2a4fd87c96f0e1ca356e53f73c9b396383df33e8e64ea39dcbe5894f5b30cd | R | 3,496 | 102 |
# Quadrature Filter Analysis SC
library(ggplot2)
library(gridExtra)
library(ggprism)
library(ggpubr)
library(coin)
# Bilateral EC (Left + Right)---
EC_Subj<-read.csv('/Volumes/ROBBOT/Projects/GridMagination/Tables/02_QuadratureFilter/EB_CombinedROI_Subj.csv')
EC_Subj$SubjectID<-factor(EC_Subj$SubjectID)
EC_Subj$Fo... |
2edb891a1ce617ed30d9ea4b7aee29862cfcde7d02bc1adba1663d416447be93 | R | 3,501 | 54 | rm(list=setdiff(ls(),c('params')))
basedir <- params$basedir # make this whatever you like, end with /
setwd(basedir)
library(rjson)
source('code/aba/aba_fxns.R')
source('code/misc/miscfxns.R')
abadir <- paste0(basedir,'data/aba/')
dir.create(paste0(abadir,'ontologies'),recursive = T)
# now we need to get a list of re... |
9f2717d387c5526df1c2a14fbfd8415e642e73237f28903e586b87415bad7617 | R | 3,511 | 74 | library(dplyr)
library(data.table)
library(Seurat)
library(scater)
source('pisces_2019_functions/functions/process-utils.R')
source('pisces_2019_functions/functions/cluster-functions.R')
source('pisces_2019_functions/functions/viper-utils.R')
library(ggplot2)
library(ggpubr)
library(viper)
library(pheatmap)
library(RCo... |
b29d8f92c6d1acf43831df0e0ba993df8186812e2dd7a592765d752944d588f4 | R | 3,528 | 75 | library(grDevices)
##########
#Parameters to set - hemisphere and gene of interest and the path to the downloaded files, loading instructions are provided at the bottom of the script
hemisphereParameter <- "lh"
geneOfInterest <- "CNR1"
setwd("/Users/lfrench/Desktop/results/FreeSurferMapDataReport/files/") #directory of... |
17930b3bddd81fd03e89dd545c07269c8be8fff70eaa2788a4b14929075b4454 | R | 3,530 | 94 | ######################################################################################################
# Create_the_gruffi_Package.R
######################################################################################################
# source("~/GitHub/Packages/gruffi/dev/Create_the_gruffi_Package.R")
rm(list = ls(al... |
3177c499e229484d4217a7e68997cd4c54a0e91f0ba648e1bae61d506df5d0cb | R | 3,539 | 115 | # Demographics and data summaries
#
# <ref>
#
library(read)
library(dplyr)
library(xlsx)
########################################################################
# Get summary of all subjects
########################################################################
# Load data
subj.data <- read.xlsx2('X:/... |
e589c7df9c0651c2f0bf01416f2b0bf0fc3144db3cd2589a9fd36862e73250cc | R | 3,551 | 117 | #!/usr/bin/env Rscript
#' Cell Proportion Analysis Pipeline for COVID-19 Dataset
#' Dataset: Bernardes et al., 2020 (PMID: 33296687)
#' Description: Analysis of cell type proportions in COVID-19 patients
#' Data: FastGenomics Portal (https://beta.fastgenomics.org/datasets/detail-dataset-0b28ff50dc64451896628dfdd5198fd... |
8b5f66887f9d1342a57d917b38b1c44dd75a394cac111888da98e00d46c86e6d | R | 3,555 | 69 | ################################pre##########################
library(ChIPseeker)
#BiocManager::install("TxDb.Mmusculus.UCSC.mm9.knownGene")
#library(TxDb.Mmusculus.UCSC.mm10.knownGene)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
library(clusterProfiler)
library(stringr)
library(reshape2)
library(ggplot2)
library(ggpubr... |
bc5dfba160d8d5066ec7531dd34eb85fbdfe40942dd35e084df1927ba9149973 | R | 3,562 | 87 |
paths <- list("Y:\\livneh\\yoavlivn\\YoavLivneh\\2p_data\\yoav\\2p_data_7\\IC71\\190903_IC71\\190903_IC71_run1\\IC71_190903_001.mat2",
"Y:\\livneh\\yoavlivn\\YoavLivneh\\2p_data\\yoav\\2p_data_7\\IC71\\190903_IC71\\190903_IC71_run2\\IC71_190903_002.mat2",
"Y:\\livneh\\yoavlivn\\YoavLivneh\... |
98b93a90c32bd90249c3869d9d049c402e01dd004c8e8344ef955ec5d1af4837 | R | 3,580 | 117 | library(Seurat)
library(cowplot)
library(SCFunctionsV3)
library(dplyr)
library(tidyr)
library(stringr)
library(tidyverse)
library(DoubletFinder)
library(pheatmap)
print("QC ...")
# Functions
### 1) how many cells
howManyCells <- function(sObj){dim(sObj)[2]}
### 2) pre doublet filtering
preDoublets <- function(seuratOb... |
1836f784ea78856a77b3494e4e1492448e4c1c9c12ad073b421da7251aa6b390 | R | 3,599 | 106 | # Global options of edgeCounter package, used by various functions
# The following aspects are considered currently:
# parallel computation support (by PSOCK cluster)
# `parallel` - BOOLEAN
# `PSOCK.names` - integer or character, see `parallel::makeCluster`
# The package always stop PSOCK cluste... |
5dd9f26cc0a5ef845d586de67bb97268e7b891a6659ac57ce6500d772bc9b22a | R | 3,603 | 48 | ################################################################################################
################################################################################################
#Plots
################################################################################################
######################... |
6dffc773f37aa0f7bd1fb37f544260d4b3d6750017626b8f8499806627010e22 | R | 3,628 | 51 |
#################
### Load data ###
#################
rm(list=setdiff(ls(),c('params','grp','treatment','injection.site')))
print(grp)
print(treatment)
basedir <- params$basedir
setwd(basedir)
savedir <- paste(params$opdir,'diffmodel/bidirectional/',paste0(injection.site,collapse='-'),'_independentfit/',sep='')
dir.c... |
a2a2f985fe1ace12a8e282f55b6c22bb271b0fa492fc92e5fe2e2b26e1bf912a | R | 3,631 | 82 | #=============================================================================
#mr.R
#date: 2023-10-13
#by: Judy Wang
#Purpose: upload for SDATA
#=============================================================================
library(TwoSampleMR)
library(dplyr)
library(data.table)
#===================================... |
e57b7c1cf0a02141355f522a21e6315e540b2c5b92a518bfc488342602f1bde4 | R | 3,634 | 94 | ---
title: "Comparing task performance as a function of task-anchored vs task-independent firing"
author: "Harry Clark"
date: "04/04/2023"
output: html_document
---
```{r}
library(sjPlot)
library(lme4)
```
# subset the data acccording to trial type
```{r}
spatial_firing <- readRDS(file="all_cells_for_R_longform.Rda"... |
0e571479bff54f6fed52000bf354e0a12977e0422b66ca3e8147c762539f44c2 | R | 3,635 | 66 | #!/usr/bin/env Rscript
# Libraries
library(Seurat)
library(argparse)
library(ggplot2)
# Create a parser
parser <- ArgumentParser("Parameters for HTODemux")
parser$add_argument("--seuratObject", help = "Seurat object. Assumes that the hash tag oligo (HTO) data has been added and normalized.")
parser$add_argument("--qua... |
28c4e7fd6379a26ee1d7c976cda1bc4622d78031e5f3424ee001581e690f33a8 | R | 3,642 | 64 | #' multimodel_count_regression()
#'
#' Multimodel Count Regression
#'
#' This function performs multimodel count regression analysis.
#'
#' @param outcomes_interest A character vector specifying the outcomes of interest.
#' @param models A character vector specifying the models to be fitted.
#' @param plot_density A lo... |
5559e8c65341e28a5ca99c42a190abbb2a6c8a831fa8fdc052244aee78ba437a | R | 3,645 | 116 |
# combining briscoe list and our data
library(htmlwidgets)
D9RA <- readRDS("C:/Users/EHeinrichs/R code/separate-analysis/subRA.rds")
D9BMP <- readRDS("C:/Users/EHeinrichs/R code/separate-analysis/subBMP.rds")
all.list <- c(D9RA, D9BMP, briscoe.list)
all.list <- lapply(X = all.list, FUN = SCTransform)
... |
70b4db0b4426a8e235cd3f68cc0fbe8f215a0e158cee9bbcf7020214c77d25ce | R | 3,649 | 134 | ResiliencyGeneticDistance <- function(ReadsTable, RDoutputname, GDoutputname) {
ReadsTable <- read.csv(ReadsTable, row.names = 1)
SampleNames <<- colnames(ReadsTable)
TableOfComparisons <- data.frame(vector1 = rep(SampleNames,length(SampleNames)), vector2 = rep(SampleNames, each = length(SampleNames)))
getr... |
52b1318ef9be3f73272153b2d081b9816c843a7a62d4b7b7b90b0a60f7931dda | R | 3,657 | 90 | library(cisTopic)
library(Signac)
library(Seurat)
library(tidyverse)
library(arrow)
#https://htmlpreview.github.io/?https://github.com/aertslab/cisTopic/blob/master/vignettes/WarpLDA_CompleteAnalysis.html
## read in processed signac data
sObj_ATAC <- readRDS("../rObjects/sObj_with_motifs_fp_rpc.rds")
sObj_ATAC$Cell... |
c6585f0560a414daea3ed2232a160b7f1d1445b7564ac1bef6d4a68110d3c0a8 | R | 3,679 | 57 | # Set directory to source file loaction
setwd(paste0(figureDirectory, "Figure1-Stability-Dendrogram" ) )
library(RColorBrewer)
library(stringr)
library(pvclust)
library(dendextend)
load(file = "valuesManhD2PV.RData")
patientColorManhD2 <- valuesManhD2PV$hclust$labels[valuesManhD2PV$hclust$order]
patientColorManhD2[... |
b637a39649ee1779c5695a5dc5b9daea89bc8792ae88cfa586fddccc2c54b5ef | R | 3,684 | 95 | ---
title: "Comparing task performance as a function of task-anchored vs task-independent firing using the ensemble classification method"
author: "Harry Clark"
date: "04/04/2023"
output: html_document
---
```{r}
library(sjPlot)
library(lme4)
```
# subset the data acccording to trial type
```{r}
spatial_firing <- re... |
a954813805952d59ae12ae386a8adf866c629761ebbb456380da46151e7d3b06 | R | 3,691 | 123 | #!/usr/bin/env Rscript
################################################
################################################
## USE PARAMETERS FROM NEXTFLOW ##
################################################
################################################
# cast parameters from nextflow
rna_matrix <- '$rn... |
28f2e41652bb32963a3d5cd1d2354b5461a0f2763894691a8b1ea5ff4df4e2f3 | R | 3,699 | 99 | # Set up environment
setwd("/path/h2")
library(data.table)
library(ggplot2)
library(ggridges)
options(bitmapType="cairo")
# Load data
data = fread("summary_schaefer.txt")
# Threshold diffusion elbow
NF_excl = paste0("NF_PCs",c(88:1000))
N0_excl = paste0("N0_PCs",c(66:1000))
ND_excl = paste0("ND_PCs",c(125:1000))
dat... |
5b4669b567a128b05c5327938f355427e9f8957b9b868abf62a0a579918e9fe1 | R | 3,706 | 97 |
suppressPackageStartupMessages({
library(Seurat)
library(stringr)
library(sctransform)
library(future)
require(scales)
library(RColorBrewer)
library("readxl")
library(dplyr)
library(dendextend)
})
### figure 1 + figure supplements
# import all_nuclei dataset.
sobj <- readRDS("/path/to/dir/allnuc.rd... |
6b33c64127a2226efed9b1c8edb3deaf929e396ee6eb89733475757958433374 | R | 3,722 | 67 | ## Prepare FUMA GSEA results as input for EnrichmentMap in Cytoscape (inspired by code from ActivePathways)
library(ActivePathways)
library(data.table)
library(dplyr)
###################
## Load FUMA output
###################
crossmodality = fread("/path/crossmodality/FUMA_gene2func86752/GS.txt",data.table=F)
diffusi... |
93dd5c6a8de761647a08524033027b32eddc9ef8ad0d7efa1cf8e35a693ddb95 | R | 3,732 | 77 | #' Calculate and store gene rankings for a single-cell dataset
#'
#' Given a gene vs. cell matrix, calculates the rankings of expression for all
#' genes in each cell.
#'
#' While \code{\link{ScoreSignatures_UCell}} can be used 'on the fly' to
#' evaluate signatures in a query dataset, it requires recalculating gene
... |
19a9c41322e311cc72a0724cbe6da1e7b11b3363be230e9a47df3c24ab87ac40 | R | 3,774 | 80 | # Scoring semantics of ScoreSignatures_UCell / u_stat. The graded matrix has
# no ties, so the expected scores below are exact rather than approximate.
test_that("UCell scores follow the normalized U statistic", {
m <- make_graded(nfeat = 50)
# maxRank is capped at nrow(m), so the top 5 genes hold ranks 1:5 and re... |
444704f37edb6f59be8750959f270d8bf74e2848f049bc5187fdd80f0f565bef | R | 3,795 | 60 | # Independent base-R checks of cumulative totals, moving windows, IQR scaling,
# coefficient intervals, cross-year population weighting and outcome transforms.
args <- commandArgs(trailingOnly=TRUE)
root <- if(length(args)) args[1] else 'Quantitative/Midlands_Public_Exposure'
read <- function(f) read.csv(file.path(root... |
95d5a7df0e636a38f90c7088b80b422ee96c248ff26696f8ab60c7f052222079 | R | 3,806 | 91 | #' Smooth signature scores by kNN
#'
#' This function performs smoothing of single-cell scores by weighted
#' average of the k-nearest neighbors. It can be useful to 'impute' scores by
#' neighboring cells and partially correct data sparsity. While this function
#' has been designed to smooth UCell scores, it can be ap... |
51b4af675378bfe4d3ed0e5f34a15bf7d2233e32e06ea57a263a076b677eb203 | R | 3,816 | 112 | # Main functions for counting edges
#' Get edges of BAM alignment reads
#'
#' @description
#' `bamEdges()` reads a BAM file and returns the 5' AND 3' ends of EACH
#' paired-end read PAIR as a `GRanges` object.
#'
#' @param bam.path Path to the BAM file. The BAM file is presumed to contain
#' read PAIRs.
#' @returns A ... |
efb11148637554cb3c5a8924c90ff8163dc5d8e3e7a5c383f31112b48cfab9a1 | R | 3,827 | 61 | # File for additional heatmap generation
# previous object analysis file was getting crowded
# Trajectories
# dI1 = 20, 25, 4, 0
# dI2 = 23, 27, 9, 21, 15
# dI3 = 23, 17, 27, 11
# dI4 = 23, 17, 18, 7
# dI5 = 26, 19, 10, 11
# dI6 is in cluster 8
# Getting top 10 markers from each cluster of each trajectory... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.