sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
1a3bfceee49315276afd4a58fd41e2fd00e710744e006a392adb328755490576
R
2,869
83
# 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) # Setting WD setwd(...
35a3bc256194860f0caa7201841e1a687c9dc4f11788d5078332c92ceff2c816
R
2,869
83
# 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) # Setting WD setwd(...
b446b7c8ce847b37c13dade91cead5c2e2375a50903821b2a27e08d968d0a2fd
R
2,870
81
library(GGally) library(ggplot2) #setup for figure wd <- 5 ht <- 5 fig.nrows <- 1 fig.ncols <- 1 pt <- 8 cex.general <- 1 cex.lab <- 1 cex.axis <- 1 cex.main <- 1 cex.legend <- 1 d1<-read.table("Melnikov2012/processed/mtsa_mel12.m1000.t5.e5.8mers.txt", stringsAsFactors=F) d2<-read.table("Kheradpour2013/processed/mtsa...
9ed3fd652bb981c73bab45176b509653285612b82ce76aeb7e5b8752dedc1527
R
2,874
83
# spatial qc and dotplot library(Seurat) library(Signac) library(here) library(ggplot2) library(gridExtra) library(stringr) # create a plot dir plots <- here("ckd","figures") dir.create(here(plots)) rna <- readRDS(here("ckd","spatial","step1b_spatial.rds")) rna@meta.data$library_id <- gsub("_"," ", rna@meta.data$li...
7ea5e22ca512cdda95b956d19873cf9d729953899f5ac46546544ab45503a960
R
2,875
76
library(Seurat) library(SeuratData) library(dplyr) # stable cluster one_bootstrap = function(obj, res, origin_res_label, algorithm, k.param = 20, reduction=reduction, dims=dims){ obj_random = obj[, sample(colnames(obj), length(colnames(obj)) * 0.5)] obj_random = FindNeighbors(obj_random, k.param = k.param, redu...
c99426359b1041181b15c7f555e416ada751bb40c9675d12b989d477e8e9f393
R
2,876
100
# use neighborhood identified in step1 and degs from step2 to identify neighborhood-specific gsea # this script will analyze degs for pathway enrichment # to run locally: # SCRATCH1=/mnt/g/scratch # docker run -it --rm \ # --workdir $HOME \ # -v /mnt/g/reference:$HOME/reference \ # -v /mnt/g/cellranger_atac_counts:$HOM...
cc7de54e4f35343877d61fb63b72a1861a8c50392971a54b94aeb88c98fae118
R
2,877
76
volcano_plot = function( m = NULL, group = NULL, group2 = NULL, d = NULL, center.rows = TRUE, vis.lfc = log2(2.5), vis.p = 0.01, ...
f59057fbb7b7e576f3a7edec113e2616347d6467c409f4811a587febe8dfc07e
R
2,883
84
# 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) # Setting WD setwd(...
4add5037d72050aae6dd68d0f9944a92f9c56fa2af55248bc025a37fa0e1be3f
R
2,886
96
#05/25/2023 Fengyao Yan #Make the dot plot for NNLS GTEx sensitivity test library(tidyverse) library(ggplot2) pearson_dots <- data.frame(matrix(ncol=4, nrow=0)) colnames(pearson_dots) <- c('tissue', 'pcc', 'n_gene', 'model') pcc_nnls <- read.csv('../../data/gtex/pcc_all_gtex_nnls.csv', row.names = 1) pcc_deep <- rea...
8fdb66ee09715e891d7fbe170977ced77fe4d0d3a27fa33ccb4f3d5dc74da82f
R
2,886
84
#Visualize the nonfetal & healthy subset of gut cell atlas. #Facets by age and their annotated cell types #Expression of stx3, uchl1, slc17a9 library(tidyverse) library(monocle3) library(here) source(here("scripts/accessory_functions/monocle_mods.R")) nfh <- readRDS(here("teichman_gut_atlas/data/mesenchymal_gut_nfh...
e6d4eaaa5dda014e8f0fa223487b7d95fc66f5e3810c67955c2be54fb901843c
R
2,892
89
#' @title FUNCTION_TITLE #' @description FUNCTION_DESCRIPTION #' @param data PARAM_DESCRIPTION #' @param x PARAM_DESCRIPTION #' @param xlab PARAM_DESCRIPTION, Default: 'Cell Score' #' @param mode.names PARAM_DESCRIPTION, Default: c("Mode1", "Mode2") #' @param ... PARAM_DESCRIPTION #' @param prob PARAM_DESCRIPTION, Def...
2b24f06e2b61f7fd7a48fed2a3552890b9ec9c2e9ae0acdf05ceda4458d27308
R
2,896
67
#!/usr/bin/R suppressPackageStartupMessages(library("stringr")) suppressPackageStartupMessages(library("dplyr")) suppressPackageStartupMessages(library("tidyverse")) # * meta functions cal_cv <- function(x){ cv <- sd(x) / mean(x) return(cv) } meta.TE.sumcount <- function(anno, count, level){ if(identical(anno$...
1c1c5a946e8d5f53da15f5061884571ce9107484a90ce736ab5640cca5376581
R
2,902
94
# ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } options(stringsAsFactors = F) library(tidyverse) library(broom) library(here) library(rcartocolor) library(lme4) library(lmeTest) library(tidymodels) ## main Seurat package snRNA-seq pacakges library(Seurat) li...
45220422d74cc313b942d9b5af797ddb0a50030bdb2d3c1689216069f42ec9dd
R
2,911
64
############################################################################## ########### This is the script for extracting within and between connectivity ############################################################################## #Project: Long-term effects of prenatal infection on the human brain: a prospective...
650117ae716f7ca492c22e9084ce77168fab2fd01ba83cfe741f000f200880bd
R
2,912
90
# Fit full model and output the odds ratio # update on 9.27.21: add E value # load library library(plyr) library(tidyr) library(dplyr) library(Hmisc) library(writexl) library(ggplot2) library(rms) library(kableExtra) library(EValue) load("~/Box/CCC19_TS/48 - Breast cancer/Data/48_impute.20.123_Jundat.v3.RData") load(...
a1f6787e39ec3dbd77e9424b514f3af2ee6073e4ab9b847903fbb054e141cf79
R
2,913
85
# 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...
2f128980c8218814d0cad1057f60d764ef56b9f3e8c6d83a83a6eab0f883860e
R
2,914
56
setMethod( "show", signature = "comorbidity", definition = function( object ) { cat( "Object of class 'comorbidity'\n" ) cat( " . Search: ", object@search, "\n" ) cat( " . Only comorbidities between index diseases:", object@intraCode, "\n" ) cat( " . Aggregate t...
7037d44863bfcd7f81f2389a329a2e985573e25d31d624fecf8a25d4d863f391
R
2,914
70
"pwr.2p2n.test" <- function (h = NULL, n1 = NULL, n2 = NULL, sig.level = 0.05, power = NULL, alternative = c("two.sided", "less","greater")) { if (sum(sapply(list(h, n1, n2, power, sig.level), is.null)) != 1) stop("exactly one of h, n1, n2, power, and sig.level must be NULL") if (!is.null(h)...
a41139184470ce832083e972f7c453ec36042ee38943d4dd581177f98b3d9b77
R
2,920
85
# 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...
c9f1938f167b6cac4586482232b7d403811daca61404ae05eec0a5ff3625a35b
R
2,921
85
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(data.table) library(RColorBrewer) library(rcartocolor) library(ggupset) library(svglite) ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) } options(stringsAsFactor...
55d0b53b76f10a237bea0b4b1fdb0e915da9bcfa71d95e664df742b9ffee96da
R
2,927
113
# For each HLA, # this code outputs the TCRs that appear at least twice among the subjects # with known HLA existing or not status # and their corresponding frequency among the subjects under consideration # the public TCR and HLA allele information used here are based on all 666 # Emerson HIP subjects args = com...
02db06531b83f0f3acdbd49a735fd06fe20322a123f074bbf020f6260e17a9ff
R
2,930
71
"pwr.t.test" <- function (n = NULL, d = NULL, sig.level = 0.05, power = NULL, type = c("two.sample", "one.sample", "paired"), alternative = c("two.sided", "less","greater")) { if (sum(sapply(list(n, d, power, sig.level), is.null)) != 1) stop("exactly one of n, d, power, and sig.level mus...
20169602816bc0d86f677eb7f3b5f81a7eb7404368825e45f0d82b4999b5e48a
R
2,931
75
"pwr.t2n.test" <- function (n1 = NULL, n2= NULL, d = NULL, sig.level = 0.05, power = NULL, alternative = c("two.sided", "less","greater")) { if (sum(sapply(list(n1,n2, d, power, sig.level), is.null)) != 1) stop("exactly one of n1, n2, d, power, and sig.level must be NULL") if (!is.null(...
b9c0c7e399d13178367a62b18f53f2c3fac16a9746e3d9a2537feda1fe29d24a
R
2,946
59
--- title: "Preparing GR peaks & targets" author: "Pierre-Luc Germain" date: "3/1/2022" output: html_document --- ```{r} suppressPackageStartupMessages({ library(AnnotationHub) library(epiwraps) }) download.file("https://www.encodeproject.org/files/ENCFF567KLR/@@download/ENCFF567KLR.bed.gz", "extdata/ENCFF567KLR_G...
ff800a674ddec096b418b72942586195e6c557599c94cda5014d26ee624fd564
R
2,946
69
# Kategis detection algorithm by Moritz Goretzky @ WWU Munster, which exploits the definition of Kategis (six consecutive mutations with an avg. distance of 1000bp ) to idetify hyper mutated genomic loci. # An algorithm which starts with a double-ended queue to which six consecutive mutations are added and their averag...
d065411f61fadfb83bc6e441830b38ce0196bb46d7d8a42c4345778de2f3c501
R
2,950
85
#----------------------------------------------- # 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 ...
2eb07ee93e1cd548afdc92e32867774129262351f1fd933700e215f98521993c
R
2,951
99
# ===================== # # 6. APOE2 stratified # # meta-analyses # # ===================== # ## Set up ---- filepath <- "" setwd(filepath) ## Load libraries ---- library(data.table) library(dplyr) library(magrittr) library(metafor) library(purrr) ## Read in data ---- nshd <- read.csv("results/nshd_e2_st...
86b6e1d5dd54b6ef494612b6e211856ae4ee8b153342fe8a31308a0f376f048e
R
2,955
66
library(Seurat) library(tidyverse) library(patchwork) library(reshape2) library(cowplot) #for plot_grid # script to calculate percentage of mitochondrial reads for quality control filtering of cells # input is digital expression matrix (DGE) generated by the dropseq alignment pipeline # output is a file with mitochon...
259f68d293dcbffcdb32da10b6b38c82fd553474a6dc854bf19f556bbf5b3970
R
2,956
110
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(ggplot2)...
0bb54c1b689d29eb93b28a349f5bc1af7c1f85e66d19b7eece07642e7883557b
R
2,964
65
# Extract left, right, and summed BNST volumes from the labelled segmentation masks. args <- commandArgs(FALSE) file_arg <- args[grepl("^--file=", args)] this_file <- if (length(file_arg) > 0) sub("^--file=", "", file_arg[1]) else "scripts/01_extract_bnst_volumes.R" this_file <- gsub("~+~", " ", this_file, fixed = TRUE...
f1f5e3394aa98d0577f36616d9d0b93a6077a522b85d3b975db0ff5612d0505f
R
2,967
107
library(igraph) ####GRAPH filename genedet='../OscopeData/GenesLabels/Mapping/Water123.txt' netdirList=c('../OscopeData/dataAdjacencyMatrixe02/','../OscopeData/dataAdjacencyMatrixePiDiv9/','../OscopeData/FirstData/') outdirList=c('../Communities/Networks02/','../Communities/NetworksPiDiv9/','../Communities/FirstData/'...
06d729aa3e583af4e953f7214e0234e8fc92ed1c79af3380c9a92227c60033ea
R
2,974
74
## packages for data table processing library(tidyverse) library(stringr) library(RColorBrewer) 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) F...
df6e40f473f685d0a0bc652a47d0c477b4c180df7a80d6a8ea6f275030851192
R
2,974
87
--- 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(gplots) source('functions/mediation.R') source('functions/med.plot...
f7b93a0701526190c0d9ecea88c332daacc6d4ac458f1a59c78bafbe3bacf6ea
R
2,976
73
# compare with MOp MOp = readRDS("../../merFISH_MOp/MOp_mouse1sample3.RDS") SpatialPlot(MOp, group.by = "subclass" ) genes = intersect(rownames(MOp), rownames(merFISH_integrated)) # All merFISH_integrated_L2_1 = merFISH_integrated merFISH_integrated_L2_1 = NormalizeData(merFISH_integrated_L2_1[genes,]) merFISH_avg...
7f888d918c4dc5384e66c2e017fae10d2d2082af09a02367598579b249cc94d4
R
2,989
135
# 05/23/2023 Fengyao Yan # apply NNLS deconvolution on the Gtex semi-silico data library(nnls) library(data.table) library(pbapply) mse_all <- NULL pcc_all <- NULL is_sens_test <- FALSE data_folder <- '../../data/gtex' data_raw <- '../../data/raw' f_name <- paste(data_raw, '/selected_gtex_top_1_NT_1_fc_3_data.csv...
b7f6bbba6d91e191c00688c2476ea9bfa814ca28429e7f6826a4ef94e8aa149a
R
2,990
73
#' Write an output makefile for permutation testing #' #' Generate a makefile for running a specific analysis #' @param prefix Prefix for output, to be prepended to outputs #' @param resultnames Names of results from processvoxel. You can return multiple permutation statistics, with names, and they will be used to wri...
581ec23be8aac7e4543123fcbeaba236696eab0db5fac115441d96fef51d7207
R
2,992
73
#' @title Find cell clusters and retrieve significant expresion programs #' @description Cell clusters are filtered on the basis of size, their corresponding expression programs are subsequently filtered on the basis of number of genes with sufficiently high fold-change values and sufficiently small p-values, and last...
90b4cc698c07ff6e84644728960a447980fced83f73c3a37384b0d782c45101d
R
2,993
69
#' Write an output PBS submit script #' #' Generate an PBS submit script for the given workflow #' @param prefix Prefix for output, to be prepended to outputs #' @param resultnames List of names for the expected outputs #' @param modelfile Name of the model file that contains the processVoxel command #' @param designma...
5d21dd21b6aa2b82a473f72d6a812d4e95253af97d39e821392c45dfa25e9a24
R
3,000
68
#' @title Plot State Hierarchy (Quadrant plot) #' @description Plot state hierarchy #' @param X two-column matrix or dataframe with x and y coordinates. #' @param quadrant.names character vector to label quadrants. Default: c("bl", "br", "tl", "tr") #' @param main plot title. Default: NULL #' @param xlab x-axis title....
d552d5056e782f053ecd64773c83603f12be3b48cdcd90421820c241f9bff961
R
3,003
98
#dir('../OscopeData/dataAdjacencyMatrixe02/',pattern='.csv') rm(list=ls()) inputdir="../Communities/Networks02" outputdir="../Communities/Networks02/Overlapping" # namef1="W45fastgreedy.txt" # namef2="W123fastgreedy.txt" # nameOutAll="W123_W45_fastgreedyI.txt" # nameOutSig="W123_W45_fastgreedySigI.txt" # namef1="W45w...
a51b3fdcea7a9bb23c38c36eba1fb7e15060d4d5977485cd577c04d7f440f644
R
3,007
77
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(ggsci) library(cowplot) library(here) DATADIR='data/raw_data' ## make for this subdirs...
e0eab95713a188e2b6add748d00067dcced07ad8ac04bc1d5dfddc5d2105ab08
R
3,014
103
library(argparse) library(Signac) library(Seurat) library(JASPAR2020) library(TFBSTools) library(BSgenome.Rnorvegicus.UCSC.rn6) parser <- ArgumentParser(description = "process input arguments") parser$add_argument("--rds", action = "store", type = "character", help = "path to labeled rds file for integrated object") ...
2dd5ed4a88079e2841bc206459dd0909de303721b88dec67f9da12aa20973a0b
R
3,017
79
--- title: "R Notebook" output: html_notebook --- --- ```{r} library(ggplot2) library(RColorBrewer) library(tidyverse) library(ggpubr) library(ggsignif) library(openxlsx) library(viridis) library(readxl) ``` ```{r} setwd("//atlas.uni.lux/users/isabel.rosety/GBA/8-OH-dG ELISA/") #data <- read.csv("WB data for Rstudio ...
a7f5f0a89bfb958b0692a30c661fbfdd3a82f3c98b7f92d054a2ad3b8912be62
R
3,017
84
--- title: "StemnesScoRe: An R package to estimate the stemness of glioma cancer cells at single-cell resolution" author: "Necla Kochan and Gokhan Karakulah" date: "2023-08-21" output: pdf_document: default html_document: default --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Cancer stem c...
8aa3afbab5e5a4a7dd2d3fd7e93d3b185d6fa2b333d4efc6b39e8c6234e7b3e3
R
3,022
80
--- title: "compile_library_design_files_05052020" author: "Stephen P Plassmeyer" date: "5/5/2020" output: html_document --- Takes the "bc_and_arrayNames.tab" and the "bc_and_arraySeqs.tab" files from Mike Reiger's original library design and concatenates them into a single .csv file with expected column names for oth...
eb69fb33b8c624c3fbe8aae4b2b46aa928cdfe3adfddf914c7c75a97c48644a9
R
3,028
101
# inspect MPRA data suppressMessages(library('tidyverse')) args<-commandArgs(trailingOnly=T) dna_rna_cnt_fn<-args[1] out_fn<-args[2] wd <- 2 ht <- 1.5 fig.nrows <- 1 fig.ncols <- 3 pt <- 8 cex.general <- 1 cex.lab <- 1 cex.axis <- 1 cex.main <- 1 cex.legend <- 1 lwd<-0.5 plot_plasmid_expr<-function(dna_rna_cnt_fn,...
72fcfce2ebf4f16e6c5b0cefdd68e5b731afa59866a9e39e87c09b9cb11595f6
R
3,034
114
set.seed(321) # Coordinates x <- matrix(nrow = 10, data = c(seq_len(10), 10:1)) rownames(x) <- paste0("spot", seq_len(nrow(x))) colnames(x) <- c("coord_x", "coord_y") # Proportions y <- replicate(m <- 5, runif(10, 0, 1)) y <- y / rowSums(y) rownames(y) <- paste0("spot", seq_len(nrow(y))) colnames(y) <- paste0("type", s...
0d088407b2b0088f4ebd3461f6a407e192cc5b21f3cdd6c5dac4cad35697f561
R
3,042
120
#################################################### # LC project # Script for downstream analyses: thresholding spots # Lukas Weber, May 2022 #################################################### # module load conda_R/4.1.x # Rscript filename.R # file location: # /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/ l...
6e2c036e2230408371e09f8d6b5c938118a7a1b6155ef467c5dcc22261400108
R
3,046
108
#!/usr/bin/env R # Author: Sean Maden # # Plots of tissue by deconvolution reference. # library(ggplot2) library(dplyr) library(scales) #---------- # load data #---------- csv.name <- "table-s1_tissue-references.csv" csv.path <- file.path("deconvo_commentary-paper", "data", csv.name) csv <- read.csv(csv.path) #----...
5e9c9b41d37639c1a3b73c8971b96187829ec194993151590763dbcf20fb2740
R
3,048
86
#----------------------------------------------- # 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 ...
189cbae57bd4f3ad11487617058f1461cc47521df3f3b2cb9b1ba2f9393994a1
R
3,051
79
## packages for data table processing library(tidyverse) library(stringr) library(RColorBrewer) 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) F...
a6840a125d3b916e881c420fdc4efaf1ab16abd837e29b02a012969102d20824
R
3,058
91
#KEGG Enrichment Analysis of the enriched genes #this script uses clusterProfiler::enrichKEGG() function #run locally on Ayushi's laptop #load the required packages library(org.Mm.eg.db) library(clusterProfiler) library(tidyr) #set the working directories indir <- paste0("~/Dropbox (Gladstone)/YH_NK01-Results/", ...
112ee17ab76385e74f098b4c7ed4b294f93606d2487f7e4fc48e305a8e2dea54
R
3,060
80
# Core function ---------------------------------------------------------- #' The core function, which converts the DICOM to NII, extracts the JSON information, opens the sequence mapper and converts the data to BIDS. #' #' @param user_settings_file The path to the user settings file from the "create_user_settungs()" ...
90cc3333ee913c89cd5d4729a859cbd459e4b5aec3a5634ecdbb790f0edb2138
R
3,064
90
suppressMessages(library(dplyr)) library(ggplot2) library(argparse) library(patchwork) library(argparse) parser <- ArgumentParser(description = "process input arguments") parser$add_argument("--obs", action = "store", type = "character", help = "path to file with observed results") parser$add_argument("--perm", ac...
072e9a61ac58012f06a30668542ab41621278ff03598e87bf8c8b963d957627c
R
3,073
103
#dir('../OscopeData/dataAdjacencyMatrixe02/',pattern='.csv') library(igraph) ####GRAPH filename genedet='../OscopeData/GenesLabels/Mapping/Water45.txt' netdirList=c('../OscopeData/dataAdjacencyMatrixe02/','../OscopeData/dataAdjacencyMatrixePiDiv9/','../OscopeData/FirstData/') outdirList=c('../Communities/Networks02/',...
04e7d6aa2e39e1bf727be79476c431669e5d02d2cf4bd83892773eb9ae7be83e
R
3,074
63
############################################################# # Generate Figure 2A ############################################################# library(ggplot2) library(scales) library(ggpubr) Input_data <- read.csv(".\\..\\..\\Data\\Manuscript_2D_Simulation_Pattern\\sim_MOB_pattern2_fc5_tau50_count_power1.csv...
44a2720709b4062344e38ff17424f4fa739c539279210ef339faa6f8e9a62104
R
3,090
58
library(tidyverse) library(ggplot2) library(ggpubr) library(ggridges) library(rstatix) # Load results-------- results_intermediate_1dec <- data.table::fread('../results/MI_results/landmarks_10foldvalidation_withIntermediate_1000ep512bs_a375_ht29.csv') colnames(results_intermediate_1dec)[1] <- 'fold' results_intermedia...
c5b0e0e57421f986e6350f2726d383b2cc03c4a04e931c2be2f44d921956c386
R
3,097
143
--- title: "WeberDivechaLCdata package" author: - name: Lukas M. Weber affiliation: "Johns Hopkins Bloomberg School of Public Health, Baltimore, MD, USA" - name: Heena R. Divecha affiliation: "Lieber Institute for Brain Development, Baltimore, MD, USA" package: WeberDivechaLCdata output: BiocStyle::html...
27d5fd2f19dd9be5d1c18e858a8f8b991b7a3e84eb82a87038d1812ee022cc49
R
3,100
94
sort_hclust <- function(...) { as.hclust( dendsort::dendsort(as.dendrogram(...)) ) } plot_hc <- function(hc, cex = 0.8, mar = c(8,8,4,1)) { withr::with_par(new = list( cex = cex, mar=mar), code = { plot(as.dendrogram(hc)) }) } #' hiearchical clustering for subclass #' cpm: cell by features...
2fae8ee4e7fe3c20cbf660e9a47bf8fdab8c0d2e1aae72b6e4251938aefc997e
R
3,112
80
library(boot) ## A function to form completed data by combining imputed data and non-missing data fill_data <- function(impute = impute.dat0 , data = data.sub, im) { cbind.data.frame(impute.transcan(x = impute, imputation = im, data = data, ...
a352381f12c371fc9294062d9b4d28f86f066d2a94b3989090a04abcede1fa84
R
3,112
110
# from 100 models trained using different sets of random seeds # each time, # do permutation # for n = 1, ..., 100, get the average validation AUC from the first n models library(ggplot2) theme_set(theme_classic()) library(ggpubr) library(pROC) df_seeds = read.table("../cv_train_predict/ensemble_seeds.t...
2920ff24c0bdba8330f429021857131002faa5eb75e38fd7236600e37d6ff005
R
3,113
115
# 05/23/2023 Fengyao Yan # Make the distribution plot for MSE change on CMP dataset comparing deep learning vs NNLS library(ggplot2) library(tidyverse) library(data.table) library(Metrics) dat_pred <- fread('../../data/cmp/pred_cmp_nnls.csv', data.table = FALSE) dat_true <- fread('../../data/cmp/true_cmp_nnls.csv',...
37e4086a106e8f19e0fcc47c29db881609f7981535e6e9572711a07accb22942
R
3,124
82
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(rlang) ## main Seurat package snRNA-seq pacakges library(Seurat) library(SeuratDisk) library(future) ## main differential gene expression package library(glmGamPoi) library(SingleCellExperiment) library(DelayedArray) ...
6ba0d57b6a6070f620e0988884c12f1364e566b253f24c67a432076a51ed94db
R
3,129
74
library(readr) ######################################## # Below are the variables that will be used in the model ######################################## ######## HD ISS ############# # Create some logic to calculate and display HDISS stages based # Read in phenotypic data from EnrollHD TotalFunctionalCapacity_Score ...
688e2564f8e99f5f472a7418b6e4a513a0d4ace4c5bd2b407414e83876cd69d4
R
3,132
82
#' Write information that describes how npointillist was called #' #' Write information that describes how npointillist was called #' @param args Arguments provided to npointillist #' @export npointWriteCallingInfo <- function(args) { dir <- dirname(args$output) if (!dir.exists(dir)) { dir.create(dir, r...
d006309594605b840467d538977097c4748d3bcb7b50fe9841e6640dc8b48f80
R
3,140
80
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(RColorBrewer) library(rcartocolor) ## main Seurat package snRNA-seq pacakges library(Seurat) library(SeuratDisk) library(future) ## gene expression heatmap plots library(Nebulosa) ss <- function(x, pattern, slot = 1,...
f6ad5da70047c8524991de6ddf1724f8067c6b6b5ca17c75d80ca8409dc4c596
R
3,140
80
## conda activate r4 ## packages for data table processing library(here) library(tidyverse) library(RColorBrewer) library(rcartocolor) ## main Seurat package snRNA-seq pacakges library(Seurat) library(SeuratDisk) library(future) ## gene expression heatmap plots library(Nebulosa) ss <- function(x, pattern, slot = 1,...
7b5597683c13249f6c2e8e21531d872d276f737a69180bb493dc3d4a6e671ab4
R
3,148
62
#' @rdname color #' @title Core color mapping function for SpacoR. #' @name assign_color #' @description #' Assign Colors to Clusters Based on Distance Matrix. #' This function assigns colors to clusters based on a given distance matrix. #' It supports colorblind-friendly options and can automatically generate a color ...
75c74bd609fe74caf60b00776680d7fc44ba62b19d246f47cef7807aa70e6375
R
3,154
84
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(ggsci) library(grid) library(gridExtra) ## main Seurat package snRNA-seq pacakges libr...
ca15c6e9afe4911f2812f171551f6d5f904d49ebf56c146b5764bd449f96c4a0
R
3,157
80
#' Converts gene names of query to match type/species of reference names (human #' or mouse). #' #'Modified from Azimuth::ConvertGeneNames #' library(stringr) convertHomologs <- function(gene.names, reference.names, homolog.table) { query.names <- gene.names linked <- homolog.table # remove version numbers ...
f7ff612ac49a031fc530ae46f82fa3ed11d85d146deb23676c39f6b9b30d4d4a
R
3,157
121
--- title: "R Notebook" output: html_notebook --- # Set Up ```{r setup} knitr::opts_knit$set(root.dir = normalizePath("../..")) ``` # Imports ```{r} library(lavaan) library(semPlot) source('functions/explained_variance.R') source('functions/heatmaps.custom.R') ``` # Load Data ```{r} vrf.cog.heart.brain.trad = read.c...
76c0c1758c1934c4c90fd74b69260f23312edf5874936ae523aa2e62f8d4dbee
R
3,159
74
--- title: "Pathways_normalized_Similarity" output: html_document --- ```{r} library(tidyverse) #library(ComplexHeatmap) library(pheatmap) library(RColorBrewer) #library(reshape2) #library(janitor) library(gapminder) library(viridis) ``` ```{r} setwd("C:/Users/alise.zagare/Desktop/Modeling_final_2CTRLvs2MUT/Model_com...
a6a46f736fd6ecbab3e51a43d3f6f9157ccf616166047a04d13f78ad21aab9b8
R
3,163
99
--- title: "Biolog_IPD" output: html_document --- ```{r} library(tidyverse) library(ggpubr) library(ggrepel) library(viridis) ``` ```{r} setwd("P:\\IPD\\Biolog") data <- read.csv("MaxRate_norm_forR.csv", header=T, sep=",") ``` ```{r} data %>% group_by(Condition, Chemical) %>% summarise(Value = median(Converted)...
623ddae011f268da8408c3062074a55a9d15d84150c355f92c4210eca9ebd289
R
3,164
81
--- title: "MPRA Tools Expression Calculation Function Unit Test" author: "Stephen P Plassmeyer" date: "5/7/2020" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) source('../../mpra_tools/mpra_tools.R') ``` # Initial Generation of Benchmark Data Using the implementation of t...
cae44b9672d50f9f408f9a328e1e6b517006cfb612cb61a8b2363f822ac78c8c
R
3,182
96
# 05/19/2023 Fengyao Yan # This file is written to select TSG (tissue specific genes) library(matrixStats) library(tidyverse) library(data.table) data_folder <- '../../data/raw' dat <- fread(paste(data_folder,'/mean_df.csv',sep=''), data.table=FALSE) rownames(dat) <- dat[,1] dat <- dat[, -1] dat <- as.data.frame(t(...
6a993e8943ab33c80562083ea7ba1bbce67b1436fca69b0ee06fcc4062dfa938
R
3,186
101
--- 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(gplots) source('functions/mediation.R') source('functions/med.plot...
4797ad8d7948bf6c3e3518fc272bfee9e9e9497889773d0f402bc333571cbe59
R
3,188
110
# ----------------------------------------------------- # Slices a connectome matrix based on lookup tables # ----------------------------------------------------- ## Collect arguments args <- commandArgs(TRUE) ## Default setting when no arguments passed if(length(args) < 1) { args <- c("--help") } ## Help section ...
6c575b46dae470f1d49624ea050e45d3cd7c997e0c3a195cb748cb00eaf4f35c
R
3,189
97
--- title: "Ethoscope Analysis Pipeline (Yoked Controls) - Abhilash" output: html_notebook: default html_document: df_print: paged pdf_document: default --- This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code. Try ex...
e960645609e224a5b4a866be2a6926aa626797b56cdba3bae9505be23ac79f6a
R
3,194
77
require(misha) require(tidyr) require(plyr) require(dplyr) gsetroot('/home/hpc/bonev/trackdb/mm10') 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(i2) ==0) { r...
186fa4131d6b2e89cf4326a0a9eae675461c273e00d2d9f433efe99cfbdf4d33
R
3,199
85
===--- title: "R Notebook" output: html_notebook --- --- ```{r} library(ggplot2) library(pheatmap) library(RColorBrewer) library(tidyverse) library(ggpubr) library(ggsignif) library(openxlsx) library(viridis) library(jcolors) library(readxl) ``` ```{r} #setwd("//atlas.uni.lux/users/isabel.rosety/GBA/OrganoidSize/Plo...
a4819e0f9a9794fff558e68531480a6b39715d8566a5c3b1292fccb5442d43eb
R
3,200
60
library(brms) region.logINR.ROPE<-data.frame(matrix(NA,nrow = 360,ncol = 11)) colnames(region.logINR.ROPE)[1]<-"region" colnames(region.logINR.ROPE)[2:11]<-paste("pbeta",substr(seq(.01,.1,by=.01),2,4),sep="") region.p_grade.ROPE<-region.logINR.ROPE a<-commandArgs(trailingOnly=TRUE) hcpd_data <- read.csv("n925_hcpd_myel...
d26931a5a68a80c7069a2b6c5abcd7fe7d2625c895acdfb41b251bf1bd09a8da
R
3,200
103
# rocprcurve.R: plot ROC and Precision-Recall curve using ROCR library # # Copyright (C) 2014 Dongwon Lee # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
67ef3763b0d4275a26885ecdad480701eb45444343c5a20ff58d83b936e3ecb1
R
3,204
99
library(tidyverse) library(glmnet) library(purrr) library(ggplot2) library(ROCR) library(PRROC) models <- readRDS("data/models_all_bootstrap.rds") colnames(models)[1] <- "Celltype" models$lognormalized <- NULL #================================================================================================== # Load hy...
d1a303a3a1c8ae75bfd16004be426992afeec4a4193117d9b14f4d00008475dc
R
3,205
77
#' Plot gistic results as a bubble plot #' @description Plots significantly altered cytobands as a function of number samples in which it is altered and number genes it contains. Size of each bubble is according to -log10 transformed q values. #' @param gistic an object of class \code{GISTIC} generated by \code{readGis...
dca7d5897e6f439196c48b70e7605b85789b76da10b72c30886050ab59727901
R
3,208
137
#' @keywords internal x_in_y_overA = function(A = 0.1) { function(x, y) { x = sort(x, decreasing = T) y = sort(y, decreasing = F)[1:length(x)] sum( x >= y ) >= A } } #' @keywords internal kOverA <- function(k, A=100, na.rm = TRUE) { function(x) { if(na.rm) x <- x[!is.na(x)] ...
fe45ce0aef8b64a7502407681fef99da3b0c3d526332813d1ed8bec615648f48
R
3,208
96
library(lavaan) library(tidyr) processVoxel <- function(v) { Y <- voxeldat[,v] adf <- data.frame(idnum,sex,pds,age,time,target,domain,Y) data <- aggregate(adf, by=list(adf$idnum, adf$time),FUN=mean) data$idnum <- data$Group.1 adf <- data adf <- adf[,c("idnum", "sex", "pds", "age", "time", "Y")]...
a5cea25c7eb1ce7c830441f8f5440721f73e418331f98d8d65e0e6e38e02e232
R
3,210
122
####################################### # LC analyses: number of cells per spot # Lukas Weber, Aug 2023 ####################################### # module load conda_R/4.2 # Rscript filename.R # file location: # /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/ library(SpatialExperiment) library(here) library(dplyr)...
df39a2dff47d7f97ac7a2e872d532750ef2acbba59aab30111aa44435704afa7
R
3,210
123
################################################################## # LC snRNA-seq analysis pipeline: testing some alternative methods # adapting code from Matt N Tran, June 2022 # Lukas Weber, June 2022 ################################################################## # run in interactive session on JHPCE # screen -...
59255db98b8613c18b153b6bc9b4181adbc6e9fb685aa887a71ab4a8a2884e75
R
3,213
85
# This type of error handling will not always work if run using the parallel library # It should be run using the --sgeN flag # We need nlme library(nlme) processVoxel <-function(v) { Y <- voxeldat[,v] # Time as a fixed effect e <- try(mod.fixedtime <- lme(Y ~ age + domain + target, random=~1|idnum, method=c("ML"), ...
131fb3896e6317103f031fcd71066275d4dd88d5c2769f3cf951044cd1c8c3fc
R
3,215
129
--- title: "Getting started with ggrepel" author: "Kamil Slowikowski" date: "`r Sys.Date()`" output: prettydoc::html_pretty: theme: hpstr highlight: github toc: true mathjax: null self_contained: true vignette: > %\VignetteIndexEntry{ggrepel examples} %\VignetteEncoding{UTF-8} %\VignetteEngi...
bad34b4cbc61236e0f7c03b6163e1e228ee4e2e3c037983b5a82b84b90bbafe9
R
3,223
93
# REQUIRES COMPUTE CLUSTER TO RUN library(tidyr) library(Seurat) library(Matrix) #================================================================================================== print("Load Exercise 10x Data (v3 and v2 Combined") pb <- readRDS("./data/hypo.integrated.final.20210719.RDS") # 8 samples, 40064 cells p...
259627a3d5496deea9ee3b5c8fa82dbfaf40f1007a630a8a6f0a17fd2112c618
R
3,227
70
--- title: "Mapping BC Info to Sequence" date: "May 13, 2021" author: "Stephen P Plassmeyer" output: html_notebook --- ```{r} library(tidyverse) library(data.table) ``` ```{r} apply.values <- function(d, # data.table, table of MPRA records values,# data.table, table with value l...
7444fae9559a7d99e635b71bb0ded816db7e0f78fd9d846e6351adaf3c937a77
R
3,240
98
# inspect MPRA data args<-commandArgs(trailingOnly=T) plasmid_cnt_fn<-args[1] mrna_cnt_fn<-args[2] out_fn<-args[3] wd <- 2 ht <- 1.5 fig.nrows <- 1 fig.ncols <- 3 pt <- 8 cex.general <- 1 cex.lab <- 1 cex.axis <- 1 cex.main <- 1 cex.legend <- 1 lwd<-0.5 plot_plasmid_expr<-function(plasmid_fn, mrna_fn, titletxt, exp...
fcf74dca3bcebe3f15c272d9b41b75612c98565a779363d821c7139ae8f010f6
R
3,240
73
#!/usr/bin/env Rscript #You can install the permute package by running: # install.packages('permute') library(permute) message('Loading data...') #You must have already set up the target model so we can work with the debug #data (as specified in the readargs.R file) #The next line presumes you've set your working di...
3b58ea6ef2c043051de792134a61dffdd704bee30f748fe5e46676b624374d96
R
3,241
101
#' @export setTrackNode <- function(attrkey, name, attrPath, altColor = "0,0,178", auto.scale = "false", fontSize = 15, height = 20, maximum = 10...
ed4b8a6537268350f14d258080e3e9fb1b6fd10addad03e7c89433c8cf852ad0
R
3,241
120
#X = number of successes #n = number of trials #alpha = pvalues threshold #Details: https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Agresti-Coull_interval estimate_binconf = function(X, n, alpha = 0.05){ z = 1-(alpha/2) zsqrd = z^2 nt = n + zsqrd #pr = X/n pr = (1/nt) * (X + (zsqrd/2)...
97018dc2277310b0ff83a84ce745c03a1f65b0379d83660565b6280de1743b1a
R
3,251
91
library(survcomp) compute_cindex = function(data, pred_col, time_col, event_col){ x = data[[pred_col]] time = data[[time_col]] event = data[[event_col]] weights = rep(1, dim(data)[1]) #strat = rep(1, dim(data)[1]) cindex = concordance.index(x, surv.time=time, surv.event=event, ...
40ac2e22cb91190c393c2407c4c208471c76dbb909146f63074327ad3b4f51c7
R
3,255
82
topGO_wrapper = function(geneScores, geneScoresDE = FALSE, geneScoresDirection = c("Up","Down",NA), GOmapping, algorithm = c("classic", "elim", "weight", "weight01", "lea", "parentchild"), statis...
d39863eca4bef0b628767d115345d1c709f856ec59e72265d0e635431e130e3b
R
3,262
84
#' Drug-Gene Interactions #' @description Checks for drug-gene interactions and druggable categories #' @references Griffith, M., Griffith, O. L., Coffman, A. C., Weible, J. V., McMichael, J. F., Spies, N. C., et. al,. 2013. DGIdb - Mining the druggable genome. Nature Methods. #' @details This function takes a list of ...
3da076c73fb0081555404e6433b09b548bac91e846f842ae6d1716581457c749
R
3,264
123
####╔═══════ ═══════╗#### ####💠 Package Manager 💠#### ####╚═══════ ═══════╝#### cli_h2("┗ [PACKAGES] Loading external {.file _dependencies.yml} file") dependencies <- load_yml(here("_dependencies.yml")) options( renv.config.snapshot.inference = FALSE, renv.config.snapshot.validate = FALSE, renv.confi...