sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
d874cdeb2ffe4912c5f0114e9f551e31ebd6ee0687b096dd9b22f56f1067fa70
R
7,535
167
#' Predict genesets associated with survival #' @param maf an \code{\link{MAF}} object generated by \code{\link{read.maf}} #' @param top If genes is \code{NULL} by default used top 20 genes #' @param genes Manual set of genes #' @param geneSetSize Default 2 #' @param minSamples minimum number of samples to be mutated t...
c6d661b5d12638f31523b2957082c131060ea1d246b86f41094b739b4b52e10e
R
7,540
233
# This code is to plot the distribution of metabolites in Sub2 # WANG. 28-April-2023 # Set the working directory to the path where your files are located setwd("/Users/wang/Desktop/Research_projects/BBSC/MRS/Output_v2_4/QuantifyResults") # install and load the raincloudplots packages # if (!require(remotes)) { # ...
6f36bcbca1207c463c4a2af423e19ae91bba0708374147c8fa41030575c12f74
R
7,558
233
# This code is to plot the distribution of metabolites in Sub1 # WANG. 28-April-2023 # Set the working directory to the path where your files are located setwd("/Users/wang/Desktop/Research_projects/BBSC/MRS/Output_v2_4/QuantifyResults") # install and load the raincloudplots packages # if (!require(remotes)) { # ...
99eb7b6dfc6afbd890e5e805f5d5e064225f8bd1fd97328928a5f0026b03fe17
R
7,576
171
#!/usr/bin/env Rscript #load required packages library(Seurat) library(dplyr) library(ggplot2) library(gridExtra) #set all directory paths basedir <- paste0("/gladstone/bioinformatics/adnetworksppg/Project_1_Huang/NK01/", "results/HMGB1_snRNA_mm10/06_seurat_analysis_batch1_batch2_merged/data") indir...
ea7002d6ea08abac2cbf690f883aa5dd9d7bafbcd6381351a587636054725fd9
R
7,587
195
# TODO: Add comment # # Author: Necla Kochan and Gokhan Karakulah ############################################################################### #' @title Stemness Score of Glioma Cells Using scATAC-seq Data #' #' @description The \code{stemness.score} function estimates the stemness index of #' each glioma cell usin...
51ec431b0e5e245bcd6847d55e9dba43225a36219ae8e929ab85edc13947b8ac
R
7,588
78
rm(list=ls()) options(stringAsfactors = FALSE) args <- commandArgs(trailingOnly = TRUE) print(args) ############################################################################################################ ############################################################################################################ #...
9b90952e155eacd09d32a987e512cc72810103d44b73a1e2e35cfb4a61195ba5
R
7,591
314
# ========================== # # 5. APOE2 stratified: NSHD # # ========================== # ## Set up ---- filepath <- "" setwd(filepath) ## Load libraries ---- library(data.table) library(dplyr) library(magrittr) library(mice) library(purrr) library(tidyr) ## Read in data ---- # Principal components pcs <- read.ta...
20bf890f43d8752bae5ccb48e836fee5f45260fc959fac0383f5cd8d14825295
R
7,599
219
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(tidymodels) library(rcartocolor) library(ggsci) ## main Seurat package snRNA-seq pacakges library(Seurat) li...
54ce18bdc71fee2ef2324f6021694b1392a3813c6c603d937e127aef3c063d68
R
7,603
203
#Integrate: #This script takes all the processed samples and merges them together. We check the name of the file for tags indcating age, separated by '_' #So 'E16' means embryonic day 16, and should be sorted earlier than 'P1' meaning postnatal day 1. If you have your own files, # tag them on the end with numbers to ...
1d98b12de7abf5e055b95c1054094144460b5fa76c9035eb832470780ad692b4
R
7,620
211
### create gene count file for each sample ### library(Rsubread) BAMs <- list.files(pattern="*.bam") # inbuilt has been changed to RefSeqGTF UCSC 2020 for (f in 1:length(BAMs)){ fc_mx <- featureCounts(BAMs[f], annot.inbuilt = "hg38", isPairedEnd = TRUE, countChimericFragments = FALSE, ...
44c4f006e9a56176e59d9ca3daf8cfde4ba7e2a03e0eb6b84e5ead62422c6943
R
7,621
154
library(tidyverse) library(here) library(Seurat) library(SeuratDisk) ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } ############################################# ## 1) format the files for GEO submission fq_fn = list.files(here('data/raw_data/fastq'), full.na...
4e81321176a5720a96a9d29f296a602569712fd028f58d5bfae7cdbf54a23d84
R
7,637
253
#!/usr/bin/env Rscript suppressPackageStartupMessages(library("argparse")) # create parser object parser <- ArgumentParser() # specify our desired options # by default ArgumentParser will add an help option parser$add_argument("-i", "--input", required = TRUE, help = "list of summit bed") parser$add_argument("-g",...
7a64b4a50f27279fbef026379286976603d89922bbae63f55827902f25d99e92
R
7,644
236
# library(S4Vectors) #' @export initAnnot <- function(cemballMeta) { cemballMeta$L1Annot <- cemballMeta$L1 cemballMeta$L2Annot <- cemballMeta$L2 cemballMeta$L3Annot <- cemballMeta$L3 return(cemballMeta) } #' @param allmeta meta from snap@metaData. #' @param l1 characters, like "NonN", "GLUT" or "GABA" #' @para...
1eb0b6467cede52379d2556d71fdb0a85bb8334a09a3a8b8009f6e4017df22c5
R
7,649
242
################################## # LC project # Downstream analyses on TH+ spots # Lukas Weber, Nov 2021 ################################## # module load conda_R/4.1.x # Rscript filename.R # file location: # /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/ library(SpatialExperiment) library(here) library(ggplot...
af10ad31c12ca01d416d4976f2681dffa9d7cd7120ba7ae374bcc5fce8d817a6
R
7,656
201
#' Draw two barplots side by side for cohort comparision. #' @details Draws two barplots side by side to display difference between two cohorts. #' @param m1 first \code{\link{MAF}} object #' @param m2 second \code{\link{MAF}} object #' @param genes genes to be drawn. Default takes top 5 mutated genes. #' @param orderB...
21aaed6b8ff05b5212b4e282726cf9b72992e41826bbe7da54edcc2a1c9d12e3
R
7,688
252
--- title: "tricycle_analysis Neuro subset" author: "Jared Slosberg" date: "4/5/2022" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} library(monocle3) library(tricycle) library(tidyverse) library(ggplot2) library(here) library(cowplot) source(here("scripts/access...
d0535fcd595ecd54e8b26a8b7bf77eaa5ff6cf9f1598c7e0039cca304c678223
R
7,726
162
####################################### #############Extra analysis############# ####################################### #Project: Long-term effects of prenatal infection on the human brain: a prospective multimodal neuroimaging study (in the Generation R cohort) #This is an extra analysis. Given our structural findi...
69358bc53d5b8f8c2d6a98770e8ff7312b000a4f0513df222810bad943e33af7
R
7,736
197
##############CHECK############## #Comparison:Control VS LPS : Update your script name and comparison here + Double check the folder you are in to aviod mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDoc...
61bea4065b59b126aa2ec9f1310432a9f79f4645fd6924cdc584567d85660815
R
7,756
244
################################################ # LC analyses: Grimm et al. (2004) rodent genes # Lukas Weber, Oct 2022 ################################################ # module load conda_R/4.2 # Rscript filename.R # file location: # /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/ library(SpatialExperiment) li...
3e79d769afa803a3743a62f6c37518d40cc0e1968099e4a85b93c8e3f5c73be7
R
7,771
203
#Visualize projections of 6mo patterns for our data, teichman atlas, vanderbilt data #pattern by dataset grid library(monocle3) library(dplyr) library(ggplot2) library(ggpubr) library(here) library(grid) library(gridExtra) library(purrr) library(viridis) source(here("scripts/accessory_functions/monocle_mods.R")) sour...
2e79022d8d6ebd884568a527be08b72b6d9824fd9d7a7598fa4e02fcf926e12c
R
7,772
197
#--------------------- based on binaomial distribution, estimate threshhold. get_threshold = function(gene_muts, gene_length){ th = which(unlist(lapply(X = 2:gene_muts, FUN = function(x) dbinom(x = x, size = gene_muts, prob = 1/gene_length) )) < 0.01)[1] return(th+1) } #-------------------- end of function. #----...
9b2cea4ea8f8d3e9e932b9b0cc5cd743bceec9b8d88194ef8b583586fde4b4c6
R
7,775
179
# make command list # then make nii list if (!require("pacman")) install.packages("pacman") pacman::p_load(sqldf) # 1) prep commands for dcm to nii conversion (requiring only a varying input file) allfiles = list.dirs(path = "/cluster/projects/p33/users/maxk/BBSC/structural", full.names = T) filesvector = data.frame(al...
fe23eea96e4efbd8be53f87daa5d569934c15bb54b3ba8de3d1078ae794f1d56
R
7,782
156
library(dplyr) library(purrr) load("cell_exp_domain.RData") load("cluster_1_2_3.RData") load("domain_elegans.RData") load("celltype.RData") load("neuronal_non neuronal_cells.RData") #get neu_list and non_neu_list from "Neurons_non neuronal_cells_heatmap.R" mean2 = function(x){ mean(x,na.rm = T) } sd2 =...
50d8768509e8a18b890ddd373264749aba7c6768477b53477857c174eccfbbb9
R
7,783
169
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(readxl) library(SingleCellExperiment) l...
d377afcd2a1b946b8f40fb5976daaaf05638cda7c544222ebbd398c097ab4fc4
R
7,785
169
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(readxl) library(SingleCellExperiment) l...
e2ce745072e3dc229391da39d67bdffaaa82351b32caa143aa43961f47e45a86
R
7,794
172
library(stats) library(purrr) library(dplyr) load("bulk_dev_RNAseq.RData") load("stress_RNAseq.RData") load("Cel_dup_N4Cel.RData") load("Single_copy_genes.RData") load("cluster_1_2_3.RData") load("domain_elegans.RData") load("sc_exp.RData") load("celltype.RData") load("L4_exp.RData") zscore = function(x){...
d182592355326b58f1785c8ab1632d5730242d09e38dc13ce3a7198960444d7f
R
7,799
220
--- title: "R Notebook" output: html_notebook --- # Set Up ```{r setup} knitr::opts_knit$set(root.dir = normalizePath("../..")) ``` # Imports ```{r} library(finalfit) library(mice) library(purrr) library(dplyr) library(lavaan) library(ggplot2) library(qwraps2) ``` # Load Data ```{r} latents = read.csv('data_derived/...
0f4f50095345983c6694789eee446afbc538443e8bc48c1aee00511405440ce1
R
7,821
191
#!/usr/bin/env/Rscript ## pipeline for pairwise alignment of two genomes using lastz, and UCSC's kent tools. ## Assumes lastz is in system path, as well as kent binaries. ## ## Input: Target and Query 2bit files ## Output: Pairwise genome alignment of known chromosomes ## lastz ## kent binaries download instructio...
6563d2022435cea4d1b4f39bf1e81dd859440fea8563906386e07b49246efbfa
R
7,830
207
##############CHECK############## #Comparison:Control VS TGFB : Update your script name and comparison here + Double check the folder you are in to avoid mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDo...
32985b7800ea8311e36094bbc6103712b29fcd29d9efc259fdf83408a74fd412
R
7,834
206
##############CHECK############## #Comparison:Control VS IL10 : Update your script name and comparison here + Double check the folder you are in to aviod mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDo...
6af6b78104fd5676269e55ff5998c79a3d2731130b80aafbd40e953e7a95208f
R
7,836
245
# this file stores DE methods operate in R # load packages suppressPackageStartupMessages({ library(SingleCellExperiment) library(Seurat) library(stringr) }) # limma-voom, adapted from https://github.com/csoneson/conquer_comparison/tree/master/scripts doLimmavoom <- function(sce, cellTypes) { # input must ...
8b74fd8a38b84b82aead7499ad2c50fc76efcff761dea682dde6906d44aa5727
R
7,837
214
################################################################################ # Neural substrates of parallel devaluation-sensitive and # devaluation-insensitive Pavlovian learning in humans # brain behavior correlations # last modified on MAY 2023 ###################...
7dce72d6cad4746c669fae5e61093398b3f6196196a0b1b1db45870c10056d7f
R
7,842
192
--- output: github_document --- <!-- README.md is generated from README.Rmd. Please edit that file --> ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", fig.align = 'right', out.width = "100%" ) ``` # Symphony <img src="man/figures/symphony_lo...
879e6457e79e848d2a31b9b8e3a92412c121b99c9da1744a7c94d8acba4ab436
R
7,845
201
#!/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...
96338e6d05add2444535778dd9aa289eaf50bb11f9b3b1704ee61a7ffa505979
R
7,845
195
#--- Small function to read segments readSegs = function(seg){ seg = suppressWarnings(data.table::fread(input = seg, sep = '\t', stringsAsFactors = FALSE, header = TRUE)) #seg$Sample = gsub(pattern = '-', replacement = '.', x = seg$Sample) #Replace chr x and y with numeric value (23 and 24) for better ordering ...
86b4e3a6c960231526f1002fb8eeb786f0a32f7a0dd735cbc462fd230a01e647
R
7,850
205
##' plotMulPhenGM ##' ##' @title Visualize gene association network graph for activated gene modules under multiple cell phenotypes ##' ##' @description For multiple cell phenotypes, the \code{plotMulPhenGM} function will display the activated gene modules for each phenotype and show the connection and status of ge...
857c825f39b8c4e5b0fd62f854793a738ecd255a58fb855f99ddf6bca1c9bd62
R
7,853
207
##############CHECK############## #Comparison:Control VS TGFB : Update your script name and comparison here + Double check the folder you are in to avoid mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDo...
9a93d3830ce6a139a66f4db3a5b62f4270360df26c276a2b8e4bb600c2ec08ff
R
7,853
208
##############CHECK############## #Comparison:Control VS IL10: Update your script name and comparison here + Double check the folder you are in to avoid mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDoc...
2996f45f8ffd796bea3fc6bf656c01b68d03e9429aad0bc3569c0ea0f9cd9a30
R
7,856
223
# Libraries snapshot <- "/lab-share/RC-Data-Science-e2/Public/DST_software/pipeline_R_snapshot/r4.1-20220803-bch-dst-v1/" .libPaths(snapshot) library(Seurat) library(dplyr) library(ggplot2) library(velocyto.R) library(velociraptor) # Setting WD setwd('/lab-share/RC-Data-Science-e2/Public/Daniel/p147-scRNAseq-Koehler'...
83e241b68ba8fb33e47b8778049d07bc2964fd3cb8a75341d178eae6f712ae0b
R
7,891
201
#!/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...
9a15cb7724fa81dbc1f3625d8c17899b6c7613b0850e37de7f387d979b74139d
R
7,893
207
##############CHECK############## #Comparison:Control VS IL10 : Update your script name and comparison here + Double check the folder you are in to avoid mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDo...
fa4b28386f29980edd8d7a2850312229c59243918195903b245cf3f80dcb3a66
R
7,902
208
##############CHECK############## #Comparison:Control VS TGFB : Update your script name and comparison here + Double check the folder you are in to avoid mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDo...
d8b8304059726f576795b7eeaaa437450e52a031bc0a39f29d04b72942d28e25
R
7,909
176
--- 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...
c24dd2af6d7b6c48b70d5f7c0fb50a756c9c18b68cdfdb6a8f46b792625b9143
R
7,917
208
##############CHECK############## #Comparison:Control VS TGFB : Update your script name and comparison here + Double check the folder you are in to avoid mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDo...
15df59ca559a23a0ada066c5fea9bdd5344513287b8318e11af4efa5c791ceec
R
7,922
208
##############CHECK############## #Comparison:Control VS IL10 : Update your script name and comparison here + Double check the folder you are in to avoid mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDo...
7f8d300aacd833e2d5b4ff077d039874ca229c1e0f27627b62fcd8d31a3a27d8
R
7,926
144
#' Plot differences between APOBEC enriched and non-APOBEC enriched samples. #' #' @description Plots differences between APOBEC enriched and non-APOBEC enriched samples #' #' @details Plots differences between APOBEC enriched and non-APOBEC enriched samples (TCW). Plot includes differences in mutations load, tCw motif...
440c9536056719f0d82aadf60ac0868eb0a43e68eafc4a99a444710643c687e8
R
7,927
170
ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } options(stringsAsFactors = F) ## packages for data table processing/plotting library(SingleCellExperiment) library(ComplexHeatmap) library(rcartocolor) library(data.table) library(tidyverse) library(ggsci) library...
d19ec91385e2e398709b88306e8d1d20334f7e3484d150417e5d569d02ccc633
R
7,931
193
# Run check-volume-conduction.R and LME_in_R.R first 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(lmerTest) anova_file ...
4eb337aaa6184427a2321258ff215fcb38f54cbb85c375c224c840c6a9311f2a
R
7,949
196
#' @rdname distance #' @title calculate spatial interlacement distance graph for cell clusters #' @name spatial_distance #' @description #' Function to calculate spatial interlacement distance graph for cell clusters, where #' we define the interlacement distance as the number of neighboring cells between two cluster #...
f45230474ac519e0a3658c3857017034ad1871c7123ecc6f3107813bbb8ce3cf
R
7,969
189
##### GeneSet enrichment analyses ##### # DEG enrichment test # # 21 aug 2016 # 15 Mar 2017 added ExpTs test # Kyoko Watanabe ####################################### DEGtest <- function(genes, allgenes, adjP.method="BH", MHC=TRUE, ensgdir, filedir){ require(data.table) load(paste(filedir, "/gtex.avg.RPKM.genes.RDa...
a341ed3fdde48c2ce9183d061dc8a126b12e2c86877bdd6f2f538b08f7503bb2
R
7,982
154
#' Performs mutational enrichment analysis for a given clinical feature. #' @description Performs pairwise and groupwise fisher exact tests to find differentially enriched genes for every factor within a clinical feature. #' #' @param maf \code{\link{MAF}} object #' @param clinicalFeature columns names from `clinical.d...
7eeb11b838fe4e892911f534edae49c781ef78bd4ca70b23ca4851bdeb7835f0
R
7,989
161
# Libraries library('scales') library('ggplot2') library('tidyr') library('viridis') library('plotly') # ----------------------------------------------------- # Variables id <- "HC10" ses <- "ses-pre" out <- "/Users/rcruces/tmp/derivatives" # Resting state path and name subject_dir <- paste0(out, "/sub-", id, "/", s...
ac8378512c2c171c4633e0d0efba4acf4fb6bf7b9c4bc1c188cbd1d1e15929ec
R
7,991
212
##############CHECK############## #Comparison:Control VS IL10 : Update your script name and comparison here + Double check the folder you are in to aviod mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDo...
9d802417e363e68d69089d0c7e8aab66c0b44720917c2c069af7814f94b8080c
R
7,999
211
##############CHECK############## #Comparison:Control VS LPS : Update your script name and comparison here + Double check the folder you are in to avoid mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDoc...
162832e253a89ac79344b5741a291532b40b298e2eff5cc49ab6e1c0b23c90d7
R
8,027
179
#' @title Plot model and Outliers #' @description Plot model and Outliers #' @param formula PARAM_DESCRIPTION #' @param data PARAM_DESCRIPTION #' @param mod PARAM_DESCRIPTION, Default: loess #' @param n.sd PARAM_DESCRIPTION, Default: 1.5 #' @param ... PARAM_DESCRIPTION #' @param selected PARAM_DESCRIPTION, Default: ...
515d0850be099e760c21b053880dcab87dce330b4d170a446f74efbcef759d51
R
8,029
153
#' Plot gistic results along linearized chromosome #' @description A genomic plot with segments highlighting signififcant Amplifications and Deletion regions. #' @param gistic an object of class \code{GISTIC} generated by \code{readGistic} #' @param fdrCutOff fdr cutoff to use. Default 0.1 #' @param markBands any cytob...
b78f93ae3551bc8bffa13a2a07970404b87a4849dbac3785ad2a5fbbfd6659f1
R
8,031
302
--- title: "Add cancer reactive gene signature information for CD4+ T cells" author: "Wei Sun" date: "`r Sys.Date()`" output: html_document: theme: journal highlight: tango toc: true toc_depth: 3 toc_float: collapsed: true smooth_scroll: false number_sections: false df_print: p...
66f395e1491bbec773d41625dabbd530223827eb23244fe78fb92d2973d7bdc0
R
8,036
212
##############CHECK############## #Comparison:Control VS LPS : Update your script name and comparison here + Double check the folder you are in to avoid mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDoc...
6e2f6adadd9019557ab756946dc1476ca360c4793bbda1cb30635b762e666c2c
R
8,058
212
##############CHECK############## #Comparison:Control VS LPS : Update your script name and comparison here + Double check the folder you are in to avoid mixing diff ex results! rm(list = ls()) dev.off() cat("\014") ##############CHECK############## setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDoc...
d8e5bb18a9bf15c8a483eebe0fac0f14df2d35775f058dc419a35eaf55f31486
R
8,066
235
#' @rdname plotSpatialScatterpie #' @name plotSpatialScatterpie #' @title Spatial scatterpie #' #' @description This function takes in the coordinates of the spots and the #' proportions of the cell types within each spot. It returns a plot where #' each spot is a piechart showing proportions of the cell type compo...
81b3667ab512a949c69ea0cc189307e0d14e08262299d1abec9015470bf999a0
R
8,068
128
source('scripts/config.R') source('scripts/aux_functions.R') source('scripts/plot_functions.R') source(paste0(main_dir,'results/mm10/hic/config.R')) source(paste0(main_f,'scripts/main_functions.R')) source(paste0(main_f,'scripts/aux_functions.R')) source(paste0(main_f,'scripts/plot_functions.R')) source(paste0(main_f,...
d5bc03fd24b5f801726f1fbd02f34054a034b67f46837acd4a75b4f7ce498486
R
8,078
172
#' Calculates the k-NN correlation, which measures how well the sorted ordering of k nearest reference #' neighbors in a gold standard embedding correlate with the ordering for the same reference cells in #' an alternative embedding (i.e. from reference mapping). #' NOTE: it is very important for the order of referenc...
9d67119e23a05b7c95faa32f0372af96406f1c840f04263696dd53942ae1316b
R
8,093
303
--- title: "iPSC-DA MPP vs basal: " author: "J Monzón Sandoval" date: 'Last update: `r date()`' output: html_document: theme: lumen toc: yes number_sections: true toc_float: collapsed: yes smooth_scroll: yes --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TR...
249d3f59457016c7a38b50d21ceb8a1aab05d02b8309d86766dd1cc96f11af68
R
8,124
203
library(lme4) library(car) library(lsmeans) sink('../../output/kinematics_stats_out.txt') df_9m_exe<-read.csv('../../data/9m/behavior_exe.csv') df_9m_exe$bi<-FALSE df_9m_exe$Fthand[df_9m_exe$Fthand=='R ']<-'R' df_9m_exe<-df_9m_exe[df_9m_exe$FTGhand=='L' | df_9m_exe$FTGhand=='R',] df_9m_exe$Age<-'9m' df_9m_exe$Subject...
dcf230a9559c384c6f59811742fdeb70b402756e64362b9b5c5883999aa2580d
R
8,125
177
--- title: "Developing Barcode Outlier Removal" author: "Stephen P Plassmeyer" date: "4/6/2020" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) source('../../code/mpra_tools/mpra_tools.r') ``` ```{r} compiled_counts <- fread('../../data/compiled_counts/asd3utr_compiled_counts_...
515844f487135f72714cb3a213efe9d8cc62e74cd96e9f3753aab81457f6223a
R
8,127
337
#This handy script is taken from https://stat.ethz.ch/pipermail/r-help/2010-November/259210.html ##### FUNCTION DEFS ##### listnames.get <- function( list.obj, do.basename=TRUE, do.name.chain=TRUE, ... ) { # VALIDATE if(!is.list(list.obj)) stop("Argument 'list.obj' must be a list.") # / #------...
a373d9a63bad3c8eb5912c83532b6f2a118f93a6cc188f20a8826d182c023055
R
8,142
263
#install.packages("rbioapi") library(rbioapi) library(utils) #READ REFERENCE GENES - full list of guppy vs medaka orthologous genes dat<- read.delim('guppy_medaka_ortho_fulllist.txt',header=FALSE) ref_genes <- unlist(dat$V1) #Read list of signif genes from Pool-seq analyses with merged reps - orthol...
832c2f4f148f496135b64780e7c3048e1873368fb9a3a72785fa498322fd62af
R
8,147
230
## LOAD PACKAGES ---------- library(Biobase) library(edgeR) library(qvalue) library(ssizeRNA) library(viridis) library(tidyverse) library(tictoc) ## BEFORE USING THIS SCRIPT ---------- # User should alter these variables as necessary # Get list of all objects for each dataset work_dir <- "G:/Annika/GitHub Repositorie...
63d7475a58cc5cd3a11490f61017748784035088ba87cf134fb84ffe7b2d8d15
R
8,152
254
library(data.table) library(purrr) library(ggplot2) library(stringr) projdir <- here::here() rdir <- file.path(projdir, "package/R") import::from( .from = "rknn.R", .directory = rdir, SingleCellGroup, GroupAnchor, initSingleCellGroup, getNeighborMat, getReciprocalPairs, sumGroupAnchor, plotSimMatLimited...
2a17f7d502219d44feeed9d6251b90b286447205bf39729a37436dbfc2b34b43
R
8,167
187
#' Clusters variants based on Variant Allele Frequencies (VAF). #' @description takes output generated by read.maf and clusters variants to infer tumor heterogeneity. This function requires VAF for clustering and density estimation. #' VAF can be on the scale 0-1 or 0-100. Optionally if copy number information is avail...
bcb99b37c2fa8e23412bd6c9f663f4b7069be292f822ef8a2434238a3951f941
R
8,197
213
get_lp_data = function(maf, geneID = NULL, AACol = NULL, refSeqID = NULL, proteinID = NULL, defaultYaxis = FALSE, verbose = TRUE){ if(is.null(geneID)){ stop('Please provide a gene name.') } #Protein domain source. gff = system.file('extdata', 'protein_domains.RDs', package = 'maftools') gff = readRDS(fi...
22d024922fe71d496ae375c65672ab2a290cee1f76ce73069fa6a600d72c3298
R
8,201
164
#' Transform metagenomic classification results of 'mpa' format to 'microtable' object. #' #' @description #' Transform the classification results of mpa (MetaPhlAn) format to microtable object, #' such as MetaPhlAn and Kraken2/Bracken results. Kraken2/Bracken results can be obtained by merge_metaphlan_tables.py from M...
df2ea238ebfd4fcf41fb31c6c86c794d234532e34bdc5b167d58b37ee814966c
R
8,241
233
--- title: "ChIPseq_datsets" author: "Amy Hicks" date: "27/04/2023" output: html_document: code_folding: hide toc: true toc_float: true df_print: paged --- ```{r setup, include=FALSE} library(biomaRt) library(tidyverse) library(ggplot2) library(GenomicRanges) library(rtracklayer) library(IRanges) lib...
90c1b922d2e0b35cf3bef69282467b12327d929bc9c3eeb05fd5ca307e160ae8
R
8,259
272
source("/local/projects-t3/idea/bherb/software/chooseR/pipeline.R") library(Seurat) library(ggplot2) `%>%` <- magrittr::`%>%` # Load Seurat object # Make sure this has already been normalised and that PCA has been performed setwd('/local/projects-t3/idea/bherb/Hypothalamus/PubRes/Rewrite') obj = readRDS('./SeuratObj...
c9e602748a277dc440d8388b0f030731f95d676634a3d65434a99707a22cd0da
R
8,267
161
#' Performs survival analysis #' @description Performs survival analysis by grouping samples from maf based on mutation status of given gene(s) or manual grouping of samples. #' @details This function takes MAF file and groups them based on mutation status associated with given gene(s) and performs survival analysis. R...
991be83df38252a2f0710331917901dc8ecac88419c482029f07c538e6918bd9
R
8,268
235
############################################################################### ## Load RDS sub-type ############################################################################### pht <- "m_m" # select the desired sub-type # pht <- "p_p" # pht <- "m_p" # pht <- "p_m" alldata.int <- readRDS(paste0("./data/sce_",pht,"...
1ab4339ffba2716ea1310e58178cd87dbfd4d10f603ba1a2dec64c5f855ca37d
R
8,276
172
#' pfam domain annotation and summarization. #' @description Summarizes amino acid positions and annotates them with pfam domain information. #' @param maf an \code{\link{MAF}} object generated by \code{\link{read.maf}} #' @param AACol manually specify column name for amino acid changes. Default looks for field 'AAChan...
03b6d3df90111b761d2cb92f0d9c19034bb6a1f63d73f2eedf0c1e3a8c668d6a
R
8,286
283
# ========================= # # 5. APOE2 stratified: UKB # # ========================= # ## Set up ---- filepath <- "" setwd(filepath) ## Load libraries ---- library(data.table) library(dplyr) library(magrittr) library(mice) library(purrr) library(tidyr) ## Read in data ---- # Principal components serology_dat_genq...
09ac989635a34185770e24d9fb20a136388922a9fe944530b76b1fa98f9f24c6
R
8,297
175
--- title: "Vgat Comparison" author: "Stephen P. Plassmeyer" date: "2/15/2022" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) source('../../../../code/mpra_tools/mpra_tools.r') library(ggpubr) library(MASS) theme_set(theme_bw(base_size = 6)) library(lawstat) li...
c4d53a4abd2702cbbcefd599211efa10eeb1d7ebb9eee204f506791e1256a5cd
R
8,316
162
#' Detect cancer driver genes based on positional clustering of variants. #' #' @description Clusters variants based on their position to detect disease causing genes. #' @details This is the re-implimentation of algorithm defined in OncodriveCLUST article. Concept is based on the fact that most of the variants in canc...
c276d384718264b755ef087f62c6c2d8d39d905a457e5f65f427568a926f6072
R
8,346
180
### LC snRNA-seq analysis ### Build SCE from raw (HDF5) matrices; perform nuclei calling ### qrsh -l bluejay (default mf=2G,h_vmem=2G,h_fsize=10G) ### Adopted from https://github.com/LieberInstitute/DLPFC_snRNAseq/blob/main/code/03_build_sce/build_basic_sce.R ### Initiated MNT 13Dec2021 library(SingleCellExperiment) l...
baed35e49b2e245e83403775f03ad5da6359ad17ca42450b2fc0112b34ae73e1
R
8,350
225
## packages for data table processing library(tidyverse) library(igraph) library(network) library(sna) library(stringr) library(data.table) library(leiden) ## this script was adapted from ## https://github.com/kowaae22/ClarkLabDocumentation/blob/main/MakeigraphFigures.R ## http://kateto.net/network-visualization ss...
9564e3e3d62b94b4e3d9117623cfdd99cf33781e05f87d3a14dabaaca56e8f71
R
8,370
238
#---Load Libraries------------------------------------------------------------------------------------------------------------------------#### library(Matrix) library(tidyverse) library(stringr) library(EWCE) library(limma) library(data.table) # 2020/03/31 - Files used in this script can be downloaded from: https://ww...
37b470b1f897eb0e31d940a36610153610419d079ee4afe21bf96d375c302c5d
R
8,378
223
# only run once for initial installation. if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("DESeq2") BiocManager::install("biomaRt") library(DESeq2) library(UpSetR) library(tidyr) library(RColorBrewer) library(pheatmap) library(biomaRt) libr...
45ffa95231da3a3853154f75ce546f17514ae66409f3dba03f1f17dd97657bfa
R
8,385
312
# install.packages("ggplot2") # install.packages("tidyverse") # install.packages("ggsignif") # install.packages("RVAideMemoire") # install.packages("lawstat") # install.packages("ARTool") # install.packages("emmeans") # install.packages("rcompanion") # install.packages("psych") library(ARTool) library(lawst...
29718a1096f7c1ca888a18d0e65b68369b8c062551fd91b710e7292e11be89f6
R
8,396
171
#' Plot Transition and Trasnversion ratios. #' @description Takes results generated from \code{titv} and plots the Ti/Tv ratios and contributions of 6 mutational conversion classes in each sample. #' #' @details #' The plot shows 6 canonical substitution classes that combine complementary strand mutations. #' See \code...
0d969dbe9ddcd8b3a2b77718ae1601da91dc67b5c68161e4b4af4d9f1fbd0414
R
8,401
224
data_001e<-read.csv("C:\\Users\\ASUS\\Desktop\\Useful\\graduation\\data_analysis\\q_dataenglish.csv", head=TRUE,encoding = "UTF-8") ##十进制转二进制 library(R.utils) data_001e$env_type=intToBin(data_001e$env_type) #处理缺失值 library(randomForest) data_001e[3:32] <- lapply(data_001e[3:32], as.numer...
c56e2588e322826256fa4e31c575c046cc5f29e3e1a598e39dc898d4c8bfd654
R
8,402
183
library(data.table) library(kimisc) args <- commandArgs(TRUE) ##### DEG function ##### DEGtest <- function(genes, allgenes, adjP.method="BH", file){ data <- fread(file, head=F) colnames(data) <- c("GeneSet", "n", "genes") allgenes <- allgenes[allgenes %in% unlist(strsplit(data$genes[data$GeneSet=="all"], ":"))] re...
bac15ae6ad7d04f2baeac699e3f0d1c603d14e5e208f6c68a1ff9e54471c1e90
R
8,409
273
--- title: "iPSC-DA time course: RNA velocity" author: "J Monzón Sandoval" date: 'Last update: `r date()`' output: html_document: theme: lumen toc: yes number_sections: true toc_float: collapsed: yes smooth_scroll: yes --- ```{r setup, include=FALSE} knitr::opts_chunk$...
c227b622c17ce07141ddde256438b2ca0526bfd7cfb3fa495e92fcf5b62da018
R
8,420
259
#THis script annotates clusters by comparing DE genes to a list of cell type markers and computing DEscore ## ----receive input from nextflow---------------------------------------------- args <- commandArgs(TRUE) path<-args[1] file<-args[2] markers<-args[3] print(path) set.seed(123) ## ---- Load standard packa...
ddedbe2da555b45159ed4859ae8cad9515fdb515194aac7f574f00ea06e6e231
R
8,421
239
library(tidyverse) library(clusterProfiler) library(msigdbr) # Read the Differential Expression results DE.results <- read.table("DE_bulk_RNAseq_ribozero_rpe_choroid_protein_coding_genes_filtered_covariate_Linear_age.tsv", sep="\t",header=T) DE.results <- DE.results[!is.na(DE.results$F...
daf769ed6385fcb1bcbf7122a26ccb031a20e80c3a678a1768b2b9a8744810bc
R
8,439
242
# Libraries 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(Seurat) library(dplyr) library(ggplot2) library(velocyto.R) library(velociraptor) library(ggrepel) # ...
34ec053d3828b6d14ec41a0cc14e596016c527fbc57fbd52ca4b52ef1c366cfd
R
8,480
208
library(plotly) library(htmlwidgets) library("rmarkdown") library(Seurat) library(monocle3) library(scales) library(igraph) library(ggraph) library(graphlayouts) library(qgraph) library(AUCell) library(MetaNeighbor) library(Matrix) library(dendextend) flexsplit <- function(dat,char){ test=strsplit(as.character(dat),ch...
92671305e6ebfe9facad5da4a281e0d7e98ee950a8bb98365d0f656f32a1ca97
R
8,497
242
####╔═════ ═════╗#### ####💠Loading Data💠#### ####╚═════ ═════╝#### cli_h2("┗ [SCRIPTS] Loading data ingestion functions") #-------------------------# ####🔺Helper functions #### #-------------------------# ## Turn a variable into a factor, ordered based on the level order defined within the relevant sheet of t...
cee5c2d54f9dd6d6cc2a4d4343a23014d20ef1a3f95299d2c3bc6cd19b3722db
R
8,506
221
##### # You can use this script to delineate super-enhancers from a .bed, *only* after it has been # pre-processed by bamliquidator. Conveniently this can be done by riesling.py, which also # allows for alternative stratifications of super-enhancers. # # # Run as: Rscript get-SuperEnhancers.R input.bed output_directory...
6c83ec7d2055cc93b21ce38d79d5c49cad47cc51c1649f97a8cbe5098d1905ca
R
8,519
217
##' plotCCNetwork ##' ##' @title Visualize cell cluster association network graph ##' ##' @description ##' The \code{plotCCNetwork} function takes cells belonging to the same phenotype as a cluster. ##' When cell phenotypes are not provided, the \code{plotCCNetwork} functions identify cell clusters based on edge ...
423d5192b93444ed170afbddb46d10e6c5d14ee34d2a0f7013ca4b21715e0706
R
8,525
134
# Script to make new ctd expression data from Zeisel 2018 -------------------------------------------------------------------------------#### # 1. Need to make expression x cell type table for input into make CTD for new version of EWCE ---# # 2. Convert expression data to ctd under new EWCE version functions #---...
8e918549318ff36f3269e02c94b61c6d85d9b95c33c79ee1529bbfc29d6a1e1d
R
8,542
191
library(tidyr) library(dplyr) load("L4_exp.RData") load("domain_elegans.RData") load("cluster_1_2_3.RData") load("Cel_dup_N4Cel.RData") load("Single_copy_genes.RData") load("gene_count_orthologs.RData") L4_exp2 = data.frame(t(L4_exp)) for(i in 1:ncol(L4_exp2)){ L4_exp2[165,i] = nrow(filter(L4_exp2[1:164,]...
528bc986e41813fec1e633a72d9c574b899b116ea268199cd76e3f35321ee25a
R
8,555
243
# Methods from singlecellmethods --------------------------------- normalizeData <- function(A, scaling_factor = 1e4, method) { if(!'dgCMatrix' %in% class(A)) A <- as(A, "dgCMatrix") if (method == "log") { A@x <- A@x / rep.int(Matrix::colSums(A), diff(A@p)) A@x <- scaling_factor * A@x ...
6387c61cfac71f62c666dcfa4b6294c8155c25a7b2a38cc9db84abf33775726b
R
8,555
284
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) library(R6) library(future) options(future.globals.maxSize = 10e9) library(future.apply) plan(multicore, workers = 4) library(Matrix) ...