sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
9bd42fbcabcd56038bba146018a713e45d9f419bd37a9f812621b6b4dd0d0855
R
2,363
68
library(ggplot2) library(dplyr) library(forcats) library(reshape2) library(viridis) # Correct data for each dataset data_countsV2A <- data.frame( Category = c(">2.0m", "1.6-2.0m", "1.2-1.6m", "0.8-1.2m", "0.4-0.8m", "<0.4m"), Count = c(5.69, 0.38, 11.66, 4.31, 2.66, 275.28) ) data_countsV2B <- data.frame( Categ...
36a7e5b9c1e5582cbeee12303bfd95c82c1a079b9c0f2540f3b411dead4c0e94
R
2,368
93
# packages setwd(Sys.getenv("HOME")) suppressPackageStartupMessages(library(argparse)) suppressPackageStartupMessages(library(Signac)) suppressPackageStartupMessages(library(Seurat)) suppressPackageStartupMessages(library(qs)) suppressPackageStartupMessages(library(magrittr)) suppressPackageStartupMessages(library(d...
e40589c882c2885d321ecd1e9de23116b1f2209c29367cf78871b5fdc61237cc
R
2,369
69
#' @include model-utils.R NULL #' @rdname mlflow_save_model #' @export mlflow_save_model.H2OModel <- function(model, path, model_spec = list(), conda_env = NULL, ....
015f14dd370739b96bac3679b677be88b02955f80535efc7c33d568e3def776c
R
2,371
70
#!/usr/bin/Rscript options(error=utils::recover) ## ## average_coverage ## Given an input coverage file in circos form, ie: # # coverage stats: mean=4748 std dev=313 # chr1 14400 14404 2 # chr1 14404 14406 3 # chr1 14406 14407 8 # chr1 14407 14408 13 # chr1 14408 14409 21 # chr1 14409 14410 39 # chr1 14410 14411 54 # c...
85d5bdf6d16b59cc01e0ca0934d2cc4c26398c0f58869ecda327e32358209b0f
R
2,375
53
#' @title plotTsne_compareSettings #' @import AUCell #' @description Plots several t-SNEs coloured by cell properties (to compare different t-SNE settings) #' @param fileNames t-SNE files to plot #' @param scenicOptions imports cellInfo and colVars #' @param varName If a varName is given, it plots all the t-SNEs (not s...
f1ee1343e3c0e512fb1ea4908ee04f378c8931f3c041d3bfeb7008f4728eefbe
R
2,375
61
#by Alexander Zizka, 2016-01-30, bugs & questions to speciesgeocodeR@googlegroups.com setwd("C:/Users/xzizal/Desktop/GitHub/PyRate") library(maps) source("pyrate_DES_utilities.R") #Example 1 - Minimum data #this generates an DESin R object; #Presence data = present distribution of all recent taxa also in the fossi...
7a9d4ce69474d2075af6c605851909eaec967f60bfe06db2584d1177ff224eb5
R
2,376
71
rm(list=ls()) #Use for extracting the files from a specific directory myDir1 <- "/projects/verhaak-lab/GLASS-III/results/mutect2/geno2db/" myinf1 <- dir(myDir1) myinf1 <- myinf1[grep("info.tsv",myinf1)] myinf1 <- myinf1[grep("GLSS-SN-",myinf1)] myoutf1 <- myinf1 myoutf1 <- gsub(".tsv","",myoutf1) myinf1 <- paste(myDir...
34f57b0c0b20010436e7183f8a7470cfa728d79db5c7d952458857d96a1db20e
R
2,377
64
# Predict the TFBS of each CRE peak library(rhdf5) library(data.table) library(dplyr) library(parallel) library(preprocessCore) library(BSgenome.Hsapiens.UCSC.hg38) library(memes) source("pci_snATAC_peakSet_w_Enh.R") pciATAC_peakset$peakloci <- paste(pciATAC_peakset@seqnames, pciATAC...
40f9dcc608a5d682f077aae512f4e5742f244abd62d88cf4e4d1c1120a224e02
R
2,379
52
# Load necessary libraries library(dplyr) # Define input directory and variable list directory_path <- "/home/joonho345/1_Epilepsy_RNA/RNA_Human/11.Sample_variables/02.deseq" variable_list <- c("HS", "withoutHS", "IP", "NO", "IP_Sei", "IP_Other") all_merged_dfs <- list() # List to store matrices for final merging f...
79b78c8b29a22b1b2915d38cbb19211a429579571f996b781737a0b6e63eea6f
R
2,379
81
#!/usr/bin/env Rscript #------------------------------------------------- # Title: Non-specific filtering # Author: Amanda Zacharias # Date: 2023-08-07 # Email: 16amz1@queensu.ca #------------------------------------------------- # Notes ------------------------------------------- # module load nixpkgs/16.09 gcc/7.3.0 ...
296883d14268b3afbe98da4e643ac4af6691bbbacec2cac9f6c93008449e66bd
R
2,382
54
# 05_go_bubble_heatmap.R # Combined bubble plot + gene heatmap for selected GO terms rm(list = ls()) library(ggplot2) library(reshape2) library(patchwork) library(cowplot) library(openxlsx) source("scripts/utils.R") # Load GO results from earlier steps (example for Hip_BP7) go_df <- read.xlsx("output/Hip_...
1f770e8d61d57fbd3bcba20c859b59fbdbc44609c81578d0433d4f2c803066b2
R
2,386
72
test_that("multiplication works", { mirroreg = structure( c( -0.993507657550687, -0.0789118732716515, 0.162578427057817, 0, -0.0415891298774246, 0.998353717776582, 0.00339175766683097, 0, 0.0594215260756958, 0.0023521675167209, 0.9951539398219, ...
418496b2be72ed6dd7df149b660cd8087f0982507ba807650e901bc5aff2ad22
R
2,388
73
--- title: "Fig_S4G_CD8_Tcell_functional_genes" output: html_document date: "2026-02-17" --- ```{r} library(Seurat) library(tidyr) library(ggplot2) library(ggpubr) library(dplyr) library(harmony) library(purrr) library(cowplot) library(rstatix) library(ggbeeswarm) library(ggbreak) ``` # Set up and adjust metadata ``...
5dbff817e28f5ba5550c55100fbdff548ea2691775f31ed70cd70f6b550d0edf
R
2,388
67
library(ggplot2) rm(list=ls()) options(digits = 4) # by default, print results to four decimal digits set.seed(1823) #for replication - the year Trinity College was founded! #replace the empty quotes with the file path to the location where you downloaded the files from Dropbox below path = "" #----- Load in data ---...
1f6ecc0ea4cdd2bf11bf5eb1b3e112f04334d790d998c06d9a7c4b05fae47e9a
R
2,391
61
############################################################################### ## Generate DE gene counts plot with FDR < 0.1 ## ############################################################################### library(here) library(limma) library(ggplot2) library(tidyr) # Load the checkp...
f918fa8b4bc79b67650f141bad8e93ba8f2b76c11752b3030017633780f26a4c
R
2,393
53
data_selectedCpt_all_CPTPSP <- readRDS("datasets/data_selectedCpt_all_CPTPSP.RDS") nca_selectedCpt_all_CPTPSP <- readRDS("datasets/nca_selectedCpt_all_CPTPSP.RDS") pure_selectedCpt_all_CPTPSP <- readRDS("datasets/pure_selectedCpt_all_CPTPSP.RDS") cmp3_selectedCpt_all_CPTPSP <- readRDS("datasets/cmp3_selectedCpt_al...
1feb1294056098cc61c8ead439c00aa1577cb338a103f4ba8f23129123d74bbb
R
2,396
66
library(ggsegGlasser) library(ggsegSchaefer) library(ggseg) library(dplyr) library(ggseg3d) library(R.matlab) library(ggplot2) library(cifti) library(stringr) library(factoextra) library(matrixStats) library(scales) library(Hmisc) library(tidyr) library(cocor) # atlas data. schaefer200x17_label <- read.csv("G:/datase...
4a35fcb9ae978d56eb19659c340e71af3381a8ee2397ef6f371349cde7dfbba4
R
2,399
78
fanc_cloudvolume <- function(...) { cv=fafbseg::flywire_cloudvolume(cloudvolume.url = fanc_cloudvolume_url(), ...) cv } fanc_cloudvolume_url <- function() { rr=with_fanc(getOption("fafbseg.cloudvolume.url"), force = FALSE) sub("graphene://middleauth+", "graphene://", rr, fixed = TRUE) } fanc_api_url <- functi...
ae2b4666da4a6c6980c3bd390d0c7717e644ea72052c312403b86c83f83b310b
R
2,402
63
library(DESeq2) library(ggplot2) library(pasilla) # Define all comparisons comparisons <- list( list(name = 'HS', data = 'adjusted_df_HS', coldata = 'coldata_df_HS'), list(name = 'withoutHS', data = 'adjusted_df_withoutHS', coldata = 'coldata_df_withoutHS'), list(name = 'IP', data = 'adjusted_df_IP', coldata = '...
cba1c19715a93b63933fc48fbbf9ad0804b55bea762b159d0cbe48c4aa02619e
R
2,411
63
# Set the output directory output_directory <- "/home/joonho345/1_Epilepsy_RNA/RNA_Animal/06.Deconvolution/02.IMPORT_GO/" # Create destination directory if it doesn't exist if (!dir.exists(output_directory)) { dir.create(output_directory, recursive = TRUE, showWarnings = FALSE) } file_directory <- "/home/joonho345...
5416c4373c16b4d9e862bc670974098c11982622b7c214dcdb62deeeb5e5d32a
R
2,412
65
context("preparing a data set") test_that("ensure that samples and directories are included", { expect_error(sleuth_prep(study_formula, study_mapping)) expect_error(sleuth_prep(3, study_mapping)) expect_error(sleuth_prep(study_mapping, 3)) }) test_that("normalization factors", { expect_error(sleuth_prep(stud...
b429671947324c45ffe5efa685d67a8c16fc340261028082bb33af37bb527fbe
R
2,412
82
library(methylKit) library(dplyr) library(rtracklayer) library(ggplot2) library(reshape2) library(ChIPseeker) library(org.Hs.eg.db) library(GenomicFeatures) library(biomaRt) library(tidyverse) library(ggalluvial) plot_meth_pc <- function(pc, title){ # Add region IDs as a column pc_df <- as.data.frame(pc) n_r...
525bed695c48e58e1381195050cad2571224577af81486775c16b0369e674379
R
2,416
94
# ---- Variance Beta Distribution ---- # betaVar <- function(alpha, beta){ num <- alpha*beta den <- (alpha+beta)^2 * (alpha+beta+1) return( num/den ) } get_alpha_beta_EV_Var <- function(Pex, NewInfo, lowerQ, upperQ){ out <- matrix(nrow=length(Pex), ncol = 6) alpha <- 1; beta <- 1 out[1, 1] <- a...
602cc611e2fa14c007c9478fd72c0675d9f706ea46145a7204b0b07370bc08dc
R
2,416
70
########################################################### ### fix-batch-003-duplicates.R ### ### Removes the 3229 duplicate rows (rows 1-3229) from ### batch_000003.parquet that are already present in ### batch_000001 and batch_000002. ### ### Idempotent: skips if .bak already exists. ################################...
0190a1a5a619311cf4faed3d36572ac98460ef90352cd1c9583a813f2c8b640e
R
2,419
109
--- title: "Venn Calculator" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{VennCalculator} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` ## How to use Venn Calculator? `ggVennDiagram`...
a90d82539fc5073623f370adeb4023368f5200455bcfbf22591659739e9946f5
R
2,421
58
setwd(rstudioapi::getActiveProject()) rm(list = ls()) library(tidyverse) library(ggpubr) load("./Output_Data/Invitro.SC.analysis.Rdata") Invitro.SC <- Invitro.SumSC %>% mutate(Cla_SC = paste0(Class, "(", Sep.SC, ")")) %>% mutate(Age = ifelse(grepl("^O", Samples), "Old", "Young")) %>% group_by(Cla_SC, Age) ...
ef9f1f42cd50a9a4fa15c8ce1e439555119ed5142d1d0a42ccca986ff5137c54
R
2,422
56
library(dplyr) library(tidyr) #### Create GTF Matrix #### gtf_path <- "/home/joonho345/resources/Reference/Homo_sapiens.GRCh38.112.gtf" gtf_table <- read.table(gtf_path, header = FALSE, skip = 5, sep = "\t", quote = "", comment.char = "") gtf_table <- gtf_table %>% dplyr::select(-c(V1, V4, V5, V6, V7, V8)) gtf_table...
020cf768894bebc0f83d1117972ccf2d761f8f43fddb2fd95036434de4e6762b
R
2,423
61
# # sleuth: inspect your RNA-Seq with a pack of kallistos # # Copyright (C) 2015 Harold Pimentel, Nicolas Bray, Pall Melsted, Lior Pachter # # 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 F...
605c61b15e416afa5bbb5771d22db0a625033ffacf0d447b8f57c73a25bb30cb
R
2,425
53
######################################### ### ORGANISE CONNECTOME DATA MATCHING ### ######################################### source("banc/banc-startup.R") library(DBI) library(RSQLite) library(fs) #################### ### Flywire data ### #################### # Read from legacy source SQLite original_file <- "/n/dat...
3c4d4e191bfac092f3bc2161df4e1713f8041ac721c947dc032447d816047ce4
R
2,431
51
#' @keywords internal "_PACKAGE" ## usethis namespace: start #' @importFrom DBI dbConnect dbDisconnect dbGetQuery dbReadTable dbWriteTable #' @importFrom Matrix sparseMatrix solve diag lu #' @importFrom R6 R6Class #' @importFrom RSpectra eigs #' @importFrom RSQLite SQLite #' @importFrom dplyr filter #' @importFrom dig...
d865f3536d354471cf39a6467a07038bbb85fbb83219202cfa93d315f47866bb
R
2,432
83
#' @importFrom utils unzip #' @importFrom progress progress_bar extract_zip_files <- function(files, zipfiles=NULL, ...) { if(is.character(files)) { zipfiles=attr(files, 'zip') files=list(files) } else { if(is.null(zipfiles)) zipfiles=names(zipfiles) } if(is.null(zipfiles)) { stop("Please speci...
54d592cb283a3bb6d558b0de5455ae191879011831ac4ca5e6ee5a78b73a7497
R
2,435
49
#' banc-alignment-prep — Prepare data for the cross-dataset alignment algorithm. #' #' Dispatcher that loads a region preset and runs the preset's prep logic. #' Each preset bundles the region filter, the reference-dataset vocabulary #' rules, the seed-labelling policy, and the per-type capacity formula — #' those diff...
149b7279d0ba9cd9beddac1dc74442e3d7b421fc1efd4daebb019ac6ed41d080
R
2,438
68
##################################### ## Write TITAN parameters to database ## Author: Kevin Johnson ## Updated: 2023.03.20 ##################################### library(tidyverse) library(DBI) library(odbc) ## Current project. projdir <- "/projects/verhaak-lab/USERS/johnsk/glass4" setwd(projdir) ## Connect to the ...
ac1a428d620fbd0bdb24e4d6b80774395a90cb97dea5477cbaba836080213a5e
R
2,439
55
if(!require(dplyr)) { install.packages("dplyr") } if(!require(ggplot2)) { install.packages("ggplot2") } library(dplyr) library(ggplot2) # Test Case #2: CountReadsSpark, no intervals, HDFS input test_case_2 <- read.csv("/Users/tom/workspace/gatk/q4_spark_eval/test_case_2_results.csv") test_case_2$Total.cores <- wit...
36f9fce536f3fd3d33cc6925be134531ff14a31333ee3c2c185fed190c3f9400
R
2,441
52
# ---------------------------------------------------------------- # Run all dataset-specific load_data scripts, found in the # "load_original_data" directory. # After completing, each dataset should have a folder with all # processed data in "data/prelim_data" directory. # ------------------------------------------...
28cc15aff21cba474d75de199115ac8668340ddf38089010d0065e2c0a74d8e9
R
2,443
80
#DegCre RNAseq input files # open R srun -n 10 -p interactive --pty /bin/bash module load cluster/gsl/1.15 module load cluster/htslib/1.9-devel module load cluster/build_tools/llvm/8.0 module load cluster/util/gcc/8.2 module load hdf5_18/1.8.21 conda activate r4.4.1_env #conda deactivate R # Load necessary librarie...
486993842b66c25ffef8e2cfb58a61aaefc84d12d4490801b5ea2504b3bbc0cf
R
2,446
103
#' get applicable shape data for Venn object #' #' ggVennDiagram stores shapes as internal data. You may see all the shapes by #' using `plot_shapes()` or `get_shapes()`. #' #' @param type type of shape #' @param shape_id shape id #' @param nsets number of sets #' #' @return a tibble describing specific shape #' @exp...
eb7332b9a4d5fb9df6ad7184881f2d98cfbc51b7ac03e0542754d8f6bfb5eb97
R
2,446
68
##################################### ## Write TITAN parameters to database ## Author: Kevin Johnson ## Updated: 2022.07.06 ##################################### library(tidyverse) library(DBI) library(odbc) ## Current project. projdir <- "/projects/verhaak-lab/USERS/johnsk/glass4" setwd(projdir) ## Connect to the ...
57a0801f87a2b2de79a38e350d1274482794eb96a3f5e94f1665a30f66bf87c9
R
2,451
78
local({ correlation_ids <- c( "undefined_survivor", "member_b", "window_survivor", "index_a", "hidden_from_sp2", "overlap", "r2_survivor", "index_b", "ä_member", "z_member" ) correlations <- matrix( 0.1, nrow = l...
57adf95e506072a3c297cc84027e12fa51160154ba0f7b4d4c381b817666d6a6
R
2,455
77
root="C:/Users/Jun/Documents/R/AA_wSignal/" #this is the root folder ###########################you should only need to change the root directory to poinit towards your working directory #following sub folders rawtrack, rawtrack_ttl, allsigs, sig_ttls tdir=paste(root,"rawtrack",sep="") #put topscan files in ...
51868c319ea373325f0b29bba63b9622577d92b3d8e1b834e34062283f4ab002
R
2,458
73
suppressMessages({ library(scrattch.hicat) library(dendextend) library(dplyr) library(matrixStats) library(Matrix) library(Seurat) library(RColorBrewer) library(scrattch.vis) library(ggdendro) library(tidyr) library(ggExtra) }) args = commandArgs(trailingOnly=TRUE) obj <- r...
6bfb63ef0983b70600fc9def5aafa522e008a5df185836291b55feab3af1898b
R
2,460
65
library(ggplot2) library(dplyr) library(forcats) library(reshape2) library(viridis) # Correct data for each dataset data_countsV2A <- data.frame( Category = c(">2.0m", "1.6-2.0m", "1.2-1.6m", "0.8-1.2m", "0.4-0.8m", "<0.4m"), Count = c(5.689655172, 0.3793103448, 11.65517241, 4.310344828, 2.655172414, 275.2758621) ...
c1c4634626a5435eaa52c624e984027dae5c2ab19bba6a97b2a07d0514aed016
R
2,462
59
#####Tanycyte Mapping to Remove Nontanycytic Cells Through MapMyCells (RRID:SCR_024672) ##### #Software were given at https://portal.brain-map.org/atlases-and-data/bkp/mapmycells #Convert the tanycyte .rds file to .h5ad file # Extract the raw count matrix data_matrix <- tanycyte@assays$RNA@counts # Transpose...
c668b761199cde84593f78b599b72ddfb0a70afeb55ace51eca77cc7967f73d1
R
2,468
49
################# ### Load data ### ################# rm(list=setdiff(ls(),'params')) basedir <- params$basedir setwd(basedir) savedir <- paste(params$opdir,'processed/',sep='') dir.create(savedir,recursive=T) source('code/misc/miscfxns.R') connectivity.ipsi <- read.csv('data/Connectome_Ipsi.csv',row.names = 1,header...
7444e2bb80a3c327b2990af22b66da637967e7f2a93527da975c8dc6bd55137f
R
2,469
70
#!/usr/bin/env Rscript #------------------------------- # Title: Check success of scripts # Author: Amanda Zacharias # Date: 2022-12-17 # Email: 16amz1@queensu.ca #------------------------------------------------- # Notes ------------------------------------------- # module load nixpkgs/16.09 gcc/7.3.0 r/3.6.0 # If job...
0dedb23ffd35af2e5f0230588e41a387038230a61e78606565d5f5421519c6ed
R
2,470
76
# This script identifies SNPs that are present in the EpiXcan database but missing from the target genotype data # It is typically used as a preprocessing step for genetic analysis to identify variants that need proxy SNPs # Load required packages if (!require("data.table")) install.packages("data.table") if (!re...
7f98886d278844a406a2a7de970730198983a100b84d7531c3fb644e089a0abe
R
2,472
80
# Description: This file is used for categorical conversion of trait variables library(dplyr) traRfVif2ndEd <- "D:\\work2\\t2dAndComplicationsUkb\\data\\processed\\integComp2ndEd\\traRfVif2ndEd.rds" %>% readRDS(.) trait6 <- traRfVif2ndEd traCla <- trait6 %>% lapply(., class) %>% as.data.frame(.) %>...
fe028a3104f20198bc10ad87b2a88406f816333f444121a6abc2ba4094a5922d
R
2,472
53
library(dplyr) library(ggplot2) library(ggrepel) studies = c('Ma_human', 'Franjic_human', 'Sepp_human', 'Ma_chimp', 'Ma_rhesus', 'Franjic_rhesus', 'Ma_marmoset', 'Franjic_pig', 'Sepp_opossum', 'Tosches_lizard', 'Tosches_turtle', 'Colquitt_zebrafinch', 'Colquitt_Bengalese_finch', 'Liao_frog', 'L...
142121d357d14cc77f1ad0498e882dc033788cee03e1cf7c00cc7e36b5ccd051
R
2,475
58
require(ggplot2) require(grid) # Define the custom geom function geom_gene_rect <- function(mapping = NULL, data = NULL, stat = "identity", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, rect_height = grid::unit(3, "mm"), ...) { ggpl...
50c5039b95ecdb8fc6c123ce4f263e0edb1a1f0e87b2052e6a8afcae9fcf6403
R
2,481
72
library(tidyverse) library(odbc) library(DBI) library(GSVA) library(qusage) rm(list=ls()) myinf1 <- "/projects/verhaak-lab/GLASS-III/data/res/verhaak_prelim/msigdb_hallmark_enrichment_idhwt.txt" es <- read.delim(myinf1) colnames(es) <- gsub("\\.","-",colnames(es)) es <- t(es) #Establish connection con <- DBI::dbCo...
0d7d8539ac215e0c6c5832b598d583ad1a09285f506fe92b5fe1a9652043853f
R
2,491
67
#' Marker Diversity Function #' #' This function calculates the Shannon diversity index for markers within clusters #' and categorizes the diversity into "High", "Within 95% CI", and "Low" categories. #' #' @param ann An object containing annotation data. #' @return A ggplot object showing the Shannon diversity by clus...
d523a2eda743db408d1ed9c68fd8a2d8e1b9d1484bb3207a027f50f79bc51d06
R
2,499
74
library(dplyr) library(readxl) library(readr) # Set base directories # base_dir = "path/to/conditional/results/" # metadata_path = "path/to/metadata.RData" base_dir = "./result/conditional.results/" metadata_path = "./metadata.RData" check = list.files(file.path(base_dir, "cohort.list")) check = gsub("\\.r...
6d8505e5406f63681838f2bcd5e3312580bf86e0daf9eb8ba7cfc5b3a30e313d
R
2,502
84
# =============================================================== # 🧭 Stratification helpers (shared across analysis modules) # =============================================================== MAX_STRATIFICATION_LEVELS <- 10 stratification_ui <- function(id, ns = NULL) { ns_fn <- if (is.null(ns)) { NS(i...
28028c1707eb0e3bf169e9f390a897164a7a383aa9a29273d15b13746dd665ff
R
2,503
45
library(dplyr) library(ggplot2) library(Hmisc) library(survival) library(rms) library(feather) #Parse SUPPORT trial data from Vanderbilt Biostatistics web site #If lab value missing, set to recommended value in: http://biostat.mc.vanderbilt.edu/wiki/Main/SupportDesc?sortcol=1;table=1;up=0#sorted_table #We do not inclu...
0d94fc786a0734e23bfca1e099b336760c89c569179f4e86db794c666d0e659d
R
2,504
113
--- title: "Get list of triple Aplus samples" author: - David lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r Sys.Date()`" output: rmarkdown::html_document: highlight: pygments theme: yeti toc: true number_sections: true df_print: paged code_download: false ...
1bb255b04deac46329d69396eeaa4d1c0a25e3c89b739c65301ec36e2619b04a
R
2,508
69
## ******************** ## Create the R package ## ******************** ## To get started, install R from https://cran.r-project.org/ ## and RStudio Desktop https://rstudio.com/products/rstudio/download/#download ## You can install both of them for free. ## Next, open RStudio as the code that will run benefits from r...
c0a7722ca74de71178c71f584ce2e1cdbd373e9e194248fbab2fc68f09ea9028
R
2,512
58
#' load-keys — Load private Google / Drive / Sheet identifiers into `banc.keys`. #' #' Mirrors `BANC-project/R/startup/load-keys.R`. Reads `data/private/keys.csv` #' (gitignored) into the named list `banc.keys` exposed to the global #' environment. Each row is `name,value,description`. Downstream scripts #' reference `...
2c39383f352e303cb364422f4161a138daa0c6207f7d6a21f0633b67aeec11b0
R
2,516
120
--- title: "Summerize the results from GOseq" 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: paged --- ```{r setup, include=F...
5f60da4a869669bfd65b2e5c9eaa1e1c9b1919efda23d3d2ba86132b75ef31cb
R
2,520
75
args <- commandArgs(TRUE) data <- read.table(args[1], fill=TRUE, sep="") #choose sequences that have less e-value than 1e-5 viruses_sequences <- subset(data, data[,5] <= 1e-5) #get rid of the last underscore and number of the sequence name viruse_sequences_name = c() for (i in 1:length(viruses_sequences[,1])) { ...
adf674340e71b78b61b6a9069208d90052b5a7212cf1d13f1e100fb6ddd861a2
R
2,526
73
library(Seurat) library(ggplot2) library(dplyr) library(cowplot) library(reshape2) library(MIN) library(EnhancedVolcano) Idents(LG815_TDI) <- "celltype" levels(LG815_TDI$celltype) MG <- subset(LG815_TDI,idents = c('MG')) DefaultAssay(MG) <- 'integrated' all.genes <- rownames(MG) MG<- ScaleData(MG, features = all.gene...
aed112d6a34767b405a23da84999096870a83956087aa6f871d5e77b0071a589
R
2,526
64
#!/usr/bin/env Rscript # Supp10a.export_gsva_modules.R # ---------------------------------------------------------------------------- # Companion to Supp10.replicate_level_gsva.py — exports the per-sample GSVA # module scores from the binary RDS checkpoint into a tidy long-format CSV # that the Python plotting script c...
f4abbbe384a26c03f3291ef90fb6f5fd15d34b53e6c0e8206564ad8756f48def
R
2,529
70
suppressMessages(library(monocle)) # Pseudo-time for uncorrected. expr.matrix <- as.matrix(read.table("data/macrophage/mono_macro_table.txt")) sample.sheet <- read.table("data/macrophage/mono_macro_meta.txt") gene.annotation <- read.delim("data/macrophage/mono_macro_genes.txt") pd <- new("AnnotatedDataFrame", data =...
7ae084291b17694e8a96d5c082f23368a38d19a40aa2b77af8e845c988cab298
R
2,532
123
--- title: "Add brain and blood analysis results to external cohort (ANDI) results" author: - David Lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r format(Sys.time(), '%d %B %Y')`" output: rmarkdown::html_document: highlight: breezedark theme: lumen toc: true number_s...
253880ec95f3cc3413e1c9f1be089f60c651b0b1b73351b5196ec3df9ffc3e88
R
2,534
78
parse_svg <- function(f, outf=NULL, colpal=NULL, colids=names(colpal)) { if(!requireNamespace('xml2', quietly = TRUE)) stop("Please install") x <- xml2::read_xml(f) xmc=xml2::xml_children(x) ids <- xml2::xml_attr(xmc, 'id') xmc=xmc[!is.na(ids)] ids=na.omit(ids) paths <- xml2::xml_children(xmc) if(l...
8822af7435a93ef58f7eed560fd84238332cf1df8ccc153abcf4d5a0a624ae10
R
2,536
93
# 加载必要的包 library(readxl) library(dplyr) library(tidyr) # 读取 Excel 文件 data <- read_excel("P0-qRT-PCR-unpaired-t-test.xlsx", sheet = 1) # 查看实际列名 col_names <- colnames(data) cat("实际列名:\n") print(col_names) # 数据清洗:将基因列转换为字符 data$gene <- as.character(trimws(data$gene)) # 根据实际数据结构提取CON和GCS组的列 # 第1列是gene,...
565ad371dfd2d02b807cce09a74f7c99f7aeb99f1b66d43ed25fbc945dced163
R
2,537
70
library(ggplot2) library(dplyr) library(viridis) library(cowplot) # Combine data for global color scale combined_data <- bind_rows( horizontal_combined %>% mutate(Type = "Horizontal"), vertical_combined %>% mutate(Type = "Vertical") ) # Define a global color scale shared_scale <- scale_fill_viridis( option = "D...
0807fcec4d621aca96e4b0a590b720f1bd7b00cc936dda6915a1c80ac75d2d20
R
2,538
68
library(mice); library(readxl) # IMPUTE BIOMARKERS ------------------------------------------------------- bio <- read_excel("~/Documents/BrainAge/ELS/BioAgingComposite/Biomarkers_raw.xlsx") # --- Separate ID so it never enters the imputation model --- subID <- bio[, 1, drop=FALSE] # keep as data.frame,...
4e65324a07212a8e9fac6981178d490b8db52b5423096869575e2e93b826f00c
R
2,539
39
######################################################################################################## #### Trial dataset for this R script can be downloaded from #### #### https://data.mendeley.com/datasets/454s2vw255/1/files/38438fb8-b4f9-4c3b-8e36-7b7f7ace017e #### ##...
a52be4cf10f3fbdd3c39ecdc9d293682770a12b957b9167d6d0e4d952ed09985
R
2,541
78
#setwd("E:/Rworkplace/01-17") #remove.packages("rlang") #BiocManager::install(c("lifecycle")) #install.packages("BiocManager") #library(BiocManager) #.libPaths(c("","")) #BiocManager::install("ggplot2",force=TRUE) #BiocManager::install("rlang",force=TRUE) #BiocManager::install(c("ggplot2","ggpubr","ggsignif")) library(...
3430b0d26d4c614ecf6e3cca507bdb750970bd834e9677ac3ae7adb8ef3d7445
R
2,544
74
library(biomaRt) library(data.table) library(dplyr) library(GenomicRanges) p1 <- "resources" mpra_pos <- read.csv(file.path(p1,"MPRA_w_pos_GRCh38.csv")) # load atac peaks path_mypeak <- "QTL_fsVars/mypeaks" atac_cts <- c("ast","mg","EX","IN","odc","opc") bed_files <- read.csv(file.path(path_mypeak,"list"), header = F)...
a6f1942825fb0aeeea52a29af28fc18131301bf4eb25e2bcf53c2edc736bd8fb
R
2,544
72
# ============================================================================== # Load DNA Methylation (DNAm) Data # ============================================================================== # This script loads and prepares DNAm data from Illumina 850K arrays # # Author: Osama Shiraz Shah # ======================...
2563f5278a1af41c6f09cd3ca123b5023747eab06837fb30e5b9f10e5d89126a
R
2,550
66
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### # Parameter settings ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### setwd(file.path(getwd(), "R")) source("00_directorySettings.R") # load baseDir <- "/WORKING_DIR" source("00_settings.R") dataDir <- file.path(baseDir, "data") nmfDir <- file.path...
cc00bb34ae0e9e7a76f2d6a5ec36f7b7b88aa94f7366a9649bed01b4476936b6
R
2,551
71
#------------------------------------------------- # Title: Check success of stringtie scripts # Author: Amanda Zacharias # Date: 2023-01-01 # Email: 16amz1@queensu.ca #------------------------------------------------- # Notes ------------------------------------------- # module load nixpkgs/16.09 gcc/7.3.0 r/3.6.0 # I...
2d818ffc55cde36752fa2c4c2c342c722ef5b26afd2857539dfe715ee7dc5f8a
R
2,557
71
# Description: This script uses the mstate package to analyze the risk of # type 2 diabetes and overall complications # Shared head ---- library(mstate) library(dplyr) integComp2ndEd <- "D:\\work2\\t2dAndComplicationsUkb\\data\\processed\\integComp2ndEd\\integComp2ndEd.rds" %>% readRDS(.) traLab2ndEd <- "...
3a9e1fbd32a930a52dd000100a33287f4047d0e15816a48204ce2e05b19a71b4
R
2,559
62
################################# ## Create blocklist for GLSS-LX WGS ## Updated: 2022.07.26 ## Author: Kevin Johnson ################################# library(DBI) library(tidyverse) ## Connect to the latest version of the database that contains the GLSS-LX samples. con <- DBI::dbConnect(odbc::odbc(), "VerhaakDB4") ...
19026e8612867eff07f9c60d74f8b2d599fe5b3ec928aacf0d543555303aeafd
R
2,563
73
#!/usr/bin/env Rscript # ============================================================================ # ## set_dirs.R ## MGNG-TUS study: Set input and output directories for data processing. ## Copyright (C) Johannes Algermissen, University of Oxford, Oxford, UK, 2024-2025. set_dirs <- function(rootDir){ #' Initiali...
9b35dd29345c9eb8ca04bf741a5ae71e16bf7f03e64cbbaa6f8cfc3a2176c3df
R
2,563
61
library(foreach) library(doParallel) library(emmeans) ## Calculate edge-wise significance and Cohen's D for visualization setwd('/home/huyang/Projects/HuYang/HY_20251111') ## Set parallel cluster to speed up n.cores <- 20 my.cluster <- parallel::makeCluster(n.cores, type = "FORK") doParallel::registerDoParallel(cl = my...
a338aa96bfb5007543ecf744ee96b8e1f07ce05b8a16b8d48cd0e29c2d2d6bae
R
2,572
90
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # Load banctable and save DN metadata, DN skeleto...
217046827fba404423736da22b3f1646008131e8909d8d808b4d31f531e59461
R
2,576
70
# Written by Yapei Xie and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md CBIG_LBC_plot_violin <- function(df_m, outfile, model_order, fill_colors) { # CBIG_LBC_plot_violin # # Generate a violin plot with overlaid boxplot for comparing correlations # across multiple models and save...
1cd0af7fe210db4b81f120163f2103919418a71efe319d06ac48fe38fe6475fe
R
2,578
87
# Convert characters to ordered factors preprocess_uploaded_table <- function(df) { df |> mutate(across(where(is.character) | where(is.factor), auto_factor_order)) } # Convert character/factor to factor with numeric-aware order auto_factor_order <- function(x) { if (!is.factor(x) && !is.character(x)) return(x) ...
3870b3c3fbda2d4fb1100bb9d1e9f31f391d11e607a0a627ad95e1048ec681e2
R
2,579
76
rm(list=ls()) #Use for extracting the files from a specific directory myDir1 <- "/projects/verhaak-lab/USERS/johnsk/glass4/results/mutect2/geno2db/" myinf1 <- dir(myDir1) myinf1 <- myinf1[grep("info.tsv",myinf1)] myinf1 <- myinf1[grep("CARE-TK|CARE-TO",myinf1)] # Remove CARE-TK-TK06.info.tsv and revisit later since it...
8199c4167f5660aae90b04233d24c0a51a1d3a0ec46a7f991f3ea564bbeafb79
R
2,579
68
#' Tunes marker set based on specified criteria #' #' This function filters markers within a specified set (query or database) based on absolute or relative thresholding of a given variable. #' #' @param ann An object containing marker data in `ann1$query` or `ann1$db`. #' #' @param method The tuning method ("absolute...
b828edf95255fb46f8035b73ab1016a7c7e2b792127dd9a437141587feb3f754
R
2,582
124
--- title: "Summerize the results from GOseq" 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: paged --- ```{r setup, include=F...
03f7cb7a3add22cf448d1faca4bfa960bf0fa1011ff685939d0a740fc0af9d9f
R
2,583
68
# Load required libraries library(ggplot2) library(dplyr) # Function to plot publication years (horizontal bars) and save as PDF # order: "older_first" (default) or "newer_first" plot_publication_year <- function(df, output_file, order = c("older_first", "newer_first")) { order <- match.arg(order) # Remove m...
9ba0305489d116d9adac02175852046eaaa26f665d3cf22190b28933b018acc7
R
2,583
86
#!/usr/bin/env Rscript #------------------------------------------------- # Title: Write individual multiqc scripts # Author: Amanda Zacharias # Date: 2022-12-17 # Email: 16amz1@queensu.ca #------------------------------------------------- # Notes ------------------------------------------- # module load nixpkgs/16.09 ...
47998b553788b0331486dbeb2bb7eaeb4e22d253949d79b34fde0591bca9f7e7
R
2,584
54
library(ggplot2) library(Seurat) library(ggrepel) library(RColorBrewer) library(dplyr) library(cowplot) library(reshape2) library(MAST) library(patchwork) # volcano plot of markers of MG4, focusing on DAM genes (Figure 2E) ====== setwd() dam <-read.csv("DVvsWT_DE_MAST_RNAassay_MG_pct0.15_dim15.csv") DV_MG <- read.csv...
a4d95db9609fc8d9c0737dcd75af5c316feade7355d673486b46d13d1eff8681
R
2,586
58
# Read source and libraries library(SAIGE) library(data.table) library(Matrix) library(optparse) option_list <- list( make_option(c("--rdaFile"), type="character", default="", help="Path to rda file from SAIGE step 1"), make_option(c("--chrom"), type="character", default="", help="Chromosome"),...
efa3e2c236298ddc8e6b99b9c8a4b2ed7583d4b71971c9dca8e4dbb7b60f0fdf
R
2,588
65
#!/usr/bin/env Rscript args = commandArgs(trailingOnly=TRUE) print("************************************ Starting ************************************") library(Matrix) ## Test parameters: # in_path <- "/vast/palmer/pi/verhaak/kcj28/care_mut/processed_data/nmf_2026/Myeloid/" # mat_index <- 1 # out_path <- "/vast/pa...
cfd73abb242acc514ed73d19658aa785764e01ec1e0f7c4064d147b043d43c2d
R
2,589
67
library(data.table) library(dplyr) library(parallel) library(limma) library(purrr) # Set working directory to project root # setwd("") model = "CIS_EpiXcan" ### Params target_file_path = c("./genotype/") site = "your_training_genotype.bim" # GTeX.v9.phased.geno.maf.bfile.updated.EUR CMC...
8f49fd20af14e7ded7b1651a6bb1aac0e980c470348c91d6d583f7ea32940f8d
R
2,590
122
--- title: "Summerize the results from GOseq" 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: paged --- ```{r setup, include=F...
62625f91a83f167d519973cfa7ebef9e31e16f3ece69705a2d32e275471a9107
R
2,594
78
#' banc-obj — Download per-neuron OBJ meshes for proofread BANC neurons. #' #' @section Reads: #' - SeaTable `banc_meta` #' #' @section Writes: #' - `<banc.obj.save.path>/<root_888>.obj` #' #' @section Invoked by: #' `o2/production/o2_banc_meshes.sh`, `o2/production/o2_banc_split.sh`. ###########################...
21457c92693929a236e2627bc72e829ffcd7b7fbbfc0c799ae8d52e778223aff
R
2,597
77
##################################################################### # Create Prediction Database Pipeline ##################################################################### # This script creates SQLite databases from the training results # It performs the following steps: # 1. Processes summary and weights fi...
479130fe3cbce389ba54730e543eb686ccbf78271e58ec074561b6325ed22b46
R
2,599
60
################################## # Plot the proportion of malignant cells cycling per malignant state # Author: Kevin Johnson # Date Updated: 2026.04.10 ################################## library(tidyverse) proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut" fig_dir <- file.path(proj_dir, "figures/") se...
0ebc2672fe2e578468a008979549b818d126a0adef5366f093b3772e7187a041
R
2,602
80
--- title: "Fig_S4B" output: html_document date: "2026-02-17" --- ```{r} library(Seurat) library(tidyr) library(ggplot2) library(ggpubr) library(dplyr) library(harmony) library(purrr) library(cowplot) library(rstatix) library(ggbeeswarm) library(ggbreak) ``` # Set up and adjust metadata ```{r} srt_merge <- readRDS("~...
15aee0bc3f3a5e4187e27543063069156cb91d63cab1cf79e9be4ec8cef51455
R
2,602
95
rm(list = ls()) library(tidyverse) library(Seurat) library(recombine) # Here we use a scRNA-seq data of the mouse visual cortex from Allen Brain Atlas, which can be downloaded from: # http://celltypes.brain-map.org/api/v2/well_known_file_download/694413985 # The following files are used after uncompressing the dow...
83c72a4a4c739b66e2dab83f89e66c74e59715d5929adae5a2776cf22e51acee
R
2,606
66
## In vivo sorted cells effect size calculation setwd(rstudioapi::getActiveProject()) rm(list=ls()) source("./Scripts/Function_scripts/Effect_size_functions.R") source("./Scripts/Function_scripts/Pre-processing_functions.R") library(tidyverse) ###########################################################################...
345748b2c1d65d953b8455b7c6d58967ad20b18896c072870139ffba6db0dd4c
R
2,610
85
# ============================================================ # Nyström KPCA core routine # # This function performs kernel PCA using a Nyström # approximation to reduce computational complexity. # # Key implementation details: # - A fixed proportion (5%) of the total sample size is used # as Nyström centers...
9e5d45fc78dbc93a3a5c0458179c14ef77e7346d5c6b747d9adf9ac6fe01ba1e
R
2,611
67
# 1-20-10 Qunhua Li # # This program first plots correspondence curve and IDR threshold plot # (i.e. number of selected peaks vs IDR) for each pair of sample # # usage: # Rscript batch-consistency-plot-merged.r [npairs] [output.dir] [input.file.prefix 1, 2, 3 ...] # [npairs]: integer, number of consistency analyses # ...
cc8a4002e6742133a6390a034b27fdf4246808caa631baf71b8912c4432b5a8a
R
2,611
59
################################## ### Upload tumor-only files data for GLSS-LX WGS files ### Author: Kevin Johnson ### Date updated: 2022.07.29 ################################## library(tidyverse) library(odbc) library(DBI) library(stringi) ## Establish connection with GLASS 4 database. con <- DBI::dbConnect(odbc::o...
2a6f0deac6ec88e27a0dffc69fa00e5c39e32598e59c1c953d90a976e497bc17
R
2,615
71
library(dplyr) example_driver <- readRDS("~/tmp/mhcbinding/example_driver.rds") example_driver <- example_driver %>% select(-pos_alter,-transcript,-exon,-index) %>% select(trans,everything()) %>% group_by(across(2:aa)) %>% summarise(contain_trans = paste(sort(trans),collapse = ",")) ##文件太大,先把 gene 及其 突变 氨...