sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
e618487acdecc0805eab110cd5f1beec3e663214303b0c43df822d72b357ab5e
R
7,510
175
library(tidyverse) #' Factory function to process a chunked 'coverage ratio' BED-like file produced by pipeline (to be used with readr::read_tsv_chunked()) process_chunk <- function(le_id_filter = NULL) { # https://stackoverflow.com/questions/49238163/how-to-pass-arguments-to-a-callback-function-for-readrread-...
fb684a8ed88f27dd138f5c2e8613b092904e84f364030d036058f17db95b7124
R
7,515
132
###------------- Code for formally testing pleiotropic association of two phenotypes with SNPs using GWAS summary statistics----------------- # message("====================================================================") message(" PLACO v0.2.0 is loaded") message("===================================...
7cfb0f13258cf2fc50f9f1fcf22395594890d2e7603b6b3d3a7d2d792c8c0edd
R
7,528
209
# Tidy sample info table library(tidyverse) library(readxl) library(janitor) theme_set(theme_minimal() + theme(text = element_text(size = 16))) # Read sample info -------------------------------------------------------- # master table with information about each sample sample_info <- read_excel("data/raw/RNA seq - ...
58b4938c8be2e1b8e06bfb5481104d453e64c47c98236aff7877092a4535be71
R
7,537
160
```{r} # gene panel includes cell type and neuromodulator genes on sagittal slices # whole-brain BAR-seq data registered to the Allen Common Coordinate Framework version 3 (CCFv3) # data is quality controlled by keeping cells with genes/cell >= 5 and reads/cell >= 20 # load libraries suppressPackageStartupMessages(li...
a535d372e63a351c4c0b1b49c91bfc57d222bfe5debce7e7c1ec1ae7d1cb6350
R
7,541
162
--- title: "Convert tree shrew orthologous genes to mouse genes" author: "Yuanming Liu" date: "2024/4/14" output: Orthl_document --- # R version 4.3.1 (2023-06-16 ucrt) # Platform: x86_64-w64-mingw32/x64 (64-bit) # Running under: Windows 11 x64 (build 22631) # Matrix products: default # locale:...
3fd04227357261e17b57a76108f8557386f220cd906dc26ed22d29e34c5e6f1f
R
7,542
218
library(tidyverse) library(scrattch.hicat) library(scattermore) library(here) #load data and calculate cl means/medians orthologous_genes <- readRDS(here("data", "orthologous_genes.RDS")) #human human_mat <- readRDS(here("data", "human_mat.RDS")) human_meta <- readRDS(here("data", "human_meta.RDS")) human_meta <- hu...
9d232f785407f47b2d8feb3f081ab2d7d7547cb3893eed8f4be5bbdf8b7dfb60
R
7,542
178
library(tidyverse) library(here) #read in species subclass marker gene lists human <- readRDS(here("DEG_lists", "human_subclass_wilcox_markers.RDS")) chimp <- readRDS(here("DEG_lists", "chimp_subclass_wilcox_markers.RDS")) gorilla <- readRDS(here("DEG_lists", "gorilla_subclass_wilcox_markers.RDS")) rhesus <- readRDS(...
3184df193b4b19ef4a048a620f121448a27d22859560fe29e0f7504e34df4e54
R
7,579
285
--- title: "CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project - Common variants: cell-type enrichment" author: "Isabel Castanho" date: "`r Sys.Date()`" output: html_document: toc: true toc_float: collapsed: false toc_depth: 4 code_folding: hide --- --- ...
e0e2c438dc08c8b1fe08da352e3abe7240fc300be52026068ebdc5cf26e4c2ee
R
7,586
177
#!/usr/bin/env Rscript # FFERREIRA 03/24/2024 # Nina Project - Neanderthal ## Runs differential gene expression (DEG) analysis ### PS: it should have more than 1 sample by group for comparison (at least 2x2), otherwise it throws an ERROR #### NICE TUTORIALS / EXPLANATIONS # https://hbctraining.github.io/DGE_workshop/...
46add992f53d5b4fd506ce18d65590bfaeba4384ad2a4fd2b00546ec635257d6
R
7,608
192
#' Plot pain score distributions #' #' This function plots the distribution of pain scores, at either pre-peak or post-peak. #' #' @param csv_path The path to the aggregated CSV exported from the `paws_analysis` function #' @param peak Whether to plot pre-peak (`pre`) or post-peak (`post`) pain scores. #' @return A d...
45ac207e782d2b357965b9dd387bb2cd416f85e5e10ea7b02e1cff376752a2f8
R
7,610
194
#!/usr/bin/env Rscript # FFERREIRA 06/11/2024 # BEPE Collabs - Nina Neanderthals ## Makes PCA plots from COUNTS data generated in 'st1_TXimport.R' ### Apply filters: (i) protein-coding only; (ii) |L2FC| > 1 | 2 ################ # 0. SETS UP ENV ################ # Loads LIBs library(ggplot2) library(DESeq2) # Sets ...
f09e82c2d1c84e125d275db1756e2f52b903f4286498de01f49d3b6677e88e83
R
7,617
151
suppressPackageStartupMessages(library(optparse)) option_list = list( make_option(c("-c", "--ciri.ref"), type='character', help="Reference database (ciri2)"), make_option(c("-g", "--gtf"), type='character', help="genome annotation (gtf)"), make_option(c("-i", "--introns"), type='ch...
e980f35f4874f67671a4c276c3be416cfd5ff9c6a1b4953727daa8c0c932a6a6
R
7,621
183
suppressPackageStartupMessages(library(optparse)) option_list = list( make_option(c("-b", "--iclip_bedgraph"), type='character', help="iCLIP bedgraph (iCount)"), make_option('--intron_split', type = 'logical', action = 'store_true', default = FALSE, help = "split introns into 5\' and 3...
f0fd59d89ddda9216ca628d896f8560df50384871fb8865814e16d27a9956ac3
R
7,638
195
#---------- Load Required Libraries ---------- library(TwoSampleMR) # For MR analysis library(dplyr) # For data manipulation library(pbapply) # For progress bars in loops library(data.table) # For efficient file handling #---------- Custom Function for Path Concatenation ---------- '%+%' <- f...
22dafd21ffc0d79276ee91270df86dbe536a971361c403d88e2d6e6c7639efb4
R
7,647
227
# Siwei 18 Feb 2024 # make a GRangesObject of TSS -2/+1 kb # Need to test which genes to include (if only protein_coding, 19 k) # init #### { library(Seurat) library(Signac) library(EnsDb.Hsapiens.v86) library(GenomicFeatures) library(BSgenome.Hsapiens.UCSC.hg38) library(GenomicRanges) library(org.Hs.eg....
2907abe3a7da792fe772a8297299738cf5ca71904bfc7303dba14c511906f91e
R
7,652
124
#library(magrittr) library(tidyr) library(data.table) library(biomaRt) library(org.Hs.eg.db) source_folder <- "/servers/iss-corescratch/am3019/250220_SP_alex_bulk/X204SC25013974-Z01-F001" expr_folder <- file.path(source_folder, "07.Expr_matrix") bulk_folder <- file.path(source_folder, "08.Bulkanalyser") output_folder ...
b4e995a584f2321bdee0dc89bce8172470101e658e8ebd9617b7b50e8e4236ce
R
7,656
138
library(Seurat) TPM = readRDS("embryo.14082cells.TPM.new.rds") metadata = read.table("embryo_14082cells.metadata.upload.txt",row.names=F,header=T,stringsAsFactors=F,sep="\t") rownames(metadata) = metadata$Cell.Id metadata = metadata[colnames(TPM),] embryo = CreateSeuratObject(counts = TPM,meta.data = metadata,min.cell...
f2b0e56e2972fd62c5a8d13b75f8fb7e5c0e5523392992ad368d4ea7fbd1b09e
R
7,658
166
#Adaptation to ccn_hmClass to prevent re-ordering the groups by name acn_queryClassHm <- function (classMat, grps = NULL, isBig = FALSE, cRow = FALSE, cCol = FALSE, fontsize_row = 4, fontsize_col = 4, main = NA, scale = FALSE, customAnnoColor = NULL, ...) { cools ...
d9da9a2f46f3f39ea3bb5706b9f4b01cc293956d669f13f8e96cd05cdf06bbcd
R
7,660
185
#!/usr/bin/env Rscript #### Title: Integration of T cells using STACAS and LISI score #### Authors: Jana Biermann, PhD; Massimo Andreatta library(Seurat) library(dplyr) library(ggplot2) library(ggrastr) library(gplots) library(lisi) library(tidyr) library(magrittr) library(viridis) library(scales) library(STACAS) lib...
ac4e2a783b5301f9c3f85821b13831a216a5b1ecdac1de5c410ff7c8d7ffba0d
R
7,661
151
## Perform logistic regression to test enrichment of cell-type peaks in DMPs, whilst controlling for contributions from other cell-types ## library(dplyr) cells <- readRDS(paste0(refPath,"tissueNames_peakEnrichment.rds")) #1. Load EWAS results annotated to cell-type-specific peaks ===============================...
917c9a933ceead3343a29e76518655bb0159eae280bc727f372bdc5eeac0a7c6
R
7,673
172
# FFERREIRA 05/26/2024 # Sanford Consortium - UCSD # DEG results from bulk "full" normal brain organoids - Volcano Plot ################ # 0. SETS UP ENV ################ # Loads LIBs library(ggplot2) library(ggpubr) library(ggrepel) library(tidyverse) # Figure CONFIG dpi <- 1000 #formats <- c("jpeg","pdf","png","sv...
b487eb778a79dd47eb61b765de60ea64401290e7572081f37b9a62e0394ee5fd
R
7,679
216
--- title: 'A simple introduction to seismicGWAS' output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{A simple introduction to seismic} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} html_notebook: fig_height: 5 fig_width: 5 --- This vignette introduces the `seismicGWAS` packa...
1b8b78c23422fa443f6f71bc7ece93234b939926907fe7fa921302f5db2c2602
R
7,683
187
#function to calculate mean: (truncated from calc_specificity) calc_ct_mean <- function(sce, assay_name = "logcounts", ct_label_col = "idents", min_ct_size = 20) { ct <- N <- nz.count <- ave_exp_ct <- NULL # due to non-standard evaluation notes in R CMD check ...
d38b00bacfd63b39de95bb2a172fc266afb5ee389ffc0785155b0e990b3c5cb2
R
7,687
251
library("SummarizedExperiment") library("tidyverse") library("sessioninfo") library("here") library("jaffelab") library("recount") library("viridis") library("ggrepel") library("GGally") ## prep dirs ## plot_dir <- here("plots", "02_quality_control", "03_qc_pca") if (!dir.exists(plot_dir)) dir.create(plot_dir, recursi...
e3d26646b511db18981636c0c4916fc8083226c96d01d3fb6fdb326fd0d0212a
R
7,698
151
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) library(readr) library(plotrix) library(GenomicRanges) library(scales) ### Test functional elements for all exp = gtex.str dt.out <- data.frame() for(typeseq in unique(as.character(exp$typeseq_priority))){ variable.count <- sum(exp$typeseq_priority == type...
4a7e7c9e9abf4d5435c33eb4682c3ec8ae82c62c3336e99971a8eaa3a216e191
R
7,702
184
#!/usr/bin/env Rscript ### title: Overlap of MBM enriched genes from cell line RNA-seq, ATAC-seq, TF and motif enrichment ### author: Jana Biermann, PhD library(dplyr) library(ggplot2) library(gplots) library(viridis) library(scales) library(ggrastr) library(ggrepel) library(ggpubr) library(patchwork) library(ggrastr...
d8e73c4e26563603c748dbcf92b5547072e0187ac7f3069dca9c01aa337fc3ba
R
7,710
235
####################### load all data and process ##################### suppressPackageStartupMessages({ library(tidyverse) library(readxl) library(ggplot2) library(gridExtra) library(Matrix) library(matrixStats) library(scrattch.hicat) library(tibble) library(patchwork) library(dplyr) ...
2f0ca0cf23c466d523c29d40d7ec9db68659ae3c7bfd9da1450aebda1ef33abf
R
7,723
206
library("SummarizedExperiment") library("tidyverse") library("EnhancedVolcano") library("here") library("sessioninfo") library("ggrepel") library("jaffelab") library("UpSetR") #### Set up #### ## dirs plot_dir <- here("plots", "10_bulk_vs_sn_DE", "04_DREAM_plots_sn") if(!dir.exists(plot_dir)) dir.create(plot_dir, re...
b5ba4ad9e11f2740ce2c2c31a8cc79951b23aa8ddf131790f51b5e3fe1eba8d6
R
7,727
155
# ============================================================================ # # Script: PCA and Correlation Analysis for MOCA and IADL Data (IDoct Version) # # Description: # This script performs a principal component analysis (PCA) on cognitive data # extracted from healthy and patient imaging records (IDoct ve...
53691eed39b2e69cc3dd591f64467540756cd8ab9e75ddb6de2965461eed8bef
R
7,748
170
--- output: html_document: default pdf_document: latex_engine: xelatex --- ######################################################################################################## # Combining projects with overlapping barcodes If you have a large project or are combining multiple runs, you might encounter ov...
8ca018cc861abf338ea3df161f4ce4d6dfe4b5746f13ec93655be03e6b9551da
R
7,752
230
# ʹÓÃggmagnify»æÖÆÉ¢µãͼ£¨³ý´ËÖ®Í⣬ÀàËÆµÄ·½·¨»¹ÓÐggforce°ü£© install.packages("ggmagnify", repos = c("https://hughjonesd.r-universe.dev", "https://cloud.r-project.org")) setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(tidyverse) library(ggmagnify) library(g...
e65e78326527fba6ea3828ffa9fe98590f860aa8b2fc13d4e49ff2f2e66fd6d9
R
7,785
160
#' Compute seismic specificity score for each gene and cell type. #' #' @param sce A SingleCellExperiment object. This object needs to include the #' assay_name specified and a ct_label_col column corresponding to cell type labels #' for the granularity of interest. Row names are used as the gene name identifiers. #' @...
4d66cb00e1aa102edf64b0d3f773a844699ea8eb968b17ca4dbf03a91174c2d8
R
7,787
149
library(Seurat) library(Signac) library(patchwork) library(ggplot2) atoms_merge <- readRDS("atoms_merge.rds") atoms_merge <- FindNeighbors(atoms_merge, dims = 1:30, reduction = "integrated_dr") atoms_merge <- FindClusters(atoms_merge, resolution = 0.8) atoms_merge$cell_type_l1 <- Idents(atoms_merge) Dim...
04d43a714b38edd2f4c9b8f1fa07ec5b4c3a0cd6f56df0e19663e73faad0a474
R
7,792
225
library(data.table) library(dplyr) library(TwoSampleMR) #============= PSY Data Preparation ================================================================ # Read data PSY_data <- fread("[Please replace with path to combined_hg38.txt.gz file]") # Filter out invalid rows with OR <= 0 PSY_data <- PSY_data[OR ...
a650a1ce9da6406d5d0487c5112012cb77d4167104ab72eaa61a4d0f702ec519
R
7,809
196
#----03_auto_metadata_v01_single_experiments------------------------------------ #------------------------------------------------------------------------------- # Locomotor activity analysis for Reinhard et al. 2025 (10.1073/pnas.2506164122) # Requirements: # 1)scripts: # 01_setup_v01 # 02_variables_an...
cfccf239da6455c4cd2712b5a12dd59e3969d9ea8038df8395ae8b4b0c3dd664
R
7,825
173
library(rtracklayer) # directory with bw files dir<-"../example_data/" cat("workdir: ", dir, "\n") cat("Enter the number of BigWigs: ") num_bw <- readLines("stdin", n=1) num_bw <- as.integer(num_bw) samples <- c() for (i in 1 : num_bw) { cat("Enter BigWig number ", i, " without .bw : ") samples <- append(samples, re...
e6e247791340996b6b2193b1769be19cbf0de3c3b9244d09094d4b85d395bf06
R
7,831
183
install.packages("readxl") library(readxl) library(ggplot2) library(PMCMRplus) data <- read_excel("V:/tallab/Experiments_new/PFAS2/PARC_IS080_hMNR_raw_data.xlsx") # Step 1: Select the specific columns in the desired order filtered_data <- data[, c("concate", "cellcondition", "treatment", ...
a2d50f8f8b40ca775773da53b6c1cec4ca3b2a011d0bcfa0e3d357fb2d1a9d1b
R
7,833
178
#----05_actograms_v01_single_experiments---------------------------------------- #------------------------------------------------------------------------------- # Locomotor activity analysis for Reinhard et al. 2025 (10.1073/pnas.2506164122) # Requirements: # 1)scripts: # 01_setup_v01 # 02_variables_an...
8bf7227fb74b8b2d7b485ce95c49a13932fb3ae91e147722c36ad0fc4b544519
R
7,834
203
## 01_read_matrices.R library(Seurat) library(scCustomize) library(Matrix) set.seed(1234) # Read Li2023 dataset (frontal cortex) li_ID <- c("A1","A2","A3","A4","A5","A6", "F1","F3","F4","F5", "C1","C2","C3","C4","C5","C6") li_sample <- c(paste0("C9ALS", 1:6), "C9FTD1","C9FTD3","C9FTD4","C9FTD5", ...
23f44ac322b0a2ed896ae453378dee0e4f3f55d39a6abd5ddb13e201e0f19cd0
R
7,840
225
#OPEN LIBRARIES ```{r} library(kronos) library(ggplot2) library(gridExtra) library(tidyverse) library(corrplot) library(gprofiler2) library(outliers) library(dplyr) ``` # IMPORT DATASET ```{r} library(readxl) bigdata_pd60_HPC <- read_excel("/Users/mariareinacampos/Documents/00_MASTER/TFM/Resultats/Results_PD60_HPC/b...
0192354e6445e45a82b86ec81d4baefbb159d3f98c5e33e63b3880d86f3cee3f
R
7,858
171
library(tidyverse) #' helper function to collapse duplicated values in a delimited string to non-redundant values #' I wasn't very smart with gene_name column in PAPA output - often get duplicated gene name values... collapse_names <- function(col, split=",") { apply(str_split(col, split, simplify = T), # genera...
599d010739296c43f76288b86c654097c0ce64bb26ad1b66eb1d95394b707313
R
7,861
178
#' Recover intra-sample doublets #' #' Recover intra-sample doublets that are neighbors to known inter-sample doublets in a multiplexed experiment. #' #' @param x A log-expression matrix for all cells (including doublets) in columns and genes in rows. #' If \code{transposed=TRUE}, this should be a matrix of low-dimensi...
168886c02af3f7509abab1fe4963d244cfbd5aaed273c8a2a50a874b599aedde
R
7,865
155
options(stringsAsFactors = FALSE) library(ggplot2) library(reshape2) library(dplyr) library(stringr) library(lme4) library(lmerTest) library(RColorBrewer) library(ggpubr) #### PTA Indel burden vs. age (with AD) #### df <- read.table("data/TableS3_PTA_burden.tsv", header=T, sep="\t") df$Case_ID <- as.character(df$Case...
07d12a3acbf05b7a2f64076c4d15910fd8186afe317c7e4dbb5cc2ca9739cab4
R
7,866
149
#collect data, convert to Seurat objects. #collect meta data for QC filtering library(Seurat) library(Signac) library(dplyr) library(ggplot2) library(cowplot) library(patchwork) library(EnsDb.Hsapiens.v86) library(hdf5r) library(biovizBase) #load command line parameter for what datasets to process args ...
5913e88f2af91bba70eceff000704d9846f183f2f73f3e6c964dd54411dd2df1
R
7,871
40
--- title: "Mouse ChIP-seq data from ENCODE" author: "lecook" date: "2022-02-23" output: workflowr::wflow_html editor_options: chunk_output_type: console --- # Mouse ChIP-seq data from ENCODE Unfiltered aligned reads downloaded from https://www.encodeproject.org/search/?type=Experiment&control_type!=*&status=release...
684a6370490400cfa4d8d9155efe26da161918809114adb9d89064d6fd185e64
R
7,874
168
# ============================================================================ # # Script: Correlation Analysis for Patient Imaging and Cognitive Data # # Description: # This script performs a principal component analysis (PCA) on cognitive data # derived from patient imaging records and investigates the correlatio...
00353ebb9054926a4e9b65acd56d2cf88378cca1750d58f64a59bc0851728919
R
7,875
181
# explore exp pattern of coding UCR genes using datasets data setwd(dir = "D:/R_project/UCR_project/") options(stringsAsFactors = FALSE) rm(list = ls()) library(tidyverse) library(dbplyr) library(pheatmap) library(readxl) library(stringr) library(ggview) library(ComplexHeatmap) # human rpkm human_rpkm <- read.table(...
17ac421f254421f9426efb43a62d29a5483622de11f003c953871811ba872baf
R
7,877
172
library(tidyverse) library(writexl) datasets <- read_tsv("data/2023-11-22_paper_tdp43_collection_library_statistics.tsv") # df containing cleaned cooridnate columns extracted from quant GTF le_id_coords <- read_tsv("processed/le_id_collapsed_coords.quant.last_exons.tsv") # yes/no binding within plotting windows at rep...
50072bf90b586a5ba1bc7ba178d0843a5ac6c9be7323b704c2a95d6ae49769c9
R
7,887
174
#' Script: De-Novo Clustering #' Author: Ilias Lagkouvardos #' #' Calculate beta-diversity for microbial communities #' based on permutational mulitvariate analysis of variances (PERMANOVA) using multiple distance matrices #' computed from phylogenetic distances between observed organisms #' #' Input: #' 1. Set the pat...
00b09aca985954317d964379777ad3200c791a035347ed2f93308be200d3cf0b
R
7,890
218
library(tidyverse) library(tidytext) dbrn_tbl <- read_tsv("processed/peka/papa/2023-11-03_papa_cryptics_kmer6_window_250_distal_window_500.cleaned_6mer_distribution_genome.tsv") simp_dbrn_tbl <- read_tsv("processed/peka/papa/2023-11-03_papa_cryptics_kmer6_window_250_distal_window_500.cleaned_6mer_distribution_genome_s...
4eec3aed5915f631b533e95371cbb2955c3fc2e6573a858fe06d485d47681620
R
7,891
161
library("SingleCellExperiment") library("rafalib") library("iSEE") library("pryr") library("here") library("whisker") library("usethis") library("withr") library("sessioninfo") load(here("rdas", "ztemp_NAc-ALL-n5_SCE-with-tSNEon15-10PCs_MNT.rda"), verbose = TRUE) source(here("shiny_apps", "00_clean_functions.R")) ex...
80cdf7b596cd2632d9dd960daed0b6071c5313c5c30d3ceb3d92c20b81ae51a9
R
7,893
185
install.packages("readxl") library(readxl) library(ggplot2) library(PMCMRplus) data <- read_excel("V:/tallab/Experiments_new/PFAS2/PARC_IS080_hMNR_raw_data.xlsx") # Step 1: Select the specific columns in the desired order filtered_data <- data[, c("concate", "cellcondition", "treatment", ...
bfa5796ab71c30626e2040e2088c4f6b1abfb2a2d76ac28b8d068f93705f1840
R
7,917
160
#----significance_test---------------------------------------------------------- #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # This script tests the experimental group against the control groups for ...
b659762c254f23f834b96de49133c79aa00076fd8af44e75927d04da00fd594e
R
7,935
163
sem <- function(data) { # Проверяем, что данные не пустые if (length(data) == 0) { stop("Входные данные не могут быть пустыми") } # Вычисляем стандартную ошибку se <- sd(data) / sqrt(length(data)) return(se) } # Загрузка данных SerpinE1_data <- read.table("C:/Anna_27.08.2021/PiloLatLenaP...
fed7f9265c990b478217bf7235e0954115a7b24fad7458c069211a81190f6560
R
7,940
273
#----------------------------------------------------------------- QC UI ---- qc_ui = function(id){ ns = shiny::NS(id) shiny::fluidPage( # shiny::fluidRow( # shiny::p("QC page imported data wil be shown here!"), # ), waiter::autoWaiter(html = waiter::spin_fading_circles(), ...
733cc06f9905d3f4018b639882af06c22faa018153eb589732aac51fd69ed5f8
R
7,946
161
# function for plotting plot_rs10792832 <- function(chr, start, end, gene_name = "", SNPname = "", SNPposition = 1L, mcols = 100, strand = "+", GWASTrack = "", x_offset_1 = 0, x_offset_2 = 0, ylimit = 800) { cell_t...
5dd4aeae7f7b9af4ec0e18fe6868c12aa874a589beb432d75b212d744cb2e646
R
7,952
205
#' Bayesian inference #' #' This script estimate the individual FC mean and standard error maps of a subject, based on a previous calculated population prior on DHCP data (2nd release) #' It is written to be run in parallelized fashion #' *warning*: Each thread will allocate ~100 GB of memory.#' #' 125 s per subject ...
637cc85f2e4ab2c858111f30770f743b9e680777efa70fe222bddf4517f5fe1e
R
7,960
226
setwd("~/Documents/mixOmics/") ########################## PRE PROCESSING OF DATA ########################## # Upload libraries library(readxl) library(readr) library(mixOmics) library(dplyr) library(ggplot2) # Import dataset of groups -> Sample ID, Genotype, Diet, and Genotype-Diet interaction and define rownames ...
7d8ef36701322aa8d71d84861741d96ae29c9fb67b40614d4080de03cdd62fc8
R
7,960
257
# 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) library(dplyr)...
f814f837eade4d3f6921baa87f7dd5ac9a3b2d19fef21d15587a8efc18c2e57c
R
7,978
237
#OPEN LIBRARIES ```{r} library(kronos) gg_kronos_sinusoid_noNA <- function(kronosOut, fill = "unique_group"){ requireNamespace("ggplot2") d <- merge(kronosOut@input, kronosOut@to_plot, by="row.names", all=TRUE)[,-1] d_noNA <- na.omit(d) x_obs <- paste0(kronosOut@plot_info$time, ".x") x_pred = paste0(k...
6b8abdca43d2fe5556e336f94d35246b503d0a6de2a7069e891628ecde0c695e
R
7,987
216
output$regionTimeSeries <- renderEcharts4r({ total <- colSums(byDate[, 2:ncol(byDate)]) totalOver0 <- names(total[total > 0]) dt <- cumsum(byDate[, 2:ncol(byDate)]) dt$date <- byDate$date dt <- melt(dt, measure.vars = 1:50, variable.name = "region") dt2show <- dt[!region %in% lang[[langCode]][35:36]] dt2s...
dc0425ec699af77e04d12c5846ba38fbd970e4a2462438b7fe5b35bb4a899dcd
R
7,990
217
# OPEN LIBRARIES ```{r} library(kronos) #Change sinusoid function to omit NA in the plot gg_kronos_sinusoid_noNA <- function(kronosOut, fill = "unique_group"){ requireNamespace("ggplot2") d <- merge(kronosOut@input, kronosOut@to_plot, by="row.names", all=TRUE)[,-1] d_noNA <- na.omit(d) x_obs <- paste0...
2a8a9c8bb4c44ca18f35bd16c1061158261838d3dd43ec35f8e52e4e688fbf7c
R
7,991
237
#OPEN LIBRARIES ```{r} library(kronos) gg_kronos_sinusoid_noNA <- function(kronosOut, fill = "unique_group"){ requireNamespace("ggplot2") d <- merge(kronosOut@input, kronosOut@to_plot, by="row.names", all=TRUE)[,-1] d_noNA <- na.omit(d) x_obs <- paste0(kronosOut@plot_info$time, ".x") x_pred = paste0(k...
dcfd5c096bf5794194ddc564450e5929695cdd457636231916c039a464deac31
R
7,993
235
rm(list = ls()) library(PanomiR) library(RColorBrewer) library(igraph) library(qvalue) fdr.paths <- 0.1 edge.fdr <- 0.05 cor.thresh <- sqrt(0.1) PLOT.META <- T # if(path.source == "MSigDBV7"){ # pcxn.dir <- "Data/GeneSets/improved_PCxN_MSigDBV7_Canonical.RDS" # PCxN <- readRDS(pcxn.dir) # ...
e010d9172136bb095b2f370ac43c0fb2b3488a848d2965b432994fea0877cc69
R
8,005
218
# OPEN LIBRARIES ```{r} library(kronos) #Change sinusoid function to omit NA in the plot gg_kronos_sinusoid_noNA <- function(kronosOut, fill = "unique_group"){ requireNamespace("ggplot2") d <- merge(kronosOut@input, kronosOut@to_plot, by="row.names", all=TRUE)[,-1] #d_noNA <- na.omit(d) d_noNA <- d x...
7e4c22bd91e120e73757d7e16550cfabda2c82295b080dc16170eb28c4cb370c
R
8,021
221
#OPEN LIBRARIES ```{r} #SCN CLOCK GENES #OPEN LIBRARIES library(kronos) #Change sinusoid function to omit NA in the plot gg_kronos_sinusoid_noNA <- function(kronosOut, fill = "unique_group"){ requireNamespace("ggplot2") d <- merge(kronosOut@input, kronosOut@to_plot, by="row.names", all=TRUE)[,-1] d_noNA ...
d37d704b49775a0c7bf412d2ac00469e536b85ca5bd604f6467bbcd2ba181eec
R
8,057
164
sem <- function(data) { # Проверяем, что данные не пустые if (length(data) == 0) { stop("Входные данные не могут быть пустыми") } # Вычисляем стандартную ошибку se <- sd(data) / sqrt(length(data)) return(se) } # Загрузка данных SerpinE1_data <- read.table("C:/Anna_27.08.2021/PiloLena2023...
f08e3c852c19232468d32c5524ba3a661e1ca3d6799f6055a7b82b35558a0d12
R
8,072
190
#This script is similar to src/causal_sim.R #Only save the results of the target cell type #For each time it will first generate the background #1: parameter df file path #2: summarized output file header #3: which column (name) indicates the final output file header? #4: regular expression contains the pattern of ta...
b82905916850a904eb7ff66c36f547b4ba873893fc576676789d0c91d4a3db5f
R
8,083
259
# run Fig5.R before this # rm(list=ls()) source('load_libraries.R') source('functions_for_network_analysis.R') library(GSEABase) library(dplyr) library(purrr) library(fgsea) library(tibble) library(rlang) library(dplyr) library(stringr) library(ggnewscale) get_fc_and_ks_by_celltype = function(degdf, q_geneset) { ...
43480903acf25507e12c00e55fe866e326f0cef455c2f46c318a47bdefb44ad2
R
8,089
219
#OPEN LIBRARIES ```{r} library(kronos) #Change sinusoid function to omit NA in the plot gg_kronos_sinusoid_noNA <- function(kronosOut, fill = "unique_group"){ requireNamespace("ggplot2") d <- merge(kronosOut@input, kronosOut@to_plot, by="row.names", all=TRUE)[,-1] d_noNA <- na.omit(d) x_obs <- paste0(...
c531eb637cbb0249859f334003367eeb4cf9353177f714b0a34a052aad69e6cd
R
8,089
219
#OPEN LIBRARIES ```{r} library(kronos) #Change sinusoid function to omit NA in the plot gg_kronos_sinusoid_noNA <- function(kronosOut, fill = "unique_group"){ requireNamespace("ggplot2") d <- merge(kronosOut@input, kronosOut@to_plot, by="row.names", all=TRUE)[,-1] d_noNA <- na.omit(d) x_obs <- paste0(...
1b0b545037f9298822a4ca844cdbcf305d00d1b11e68ae3f28eecdfcd0984b57
R
8,097
217
# ---------------------------------------------------------------------------- # Libraries and setup ---- library("argparse") library("ComplexHeatmap") library("DESeq2") library("ggplot2") library("tidyverse") library("Seurat") # Command line arguments ---- parser <- ArgumentParser(description = "Differential express...
472aa4bb8d6710971d78e34ba6cc44044729ef45c18d482062e9af13380b2341
R
8,117
215
#actual RNAseq QC # library(cqn) # library(sva) # library(biomaRt) # library(preprocessCore) # library(Hmisc) library(CovariateAnalysis) # get the package from devtools::install_github('th1vairam/CovariateAnalysis@dev') library(data.table) library(plyr) library(tidyverse) # library(psych) # library(limma) library(edge...
c53b70faae15b63cc709bb35dce1732bcf5c57d88946bda746f330fd3836aef7
R
8,118
222
# ---------------------------------------------------------------------------- # Libraries and setup ---- library("argparse") library("ggplot2") library("janitor") library("tidyverse") library("Seurat") # Command line arguments ---- parser <- ArgumentParser(description = "Differential expression analyses") parser$ad...
1864d5a28b0666ba02c61d80f9ba9f78ad37139878bab03cac0b4152dbf6779f
R
8,126
235
# Figure 4: Sex-specific cognition associations # 4a: Stratified forest plot for sex-specific flux associations with cognition # 4b: Stratified forest plot for Butyrivibrio crossotus and Bacteroides vulgatus # Requirements: # Flux regression results # Microbe regression results # 4a: stratified forest plot on sex-sp...
4d582e6425be791251831d6c20ae3690c80a53ba1675fe4899db52a25b7e44fc
R
8,163
174
# Run CellChat to explore cell-cell communication - cell subtypes # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # April 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github.com/jinworks/C...
4cc0578de503ce395e8b1a4a4aa786e23f6803d79236f063b634a58fe39f5ba0
R
8,168
174
# Run CellChat to explore cell-cell communication - cell subtypes # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # April 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github.com/jinworks/C...
b292ce6f6743af8b96ef985e50608bebad635fa9766e9a6b36bda3ee18902c09
R
8,173
174
# Run CellChat to explore cell-cell communication - cell subtypes # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # April 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github.com/jinworks/C...
50881396344f0c3e966c892e20db2f1534d0893a560ea53ce60f0028fab96fb7
R
8,175
235
# ICC Analysis with Dialog File Selection # Load required libraries if (!require("irr")) install.packages("irr") library(irr) # ===== FILE SELECTION USING DIALOG ===== cat("\nPlease select the CT data file in the dialog box that appears...\n") ct_file <- file.choose() # Opens file selection dialog cat("\nPl...
5c6cb4b718a0a58d3d40c2099ece9bdb0883f0e1273eacd1375d1c5fa88a3c8a
R
8,177
285
#' 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 #' @...
f7794d0c8464744ac1caeee43b6b15b771e3de0157d52c65799370cc077b3d18
R
8,179
204
library("DeconvoBuddies") library("SingleCellExperiment") library("tidyverse") library("ggrepel") library("here") library("sessioninfo") library("UpSetR") ## prep plot_dir plot_dir <- here("plots", "06_marker_genes", "04_marker_gene_plots") if (!dir.exists(plot_dir)) dir.create(plot_dir, recursive = TRUE) #### load s...
5b6e79f8540ee1e73a88f46bec75709aac5e155d5c3281b736bfaa70a2257bde
R
8,194
174
# Run CellChat to explore cell-cell communication - cell subtypes # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # April 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github.com/jinworks/C...
4c354bf0620b8774ac751308b64463ad9b8bfa3b326b290e8a9e9f54f73b7620
R
8,199
174
# Run CellChat to explore cell-cell communication - cell subtypes # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # April 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github.com/jinworks/C...
eb0ee3db86c944da695f16cfcf6acbbe7b19e9b905df355f7d5a13fdf54ae446
R
8,201
158
--- title: "EIB_behavioural_accuracy" author: "Barbara Cassone" date: "AUTOMATIC" output: html_document --- ```{r echo=FALSE, message=FALSE} if(!require("pacman")) install.packages("pacman") library(pacman) p_load("reshape2","ez","dplyr","lme4","lmerTest", "rmarkdown", "lattice", "ggplot2", "DACF") select <...
754ae0cf9521d0240d772116dd4e59592884832e7e4e251f7f0be9246ad1463a
R
8,204
174
# Run CellChat to explore cell-cell communication - cell subtypes # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # April 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github.com/jinworks/C...
a64f10cc4f0518aed9a88ecbc9791b65cc328f11e2885f15063a9a774e458b72
R
8,207
203
observeEvent(input$sideBarTab, { if (input$sideBarTab == "ecmo" && is.null(GLOBAL_VALUE$ECMO[[1]])) { GLOBAL_VALUE$ECMO <- list( ecmoUising = fread(paste0(DATA_PATH, "Collection/ecmoUsing.", languageSetting,".csv")), ecmo = fread(paste0(DATA_PATH, "Collection/ecmo.csv")), artificialRespirators =...
401d76053a9cb916ab73dabee60401e8d56cd5722ef236a5a76b8326c65eea25
R
8,266
159
# function for plotting BCL11B site # SNPname = "rs12895055", chr = 14, SNPposition = 99246457, # revised from plot_anywhere # Use OverlayTrack to combine data tracks plot_AsoC_BCL11B_2sites <- function(chr, start, end, gene_name = "", mcols = 100, strand = "+", ...
e13cdbd4801d37ade2efad219d18b30605d7850206dedefcbccc84a88b7a681d
R
8,269
215
is.nan.data.frame <- function(x) do.call(cbind, lapply(x, is.nan)) #' Estimate sigma #' #' This function estimates the standard deviation sigma of the noise of the model where the data are generated from a signal of rank k corrupted by homoscedastic Gaussian noise. #' Two estimators are implemented. The first one, ...
a4c0ad782a3a271580aa6afc6910d87a01256c5e9c8b8a3b98cd1a2a4955d03c
R
8,283
235
# get other UCRs nearest upstream and downstream protein coding genes setwd(dir = "D:/R_project/UCR_project/") options(stringsAsFactors = FALSE) rm(list = ls()) library(tidyverse) library(readxl) library(stringr) library(ggplot2) library(ggview) library(cowplot) otherUCRsNearestPCGsINFO <- read.table( file = "01-d...
2e5618bae77196b7cecc8c67f6e7d2211d4bc069d4761a8f866707b63d6bb881
R
8,284
273
--- title: "Meta-analysis using dmrff" output: pdf_document: default word_document: highlight: tango html_document: toc: true --- # Meta-analysis using dmrff ## Download and prepare DNA methylation datasets We'll use a couple of small cord blood DNA methylation datasets available on GEO: GSE79056, GSE...
1fcc58cdfa95bcf18871d81f98a830b0b72c829982981236d13501acac374ec1
R
8,288
179
library(tidyverse) library(data.table) library(arrow) library(here) create_formated_metadata = function(dt){ dt[,disease := ifelse(disease == "FTD" & pathology %in% c("FTD-TAU","FTD-FUS"),"FTD-non-TDP",disease)] dt[,disease := ifelse(disease == "FTD","FTD-TDP",disease)] dt[,disease := ifelse(grepl("ALS",dise...
3c0680dfbdf6e9e49edb823b621b84184489fefb588d0cbe97861bf37173623d
R
8,296
175
# Run CellChat to explore cell-cell communication - cell subtypes # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # April 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github.com/jinworks/C...
6d0910f8146ce11e766ab5fa4631099b92c51747a8d051db94c30932322839cf
R
8,301
175
# Run CellChat to explore cell-cell communication - cell subtypes # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # April 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github.com/jinworks/C...
48a7e2e7ff8ad6db459bfbc6bc0e05e1e82849dcfccd0d342b621c0f95d419e1
R
8,306
175
# Run CellChat to explore cell-cell communication - cell subtypes # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # April 2024 # https://github.com/sqjin/CellChat ## Tutorial: https://htmlpreview.github.io/?https://github.com/jinworks/C...
7f80e41bafac44c6fd85064c5e8a8af7faa4714c6b2e9222a7867e33ab1132bb
R
8,313
217
--- title: '%' output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} library(dplyr) library(Seurat) library(cowplot) library(patchwork) library(ggpubr) library(stringr) library(tidyverse) ``` 1. WT only 2. analysis 3. WT and MUT 4. analysis #2 cluster annotation study...
252e29899256dff9a7b7cf1fda4ba9fed60bcfa5cbd5e8c73b3f0b4c8a2061ff
R
8,322
221
show.tree = function(tree, names) { named.tree = tree for (i in 1:dim(tree)[1]) { for (j in 1:dim(tree)[2]) { if (tree[i,j] < 0) { t = -1*tree[i,j] named.tree[i,j] <- names[t] } } } return(named.tree) } SelectIntegrationFeaturesWeighted = function (object.list, w= NULL...
f54085b09369492241189a35309100da8d4523df8cfd370350c13be986e58e4b
R
8,326
148
--- title: Detecting clusters of doublet cells with DE analyses package: scDblFinder author: - name: Aaron Lun email: infinite.monkeys.with.keyboards@gmail.com date: "`r Sys.Date()`" output: BiocStyle::html_document vignette: | %\VignetteIndexEntry{3_findDoubletClusters} %\VignetteEngine{knitr::rmarkdown} %...
82761e8a68c3897614cc42dee03ac73abc13f29c074ef9b00f04818a9ae0b29c
R
8,329
217
# Extracts information from the downloaded abstracts # Adds for each gene in which cell type it is a diff. expressed or a signature gene # Searches keywords tumor and melanoma and gene symbols and their synonyms (Ensembl/BioMart) # in the abstracts to highlight them library(xlsx) library(stringr) # split abstracts li...
d329c234652a657317ed46af1022590d36800f897ecb6b9422757c36e1b082e4
R
8,339
250
#----------------------------------------------------------------- Start UI ---- start_ui = function(id){ ns = shiny::NS(id) shiny::tagList( shiny::fluidRow( shiny::h1('SODA - Simple Omics Data Analysis') ), shiny::fluidRow( shiny::column( shiny::hr(style = "border-top: 1px solid #7...
b9db6904466f89f1530bbf7339453dc539a7b9bbdabb430fd0c7cae56c729224
R
8,342
205
library(dmrff) options(mc.cores=4) source("functions.r") ## generate datasets set.seed(20180220) n.datasets <- 10 n.sites <- 1000 n.samples <- 100 manifest <- generate.manifest(n.sites) datasets <- lapply(1:n.datasets, function(i) { dataset <- generate.dataset(n.samples, manifest) var <-...