sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
a47a894b36b4581ddc2b76e1759211ca59fbdcdc175b2fc247807e4ac127d3c6
R
5,342
116
### Nightingale Rose Plots of NHP feature importance by epitope and feature type dictionary <- read.csv(file = "/Users/kpullen/autoencoder/serology_feature_dictionary.csv",header= TRUE) scores <- read.csv(file = "/Users/kpullen/autoencoder/importance_Primates2Humans_protection_merged.csv",header= TRUE) all<-merge(dict...
f3aa8f6f7cd3f2c49c01a408f5f8793ecf72af465b692198e8b2531119150f01
R
5,352
150
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(data.table) library(RColorBrewer) library(rcartocolor) library(ggsci) ## stats library(SeuratDisk) library(tidymodels) library(broom) library(broom.mixed) library(lme4) library(lmerTest) library(swfdr) ss <- function(...
979958390b3ec63193bf70dc5cc5b526b65d43b220a32e066264f437fd617250
R
5,355
113
#' Function for mapping query cells to a Symphony reference #' #' @param exp_query Query gene expression (genes by cells) #' @param metadata_query Query metadata (cells by attributes) #' @param ref_obj Reference object as returned by Symphony buildReference() #' @param vars Query batch variable(s) to integrate over (co...
a6427eca571c9ec0335029f0d3b29cb57b17e7675d789eb530e4a7fcbd489bde
R
5,359
128
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) ## main Seurat package snRNA-seq pacakges library(Seurat) library(SeuratDisk) library(future) ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } options(stringsAsFactors ...
de6357d3d75c7e342d5c3bac9b84f6ef49a8c3bfb3358ac6f28821921bf5fa24
R
5,361
170
# save all the critical meta data into one file # can be shard with the community # and used for figures generation library(tidyverse) library(Seurat) options(Seurat.object.assay.version = "v5") library(SeuratObject) library(stringr) library(purrr) # support R new feature in 4.2 Sys.setenv("_R_USE_PIPEBIND_" = TRUE) ...
47841ba4d4b370ef85685612c748af81b2696a3fb61ee8da393965fa64d9d819
R
5,387
123
#' Plots vaf distribution of genes #' @description Plots vaf distribution of genes as a boxplot. Each dot in the jitter is a variant. #' #' @param maf an \code{\link{MAF}} object generated by \code{\link{read.maf}} #' @param vafCol manually specify column name for vafs. Default looks for column 't_vaf' #' @param genes ...
2a0a6f34b62a708d16cd554cb6f4f2a2e5bdb33f7127b30e2de016998a5091e6
R
5,391
115
ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } options(stringsAsFactors = F) ## packages for data table processing/plotting library(data.table) library(tidyverse) library(RRHO2) library(here) DATADIR='/projects/pfenninggroup/singleCell/McLean_chronic_opioid_m...
a1b41af6ae52a43c34e898b01a3da6a817d2a7c647bb2eac6e9acbdd7d5819e1
R
5,394
131
###MainClusterWhitfild library('igraph') library('biomaRt') library('neat') library('Oscope') load('~/Manchester/Alexis/Oscope++/OscopeRcode/casestudy/WhitfieldStandardOscope/StandardOscope.RData') #mypath='/home/luisa/Manchester/Alexis/Oscope++/' mypath='~/Manchester/Alexis/Oscope++/' source(paste(mypath,'OscopeRcode...
5f57e381193ea25ccd497e3da5ae9ad2f956a9c98289ccfc2de23b8db7f62ef8
R
5,398
103
rm(list=ls()) logOddsdir <- "~/Dropbox (Gladstone)/YH_MN02/seurat_analysis_no_S521G/04_log_odds_histopathology_calculation/" logOdds_astro_dir <- "~/Dropbox (Gladstone)/YH_MN02/seurat_analysis_no_S521G/10_subclusters_log_odds_histopathology_calculation/" logOdds_micro_dir <- "~/Dropbox (Gladstone)/YH_MN02/seurat_analys...
dfcdccc6ffcde1ef7ba97b90e73d000db5598ff6f14930b8f7c4dcb7fc767f69
R
5,401
129
source("src/lib/Genome.R") SampleInfo <- read.csv("data/SampleInfo.csv", as.is = TRUE, check.names = FALSE) rownames(SampleInfo) <- sampleIDs <- SampleInfo[, "SampleID"] qualOutInPairs <- c( "Aread5End", "AreadAndFrag", "AbothFrag", "Bread5End", "BreadAndFrag", "BbothFrag", "Cmate5End", "CmateReadAndFra...
ef07658fa56a174740eb364c5c27260cc9e283feb1c0c3d53c7ab8fadbde3faf
R
5,405
114
main_f<- '/home/hpc/bonev/projects/ram/results/hg38/hic/' main_dir<-'/home/hpc/bonev/projects/ram/' genome <- 'hg38' chrom_sizes_f <- '/home/hpc/bonev/annotations/hg38/encode/hg38.chrom.sizes' map3c_f <- "/home/hpc/bonev/software/hicpipe/" cells <- c('3DRAM_D45_Pax6', '3DRAM_D45_Tbr2') bowtieInd <- "/home/hpc/bonev/an...
313a5b37ab843cceea15ea376f656328d7df412d1e0b622e6864bd1a3cac90a3
R
5,410
199
#PrepareSpatial: #This script loads each well of the spatial samples, alongside the metadata giving spatial position. #It compiles everything into a seurat object ready to be integrated togather in a subsequent script. args <- commandArgs(TRUE) path<-args[1] file<-args[2] #---- Load Libraries --------------------...
a0c35c3ed9ce62d4043326d52caf5d19b0c0035fcf7cd83a9507b7e4e19c8d6d
R
5,411
178
--- title: "NESC_nonPolar_mets_analysis_Final" author: "Alise" date: "2020 M03 14" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} setwd("Z:/16-Our Papers/In Preparation/IPD_metabolism _ Alise/Figures/Figure1/originals/Non-Polar_mets") getwd() metdata <- read.csv(...
dd102d6bfc3b7cc2034339bc37e376080bc05ee1959e0256f5cc06d9dc644e27
R
5,415
119
#' Plots decomposed mutational signatures #' #' @description Takes results from \code{\link{extractSignatures}} and plots decomposed mutational signatures as a barplot. #' #' @param nmfRes results from \code{\link{extractSignatures}} #' @param contributions If TRUE plots contribution of signatures in each sample. #' @p...
4570ee30ff56179be5ab4b0ede83b942845a90c324e642d096d9a46a094e45b4
R
5,416
173
# add new samples setwd("/nfs4/chaozhang/proj/Neuron/Aritra/merFISH/script") source("merFISH_pipeline.R") source("functions.R") merFISH_Behavior = merFISH_pipeline("../data/20221001_PFCL1_Results_BEHAVIOR-NOT PAIN/", "Behavior") merFISH_pain10 = merFISH_pipeline("../data/20221012_PFCL1_Results/", "Pain10") merFISH_pa...
e7cdf32fa30c45158a3cfd632264f3f8408b170e88d3f032cb32423d1efea97d
R
5,423
118
#' Segment and plot log ratio values with DNACopy #' @description The function takes logR file generated by \code{\link{prepAscat}} or \code{\link{prepAscat_t}} and performs segmentation with \code{\link{DNAcopy}} #' @param tumor_logR logR.txt file generated by \code{\link{prepAscat}} or \code{\link{prepAscat_t}} #' @p...
84096625ede44dfd84a759670c7113b9dc1740c13bce6f78091957cfa0f8ebeb
R
5,426
214
##################################### # LC project # Script for deconvolution of ST data # Lukas Weber, Apr 2022 ##################################### # module load conda_R/4.1.x # Rscript filename.R # file location: # /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/ library(SpatialExperiment) library(SingleCellE...
ea8891d3ab7b93290b8492a8bc11dc2554d65ddd06810ced9a765bdf019a8698
R
5,441
102
rm(list=ls()) logOddsdir <- "~/Dropbox (Gladstone)/YH_MN02/seurat_analysis_no_S521G/04_log_odds_histopathology_calculation/" logOdds_astro_dir <- "~/Dropbox (Gladstone)/YH_MN02/seurat_analysis_no_S521G/10_subclusters_log_odds_histopathology_calculation/" logOdds_micro_dir <- "~/Dropbox (Gladstone)/YH_MN02/seurat_analys...
d23b73981315d525fa85e32e01963a0d4b580505145812ccc8e0f364949dce3b
R
5,456
155
library(phytools) library(evomap) library(ape) library(geiger) library(ggplot2) library(nlme) library(stats) library(DescTools) library(GGally) library(caper) library(smplot2) setwd("your directory") ##Import tree and data mammals<-read.table("final_compilation with percentage values.R1.csv",header=T...
e7d3c7a68c78f6bd0c4ff4607eee773cce0433ec4c2dc6c4a35001e927464d88
R
5,457
179
library(SnapATAC) library(rjson) library(optparse) library(pureRUtils) op <- list( make_option(c("--config"), type = "character", default = "config.json"), make_option(c("--group"), type = "character", default = "NA") ) args <- parse_args(OptionParser(option_list = op)) pureRUtils::checkArgsExistOrStop(args) pur...
2a45654bc55068fd8b9ce0f76cd3cc432d998000823863c5eff177ceacd22256
R
5,461
196
#' @title Center a matrix column-wise #' @description Center a matrix column-wise #' @param m a matrix or Matrix #' @param by either "mean", "median" or a numeric vector of length equal to the number of columns of ‘m’. Default: "mean" #' @return column-centered matrix #' @rdname colcenter #' @export colcenter = func...
b9593487bd9bd1811e5b0fce4f9c8b9e30b4c0a248098b9db4b95372402f6eb2
R
5,466
145
library(data.table) library(GenomicRanges) library(rtracklayer) library(Matrix) library(foreach) #library(doParallel) #registerDoParallel(cl = 4) PREFIX = commandArgs(T)[1] RESOL=as.numeric(commandArgs(T)[2]) WINDOW_SIZE= as.numeric(commandArgs(T)[3]) REF = commandArgs(T)[4] WD = commandArgs(T)[5] option...
108028a1c9599e6624acd6c44136f9ccf564a6018a24b007fdf89a952128e0c8
R
5,468
219
# This code is to plot the Fig 5 # WANG. 04-April-2024 # Remove all objects created before to prevent clash rm(list = ls()) library(dplyr) library(ggseg) library(ggplot2) library(tidyr) library(patchwork) library(readr) library(reshape2) library(stringr) # Set the working directory to the path where your files are...
cf918a73292e8724e58ac0ed913c0607f7d47370eadfaf301ef54cda0ab110e0
R
5,474
127
source("src/lib/Genome.R") ## Load genomic feature data EnsFeatures <- readRDS("data/GenomicFeatures/EnsFeatures.RDS") EnsFlanksByGene <- readRDS("data/GenomicFeatures/EnsFlanksByGene.RDS") ## Load sample grouping data SampleInfo <- read.csv("data/SampleInfo.csv", as.is = TRUE, check.names = FALSE) rownames(SampleInf...
6411a9529d53618beca57058a1c405ad2f47638c0d48c00b06f37ac6fc6e4650
R
5,478
134
#' Display protein domains #' @param gene HGNC symbol for which protein structure to be drawn. #' @param refSeqID RefSeq transcript identifier for \code{gene} if known. #' @param proteinID RefSeq protein identifier for \code{gene} if known. #' @param domainAlpha Default 1 #' @param showLegend Default TRUE #' @param bgB...
2ba4349a2879b2bc2c6e525d091e19b214d644530681ff096a061632df004c00
R
5,490
175
# This code is to plot Fig. S5 # WANG. 03-April-2024 # Remove all objects created before to prevent clash rm(list = ls()) library(dplyr) library(ggplot2) library(reshape2) library(patchwork) library(RColorBrewer) # Set the working directory to the path where your files are located setwd("/Users/wang/Desktop/Resear...
073afdb2d305318e63c18f50c08eb388a234bbe9e08b388af894fe863c6a95b0
R
5,494
135
# Libraries snapshot <- "/lab-share/RC-Data-Science-e2/Public/DST_software/pipeline_R_snapshot/r4.1-20220803-bch-dst-v1/" .libPaths(snapshot) library(velocyto.R) library(Seurat) library(dplyr) library(ggplot2) # Setting WD setwd('/lab-share/RC-Data-Science-e2/Public/Daniel/p147-scRNAseq-Koehler') # Loading Seurat Obj...
4a88a61cd85b44324519fffa592396f8775017cf5b7fe2929b282614ff1afc85
R
5,496
115
#' Estimate Tumor Mutation Burden #' @description Estimates Tumor Mutation Burden in terms of per megabases #' @param maf maf \code{\link{MAF}} object #' @param captureRegions capture regions. Default NULL. If provided sub-sets variants within the capture regions for TMB estimation. #' Can be a data.frame or a tsv with...
54fae7fff8fe0f95c9d3e715121e2c0341eecc9026698c2678a0334b416b49b6
R
5,498
134
# Libraries snapshot <- "/lab-share/RC-Data-Science-e2/Public/DST_software/pipeline_R_snapshot/r4.1-20220803-bch-dst-v1/" .libPaths(snapshot) library(velocyto.R) library(Seurat) library(dplyr) library(ggplot2) # Setting WD setwd('/lab-share/RC-Data-Science-e2/Public/Daniel/p147-scRNAseq-Koehler') # Loading Seurat Obj...
967401a79c7bc4d7d7841b2fcb6115f1acbdd0a4a478aa1915b0f39d380ebf31
R
5,505
130
summarizeGistic = function(gistic){ nGenes = nrow(gistic[,.N,Hugo_Symbol]) tsb = gistic[,.N, Tumor_Sample_Barcode] colnames(tsb)[2] = 'CNV' tsb = tsb[order(tsb$CNV, decreasing = TRUE),] vc = gistic[,.N, .(Tumor_Sample_Barcode, Variant_Classification )] vc.cast = data.table::dcast(data = vc, formula = Tum...
e1fde45ce08ae0d39ea4c88bf97dedc22e118b02ad4bb67862a1f4a4a91c64bd
R
5,508
145
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #' Euclidean distance between two points. #' @param a A point. #' @param b A point. #' @return The distance between two points. #' @noRd NULL #' Squared Euclidean distance between two points. ...
d76cd694d494a0bb45b13d9354fdaf89b10ecd567f8e5f1f627cd12eed21f137
R
5,512
139
--- title: "Tissue and cell type specificity analysis" author: "Amy Hicks" date: "29/09/2022" output: html_document: code_folding: hide highlight: kate df_print: paged toc: true toc_float: true --- ```{r setup, include=FALSE} library(DT) library(readxl) library(ggplot2) library(ggpubr) library(t...
e46ba5eadd2821accecf93718a4479f8a4585278f4c8da11cb0f13bbfab328c3
R
5,528
116
## packages for data table processing library(tidyverse) library(data.table) library(here) ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } options(stringsAsFactors = F) options(repr.plot.width=11, repr.plot.height=8.5) DATADIR='data/tidy_data/compare_to_Alzhe...
06b9820bebefbe41e81e2b09e64a12bada182bb99e80adc90ffc00f15c33d6e5
R
5,531
110
#!/usr/bin/env perl ## Youtao Lu <luyoutao@sas.upenn.edu> ## Copyright (c) 2017-2022, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania ## Copyright (c) 2017-2022, James Eberwine, Perelman School of Medicine, University of Pennsylvania ## All Rights Reserved. ## This Source Code Form is sub...
aed5c53a3c1515dfe4f8af6e76146026ab1a407ff56fe8781b1c686e7a1de277
R
5,545
174
# This code is to plot Fig.s8 # WANG. 03-April-2024 # Remove all objects created before to prevent clash rm(list = ls()) library(dplyr) library(ggplot2) library(reshape2) library(patchwork) library(RColorBrewer) # Set the working directory to the path where your files are located setwd("/Users/wang/Desktop/Researc...
d5039b6aa97a1759fed0dc26059738eefdf88a07dd59f6582669d15437ec240b
R
5,559
103
GO_treeplots = function(GOframe, path){ require(rrvgo) require(org.Dm.eg.db) require(treemap) require(grid) require(GOSemSim) require(RColorBrewer) #create similarity matrices in parent environment if necessary if(!exists("BPsim")){BPsim <<- GOSemSim::godata(org.Dm.eg.db, ont="BP")} if(!exists("...
89ae033a032346755af99994d5cb92eccfb3da52503447fa3467d05d305fb7aa
R
5,564
148
#' Identify sample swaps and similarities #' @description Given a list BAM files, the function genotypes known SNPs and identifies potentially related samples. For the source of SNPs, see reference #' @param bams Input bam files. Required. #' @param build reference genome build. Default "hg19". Can be hg19 or hg38 #' @...
0c1e9c7b681fa501a08f004db5459cdbe3dd1ef38feab5f79fd391174109d730
R
5,566
106
#'Prepare input files for ASCAT #' @description Function takes the output from \code{\link{gtMarkers}} and generates `logR` and `BAF` files required for ASCAT analysis. #' @details The function will filter SNPs with low coverage (default <15), estimate BAF, logR, and generates the input files for ASCAT. Alternatively, ...
11eda1645d46f38747eac169ec17fe9b0484b48e397fea399affc0ef7ddc2056
R
5,566
162
library(Seurat) options(Seurat.object.assay.version = "v5") library(SeuratObject) library(Matrix) projdir <- here::here() workdir <- file.path(projdir, "04.cCREgene/sa2.cicero") packdir <- file.path(here::here(), "package", "R") import::from(.from = "cembav2env.R", .directory = packdir, cembav2env, Sa2PeakCalling, ...
7eecfc60a445064ee63df2a3dabd2468581394b46c834ddddfff141fb4631a41
R
5,578
140
#!/bin/env Rscript args = commandArgs(trailingOnly=TRUE) main_f <- as.character(args[7]) source(paste0(main_f,'config.R')) construct.grid = function(interv1,interv2,min_dist,max_dist){ return(ddply(interv1, .(chrom), function(i1) { i2 = interv2[as.character(interv2$chrom) == as.character(i1$chrom[1]),] if (nrow(i...
1629912b0e3c3063359afa7265ef85b454cdb28562b23d92d77ef6bb722e2cff
R
5,585
161
--- title: "Figure 2 barplot" author: "Hao Huang" date: '2022-09-08' output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Load ## load packages ```{r} suppressPackageStartupMessages({ library(SingleCellExperiment) library(Seurat) library(caret) library(kknn) lib...
cf4852f49f4f34d2812af43b51e0ec5ef1f61bbb60b961abf90061c0549043fe
R
5,588
124
##setwd to the folder containing the dataset ##composer:HoangAnhLeP ##Institute: Brain Health Lab - International University, Vietnam ##composingdate:19-03-2023 if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("DESeq2") library(edgeR) library(DESeq2) library...
7aec3df5f77b2ad1a3c4c993f1cef0035f83486c0c4e4a2f0f7debf53bea420a
R
5,619
187
#' @name trainNMF #' @rdname trainNMF #' @title train NMF model #' #' @aliases trainNMF #' #' @description This is the training function used by SPOTLight. This function #' takes in single cell expression data, trains the model and learns topic #' profiles for each cell type #' #' @param x single-cell dataset. Ca...
3e0c8268a7c3b617825fa8dfb470532db6813a9186f2bd8d3f6c5bcbbc055af9
R
5,626
165
## Youtao Lu <luyoutao@sas.upenn.edu> ## Copyright (c) 2017-2022, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania ## Copyright (c) 2017-2022, James Eberwine, Perelman School of Medicine, University of Pennsylvania ## All Rights Reserved. ## This Source Code Form is subject to the terms of...
18990acbfdfd5326d67c57b0a7ac4d2915efe4ad15f70b83f32ba6b18857ccd8
R
5,637
139
################################################################ # Generate Figure 3e, Supplementary Figure 25, and # Corresponding Supplementary Figures 26-33 ################################################################ library(ggplot2) library(scales) library(ggpubr) library(clusterProfiler) library(openxlsx) li...
85cc404d55aa311144fe62c8fb6476ae82eae4daf53a4004e84c9452fbcddd81
R
5,637
166
## Author: Youtao Lu <luyoutao@sas.upenn.edu> ## Copyright (c) 2017-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania ## Copyright (c) 2017-2023, James Eberwine, Perelman School of Medicine, University of Pennsylvania ## All Rights Reserved. ## This Source Code Form is subject to the...
c8ddbf4153fe8e8b4f7bee2b21e57c8709b8e3e4f221c730fd14a9e9832cee57
R
5,637
139
################################################################ # Generate Figure 3D, Supplementary Figure 25, and # Corresponding Supplementary Figures 26-33 ################################################################ library(ggplot2) library(scales) library(ggpubr) library(clusterProfiler) library(openxlsx) li...
d93ef6ad40a408696ae7d2d7ce90f69c8953771b0a0b5128763922bcd95bc1e2
R
5,639
145
library(ggplot2) library(data.table) library(cowplot) library(scales) packdir <- file.path(here::here(), "package", "R") import::from(.from = "cembav2env.R", .directory = packdir, cembav2env) import::from(.from = "annot.R", .directory = packdir, getSubclassMeta.ordered, mapAllenSubclassTomCGSubclass2) import::from(...
b9f74f083e9faeec8655896bd7c51872bc4ede933a177b0e1e6bb1b7118cbb44
R
5,649
145
setwd(file.path(path.expand(dirname("~")), "Downloads")) library(tidyverse) library(lme4) library(car) library(zoo) library(ggplot2) library(qqplotr) library(patchwork) library(interactions) library(effects) library(MuMIn) # for effect size library(sjPlot) library(dplyr) library(performance) library(lmtest) library(ast...
6465fd9b9cb824a5f0b8bf1f4cb6a2483febdabb86ac9bfd9a8fcc947b7614f2
R
5,651
153
#----------------------------------------------- # LICENSE #----------------------------------------------- # Copyright 2019 Novartis Institutes for BioMedical Research Inc. # Licensed under the GNU General Public License, Version 3 (the "License"); # you may not use this file except in compliance with ...
dfa80d48e8fffde121afdd58303da8824464be163806571346c1d4e2bcc5b0fa
R
5,660
154
#' Function to find variable genes using mean variance relationship method #' #' @importFrom methods as #' @importFrom stats loess median na.omit quantile #' @importFrom rlang .data #' #' @param X expression matrix #' @param groups vector of groups #' @param min_expr min expression cutoff #' @param max_expr max expres...
aa55ae11ad25ead42f6bbc78614a11485eade1abb062d17776dc22727f857a59
R
5,672
175
# This code is to plot Fig. S3 # WANG. 03-April-2024 # Remove all objects created before to prevent clash rm(list = ls()) library(dplyr) library(ggplot2) library(reshape2) library(patchwork) library(RColorBrewer) # Set the working directory to the path where your files are located setwd("/Users/wang/Desktop/Resear...
f79361c48fe4bcde602353f57ae23987d284c1ace37e709b15bbb7501f50b663
R
5,672
159
--- title: "Figure 2 barplot" author: "Hao Huang" date: '2022-09-08' output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Load ## load packages ```{r} suppressPackageStartupMessages({ library(SingleCellExperiment) library(Seurat) library(caret) library(kknn) lib...
96d40e293a49593b9eb8bc22275a16c61075e140bdbde19c333455c03b10bbf2
R
5,674
112
--- title: "Common Variants near Functional De Novo Variants" author: "Stephen P Plassmeyer" date: "7/28/2020" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(data.table) #library(Biostrings) library(BSgenome.Hsapiens.UCSC.hg19) library(liftOver) library(stringr) librar...
47a625b8bedf1abdf4d3ec50683e42743035bf336849590a00d26ba9a06534a2
R
5,684
137
# cellchat with secreted signaling only # SCRATCH1=/mnt/g/scratch # docker run -it --rm \ # --workdir $HOME \ # -v /mnt/g/cellranger_atac_counts:$HOME/cellranger_atac_counts \ # -v /mnt/g/cellranger_multi_counts:$HOME/cellranger_multi_counts \ # -v /mnt/g/spaceranger_visium_counts:$HOME/spaceranger_visium_counts \ # -...
5301b36d0ae9373efd1e1adaf46698fe026b339dbe68d734d12b60b8a86150e2
R
5,684
134
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(rlang) library(writexl) ## main Seurat package snRNA-seq pacakges library(Seurat) library(SeuratDisk) library(future) ## main differential gene expression package library(glmGamPoi) library(SingleCellExperiment) libra...
922f9e0a380ed454e36774fd79bde13b3f06b4bc70c8f56a81ec6c58d7b8399c
R
5,693
131
#' Age distribution comparison: patients subset vs all population. #' #' Given an object of class \code{comoRbidity} the age distribution of your patients #' of interest (those that have at least one code of the ones contained in indexDiseaseCodes.txt #' file) is represent comparing with the age distribution of the y...
de609e58d2d7fac30667b16da244753cfdc113f45d9897ee875ed05da7479259
R
5,696
106
#' Rainfall plot to display hyper mutated genomic regions. #' @description Plots inter variant distance as a function of genomic locus. #' @details If `detectChangePoints`` is set to TRUE, this function will identify Kataegis loci. #' Kategis detection algorithm by Moritz Goretzky at WWU Munster, which exploits the def...
3230191350510b6c351939d64908884e1666b80206103a223dcdbde026f90ed5
R
5,699
109
#' Per-cell Confidence Score: #' Calculates the weighted Mahalanobis distance for the query cells to reference clusters. Returns a vector #' of distance scores, one per query cell. Higher distance metric indicates less confidence. #' #' @param reference Reference object as returned by Symphony buildReference() #' @para...
c6c16e3464227c2b6e5d42b17216e11e62ea5a9611ea839e1f414341aa4ffc76
R
5,704
216
#Accessory codes for FCSTrans Transformation of FCS #' Set output to 0 when input is less than cutoff value #' #' @param x input array #' @param cutoff cutoff number #' @param target target number #' ipfloor <- function (x, cutoff = 0, target = 0) { y = x if (x <= cutoff) y = target y } #' Set output to 0...
d33d85c54a2b0a7a304c7c1d3ee31d849dbb79865ae186c64632f637859f2637
R
5,710
141
## --------------------------- ## ## Script Purpose: Figure demonstrating Brain IDP and CMR IDP indirect efffect sizes ## Boxplot demonstrating how different features mediate the VRF-CF association ## ## (1) Combine both brain IDP SEM analyses and CMR IDP mediation results ## ...
d6f76e195121c8048f2183d0db6ee0b77402d769ee306e3b68f05c3d6e9dbba7
R
5,724
176
## --------------------------- ## ## Script Purpose: Figure 3 demonstrating single mediation modelling ## Geom_point plot comparing the estimated indirect effects of the mediators ## ## ## (1) Assign new column describing which latents are in which group (Heart v Brain)...
21b7f97ff0111f8ced8f8d8a0e12ab770f05d46dcaef596e3623ac164de5e761
R
5,727
120
#========================================================================= # # Copyright NumFOCUS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/license...
db894b7c09c30b8bd335d67e5765918524088d7d7bafecc87afd28ff5ac62012
R
5,727
189
library(optparse) library(Matrix) library(fitdistrplus) library(ggplot2) projdir <- here::here() sa2_subclasspeak_dir <- file.path(projdir, "supple.07.peakcalling.allinone", "sa2.subclassv3.final.peak.srt") pack_dir <- file.path(projdir, "package/R") import::from(.from = "utils.R", .directory = pack_dir, checkAr...
59f7543e7888958aacd22060eb585d2b588817424a8c590751eda81748dbf2dd
R
5,731
136
library(rsvd) normalize_data <- function (A) { # Simple convenience function to library and log normalize a matrix totalUMIPerCell <- rowSums(A); if (any(totalUMIPerCell == 0)) { toRemove <- which(totalUMIPerCell == 0) A <- A[-toRemove,] totalUMIPerCell <- totalUMIPerCell[-toRemov...
3e6e69d8ff71554cf462b205f1aaf9ef9c718a012d5f129944642964f080fd3a
R
5,745
195
# This code is to # 1. load the subcortex data # 2. calculate and plot the CV of the subcortex # 2. plot the mean, ordered mean; cv and percentage change # WANG. 04-April-2024 # Remove all objects created before to prevent clash rm(list = ls()) library(dplyr) library(ggseg) library(ggplot2) library(tidyr) library(p...
bc7812b1e34547a744e717f593ac99301b60c7db8752913ae7a727d8fe51e4fe
R
5,772
143
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(RColorBrewer) library(rcartocolor) library(ggpubr) ## main Seurat package snRNA-seq pacakges library(Seurat) library(SeuratDisk) library(future) ## AUCell object for DNA damage estimates library(AUCell) ## for plots ...
1a17c3d0b4a92d0fb5307d7f3bc6410b7281b7d4b69c23af7f86b56e194acbb4
R
5,775
124
## packages for data table processing library(tidyverse) library(igraph) library(network) library(sna) library(stringr) library(RColorBrewer) library(data.table) library(here) library(leiden) ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } options(stringsAsFac...
b1629bfb73c5258213bc347f6520f9538fb330c8fd450937d15c68371335bcab
R
5,781
146
#install.packages("ggsignif") library(ARTool) library(lawstat) library(ggplot2) library(tidyverse) library(ggsignif) library(RVAideMemoire) library(emmeans) library(rcompanion) library(psych) library(car) ###Setting of the Graph### #label lab_homo = expression(paste(italic({piezo ^ {"KO"}}))) print(l...
6a2ac08282149def705df6ea8709cda3a6735d89b8ec1f8863bb41d7e238cfa0
R
5,795
180
suppressMessages(library(Signac)) suppressMessages(library(Seurat)) library(argparse) suppressMessages(library(GenomeInfoDb)) suppressMessages(library(AnnotationHub)) suppressMessages(library(BSgenome.Rnorvegicus.UCSC.rn6)) library(rtracklayer) library(ggplot2) parser <- ArgumentParser(description = "process input arg...
55c598b2f6426edab28dba3175ea91236c1f1fbae3f909925ef1cccdbade110c
R
5,811
116
--- title: "Gene list summary" author: "Amy Hicks" date: "03/02/21" output: html_document: code_folding: hide toc: true toc_float: true df_print: paged --- ```{r setup, include=FALSE} library(tidyverse) library(biomaRt) library(readxl) library(knitr) library(here) knitr::opts_chunk$set(echo = TRUE) ``...
f01eb548467be1c7126e2049d5b88417d0ca48a2fa6b066424b9a2b886bf3cbf
R
5,812
134
#' compare two cohorts (MAF). #' @details Performs fisher test on 2x2 contigency table generated from two cohorts to find differentially mutated genes. #' #' @param m1 first \code{\link{MAF}} object #' @param m2 second \code{\link{MAF}} object #' @param m1Name optional name for first cohort #' @param m2Name optional na...
b801f14dac7bd1711a7fe87bee0d290fdf2404e078fc45a1e74cc78d00ee5b28
R
5,821
156
#' @name SPOTlight #' @title Deconvolution of mixture using single-cell data #' #' @description This is the backbone function which takes in single cell #' expression data to deconvolute spatial transcriptomics spots. #' #' @param x,y single-cell and mixture dataset, respectively. Can be a #' numeric matrix or \cod...
3e4ea34dedcc3307241227e769bca5b8b9abbd8d00f6c2c33b5db3fd1a7f8d3d
R
5,832
137
ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } options(stringsAsFactors = F) ## packages for data table processing/plotting library(tidyverse) library(rcartocolor) library(data.table) library(ggsci) library(here) library(ggvenn) # devtools::install_github("ya...
13a2f92dc825e2cfb615a494ad882d8673eff960de5dbe149c8479d877572d6b
R
5,849
219
# test association with survival outcome, on Chowell 2018 subjects # -- DePTH on Zheng 2021 pos tcrs, cor (dist_DePTH_cor) # -- Glazer 2022 on Zheng 2021 pos tcrs, cor (dist_CLAIRE_cor) # -- aa blosum62 (dist_AA) # -- DePTH on Zheng 2021, set (dist_DePTH_breadth) # -- Glazer 2022 on Zheng 2021, set (dist_CLAIRE_...
9024b924eb59946352ef898e4de33bc26b0ec95d5e06b51e0ee3459d140efd4b
R
5,855
128
#' A graphical summary of the database content. #' #' Given an object of class \code{comorbidity}, and the characters used to #' specify the sex, a figure containing 3 plots, one of the age distribution, #' another one of the age distribution and the third one with the relation #' between age and sex distribution. ...
777e86463e83191b6a3d506923b408b123e00497cf7c7895fba4b6d9cef21c60
R
5,860
116
library(tidyverse) library(cmapR) library(doFuture) # parallel: set number of workers cores <- 16 registerDoFuture() plan(multisession,workers = cores) library(doRNG) library(caret) library(ggplot2) library(corrplot) library(reshape2) ########## The whole pre-processing analysis is in the L1000 folder of the new data ...
a26e0e39095da8b48e034cdde1ddace2372895f6a9a281f827f193fcf04f260c
R
5,871
136
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(RColorBrewer) library(rcartocolor) library(ggpubr) ## statistical analyses library(tidymodels) library(lme4) library(broom.mixed) library(lmerTest) ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x,...
2ba206733ac3b07b8043f8ce579b61cddd46ff24ffe403d4af8035a3760fa64b
R
5,874
186
# dpcr validation and analysis library(ggplot2) library(dplyr) library(ggplot2) library(dplyr) library(here) df <- read.csv(here("ckd","digital_pcr","Validation run RPTEC & HEK 293T (238,110)-Quantification.csv")) %>% dplyr::filter(Well != "Average") clinical_meta <- read.xlsx(here("ckd","clinical_meta.xlsx")) sam...
8875425abef2a6665b36b389f4180c9adb8fd0200a928e19c43ff4dde4008472
R
5,880
122
library(here) library(ggplot2) ################# # genes from https://www.mdanderson.org/documents/Labs/Wood-Laboratory/human-dna-repair-genes.html dna_repair_genes <- c("AAAS","ADA","ADCY6","ADRM1","AK1","AK3","APRT", "ARL6IP1","BCAM","BCAP31","BOLA2","BRF2","BRP44", "CANT1...
7810cf6750b53cfd00aa0411ab4f54ca14657091784134d7b15b356366d50ae5
R
5,881
143
library(tidyverse) library(ggplot2) library(ggpubr) library(ggridges) library(rstatix) library(patchwork) # Load results-------- cpa_intermediate <- data.table::fread('../serology/results_intermediate_encoders/10foldvalidation_wholeModel_32dim2000ep_serology.csv') colnames(cpa_intermediate)[1] <- 'fold' # cpa_intermed...
ae599faf83bfab28a69689ea576ace3a8ddff657faceea6f26ad4f565576e04d
R
5,886
119
--- title: "Gene list summary" author: "Amy Hicks" date: "03/02/21" output: html_document: code_folding: hide toc: true toc_float: true df_print: paged --- ```{r setup, include=FALSE} library(tidyverse) library(biomaRt) library(readxl) library(knitr) library(here) knitr::opts_chunk$set(echo = TRUE) ``...
102c88b2e4af1af6a5fcbae25c22d34abfbf499778674894339fdc2e6903ac4d
R
5,901
163
--- title: "Plot evaluation" author: "Hao Huang" date: "07/07/2022" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Load ```{r} suppressPackageStartupMessages({ library(ggplot2) library(glue) library(reshape2) library(ggpubr) }) ``` ```{r} topN = 10 ``` # Set...
ae17ab02b83e5dbee1f6065659aeda38ad1927baf73d892ffc5274158c59c131
R
5,904
180
## --------------------------- ## ## Script Purpose: Figure 3 demonstrating single mediation modelling ## Geom_point plot comparing the estimated indirect effects of the mediators ## ## ## (1) Assign new column describing which latents are in which group (Heart v Brain)...
e0479fd3693a69ebcccf3ea5c137a71004228f424b49a59aee7a79971bff913f
R
5,905
253
#This script will load any/all packages required throughout the pipeline. #Not every package is used in every process, but for simplicity they are all loaded together #This is needed to stop some packages complaining Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true") options(needs.promptUser = FALSE) #-----------...
7eefc93e4a9726e1f3d824054975f81d7c02017636ad247b128f4ca38b6dd67e
R
5,914
227
--- title: "LC analyses: additional marker genes" author: "Lukas Weber" date: "`r Sys.Date()`" output: html_document: toc: true number_sections: true toc_depth: 3 toc_float: collapsed: false --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Introduction Analyses for LC...
9104564705d895b584000619793700810e25b56a2e8f54e89ae13bf9eea2cb76
R
5,917
138
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(rlang) library(writexl) ## main Seurat package snRNA-seq pacakges library(Seurat) library(SeuratDisk) library(future) ## main differential gene expression package library(glmGamPoi) library(SingleCellExperiment) libra...
72bbd654cd2ffc4069b96869e19e3c587117e97757a99cdfde817f85c6ee5c10
R
5,925
176
library(Seurat) library(symphony) snapshot <- "/lab-share/RC-Data-Science-e2/Public/DST_software/pipeline_R_snapshot/r4.1-20220803-bch-dst-v1/" .libPaths(snapshot) source('/lab-share/RC-Data-Science-e2/Public/Daniel/rFunctions.R') library(ggplot2) library(ggrepel) tpColors <- tenColors <- c('#a9d6e5', '#89c2d9', '#61a...
a801ad00dbb2fd3dba91a553f61a2479c0b42610decf558086acc5d1a7b64eee
R
5,926
114
####################################### ####fMRI metrics extraction script#### ###################################### #Project: Long-term effects of prenatal infection on the human brain: a prospective multimodal neuroimaging study (in the Generation R cohort) #Author: Anna Suleri rm(list=ls()) #clear environment ...
7d3e3316af0e966e23ab9a1130221581af16279b1d8b290fe5efd0fcd4322a77
R
5,936
172
setwd(file.path(path.expand(dirname("~")), "Downloads")) dataset.raw <- read.delim("results___2023-06-13T171710.txt", sep=",") #dataset.realtime.aug <- read.delim("realtime-cPLV.csv", sep=",") dataset <- data.frame(dataset.raw) dataset$MuPowerR <- log(dataset.raw$MuPowerR) dataset$MuPowerL <- log(dataset.raw$MuPowe...
4616ebbde1007c2fad950d33166852569939bd0e28cdf077db4b49708923869e
R
5,939
192
--- title: "Vanderbilt MENS projection - old patterns" output: html_notebook --- ```{r check_interactive} if(interactive()){ print(date()) print("This was run interactively. Please run with rmarkdown::render") }else{ print(paste0("This notebook was compiled on ", date())) } ``` ```{r load, message = F, results...
12f85e05292f4d9e23807e1840d2b0bceb4610d844dd5354b38c303b0c881e15
R
5,952
105
library(tidyverse) library(mmtable2) library(gg3D) library(ggpubr) library(gt) #library(gridExtra) style_list <- list(cell_borders(sides = "top",color = "black"), cell_borders(sides = "bottom",color = "black"), cell_text(align = "center",size = px(20))) # Supplementary table 1-4-...
91608c7f7a5d092c7133684cdd1e81445c23a0b3ab0ce434eb4d317b8135feff
R
5,958
208
################################ # LC project # Script for downstream analyses # Lukas Weber, Apr 2022 ################################ # module load conda_R/4.1.x # Rscript filename.R # file location: # /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/ library(SpatialExperiment) library(here) library(scater) libr...
db4b14711bbda56437728ff2ea5d0bb6047b011471e82962c0c0c36b30e567d7
R
5,964
135
#' @title One-bar annotation ggplot #' @description one-bar annotation ggplot #' @param X named character vector of observations and groups (names); or a dataframe with first two columns as observations and groups. #' @param title annomap title. Default: NULL #' @param x.title x axis (observations) title (e.g. 'cells'...
063e5fe87df30b681d56137537572f1d552160db5bdd58bdceac9d9e3a50c539
R
5,972
131
## packages for data table processing library(tidyverse) library(igraph) library(network) library(sna) library(stringr) library(RColorBrewer) library(data.table) library(here) library(leiden) ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } options(stringsAsFac...
d339b6b7f68e495df0c61349a56e2a936511b9856bdc75bdc04c6fe5484bd24b
R
5,973
148
#' Extract read counts from genetic markers for ASCAT analysis #' @description The function will generate tsv files `<tumor/normal>_nucleotide_counts.tsv` that can be used for downstream analysis. Note that the function will process ~900K loci from Affymetrix Genome-Wide Human SNP 6.0 Array. The process can be sped up ...
29458b713dc6a995791a7f6ade509142371fefd83f5bcf85523d77fa9173500b
R
5,976
107
#' @title Summary Statistics for Bootstrapped State Fractions #' @description Compute summary statistics for bootstrapped data #' @param bootstraps a matrix or dataframe of data values in rows by bootstrap repeats in columns #' @return dataframe with the mean and SEM across all bootstrap repeats (columns) for each row...
9f2fc640e282e9390a61ed9c2da06c8835f9b3de6569a5e89b89181f4f6fc36c
R
5,981
219
set.seed(321) # mock up some single-cell, mixture & marker data sce <- mockSC(ng = 200, nc = 10, nt = 3) spe <- mockSP(sce) mgs <- getMGS(sce) .checks <- function(res, sce) { mod <- res[[1]] mtr <- res[[2]] expect_is(res, "list") expect_is(mtr, "matrix") expect_is(mod, "list") expect_identical(...
1021c76320f3850c67d543a72a656d1ab493758f30d5686ee5365d071cc66855
R
5,982
141
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(rlang) library(writexl) ## main differential gene expression package library(SingleCellExperiment) library(limma) library(edgeR) library(swfdr) ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, spl...
15d12ab2dfadbbbf9b9384c921078bd16c0a74dbb2a042c5a4c51fb7c3c510cf
R
5,991
146
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(RColorBrewer) library(rcartocolor) library(ggpubr) library(data.table) library(fgsea) library(swfdr) library(msigdbr) ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', s...