sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
265237e9f1ff6cf9452095bcb64d2bb632443d1347c6722dffa2a22c592fb817
R
5,146
148
# 13 Jun 2022 Siwei # Calc Bulk atac-seq of NGN2-Glut # init library(readr) library(plyr) library(dplyr) library(stringr) library(Rfast) library(ggplot2) library(RColorBrewer) ### NGN2_Glut_NEFM_pos ASoC_df_raw <- read_delim("two_batchs_merge/temp_merge/output/GABA_14_lines_merged_SNP_24May2022_DP20_4_R.txt", ...
6ec7e0123b5ca9f24d00ce7bc89efe34a27f236fb3af9a6a756ac516643ce98d
R
5,150
155
# Brain Perfusion Analysis - Simplified Version # Creates hemisphere comparison figures for Gross, CT, and H&E assessments # Load required libraries library(tidyverse) # Define color palette cbPalette <- c("L" = "#3182bd", "R" = "#FF7F7F") # === HELPER FUNCTIONS === # Function to create hemisphere compar...
af582ebfda6f9c530dd386698da6c69c5e644f307473775be6722ba9ef8f9a4c
R
5,162
119
# ********************************** # Tabula muris dataset analysis # ********************************** if (!require("here")) { install.packages("here") library("here") } if (!require("magrittr")) { install.packages("magrittr") library("magrittr") } if (!require("tidyverse")) { install.packages("tidyverse...
c35885cbbac3598e5ae14fd1808da46291202a609bd7c83aec6468449e4449eb
R
5,166
148
# ICC Analysis for Perfusion Rating Data # Modified for specific CSV structure with Grader 1 and Grader 2 columns # Load required libraries if (!require("irr")) install.packages("irr") library(irr) # ===== FILE SELECTION ===== cat("\nPlease select your perfusion rating CSV file in the dialog box...\n") data_...
0c8ac7e6fc8db9b84c0e49e76ec44aa75e709b3ac8a802badc71b4a1a5c6398e
R
5,171
125
#' Get UK Biobank participant phenotype data #' #' @description Using a Spark node/cluster on the UK Biobank Research Analysis Platform (DNAnexus), use R to extract a provided set of variables. Using code from the UK Biobank DNAnexus team https://github.com/UK-Biobank/UKB-RAP-Notebooks/blob/main/NBs_Prelim/105_export_p...
146d88b487fcb35910015678cbc04b5c96b85696da93b97611b8a00150fe092d
R
5,173
117
library(tidyverse) #' starting from bottom (i.e. the filename) of a UNIX-like filepath, return the directory name at a specified upstream 1-based level getDirectoryAtLevel <- function(filepath, level) { # Split the filepath into components components <- rev(unlist(strsplit(dirname(filepath), "/"))) # Check if...
9de64d748665eb5fbec07fc564dbdf235766f7b2c238552f66135dba3f212747
R
5,179
166
--- title: "iCLIP Intron enrichments in features" author: "Michael Rauer" date: "`r format(Sys.time(), '%d %B, %Y')`" params: rmd: "iCLIP.introns_analysis.Rmd" output: html_document: code_folding: hide df_print: paged fig_caption: yes number_sections: yes tables: yes toc: yes toc_float:...
38bec9c4bfe1524234d0325204b2fd83f729d068d9c1d094ca85c98a2e864718
R
5,180
132
#' Run differential rhythmicity analysis using linear model selection #' #' This function runs the information criteria-based model selection proposed by #' Atger et al. (2015) for identifying timeseries with different rhythms in the #' two datasets. #' #' @inheritParams compareRhythms #' @keywords internal compareRhy...
75c65d05bfe32fffb496986124b8deb090bc74ef349a9213c43a6b1d25a399c4
R
5,180
107
options(stringsAsFactors = FALSE) library(ggplot2) library(reshape2) library(dplyr) library(stringr) library(lme4) library(lmerTest) library(RColorBrewer) library(ggpubr) library(parallel) library(MutationalPatterns) ref_genome="BSgenome.Hsapiens.UCSC.hg19" chr_orders=c(paste("chr",1:22,sep=""),"chrX","chrY","chrM") li...
00915ce28f64ace6211577aed06593c27d80c654ceb18583d3e8cb111d82795b
R
5,184
160
#' Plot_Zygosity_Sinle #' #' Plot each SNP, without any summarization #' @param Table The LOH table containing the output of the DeletionTable function #' @param Organism "Human" or "Mouse" #' @export #' @return None Plot_Zygosity_Sinle <- function(Table, Organism) { tbl <- Table if (Organism == "Human") {...
4ee8131fd5980d35203587f70104cc0c43b09e2cd3877e2927aa33ca1fae0c14
R
5,189
136
# group 1 (split): introns, flanking circRNA. Split into upstream and downstream # group 2: genome-wide. Note, Discard short introns # group 3: Introns of circRNA genes, not flanking the circRNA exon # group 4: introns of functional targets (carrasco2020) # [open] group 5: differential Exons (DEXseq, carrasco2020), ups...
0c125bfa875676d8e1e03cc2a33bac3c7f0b9d8a476d7450ae05e2525f8ee301
R
5,199
163
library("SingleCellExperiment") library("BisqueRNA") library("here") library("tidyverse") library("sessioninfo") library("BiocParallel") n_runs = 1000 marker_label <- 'MeanRatio_top25' marker_file <- here( 'processed-data', '08_bulk_deconvolution', 'markers_MeanRatio_top25.txt' ) sce_path = here("processed-data", ...
60d6ab3afd4a7bb2901cefcd8904719cfc64b92299094e6929ae8f0f7f19da41
R
5,201
136
# Finding differentially expressed features (cluster biomarkers) using Seurat (Harmony subclusters) # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # August 2022 # Based in the Seurat Vignettes by the Sajita Lab # activate conda enviro...
86b2ec53e9e11c2e03d75c7bdd4c6482ca3789414ac82dff26d019c609a04147
R
5,204
114
```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(WVPlots) library(clue) library(tidyverse) library(dplyr) library(tidyr) library(ggplot2) library(ggExtra) library(cowplot) library(corrplot) library(visreg) library(ggcorrplot) library(ggseg3d) library(ggseg) library(ggsegSchaefer) #library(ggsegYeo...
77c43f56d7c492f47ddbfe07b29b945f42e85eddcb7572b85791dae70fdb7590
R
5,221
173
# Siwei 21 Jun 2024 # Import scRNA-seq data of previous microglia to identify potential samples # init #### { library(Seurat) library(Signac) library(edgeR) library(DESeq2) library(MAST) library(future) library(stringr) library(harmony) library(readr) } plan("multisession", workers = 6) set.see...
4e89be2822c11b34ea1b7d6793704d21943794e15ef8806dd1a0df3e8516e1f0
R
5,223
135
#!/usr/bin/env Rscript # Author: Tim Sterne-Weiler, 2014 # tim.sterne.weiler@utoronto.ca # Updates: Manuel Irimia, 2015-present # mirimia@gmail.com suppressPackageStartupMessages(require(optparse)) option_list <- list( make_option(c("-p", "--prompt"), action="store_true", default=TRUE, type="logical", help="User ...
43accd5cf289da834d0d1d2eb5aa58c440a3ec072404f29beda0ef7750addb1d
R
5,233
105
##basic GSEA of DESeq2 results ##also the msigdb library(clusterProfiler) library(msigdbr) library(tidyverse) get_cds_list<-function(lfcs){ df<-lfcs %>% as.data.frame() %>% mutate("stat"= log2FoldChange * -log10(pvalue)) geneList<-df[, "stat" ] names(geneList)<-sapply(row.names(df), function(...
832a5e4c0a7484c82f9a9264251e819109f394ea3c6ca244f3c1d666f77400f0
R
5,237
167
#5C library(ComplexHeatmap) library(ggplot2) young_kznf <- kznf_infer %>% filter(age=="young") # preprocess tcx tcx_res_kznfs <- mayoTEKRABber$tcxDE$gene_res %>% data.frame() %>% filter(abs(log2FoldChange) >= 0.5 & pvalue < 0.05) %>% filter(rownames(.) %in% kznf_infer$external_gene_name) tcx_exp_kznfs <-...
cc854d282a5c41b56d6b2e83fce7aca0fd4300f16866c3ce1ac7949100a6b58d
R
5,239
119
# Script to explore expression of genes from protective rare variants in DLPFC Inh1 # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # Jan 2024 # Run the script using my conda environment (conda activate use_seurat_r4), from its director...
bf49a9f5404a92b5ec44553048d54278c9718da0af70ee34eadeab86308325f6
R
5,245
129
suppressPackageStartupMessages(library(optparse)) option_list = list( make_option(c("-e", "--eej_count"), type='character', default = NULL, help="count matrix for exons, feature counts junctions files"), make_option(c("-i", "--eij_count"), type='character', help="count matrix for int...
59127aabf4172e9685f56f80538cffdb9d7c166ca2db9051e0d16184fd9eb1a6
R
5,255
173
# Siwei 26 Jan 2025 # plot new Ex. Fig 5c # init #### { library(readxl) library(stringr) library(ggplot2) library(scales) library(reshape2) library(RColorBrewer) library(ggpubr) library(dplyr) library(data.table) library(DescTools) library(multcomp) library(gridExtra) } rm(list = ls()) ...
862b4a249a5bc12650f967615c52151ca54adfce079f1759ee0bb58a4dcc059e
R
5,266
118
#Analysis of Tabula muris data set ##### 1. load packages and data####### ###load packages if (!require("here")) { install.packages("here") library("here") } if (!require("magrittr")) { install.packages("magrittr") library("magrittr") } if (!require("tidyverse")) { install.packages("tidyverse") library("ti...
35b4c778970e6bc9856887fb00f715ea247b497e36aa7e2262ba941640fd2b90
R
5,271
150
# Siwei 24 Apr 2024 # make Upset plots to show peaks between all cell types # init ##### { library(readr) library(UpSetR) library(stringr) library(RColorBrewer) } # load data #### df_peaks_file <- list.files(path = "indiv_peak_names", pattern = "*.bed", full.names = T) df_raw <...
99a54f45bc26c5354d16e7179c11e2a3fae79558e821e431e86219018478a0eb
R
5,275
137
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) list2env(rjson::fromJSON(file = "00_configs.json"), envir = .GlobalEnv) library(Seurat) library(Signac) library(ClustAssess) library(qs) library(rhdf5) library(dplyr) library(future) library(doParallel) library(ComplexHeatmap) figures_path <- file.path(projec...
4512537f28b58e58045161d42a2a5b61c49bb280baa2fbf0ef928b49440af8a5
R
5,277
137
library(tidyverse) library(nullranges) library(cobalt) requireNamespace("ks") set.seed(123) # Function to add pseudocount and log2 transform using tidyverse add_pseudocount_and_log2 <- function(data, columns, pseudocount = 1.01) { data %>% mutate(across(all_of(columns), ~log2(.x + pseudocount))) } # Function t...
1aa7fef0ad21e47c2950dadf7af17923bc9db26a96d5246f84d3c9308b809712
R
5,278
100
#inputFile='feature_infor.txt' #inputDirectory='/home/yli4/development/JUMPg/JUMPg_v2.3.3/gnm_stage1_test1/intermediate/sum_accepted_PSMs/misc' #nTotLines=3724 #search_engine='jump' setwd(inputDirectory); #suppressPackageStartupMessages(suppressWarnings(library(tcltk))) library(MASS); #library(...
9b979df6d0e3357c7f9c433f2deb738084ed596da01f545d0337392b01c26a9c
R
5,284
100
#inputFile='feature_infor.txt' #inputDirectory='/home/yli4/development/JUMPg/JUMPg_v2.3.3/gnm_stage1_test1/intermediate/sum_accepted_PSMs/misc' #nTotLines=3724 #search_engine='jump' setwd(inputDirectory); #suppressPackageStartupMessages(suppressWarnings(library(tcltk))) library(MASS); #library(...
439d2ce0917e17edca820116a92e1b27ca51225b152f21fec224b445b661598c
R
5,291
97
context("Comprehensive Test for Classification Metric") test_that("running dataset test", { act <- aif360::binary_label_dataset( data_path = system.file("extdata", "actual_data.csv", package="aif360"), favor_label=1, unfavor_label=0, unprivileged_protected_attribute=0, privileged_protected_attr...
10852d9ddc0b88891c0d496913b4f8a23c40831684bf16997f3953b6772b0821
R
5,292
138
library("tidyverse") library("SingleCellExperiment") library("here") library("sessioninfo") library("here") library("patchwork") #### Set-up #### plot_dir <- here("plots", "03_HALO", "12_HALO_cell_size") if (!dir.exists(plot_dir)) dir.create(plot_dir) data_dir <- here("processed-data", "03_HALO", "12_HALO_cell_size")...
3c6ec93a3a8930eadea4fb376b98a4247106cebe7da3f7f72c0836bcc0fd8f6b
R
5,292
138
## create variable y, such that cor(x,y) == r rcor <- function(x,r) { e <- rnorm(length(x), mean=0, sd=sqrt(1-r^2)) mx <- mean(x) sx <- sd(x) s <- (x-mx)/sx (r*s + e)*sx + mx } ## create a variable that corresponds to a true dmr in a dataset ## 1. select a random cluster of CpG sites of minimum siz...
68bfed78fc005fa2ef922a9d74dc2193dab84eb228bdf682e932749edc851891
R
5,292
112
options(stringsAsFactors = FALSE) library(ggplot2) library(reshape2) library(dplyr) library(stringr) library(lme4) library(lmerTest) library(RColorBrewer) library(ggpubr) library(ggbreak) library(MutationalPatterns) library(factoextra) #### PTA excess Indel burden by CTE and AD cases #### df <- read.table("data/Table...
ce7f9a847e67b4610fad79f94b362e61a4fe9d14e0081d3a72a49827afca6761
R
5,294
150
library("recount3") library("SingleCellExperiment") library("BisqueRNA") library("tidyverse") library("here") library("sessioninfo") # library(DeconvoBuddies) data_dir <- here("processed-data", "07_GTEx", "01_GTEx_Bisque") if (!dir.exists(data_dir)) dir.create(data_dir, recursive = TRUE) #### Load GTEx data with re...
f472fe1295a6a56351f2c2f34eeaf85b4a640a3789a3bd2671a0f310042f82d7
R
5,295
88
runRegressionAnalyses <- function(fluxAll,AD_risk,Sex_moderation,e4_moderation,e2_moderation, file,type){ #' runRegressionAnalyses - Runs a series of regression analyses on metabolic fluxes or microbiome data. #' This function performs a series of regression analyses on the provided flux data, considering different ...
7865d5149da96cb60e9d26de01b6d4bf34b750b593fa1a78779319ab60e3613f
R
5,312
150
library("tidyverse") library("sessioninfo") # library("DeconvoBuddies") library("here") library("slurmjobs") # library("viridis") # library(spatialLIBD) # library(ggrepel) # #library("GGally") ## prep dirs ## plot_dir <- here("plots", "08_bulk_deconvolution", "15_method_runtime") if (!dir.exists(plot_dir)) dir.create...
41948ee798f59f0f42e9f8a9835e1d77b015cc8f5309f4b51206122bfcfa8967
R
5,314
126
#!/usr/bin/env Rscript #### Estimate CNAs using inferCNV with patient argument provided #### Author: Jana Biermann, PhD print(paste('Start:', Sys.time())) library(dplyr) library(Seurat) library(infercnv) library(stringr) library(gplots) library(ggplot2) library(viridis) # Get patient argument pat <- commandArgs()[6...
38077446924dff44a1a4f821cc3911ad7064f31105f14fbe0e2df4a798a36da1
R
5,319
140
library("tidyverse") library("sessioninfo") library("here") ## prep dirs ## data_dir <- here("processed-data", "13_PEC_deconvolution", "10_get_est_prop_donor_subset") if (!dir.exists(data_dir)) dir.create(data_dir, recursive = TRUE) #### data details #### ## dataset properties dataset_lt <- tibble(Dataset = c("2107UN...
607d03c26867b2f7715f4abae253c4817ba658c90467ffbd39fb595a35a909e3
R
5,320
187
# Siwei 20 Jun 2023 ##### # plot a large PCA include MG, Ast, GA, and possibly NGN2 # ATAC-Seq data using the count matrix of Kosoy et al. (syn26207321) # (microglia regulome) # init ##### { library(readr) library(edgeR) library(Rfast) library(factoextra) library(Rtsne) library(irlba) library(stringr)...
a584b8971ac3b95fa2d1f3a3bd53df830da3440a2552b4af2effe040e7aa1c5f
R
5,324
173
brew install imagemagick --with-fontconfig --with-librsvg --with-fftw--- title: "Lenia" output: html.notebook --- ```{r} SIZE <- 2^8 MID <- SIZE / 2 ``` ```{r} kernel.core <- function(r, kernel.type) { rm <- pmin(r, 1) if (kernel.type == 0) return ( (4 * rm * (1-rm))^4 ) else return ( exp(4 - 1 / (rm * (...
8d33440e6ef08fece11da2ed752db1277957cd63686fce3bb96ef7cb8483891b
R
5,328
80
options(stringsAsFactors = FALSE) library(ggplot2) library(reshape2) library(dplyr) library(stringr) library(lme4) library(lmerTest) library(RColorBrewer) library(ggpubr) #### QC-corrected excess Indels by group #### high_indel_cases_CTE <- as.character(c(6195, 6489, 7038, 7932, ...
78d392defde8cd79987391c2095e1496db867c727a6a159ebdb6f8cb41d6a4c0
R
5,341
154
library(tidyverse) library(gprofiler2) library(data.table) library(org.Hs.eg.db) library(GO.db) library(reactome.db) set.seed(1234) process_apa_data <- function(directory = "data/APA", output_dir = "results/APA") { # Read APA result files files <- list.files(directory, pattern = "\\.txt$", full.names = TRUE) ...
3b69f100e8423c995df06a1699dbc4d392c09247438a0d8bd0dc81497546ed70
R
5,342
146
#' dmrff #' #' Identifying differentially methylated regions efficiently with power and control. #' #' Warning! Ensure that the order of the CpG sites corresponding to the the rows of `methylation` #' match the order of the CpG sites corresponding to the other variables, #' e.g. `estimate` and `chr`. #' #' @param esti...
1d9815ec49a990398fb27903020d27a64e5fe98c9677c1e3b3a74d530f3fdb06
R
5,349
194
library(here) library(readr) library(dplyr) library(tidyr) library(purrr) library(ggplot2) library(brms) library(bayesplot) library(tidybayes) # set params ---- color_scheme_set("red") theme_set(theme_ggdist()) # import data ---- dat <- read_csv(here("out", "degree.csv"), show_col_types = FALSE) |> drop_na() |> ...
45f78213bf7004b7a3c8d03f271a93e039085c0bef527ebfe464a81a75151c16
R
5,355
139
--- title: "Ascertain diagnoses" description: > Ascertain UK Biobank participant diagnoses from all sources (medical records and self-report data). output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Ascertain diagnoses} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, incl...
718ab060391394b55718d6dbfbdae953cafbd2d46d35ee69d65486ed943c02f0
R
5,360
155
--- title: "Plot muliplexing results" author: "C-M Svensson" date: "`r Sys.Date()`" output: html_document --- ```{r setup, include=FALSE} rm(list = ls()) knitr::opts_chunk$set(echo = TRUE, fig.width = 12, fig.height = 12) library(dplyr) library(latex2exp) library(tidyverse) library(ggplot2) library(readx...
0ce87beb0701a1cd81617743214bb33ab4e600d11208b68d4812e3523d1cefa8
R
5,363
107
##### 1. load packages and data####### ###load packages if (!require("here")) { install.packages("here") library("here") } if (!require("magrittr")) { install.packages("magrittr") library("magrittr") } if (!require("tidyverse")) { install.packages("tidyverse") library("tidyverse") } if (!require("scran")) ...
b77aca83a42a466201568c13a48badad767bc50aabb7e6c3a65fa03d24d4a08f
R
5,380
118
#!/usr/bin/env Rscript ### title: Analysis of non-immune and non-tumor cell types (UMAPs, DEG) ### author: Jana Biermann, PhD library(Seurat) library(dplyr) library(ggplot2) library(gplots) '%notin%' <- Negate('%in%') colBP <- c('#A80D11', '#008DB8') colSCSN <- c('#E1AC24', '#288F56') colCNS <- c('#92D84F', '#7473A6...
07a75e3fbaac80dad2e755966e5e3e0d8d6bc0f3a93b513175ecbbe97d6eb6bd
R
5,393
140
#!/usr/bin/env Rscript # ============================================================================== # Script: rnaseq_transcript_and_gene_level_differential_analysis.R # Author: Alireza Ghahramani # Contact: aghahram@uwo.ca # # Purpose: # - Transcript-level RNA-seq DESeq2 analysis (StringTie quantification) # - ...
87f48674cdffc158573a678f4ccd655d9cfcfa38238ccaa4647c6467e57287c6
R
5,401
156
#' Plot_Zygosity_Blocks #' #' Plot blocks of heterozygous and homozygous SNPs #' @param Table The deletion table containing the output of the DeletionTable function #' @param window the block size in bp, usually 1500000 #' @param Max How many Heterozygouse SNP need to be in a block to get the full color, usually 6 #' @...
1541a78d34951d76121fcf77af7dba21134e4a57288ebc7f8e2806edb25a9138
R
5,404
94
#### Figure S18 #### #### hDEGs near HARs and hCONDELs in SynGO dataset #### library(stringr) library(reshape2) library(ggplot2) library(here) # syngo: syngo_terms <- read.table(here("data/syngo_analysis", "syngo_terms_id.txt"), sep="\t", header=TRUE) syngo_genes <- read.table(here("data/syngo_analysis", "syngo_onto...
9fb1039e1e5bd232028b3747e342a6eb2571b584641d593fe6000b1bc2f314bb
R
5,413
160
# Plot_Zygosity_Blocks_noxy # # Plot blocks of heterozygous and homozygous SNPs # @param Table The deletion table containing the output of the DeletionTable function # @param window The block size in bp, usually 1500000 # @param Max How many Heterozygous SNPs need to be in a block to get the full color, usually 6 # @pa...
5e5713167afa8b94e82e7c37a1613b4a41995991ef465c776539ccacddc912f0
R
5,438
135
#!/usr/bin/env Rscript #### Integration using Harmony and LISI score #### Author: Jana Biermann, PhD library(Seurat) library(dplyr) library(ggplot2) library(ggrastr) library(harmony) library(gplots) library(lisi) library(tidyr) library(magrittr) library(viridis) library(scales) colBP <- c('#A80D11', '#008DB8') colSC...
0f6e5b84c9c1b79ac705f0735081a51fdd9102d0e367f50592fcb9c0ae1dc812
R
5,441
159
#!/usr/bin/env Rscript # ========================================================================= # Title: Identification and Classification of Upregulated LTRs as Full-Length or Solo Using RetroTector # Script: ltr_classification_solo_full_length.R # Author: Alireza Ghahramani # Contact: aghahram@uwo.ca # # Descripti...
125f9c78d5aeac0169107b9055e74f754227b4badda5cab013361f7d0a6bf223
R
5,451
58
#-----------------------------------------------------------------------------------------# # Step0 set options & mkdir directory # #-----------------------------------------------------------------------------------------# Sample=sample_list.txt Rawdata_path=rawdata ...
d2af29e8deea0e9f8682a7266a389bf0e299acc997467d32aef07090e926b1cc
R
5,453
142
# libraries library(tidyverse) # tibble stuff # total number of flips n.trl = 240 # file paths dt.path1 = paste('/home/emba/Documents/EMBA', 'BVET', sep = "/") dt.path2 = paste('/home/emba/Documents/EMBA', 'BVET-addMRI', sep = "/") # load the relevant data in long format: only people with separate logs for ru...
0cf1d2cf8e083d276b1570d76208f6e1dc16d644c5f206094db0c00740b47cab
R
5,464
94
#Run QC filtering for each sample ############################################################################################################ #Load libraries library(Seurat) library(tidyverse) library(scDblFinder) #Create directory dir.create("1_results_QC_filt", showWarnings=T) #Create function to read counts, cre...
4da04695f382a74a4c1b9fd3fa63baf755d564e0225afb96b8bf45b9b558bc05
R
5,466
141
fluidPage( fluidRow( box( width = 12, closable = T, enable_label = T, label_text = "New", label_status = "warning", solidHeader = T, status = "warning", title = tagList(icon("bullhorn"), i18n$t("お知らせ")), collapsible = T, collapsed = T, tags$small( ...
3e56b5a8d3f372fa694cf99b5402e08fe12e22b4c5e946c44e28f273b9f0f83c
R
5,467
160
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) list2env(rjson::fromJSON(file = "00_configs.json"), envir = .GlobalEnv) library(Seurat) library(Signac) library(ClustAssess) library(qs) library(rhdf5) library(dplyr) library(future) library(doParallel) # 50 GB options(future.globals.maxSize = 50 * 1024^3) pl...
e550cfb057d0f83c5015522493f0ac0d42d1637944f5f6d71813a3be326de2d4
R
5,470
200
# Siwei 11 May 2023 # Process all Asts (FASTQs trimmed) # May 2023 # init library(readr) library(vcfR) library(stringr) library(ggplot2) library(parallel) library(MASS) library(RColorBrewer) library(grDevices) # load the table from vcf (the vcf has been prefiltered to include DP >= 20 only) df_raw <- read.vcfR(f...
8c8afeb7e06494d0eb2f7ba6e259195320715ca2d4bc037aac399f316a64ffb7
R
5,471
134
library(tidyverse) # output of get_num_pas.py - used to get le_ids of interest (as a vector) le_ids <- read_tsv("processed/curation/cryptic_annot_comparison/2024-09-03_le_id_pas_counts.tsv", col_select = le_id) %>% pull(le_id) # top level directory storing PAPA outputs for all runs # i.e. <papa_results_dir>/<dataset...
43caa053610a3a71183bf8885a18cbe8ad00da8f14f39e724d5b4832b4fc0ec0
R
5,486
152
# ---------------------------------------------------------------------------- # Libraries and setup ---- library("argparse") library("ggplot2") library("khroma") library("tidyverse") library("Seurat") library("ComplexHeatmap") library("RColorBrewer") # Command line arguments ---- parser <- ArgumentParser(description...
bb79f2d1be4fac8133d3dfb18f6ca6a4c702471ab83d63906731e08b5c53b41b
R
5,486
117
#prepare files for scDRS/FUMA/MAGMA ##### 1. load packages and data####### ###load packages if (!require("here")) { install.packages("here") library("here") } if (!require("magrittr")) { install.packages("magrittr") library("magrittr") } if (!require("tidyverse")) { install.packages("tidyverse") library(...
76025fdafa973de067152631fe427469c118bc8d9d4de9b708d4c0e93481e922
R
5,490
129
library(qs) library(scDblFinder) library(SingleCellExperiment) library(Seurat) library(dplyr) library(stringr) library(AnnotationHub) library(ensembldb) library(gridExtra) library(RCurl) library(ggplot2) library(cowplot) # Replace all *...* with respective text # open merged_seurat file. Check path ---...
e10b967eca827048d6a376c35e15aa58b3577bbe1a865713d839cc2646c80d59
R
5,490
140
#!/usr/bin/env Rscript #### title: Tumor cell integration, UMAPs and pathway signatures applied to tumor cells #### author: Jana Biermann, PhD library(dplyr) library(Seurat) library(ggplot2) library(gplots) '%notin%' <- Negate('%in%') colBP <- c('#A80D11', '#008DB8') colSCSN <- c('#E1AC24', '#288F56') cycling <- c(...
8fad2f31830346639d7edb437b884b11ad0d43384ca7bcc756bef772f62c12fc
R
5,493
183
# 25 May 2022 Siwei # process new NGN2-glut batch data (May 2022) # note that this batch of NGN2-glut bulk ATAC-seq data, # has lower quality # since their original samples had been frozen-thawed. # init library(readr) library(plyr) library(dplyr) library(stringr) library(Rfast) library(ggplot2) library(RColorBr...
7c5f37d84f00883a58693a56afb1cba435d66f214592c3e5672a1b9820c23724
R
5,499
165
# UCRÏà¹ØµÄlncRNAµÄÏ໥×÷ÓÃÊýÄ¿ setwd(dir = "D:/R_project/UCR_project/") options(stringsAsFactors = FALSE) rm(list = ls()) library(tidyverse) library(BiocManager) library(ggplot2) library(stringr) library(ggbeeswarm) library(ggsci) library(ggpubr) library(Hmisc) library(ggview) library(gginnards) library(scales) libr...
96544e5fcad97902157777ece642f4993e41aae314dee1167a89f0f544c4145a
R
5,514
185
# 25 May 2022 Siwei # process new GABA batch data (May 2022) # note that this batch of GABA bulk ATAC-seq data, # two of the samples has lower quality # since their original samples had been frozen-thawed. # init library(readr) library(plyr) library(dplyr) library(stringr) library(Rfast) library(ggplot2) library...
99f3b38ad086dcf5ba9cdafeda716a3afaa90a906aaaffcd3a74314099283094
R
5,523
146
# Neocortical Localization and Thalamocortical Modulation of # Neuronal Hyperexcitability contribute to Fragile X Syndrome # Communication Biology # Demographics # Table 1, Supplemental Table 1, Figure 2A # Author: E. Pedapati # Version: 3/27/2022 pacman::p_load(tidyverse, labelled, compareGroups, lsmeans, B...
a47e0bb029208e3c16b4797b6e09c15992458b5991fa67684240773c7db4a0cc
R
5,526
143
library(Signac) library(Seurat) library(stringr) library(dplyr) library(tidyverse) oligo_atac <- LoadSeuratRds("ATAC/Oligo_ATAC_object_with_activity_and_motifs.rds") oligo <- LoadSeuratRds("oligo_sub.rds") x <- str_split_fixed(Cells(oligo), "_", 4) x <- data.frame(x) # x <- x[x$X4 != "",] x[str_detect(x...
95ba521d24afe845a59cfa52fa9fc09ccc9c4502724fb9d64e56583eaa570402
R
5,533
132
library("tidyverse") library("sessioninfo") library("DeconvoBuddies") library("here") ## prep dirs ## plot_dir <- here("plots", "08_bulk_deconvolution", "11_deconvo_plots_subset") if (!dir.exists(plot_dir)) dir.create(plot_dir, recursive = TRUE) ## load colors & shapes load(here("processed-data","00_data_prep","cell...
9d37efea5e8eb6c1e3f0b125ad8fa7d6930ea732eaa0803d3655e3d92f10dbd2
R
5,540
190
# Siwei 21 Jun 2023 # Process all NGN2s (FASTQs trimmed and the original NGN2-20 # + from 2019) # note the sample names are complex, need processing (NGN2 and R21) # Jun 2023 # init library(readr) library(vcfR) library(stringr) library(ggplot2) library(parallel) library(MASS) library(RColorBrewer) library(grDevices...
c356c89f9dec54357380b49ef507c8a06611f54cfd34c7d1912cb3661bbfcfd6
R
5,542
96
#Run QC filtering for each sample ############################################################################################## #Load libraries library(Seurat) library(tidyverse) library(scDblFinder) #Create directory dir.create("1_results_QC_filt", showWarnings=T) #Create function to read unfiltered counts, create...
df7f1982c40c3628fe5595c79bcb61fe677587afe86a7134b435ee10cc2a3f8a
R
5,551
85
options(stringsAsFactors = FALSE) library(ggplot2) library(reshape2) library(dplyr) library(stringr) library(lme4) library(lmerTest) library(RColorBrewer) library(ggpubr) #### PTA SNV burden after controlling for QC metrics #### df <- read.table("data/TableS2_PTA_QC.tsv", header=T, sep="\t") df$Case_ID <- as.characte...
b3418b78462f68eec1dd1740674f9af64a776433b430c544176291e275d2ecee
R
5,569
126
library(tidyverse) # Script to get a table of non-cryptic APAs produced by the pipeline # Combined differential analysis dexseq_all <- read_tsv("data/2023-05-24_i3_cortical_zanovello.all_datasets.dexseq_apa.results.processed.cleaned.tsv.gz") # df containing cleaned cooridnate columns le_id_coords <- read_tsv("proces...
aeb91c51809ae95b0e43d3e1d6192134b72924e72c06ca54896db64170a16ca9
R
5,575
141
library(tidyverse) source("scripts/utils_liu_facs.R") ppau_delta_paired_median_all <- read_tsv("processed/liu_facs/2024-11-20_liu_facs_decoys_delta_ppau.all_samples.all_ales.tsv.gz") ppau_delta_paired_median_disease <- read_tsv("processed/liu_facs/2024-11-20_liu_facs_decoys_delta_ppau.subtype_split.all_ales.tsv.gz") p...
3190370adba9d0e3ec18d37e800d6be88de32547f3ff978144cb0161fecfe274
R
5,578
96
# this script produces plots depicting the different partial effects of LSNS by gender library(tidyverse) # version 2.0.0 library(gratia) # version 0.10.0 library(MetBrewer) # version 0.2.0 # define the path path = "/data/pt_life/ResearchProjects/LLammer/gamms/Results/by_gender/" #choose palette palette <- met.brewe...
6d1ab39ad4d983101d865d3a503e6062ffb43a20ad1f4de60860a494de5022af
R
5,578
142
--- title: "4. Visualization using xQTLbiolinks" date: "2023-05-01" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{visualization} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} lang: en-US --- ```{r, include = FALSE} knitr::opts_chunk$set( echo=TRUE, progress =FALSE, commen...
7aaed33b4ba9121864689153c230b4182e89fdc59ed8461f0d27c7ba12535882
R
5,579
147
#!/usr/bin/env Rscript #### Integration using Conos and LISI score #### Author: Jana Biermann, PhD library(Seurat) library(dplyr) library(ggplot2) library(ggrastr) library(gplots) library(lisi) library(tidyr) library(magrittr) library(viridis) library(scales) library(igraph) library(leidenAlg) library(conos) colBP <...
ddf073f4cb1b70a82660d7b48da49549262d6938d9ea3c2863b771f6cfb259b8
R
5,580
132
rm(list = ls()) setwd(dir = "D:/R_project/UCR_project") library(tidyverse) library(ggplot2) load("02-analysis/04-SNP_Quality_Control/filtered_TOPMed_SNPs/passed_UCR_SNPs.Rdata") load("02-analysis/04-SNP_Quality_Control/filtered_TOPMed_SNPs/passed_UCR_left_SNPs.Rdata") load("02-analysis/04-SNP_Quality_Control/filtered...
76840098538ecdea453be9ab97df4931a024bc67ad1a4011d22ed4759dfd8c52
R
5,603
165
require(ggplot2); require(scales); require(reshape2); #install.packages("dplyr") require(dplyr) #require(Hmisc) library("readxl") library(RColorBrewer) library("ggsci") #install.packages("ggrepel") library("ggrepel") library(ggpubr) library(stringr) setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #s...
cb2beae1312d61e3fbbe2211d2adc847687a1210976dae549adfb006c7dfabde
R
5,604
129
#!/usr/bin/env R # Author: Sean Maden # # Plot cell quantifications by assay type. Reads outputs from script # "cor-celltype-prop-count...R" # library(ggplot2) library(gridExtra) library(ggrepel) #---------- # load data #---------- dfsn.fpath <- file.path("dlpfc_ro1", "df-snrnaseq-all_cell-prop-abund_dlpfc-ro1.rda"...
5c29e66a15e0ec1afeb5f071a26e87a1b1e798c46ef43e04dbb1947fefd18a31
R
5,605
159
# setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(dbplyr) library(Biostrings) # ÕûÀíÐòÁÐ -------------------------------------------------------------------- ## UCR left UCR_left <- readDNAStringSet(filepath = "02-analysis/14-GC_content/ucr_left_homemade_GRCh38p14.fa") print(UCR_left) names(UCR_lef...
834a64da2ee7baeec914de4b9e3028284bf657f7f97b460d2be2ae93f9285600
R
5,605
209
--- title: "CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project - unique DEGs AD vs RES" author: "Isabel Castanho" date: "`r Sys.Date()`" output: html_document: toc: true toc_float: collapsed: false toc_depth: 4 code_folding: hide --- --- # Cell-type enr...
81b90bff360a22f0ec5e27ca226209e215ed88259fa907868127cb3c3f52f78a
R
5,611
122
library(Seurat) #library(SeuratData) library(ggplot2) library(patchwork) library(dplyr) library(SingleR) library(SingleCellExperiment) library(scater) library(pheatmap) library(rlist) library(stringr) library(grid) library(ggrastr) library(metR) library(akima) homedir = "/data" #read in table of signature genes, manu...
49aff82a8643feee0071ab1e36e1e22e302704bcce81364233bd893227b8e90f
R
5,621
141
# Clear workspace and load necessary libraries rm(list = ls()) start_time = Sys.time() source('load_libraries.R') # Assume this loads required libraries like dplyr, tidyr, igraph, etc. source('functions_for_network_analysis.R') source('functions_for_drug_repurposing.R') InSub=c('Lamp5', 'Pvalb', 'Sncg', 'Sst','Sst.C...
eee6c61b2efff5c7e7beaa2a678b01672bcf04f0a87cdd710d491ea0e919291e
R
5,623
146
# ¿´ÔÚ²»Í¬Æ÷¹ÙÀïDDGµÄÊýÄ¿ setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(tidyverse) library(readxl) library(ggplot2) development_dynamic_organ <- read_xlsx(path = "01-data/18-Development_dynamic_genes/development_dynamic_organ.xlsx", sheet = 7, skip = 2) dev...
1f2b599160bf7e617d8471a66274df2319e058469714c94f82704e92a4238679
R
5,627
132
#!/usr/bin/env Rscript ## ## Summarize Salmon transcript abundances on a gene level for individual samples and combine into a single table. ## ## usage: Rscript --vanilla quant-merge-salmon.R genes.gtf quant_sf_dir out_base ## # increase output width options(width = 120) # print warnings as they occur options(warn ...
d173ada431f2b92a04634050fade4cfcd0d4989b1ebe1419bd8a02355f08b78c
R
5,628
127
library(spacexr) library(Matrix) library(stringr) library(Seurat) ### title: Use RCTD pipeline to assign cell type identities to SlideSeq samples ### author: Yiping Wang date: 03/29/2022 datadir = "/data" #load in single-nuclei reference, filter for only single nuclei data, and filter out low-quality cells system(pa...
8498790090ca58c34c2c4203c4cea4667e885dbeaf44e818b74ccb188017c8a1
R
5,647
140
# Reference values for PyMARE's effect-size converters. # # Writes pymare/tests/data/metafor_escalc_reference.json, which # pymare/tests/test_metafor_escalc.py reads. Run it through the harness in this # directory rather than directly, so the R and metafor versions are the pinned # ones: # # validation/metafor/rege...
ecac49d8675338300ecb21113f008afa801c87cab9c752d9214c7690a25306cb
R
5,654
106
###ÕûÀí½á¹û library(tidyr) library(tidyverse) library(openxlsx) out_all_res <- data.frame() out_null_res <- data.frame() inputpath <- "/mnt/data/lijincheng/mGWAS/result/04replication/Kunkle/FR/" outlist <- list.files(inputpath) ### for(i in 1:length(outlist)){ inputpath <- "/mnt/data/lijincheng/mGWAS/result/04repli...
2cef16b8c5f14434d04d926f9ae29ad7edc04faf531f18114a196721a80e10d7
R
5,656
144
require(ggplot2); require(scales); require(reshape2); #install.packages("dplyr") require(dplyr) #require(Hmisc) library("readxl") library(RColorBrewer) library("ggsci") #install.packages("ggrepel") library("ggrepel") library(ggpubr) library(stringr) setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #...
5ad0ade348a2a35763b9fdba8174ba881b62aa4912aa1d4338f97c9b916ed4df
R
5,659
136
#' Run differential rhythmicity analysis defined in Thaben & Westermark #' #' @param expr A matrix of expression values with gene in the rows and samples in columns #' @inheritParams compareRhythms #' @keywords internal compareRhythms_dodr <- function(expr, exp_design, period=24, rhythm_fdr = 0.05, ...
32d531596603fe5e97cfea31f7f68d470a62b9714745a61f3628210295dd5f10
R
5,660
129
# load libraries library(tidyverse) library(data.table) library(Matrix) library(Rfast) library(matrixStats) library(ggridges) library(reticulate) library(anndata) library(scales) library(ComplexHeatmap) library(forcats) library(igraph) library(mclust) library(future.apply) library(UpSetR) library(gtools) library(patchw...
bdbdf4f30b5643ef70667a7c2928ecaf17da9cfb357d34766957d4ef9c4ede4f
R
5,664
164
library(tidyverse) library(fgsea) library(dorothea) library(decoupleR) library(janitor) source("scripts/helpers.R") # output of dl_collectri.R collectri_hs <- read_tsv("data/2023-11-15_collectri_homosapiens.tsv") collectri_hs <- rename(collectri_hs, tf = source) dorothea_hs_abc <- filter(dorothea_hs, confidence %in% ...
f8150f1faa24c91ace247be8e63326941bab474e06d45c6df5c5d4362b9ee7ea
R
5,665
120
get_local_exposures_forMRBMA<- function(inputdf=inputdf, exposure="" ) { message("exposure='Mibio','FR02','pathways'") message("outcome='LOAD','ADproxy','abeta42','ptau' ") input <- inputdf %>% dplyr::filter(exposures == ...
5d574f31f41871e76094709570567496178f34b7c41f307b44eb6dd98bb90cad
R
5,667
141
# UCR原始数据(hg16)下载,转换成GRCh38坐标,准备getfasta需要的bed文件 setwd("D:/R_project/UCR_project") options(stringsAsFactors = FALSE) rm(list = ls()) library(tidyverse) library(stringr) # 导入从网站下载的UCR原始数据,转换成方便使用的格式 ---------------------------------------------- # 导入从网站下载的UCR原始数据 UCR_rawdata <- read.table(file = "D:/A_projects/UCR/U...
0c824dfc949268196007931be868da27bf96485b102251d4492ea4c91aafbc93
R
5,672
106
###ÕûÀí½á¹û library(tidyr) library(tidyverse) library(openxlsx) out_all_res <- data.frame() out_null_res <- data.frame() inputpath <- "/mnt/data/lijincheng/mGWAS/result/04replication/Kunkle/mibiogen/" outlist <- list.files(inputpath) ### for(i in 1:length(outlist)){ inputpath <- "/mnt/data/lijincheng/mGWAS/result/0...
c637f26e7aebc6e406ade8868fb764d9ade052a7eb189b0a976b8f5410065f43
R
5,675
174
# Figure 1: Multi-panel visualization of metabolic analysis # This script creates a comprehensive figure with four panels: # a) Volcano plot of age-related flux changes # b) Bar plot showing microbial correlations with metabolites # c) Forest plot of species abundance vs age # d) Regression plot of serum arginine vs ag...
4565a16e9c6d7153f540c97df0228099dcd9eed38d82e93ceaf56cb36f0714bf
R
5,688
183
# lirbaries --------------------------------------------------------------- library(Seurat) library(tidyverse) library(ks) # function definition ----------------------------------------------------- .extract_feature_data <- function(exp_data, features) { # Extract data for input features i <- colnames(exp_data) %i...
5edabc7cae10775998a45aaa493707111414f7d2f819f9c06a84e5e49999fd67
R
5,701
93
overlap_coefficient<-function(mat){ mat.return<-mat for(m in 1:dim(mat)[1]){ for(n in 1:dim(mat)[2]){ r<-mat[m,n]/min(sum(mat[m,]),sum(mat[,n])) mat.return[m,n]<-r } } return(mat.return) } setwd("/projects/ren-transposon/home/chz272/transposon/05.Paired-ChIP/20.NovaSeq/04.Single_cell_All...
8bb8c0b9024792176ee4a6851d62f7c9a7ffd0c51576ee41c833e37b27bb0a0f
R
5,704
134
# Reference values for PyMARE's cluster-robust covariance and its degrees of freedom. # # Writes pymare/tests/data/clubsandwich_reference.json, which # pymare/tests/test_clubsandwich_alignment.py reads. Run it through the harness # in this directory rather than directly, so the R, metafor and clubSandwich # versions ar...