sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
99fd439f36259e2457f4a0ba482ded47ba7f86c6fd50e683095e26258253d92c
R
5,706
147
library("tidyverse") library("sessioninfo") library("DeconvoBuddies") library("here") ## prep dirs ## plot_dir <- here("plots", "13_PEC_deconvolution", "11_deconvo_plots_donor_subset") if (!dir.exists(plot_dir)) dir.create(plot_dir, recursive = TRUE) ## load colors & shapes load(here("processed-data","00_data_prep",...
f0a1b95e57f8fedcda2d6baf808fe727c4e6dec4eb6d552c713ff92ba797c8a8
R
5,709
160
#' Run differential rhythmicity analysis for RNA-seq data using DESeq2 #' #' @inheritParams compareRhythms #' @keywords internal compareRhythms_deseq2 <- function(counts, exp_design, lengths, period, rhythm_fdr, compare_fdr, amp_cutoff, just_classify,...
7240d323f8dd9535082b6261ef1504518986fb9de1299253ca1a6eac055cec3f
R
5,713
138
#----04_exclude_animals_v01_single_experiments---------------------------------- #------------------------------------------------------------------------------- # Locomotor activity analysis for Reinhard et al. 2025 (10.1073/pnas.2506164122) # Requirements: # 1)scripts: # 01_setup_v01 # 02_variables_an...
5cb21d1359d886ef88bb5e9e8cd046a4f08b2897a905ef57821cb41ed3a6d843
R
5,714
142
## Create gene set file and gene size file from EWAS results table for use with MAGMA ## library(biomaRt) library(dplyr) library(org.Hs.eg.db) library(data.table) #1. Load results ================================================================================================================ if(grepl(".rds", resF...
25b9b95f5be6260cc90d434942297a8dc8b42d651583d17d848263803632b71a
R
5,716
133
#' Smooth Doublet Scores #' #' This function applies a distance-weighted kNN smoothing to single-cell #' doublet probabilities, amplifying high-probability doublet clusters while #' suppressing isolated noisy predictions. #' #' @param x A \code{SingleCellExperiment} object (containing the #' 'scDblFinder.score' co...
08c20217c29d881fa300f87ebc7434c7e3cebc1580c44b7a66e343be26a5b87a
R
5,721
198
# Siwei 21 Jun 2023 # Process all GAs (FASTQs trimmed (2 batches, 1 re-seqed) # + previous ones from 2019) # note the sample names are complex, need processing # Jun 2023 # init library(readr) library(vcfR) library(stringr) library(ggplot2) library(parallel) library(MASS) library(RColorBrewer) library(grDevices) #...
328bca4f15e6ef7af0cf9870a9cd90ea6bba5614b3a3aaa3845c420c76195879
R
5,727
141
# Data integration with Harmony # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # March 2022 # Based in the Harmony tutorial for integration with Seurat # http://htmlpreview.github.io/?https://github.com/immunogenomics/harmony/blob/mast...
062ce2c636759dc2114bc2b0d85b77e3371443e91b60aeb95708da81dbc930c0
R
5,732
199
library(Seurat) library(tidyverse) library(here) # load in metadata and dendrogram meta <- readRDS(here("data", "human_meta.RDS")) dend <- readRDS(here("data", "human_dend.RDS")) dend_order <- labels(dend) #Plot 1: layer heatmap #check all SS clusters are represented ss_cl <- meta %>% filter(species_tech %>% ...
9537fff3131bd0eff73608155dbfca7e6979df960c9a8df8b4855b68f5b61855
R
5,734
170
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) peak_folder <- file.path(project...
56d85db1e2c2a17882821210066d0de2b173190403d986a8e7fdeea43fe00a81
R
5,741
131
# Add clusters from Harmony to normalized Seurat object # CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project # Isabel Castanho (icastanh@bidmc.harvard.edu) # May 2022, edited Dec 2022 # activate conda environment in ITHACA # conda activate use_seurat_r4 # Open R # R # Load packages li...
b3c32dd24353903af5d7154582686b3860d7e840e7951b7e8c97c35fc7adb7c6
R
5,742
177
# Install packages if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("clusterProfiler") BiocManager::install("org.Mm.eg.db") # Mouse genome annotation package set.seed(0) # Load packages library(clusterProfiler) library(org.Mm.eg.db) arqvo <- dir(...
bdd7ce61e11aec6e22386a135c1316a64edd8193d56a92ae11b1f63b4e132d1b
R
5,745
149
#File to identified enriched terms in DE genes between neuronal classes using the pathfinR algorythm. library(pathfindR) library(openxlsx) library(biomaRt) library('org.Hs.eg.db') library(writexl) library(plyr) library(tidyverse) library(ComplexHeatmap) library(circlize) library(STRINGdb) library(igraph) protein_i...
4a199927679ca9b45e6e18e0e4375b5e3efae1221f83c86f511527e2525c59d8
R
5,747
186
# ====退院推移図データセット==== recoveredData <- reactive({ dataset <- mhlwSummary[, .( 陽性者 = sum(陽性者, na.rm = T), 回復者 = sum(退院者, na.rm = T), 重症者 = sum(重症者, na.rm = T), 死亡者 = sum(死亡者, na.rm = T) ), by = "日付"] dataset <- merge( dataset, confirmingData, all.x = T, by.x = "日付", ...
6bba7ed60c381d979219e1b52c0674276ed9196a74b009ccb15cb83279970737
R
5,750
106
###ÕûÀí½á¹û library(tidyr) library(tidyverse) library(openxlsx) out_all_res <- data.frame() out_null_res <- data.frame() inputpath <- "/mnt/data/lijincheng/mGWAS/result/01UVMR/02mediator_outcome/final_with_conmix/with_conmix/" outlist <- list.files(inputpath) ###metabolite 249 for(i in 1:249){ inputpath <- "/mnt/da...
4c19144a8aea7077fb968c0cfc0460ef8a372af88ea69e601401271bdc447cdb
R
5,757
159
library(magrittr) library(data.table) library(dplyr) library(tidyr) library(ggplot2) library(ggrepel) library(Hmisc) library(cowplot) library(pROC) library(stringr) #genes that are relevant across drugs? sensitivity genes? essentiality? setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) read_dat <- functio...
cef1ae2cf7be50a38016f346b533008b7b48af67d619e8cbb40710b4aceccce3
R
5,758
115
```{r} library(kronos) library(tidyverse) library(ggplot2) setwd("C:/Users/U177202/PhD/Experiments_thesis/Youth_Jet_Lag_Experiment_2/YJL_Exp2_Microarrays/YJL_Exp2_KRONOS/YJL_Exp2_circadian_clock/YJL_Exp2_circadian_clock_ht_extra/Results") ``` ```{r} library(readxl) yjl_ht_bmal1_new <- read_excel("C:/Users/U17...
707839cc555e2955b0a91436c2056d7cd84f3b6ac502f48d0d86ef5fec0e8ea1
R
5,761
167
setwd("~/mount/hpc_uni/mammary_gland_transcriptomes/test_pipeline/") library(tidyverse) theme_set(theme_minimal(base_size = 16)) regular <- read_tsv("results/salmon/stromal_t1_bc_M00323192/quant.sf") diploid <- read_tsv("results/salmon_diploid/stromal_t1_bc_M00323192/quant.sf") regular <- regular %>% select(gene = N...
e36b437bc6eb1c2bb1f23807e176936424c7c87290b0b459f20de294780a4980
R
5,761
127
# load libraries library(tidyverse) library(data.table) library(Matrix) library(Rfast) library(matrixStats) library(ggridges) library(reticulate) library(anndata) library(gtools) # source functions source("/inkwell05/ameer/functions/0_source_functions.R") # we will predict the significance (alpha = 0.05) of one slice...
aad8b7593c71ab5e0e6ddd4a39ef19023661056f0c9dbb6146da32bd816736a4
R
5,765
121
get_local_outcomes <- function(outcomes_df = outcomes_df) { library(data.table) message("outcomes_df = dataframe from FR02, mibio,pathways;containing: exposures name id path") raw_outcomes <- lapply(seq(1, dim(outcomes_df)[1]), function(i){ if(outcomes_df$exposures[i] == "FR02") { sp <- fread(outcomes_df...
ba0817c6833a737fce2e43a364829710184f519fee4d4ebda6042a0873d45c26
R
5,772
169
library(data.table) library(dplyr) library(tidyr) library(purrr) library(ggplot2) library(grandR) library(ggrastr) library(glue) give.n <- function(x){ return(c(y = median(x)*1.05, label = length(x))) } #' function to plot fitted half life curves in two conditions for specific genes plot_hl <- function(go_of_inter...
4425a68f5541bb307e7af410ad2e30442cd7cc27a9efe352fb40df4016178cf5
R
5,782
164
#!/usr/bin/env R # # Analyze dispersion across cell types. Namely, plot the mean and var for genes. # library(SingleCellExperiment) #---------- # set paths #---------- sce.fpath <- file.path("/dcs04/lieber/lcolladotor/deconvolution_LIBD4030", "DLPFC_snRNAseq/processed-data/sce/sce_DLPFC.Rdata"...
2701cd4eacb3d70731f36afd5e0cf1eb02b2ee12d3dc6935630c33fcbe62ef7c
R
5,784
168
rm(list=ls()) set.seed(123) source('load_libraries.R') source('aux_functions.R') library(dplyr) library(ggplot2) library(ggalluvial) #Read and filter GO data data=GSA.read.gmt('data/Human_GO_bp_with_GO_iea_symbol.gmt') genesets=data$genesets names(genesets)=data$geneset.descriptions geneset_sizes = sapply(genesets, l...
64b4351109e2a314ea1b308857661a85a4a7a4b94f8139ad9b894c2d0a0539b6
R
5,784
101
# Load required R packages library(data.table) # For efficient data reading, processing, and merging library(MungeSumstats)# For GWAS data formatting and genome version conversion # -------------------------- 1. Basic Parameter Setup -------------------------- # Output directory (for converted data and log file...
1083c3ec80550c544b66499b1a2a9158a553a222d1913ca4820f1654f44101af
R
5,785
156
# Authors: Christian Wachinger based on ComBat code by Jean-Philippe Fortin # The original and present code is under the Artistic License 2.0. # If using this code, make sure you agree and accept this license. combatPP <- function(dat, batch, PC=NULL, mod=NULL, eb=TRUE, verbose=TRUE, parametric=TRUE){ dat <- as.ma...
aed5f0618a410d4d2e8c46c0aad3cc4dfe98f18d3053a2901df0c5638fce5c01
R
5,788
101
library("SingleCellExperiment") library("iSEE") library("shiny") sce <- readRDS("sce_nac_small.rds") packageVersion("iSEE") initial <- list() ################################################################################ # Settings for Reduced dimension plot 1 ####################################################...
ef0f315074d72f97d1b20caa12a3846777990c126182d4b09049660c8cddf213
R
5,788
101
library("SingleCellExperiment") library("iSEE") library("shiny") sce <- readRDS("sce_hpc_small.rds") packageVersion("iSEE") initial <- list() ################################################################################ # Settings for Reduced dimension plot 1 ####################################################...
51b4c4d87bf4fc82733689972ff8b8f73701fd8a404f62f0e4f5f447967179a3
R
5,790
167
library(fgsea) library(gprofiler2) library(tidyverse) library(org.Hs.eg.db) library(GO.db) library(reactome.db) # Prepare GMT files for pathway analysis prepare_gmt_data <- function(min_size = 15, max_size = 500) { # Filter gene sets by size adjust_gene_set_size <- function(gene_set, min_size, max_size) { ...
d761ff189a2cefac6cc6fc3f0d7565be1769327d408be600bfcd59dc3d1746a6
R
5,790
101
library("SingleCellExperiment") library("iSEE") library("shiny") sce <- readRDS("sce_amyg_small.rds") packageVersion("iSEE") initial <- list() ################################################################################ # Settings for Reduced dimension plot 1 ###################################################...
5329e0fa6cf1d2fd3410e5f57872e64d2f2176eddeeb512ef3e79c7a34351cec
R
5,792
101
library("SingleCellExperiment") library("iSEE") library("shiny") sce <- readRDS("sce_sacc_small.rds") packageVersion("iSEE") initial <- list() ################################################################################ # Settings for Reduced dimension plot 1 ###################################################...
54a3b5e956552cd59c7def10b96b3792ed605c63777a609a8c4c1fefca17475a
R
5,796
101
library("SingleCellExperiment") library("iSEE") library("shiny") sce <- readRDS("sce_dlpfc_small.rds") packageVersion("iSEE") initial <- list() ################################################################################ # Settings for Reduced dimension plot 1 ##################################################...
9254e6616fcd3c60eb3fd7058a1146d42bccd5576f64e559b9ac5195538c888e
R
5,796
155
# This tests the doublet density machinery. # library(scDblFinder); library(testthat); source("test-computeDoubletDensity.R") set.seed(9900001) ngenes <- 100 mu1 <- 2^rexp(ngenes) mu2 <- 2^rnorm(ngenes) counts.1 <- matrix(rpois(ngenes*100, mu1), nrow=ngenes) counts.2 <- matrix(rpois(ngenes*100, mu2), nrow=ngenes) co...
0ad94b307ca9920d7f7b4dd0db42ad1f409d5f337763e508f4e6cb6c7887078b
R
5,797
118
#plot for the simulation results ##### load packages and results #### if (!require("here")){ install.packages("here") library("here") } if (!require("tidyverse")){ install.packages("tidyverse") library("tidyverse") } if (!require("magrittr")){ install.packages("magrittr") library("magrittr") } if (!require(...
d1b8e2e250aef1574a27447b647da44e895f79a07628512b54061901f6fd51a9
R
5,809
132
# GPT social perception: Calculate how similarly GPT4 evaluated video experiment data compared to real human participants # # Process: # 1. We have approximately 10 human raters -> select all possible combinations of K raters, K = {1,2,3,4,5} # 2. Calculate the average correlation between the left_out_group...
b3d60a4d31ba68ce37e527f2a6b3131784d8f8df09ffc09606a9a113d7c94502
R
5,814
151
# ---------------------------------------------------------------------------- # Libraries and setup ---- library("Seurat") library("SeuratDisk") library("tidyverse") library("argparse") # Command line arguments ---- parser <- ArgumentParser(description = "Integrate seurat object") parser$add_argument('--input', '-i...
35ca53d1dce6f4defb888a52749f217747d168eeadbd665c8d382eae2db7dced
R
5,824
132
# GPT social perception: Calculate how similarly GPT4 evaluated frame experiment data compared to real human participants. # # Process: # 1. We have approximately 10 human raters select all possible combinations of K raters, K = {1,2,3,4,5} # 2. Calculate the average correlation between the left_out_group a...
de2a7b063e5a1db6b54d7ce759c8dd0c970e540df11efdb32ce427b4aee75cb4
R
5,826
148
dev <- FALSE if(dev) { library(ggplot2) library(tidyr) work_dir <- "/home/ricoderks/Documents/LUMC/Projects/soda-light/" feature_table <- read.csv(file = file.path(work_dir, "240220_features.csv"), row.names = 1, header = TRUE) data_table <- read.csv(f...
3a82924bce7ba5d3d89bbd0e36c97ef2608eb793f66d154982b187cfe3fa7023
R
5,839
132
# GPT social perception: Calculate how similarly GPT4.1 evaluated video experiment data compared to real human participants # # Process: # 1. We have approximately 10 human raters -> select all possible combinations of K raters, K = {1,2,3,4,5} # 2. Calculate the average correlation between the left-out-gro...
973aad070cb9057fc4480705e7a0139c1d7306f4e8d314c24dfa835f66e68e45
R
5,845
156
# devtools::install_github("Danko-Lab/BayesPrism/BayesPrism") library("BayesPrism") library("SingleCellExperiment") library("here") library("sessioninfo") ## get args args = commandArgs(trailingOnly=TRUE) marker_label <- args[1] marker_file <- NULL if(marker_label == "FULL"){ message("Using FULL gene-set") } else...
a567b0abf6ef5d789f04ab63211da607ce4df79f4355f4fb1a4b7c1617127071
R
5,851
142
#' Version 2.0 #' Last modified on 20/01/2020 #' Script Task: Calculate alpha-diversity #' Author: Ilias Lagkouvardos #' Contributions by: Thomas Clavel, Sandra Reitmeier #' #' For meaningful comparisons of species richness across samples, #' use of normalized sequence counts is expected. #' For normalized richness ca...
991d039779608fd0bbec4da51d94d8ea48f9a5226ed12e492b39d8a47bec0b9b
R
5,857
132
# GPT social perception: Calculate how similarly GPT4.1 evaluated frame experiment data compared to real human participants. # # Process: # 1. We have approximately 10 human raters select all possible combinations of K raters, K = {1,2,3,4,5} # 2. Calculate the average correlation between the left_out_group...
3e15463017fa03ffe45bbcd9f884d68964c40702844251db1081ec047b2e45b8
R
5,866
86
library(dplyr) library(Seurat) library(ggplot2) library(EnhancedVolcano) library(clusterProfiler) library(org.Mm.eg.db) # Load TM integrated data sSC.integrated <- readRDS("/project/Campbell_Lab/yl7mfw/Data Analysis/20240620_TwoSpecies_OtherPlot/20240728_Species and Cluster markers/20240729_Orthologous_sSCintegrated.r...
696e58001ba7340888aa09e55ec7cc27adc8a738f3439960822ee0ad4a33966d
R
5,871
131
if (!require("here")) { install.packages("here") library("here") } if (!require("tidyverse")) { install.packages("tidyverse") library("tidyverse") } if (!require("magrittr")) { install.packages("magrittr") library("magrittr") } if (!require("seismicGWAS")) { if (!requireNamespace("devtools", quietly = TRU...
3aa132dc32884787fd865489c2efffaef8b1b9e84d15e4cf1bac2299a6b42e15
R
5,874
136
observeEvent(input$sideBarTab, { if (input$sideBarTab == 'iwate' && is.null(GLOBAL_VALUE$Iwate[[1]])) { # GLOBAL_VALUE <- list(Iwate = list( # summary = NULL, # patient = NULL, # updateTime = NULL # )) # TEST fileList <- list.files(paste0(DATA_PATH, 'Pref/Iwate/')) ...
c9828e528d67614d0b253faa695a558aea924a12d4f3c5417525da45edf62162
R
5,874
160
# install.packages("hspe_0.1.tar.gz") library("hspe") library("SingleCellExperiment") library("jaffelab") library("tidyverse") library("here") library("sessioninfo") ## get args args = commandArgs(trailingOnly=TRUE) marker_label <- args[1] ## not using txt list of marker genes, methods needs named list marker_sets ...
ede3e6c39512825a5875b1ad3be36cd3aa089d57ee5e0dda9db46200dc79887d
R
5,879
163
#!/usr/bin/env Rscript #### Seurat CCA integration 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) colBP <- c('#A80D11', '#008DB8') colSCSN <- c('#E1AC24', '...
9907b16ced76431dbdee8a0c49fafc1707414b006f2d583a6bc9ef9313606cd2
R
5,887
219
--- title: "CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project - cognitive genes: 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 --- --- ...
66ea58a520be843a076158f64033030a388a73638f1e6e2d85803f34f1a51e08
R
5,900
123
#Analysis of Tabula muris data set using Spearman's correlation model ##### 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....
15636a52a90765f2d7ffeded7c7f59e6e89ba456e39c91a229406fa0eff671c3
R
5,910
178
library(tidyverse) library(data.table) library(sessioninfo) setDTthreads(1) gwas_files <- list.files(path = "NAc_GWAS/", pattern = ".txt", full.names = TRUE) aoi <- fread(gwas_files[1]) cpd <- fread(gwas_files[2]) dpw <- fread(gwas_files[3]) sc <- fread(gwas_files[4]) si <- fread(gwas_files[5]) bim <- fread("filter...
2dab2b7f304e4be256342297012842bd1a6dda64b3942aa21e669678a8038b7b
R
5,915
131
#' Run differential rhythmicity analysis for normalized data using linear mixed effect model (lme4) #' #' @inheritParams compareRhythms #' @keywords internal compareRhythms_cosinor <- function(data, exp_design, period, rhythm_fdr, compare_fdr, amp_cutoff, just_classify, longitudinal) {...
33a42bea2b9f0a6855ef875b6da80c50e447029ff42375505d2ee77c7701f96c
R
5,920
201
# make figures for Alena PICALM paper # Siwei 22 May 2024 # init #### { library(readxl) library(stringr) library(ggplot2) library(scales) library(reshape2) library(RColorBrewer) library(ggpubr) } ## Western blot quantify #### df_raw <- read_excel("table_western.xlsx", sheet = 1) ...
25e1dc13f6d02fd368975cd7e00b3c0127e53bc3f445a7678e9c509e64f0e0a0
R
5,921
171
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) library(ggplot2) first_group <- ...
4dc102fb696a6394c5e86641a8c77eb46703336af0bce53eb65ba8f5d9c5fc39
R
5,925
179
#!/usr/bin/env R # # Simulate the bulk RNA-seq dataset and write functions for analysis # of differential expression results. # library(DESeq2) library("ggplot2") #----------------- # helper functions #----------------- random_bulkdata <- function(design.str, num.lib = 2, num.prep = 3, ...
a2a774ee3c8863649464f5f93d2c1f75d37aec391c0f11d515357ee41eac168a
R
5,929
151
library("tidyverse") library("colorblindr") library("ggthemes") # library("RColorBrewer") library("here") #### Load data #### # DLPFC snRNA-seq cell colors # load("/dcs04/lieber/lcolladotor/deconvolution_LIBD4030/DLPFC_snRNAseq/processed-data/03_build_sce/cell_type_colors.Rdata", verbose = TRUE) cell_type_colors_all...
d00e15ce5efdf4d135fdac8118f6cbe8679713b2c40cccf2a31187206488fd37
R
5,932
150
rm(list=ls()) source('load_libraries.R') source('aux_functions.R') # Read in databases and preprocess data db_complete = read.csv("data/drugbank.tsv", sep = "\t") # download drugbank dgib=read.csv("data/interactions.tsv",sep="\t") # from DGIB dgib$drug_claim_name=tolower(dgib$drug_claim_name) # find compounds that ar...
2b5e988875efeef73764af9fda70c722e4f4eab3f23ce9848897631e8a3fa967
R
5,946
162
library(tidyverse) library(decoupleR) library(tidytext) source("scripts/helpers.R") # What is the overlap between ELK1/ELK4 ChIP-seq targets and known signalling pathways? # Is inferred activity a consequence of signalling pathway induction upon TDP-43 KD, or due specifically to ELK1/ELK4? progeny_top100 <- read_tsv...
6e0b4cdf3091bd026bc673f42a3eb2123840effc5871211b429c119bebe4812d
R
5,946
155
#!/usr/bin/env Rscript suppressPackageStartupMessages({ library(optparse) library(dplyr) }) options(dplyr.summarise.inform = FALSE) option_list = list( make_option(c("-e", "--ens_var"), type="character", default=NULL, help="ENS_ID variable"), make_option(c("-m", "--proportion_min"), type="chara...
47edaf805a7d3830dc75d169e33427bde6ddccf3d63913b1bb9c53ca9b8907c3
R
5,948
183
observeEvent(input$linePlot, { if ((input$linePlot == "vaccine") && is.null(GLOBAL_VALUE$vaccine)) { vaccine <- fread(file = "50_Data/MHLW/vaccine.csv") vaccine$date <- as.Date(as.character(vaccine$date), format = "%Y%m%d") vaccine$total <- rowSums(vaccine[, 2:ncol(vaccine)]) vaccine[, `:=` ( me...
7e13fe7c0617219292a3293b13bd055cefed21d46d6b9826428de594b68297b6
R
5,957
174
get_six_UVMR_from_bulk_harmonised <- function(dat = dat, exposure = "", outcome = "", outpath = "") { source("/mnt/data/lijincheng/mGWAS/result/02MRBMA/MRBMA_function/function/se...
2b2377bb64b0accbc9fb1c9d663be12181aced214e758593641dd31036858d50
R
5,958
114
library(tidyverse) library(lubridate) # =====データ読み込み===== # 都道府県別新規感染者数 df1 <- read_csv("50_Data/byDate.csv") %>% pivot_longer(-1, names_to = "name_ja", values_to = "new_cases") df1[is.na(df1)] <- 0 # 都道府県別新規死亡者数 df2 <- read_csv("50_Data/death.csv") %>% pivot_longer(-1, names_to = "name_ja", values_to = "new_deaths")...
913027bbf8e8e713982f73b2add08881f1a3153213869dc4884f0a63f6b9bd8d
R
5,966
95
library(here) library(SummarizedExperiment) library(tidyverse) #### confirm issue in SPEAQeasy output #### load(here("processed-data", "01_SPEAQeasy", "round2_v40_2023-04-05", "count_objects", "rse_gene_Human_DLPFC_Deconvolution_n113.Rdata"), verbose = TRUE) # load(here("processed-data","01_SPEAQeasy","round2_v40_2022...
dbaf28c0ff15d403de2eda7d734d08e07494548397dadae419dab15738960421
R
5,973
88
context("compareRhythms_edgeR") load("test_data_rnaseq.rda") exp_design_batch <- cbind(exp_design, batch, stringsAsFactors=TRUE) test_that("edger analysis works for default params", { results <- compareRhythms(countsFromAbundance, exp_design, method = "edger") expect_s3_class(results, "data.frame") expect_name...
940bc8544ddd333adddfd2e5c3dcfb451b419156cf50b03318382dde94916851
R
5,978
176
library(tidyverse) library(pheatmap) library(EnhancedVolcano) library(circlize) set.seed(1234) #' Process DEG results for comparison #' @param deg_data List of DEG results from MAST analysis #' @param external_data List of external dataset results #' @param z_score_cutoff Cutoff for z-score filtering process_compariso...
345c3d6a9664d8da50641c4627a5367ea2f17940e1010920ed60d13e48785fdd
R
5,987
191
--- 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:...
236851e42c411b93f8892c65a9bd4223a7ad52d627d3f31e63f81fbb796dac5f
R
5,998
151
# R version 4.4.2 library(Seurat) # version 5.1.0 library(AUCell) # version 1.28.0 library(GSEABase) # version 1.68.0 library(tidyverse) # version 2.0.0 library(ggvenn) # version 0.1.10 # calculate molecular subtype enrichment scores for each cell using AUCell ---- # seurat object containing scRNA-seq data of our pati...
6e744495bcc328881c9f21ae7966efe3b18ea0e8bd982f5db1794fff258ec02c
R
5,999
149
# зÖÀàºÍ·ÖÀà±ýͼ setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(dbplyr) library(tidyverse) UCR_coding <- read.table(file = "02-analysis/16-New_classification/01-UCR_from_protein_coding_gene.bed", sep = "\t") write.table(UCR_coding$V8, file = "02-analysis/16-New_classific...
371bf56c15f574a53b92440e60f4f6368060b343752428358cce161787c2e096
R
6,004
133
# Load necessary libraries library(dplyr) library(ggplot2) library(gridExtra) library(ggdist) library(RColorBrewer) # Set global settings my_colors <- brewer.pal(12, "Set3") # Load preprocessed data AllDataSumPerPart <- read.csv("..../BehaviourDataSumPerPart_withBiomarkers.csv") AllDataSumPerPartStop <- read.csv("......
1553daead8be2811e04b438a8e463c63742af41795422d5a988f7c30dc50c9c4
R
6,010
136
setwd("/project/Campbell_Lab/yl7mfw/Data Analysis/20240619_Integration_Clu21") # load packages up into R library(dplyr) library(Seurat) library(ggplot2) library(googleVis) Species <- readRDS("/project/Campbell_Lab/yl7mfw/Data Analysis/20240419_Three Species Integration_Orthologs and TSDB3/20240422_5_sSC.Neurons.rds"...
9a91b1e6cda4de5192953f1b550d540ebc2b76c53b972435d978ccb65defab24
R
6,020
182
# plot prep and filter lists: PlotTheme = theme_bw() + theme(axis.line = element_line(colour = "black"), axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1), panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.border ...
75198bdf4085f424bf6079662de66193c087bd0f74b4901031b9ee978c074030
R
6,021
205
# Siwei 24 Jan 2025 # plot new Ext. Fig 5b # 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) } ## Fig_3B #### d...
b144cfaf7a0ed09dcf3f982e453d6be4bf4350f959497d27d8927d7c621e8b85
R
6,021
191
# ÔÚhuman_brain_down_devASµÄÐòÁÐÖвéÕÒËùÓÐhexamerµÄÊýÄ¿ setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(tidyverse) library(Biostrings) # count down devAS hexamers ----------------------------------------------- # get human brain down devAS fasta human_brain_down_devAS <- readDNAStringSet( filepa...
8d34b8caded97099f937ee0e5e672aa7d9922664557d80d9a2d68930f2beba34
R
6,029
187
observeEvent(input$sideBarTab, { if (input$sideBarTab == "google" && is.null(GLOBAL_VALUE$Google[[1]])) { # GLOBAL_VALUE <- list(Google = list( # mobility = fread(paste0(DATA_PATH, "Google/Global_Mobility_Report.Japan.csv")) # )) # TEST GLOBAL_VALUE$Google <- list( mobility = fread(paste...
97aba5985a0fc3b4a7bc593f37374c334b67069ed39c03f7ece0662c328976fc
R
6,038
162
library(magrittr) library(data.table) library(dplyr) library(tidyr) library(ggplot2) library(ggrepel) library(Hmisc) library(cowplot) library(pROC) library(stringr) #genes that are relevant across drugs? sensitivity genes? essentiality? setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) ###################...
1bbc076f1c2d626e4be6e4378aedb99120bd0f1d5c7768e7695a4750e74ccb92
R
6,044
150
observeEvent(input$sideBarTab, { if (input$sideBarTab == "miyagi" && is.null(GLOBAL_VALUE$Miyagi[[1]])) { # GLOBAL_VALUE <- list(Miyagi = list( # summary = NULL, # patient = NULL, # updateTime = NULL # )) # TEST fileList <- list.files(paste0(DATA_PATH, "Pref/Miyagi/")) ...
ea1d0e290c7fa8650b4e59e4a7dcbc4488a5ccb106abff91398309961972f096
R
6,074
242
#!/usr/bin/env R # # Learning DESeq2 analysis and formatting scripts to do evaluation of # DE results, figure generation, etc. # # BiocManager::install("DESeq2") BiocManager::install("airway") library(DESeq2) ## indep hyp weighting #library(IHW) ## example datasets #library(airway) #library(GEOquery) #library(tximpo...
4e9a48cb97a7a6cd379a08a9f87f821958e59f6f1d42d49d2968747e6b981921
R
6,094
122
# Authors: Andrew Adey, PhD; Lauren Rylaarsdam, PhD # 2024-2025 ############################################################################################################################ ### Nearest Neighbor Label Xfer #' @title transferLabelsNN #' @description Transfer metadata labels based on nearest neighbor analy...
4c6af4604487d15bed12ed5fcf357222da358d379c1c1293056543d51e4d894c
R
6,095
182
#' Check UK Biobank field IDs #' #' @description Check if provided field IDs are valid and return all possible phenotype names in the UK Biobank RAP #' #' @return Returns a vector of strings (valid phenotypes). #' #' @author Luke Pilling #' #' @name fields_to_phenos #' #' @param fields A vector of character strings. Th...
fbc8210ca651e44850f2ce49bef264b6bc2f1678583976c767dd8fd97b3177e4
R
6,098
144
library("SummarizedExperiment") library("here") library("tidyverse") library("SingleCellExperiment") library("sessioninfo") #### Plot Setup #### plot_dir = here("plots","00_data_prep","data_standards") if(!dir.exists(plot_dir)) dir.create(plot_dir) pos_df <- tibble(Position = c("Anterior", "Middle", "Posterior"), ...
8ebf4a2e6202a357e536edfcd6f0acecdce2a7c87b9ef97d08cd36aa443ae3b1
R
6,107
176
#' Update UK Biobank field with `title` and `label` from the schema #' #' @description Variables such as education and ethnicity are provided as integers but have specific codes. #' #' The UK Biobank schema are machine-readable dictionaries and mappings defining the internal structure of the online Showcase. https://bi...
4baa4eb5acc463a3e10b3681ebd63525d108a27367f006ab03c8ac3e3b6d9c7d
R
6,110
117
#----06_load_data_from_RDS_v01-------------------------------------------------- #------------------------------------------------------------------------------- # Locomotor activity analysis for Reinhard et al. 2025 (10.1073/pnas.2506164122) # Requirements: # 1)scripts: # 01_setup_v01 # 02_variables_an...
e69bbb9f5283242d54efd8dc1d3f6cc9917c0e408254d0f9aeeca1f98835ebad
R
6,132
138
if (!require("here")) { install.packages("here") library("here") } if (!require("magrittr")) { install.packages("magrittr") library("magrittr") } if(!require("tidyverse")) { install.packages("tidyverse") library("tidyverse") } #load results Kunkle_hc.micro_dfbetas <- read.table(here("results","Saunders","i...
dac8f9ff6515674209d496d0cdd92721ac98d7b922e2196961ed90acf1da58c4
R
6,137
176
# ÕûÀíËùÓеÄhuman essential gene setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(tidyverse) # »ñµÃhuman deg ------------------------------------------------------------- deg_eukaryotes <- read.csv(file = "01-data/21-Human_essential_gene/deg_eukaryotes.csv", sep = ";", he...
24d07d68a3564da077ce01b5f5fe86b267d5ee93c090ce9c49655f7370f77635
R
6,159
161
#!/usr/bin/env R # # Analyze dispersion across cell types. Namely, plot the mean and var for genes. # library(SingleCellExperiment) expt.str <- "dlpfc-ro1" save.fpath.rds <- save.fpath.plot <- "/users/smaden/" #----- # load #----- # load snrnaseq base.path <- "/dcs04/lieber/lcolladotor/deconvolution_LIBD4030/" sce....
f508137c84cb6ea6fcc038edb0cade15c384211939be13234993db3b842c5977
R
6,167
136
observeEvent(input$sideBarTab, { if (input$sideBarTab == 'kanagawa' && is.null(GLOBAL_VALUE$Kanagawa[[1]])) { # GLOBAL_VALUE <- list(Kanagawa = list( # summary = NULL, # updateTime = NULL # )) # TEST fileList <- list.files(paste0(DATA_PATH, 'Pref/Kanagawa/')) indexName ...
5395b0874031ccd3706159ba89867f1178560478a6f39d7d6f1b3b41a84b3dce
R
6,174
207
# ============================================================================= # 巨噬细胞亚群追踪分析脚本 # ============================================================================= # 功能:巨噬细胞亚群提取、重新聚类、细胞类型注释,并进行CytoTRACE分化轨迹分析 print("Hello world!") rm(list = ls()) # 加载配置文件 source("../config.R") # 设置工作目录 setwd(ENV_DIR) lf <...
aba7dc08d87de84ab153a0b363dbb3aa2d3de87c6cd185e99629063dc51764d0
R
6,178
220
# Load required packages # install.packages("scales") # install.packages("ggplot2") library(ggplot2) library(dplyr) library(tidyr) library(readr) ##### Violin Plot ##### # Define stages stages <- c("NAT", "CAG", "IM", "PGAC", "Metastasis") # Read and reshape data combined_data <- lapply(stages, functio...
e634f0ebbb770b971d19073d41ab3669bbfaa75672735452201959ac5614f1d2
R
6,179
129
suppressPackageStartupMessages(library(optparse)) option_list = list( make_option(c("-g", "--gtf"), type='character', help="genome annotation (gtf)"), make_option(c("--transcript_table"), type='character', default = NULL, help="Table with target transcript_ids. Requires column \'trans...
81bba8fc377aa3a4b37fa91557d54c1cfbf009b21e2719580491a5442ca36115
R
6,180
124
get_local_clumped_exposures <- function(exposures_df = exposures_df, p_threhold = 1e-5) { message("exposures_df = dataframe from FR02, mibio,pathways;containing: exposures name id path") message("p_threhold = 1e-5, for gut microbiota") raw_exposures <- lapply(seq(1, dim(exposures_df)[1]), function(i){ if(expos...
deaa490e0e7df03d5fc6ffb2c0d7286d156cfdcb382f0eb4f0fcd783c33e4ae7
R
6,182
184
# organize the vep results setwd(dir = "D:/R_project/UCR_project/") options(stringsAsFactors = FALSE) rm(list = ls()) library(tidyverse) library(ggplot2) library(stringr) library(cowplot) library(ggview) library(ggprism) library(sysfonts) library(showtext) lwd_pt <- .pt*72.27/96 myTheme <- theme( panel.grid = ele...
0f605d62420755d767805acbaaf0cbfc60bcdf96199eff0d52a0eb4bf6ff2a35
R
6,183
210
#!/usr/bin/env Rscript #load pkgs suppressPackageStartupMessages({ require(ampvis2) require(tidyverse) require(data.table) }) functions_file <- "MiDAS_genusfunctions.csv" #load config cli::cat_line( "reformat.R: Reading config.json file" ) config <- jsonlite::read_json( "config.json", simplifyVector = TRU...
31ea3f06933ded1b5a27294079840d8a31b607418adabeb21581fe02260dc059
R
6,211
176
library(Seurat) library(Signac) library(patchwork) file.dir <- "./" files.set <- c("Pool_1", "Pool_2", "Pool_3", "Pool_4", "Pool_5", "Pool_6", "Pool_7", "Pool_8", "Pool_9", "Pool_10", "Pool_11", "Pool_12", "Pool_13", "Pool_14", "Pool_15", "Pool_16", "Pool_17") fil...
4b58c483df39daab764d1cc45c932720f3586a9fe74c1bb5f55bd26f3af2f3cd
R
6,218
182
# ²é¿´ncRNA UCRÏà¹ØµÄlncRNAµÄgwRVIS # ÏÈ¿´¿´ËùÓеÄncRNA UCRÊDz»ÊǶ¼ÂäÔÚgwRVIS»®¶¨µÄ·¶Î§ÀÈç¹ûÊǾͲ»ÐèÒª»ñµÃµ¥¼î»ùµÄgwRVISÁË setwd(dir = "D:/R_project/UCR_project/") options(stringsAsFactors = FALSE) rm(list = ls()) library(tidyverse) library(ggplot2) library(ggview) library(ggpubr) library(ggsci) library(ggbeeswarm...
3466296ff895a81b775db5182fa84207d8bf5214c89f536dbfe7d1b6e849579f
R
6,225
143
observeEvent(input$sideBarTab, { if (input$sideBarTab == 'ibaraki' && is.null(GLOBAL_VALUE$Ibaraki[[1]])) { # GLOBAL_VALUE <- list(Ibaraki = list( # summary = NULL, # patient = NULL, # updateTime = NULL # )) # TEST fileList <- list.files(paste0(DATA_PATH, 'Pref/Ibaraki...
47335c53e04b75b404c9ea7df59765fc00877e409ac9a9e7233766cf2c337ecc
R
6,225
167
# based on Biermann pipeline, code/Melanoma_Brain_Metastasis-main/Initial_processing/1_Individual_seurat_analysis.R # normalize, find variable genes, scale, PCA, UMAP, find neighbors, find clusters # mtRNA, doubledFinder + scrublet # filter cells: 500-10000 genes per cell, 1000-60000 counts per cell, max 10% mt, sin...
5dfc9b4ba29d39471eb6eb710d354a117e5c0f0747f740e7e6f486a132db6816
R
6,225
134
# This R script prepares two files (All TAXA and All OTUS) as inputs for the Serial-Group-Comparisons Script. #************************ # A total of 4 files is required for merging. # 1. A file containing the alpha-diversity measures. # 2. A file with the normalized relative abundances of OTUs across samples. # 3. A f...
016fc1924a9b57e58b4076564e98b5cb7644ad86747bd663bd7d22afd7f39d22
R
6,229
153
# Siwei 29 Mar 2024 # Plot CLU1 SNP rs1532278 # init ##### library(Gviz) library(rtracklayer) library(BSgenome) library(BSgenome.Hsapiens.UCSC.hg38) library(TxDb.Hsapiens.UCSC.hg38.knownGene) library(ensembldb) library(org.Hs.eg.db) library(grDevices) library(gridExtra) library(RColorBrewer) library(readr) library...
31972a68caaa32b88f3a00cc85894e8f4a8b4bc58aef3df467b3d19ef9d506a5
R
6,237
175
xgb.learn.curve <- function (dat_train, dat_test, X, grid, IDvarn = "Number", seed = 49789){ # this function creates a learning curve for a given model # Arguments: # <dat_train> a data frame containing the train data, including patient ID and outcome # <dat_test> a data frame containing the test d...
c3ff043c973c9ecfa0b518ace15da4297c4141830cf80f6c9ed606a03664a406
R
6,239
154
library(optparse) option_list <- list(make_option(c("-r", "--regions"), type="character", help="Path to BED file of single-nucleotide intervals for which to extend and get coverage from iCLIP peaks file"), make_option(c("-i","--iclip")...
a779027fda0f9ca0b0e30ebe2f4eda2e2bf37cc3e4e6597e0404962dfca844af
R
6,242
147
#!/usr/bin/env Rscript ### title: RNA velocity plots in R ### author: Jana Biermann, PhD library(plyr) library(dplyr) library(ggplot2) library(ggrastr) library(scales) library(viridis) library(patchwork) library(reticulate) ### Choose one label label <- 'MBM_sn' label <- 'MPM_sn' # Load python libraries scv <- imp...
62c621a4135a3c39b4afa2df82f3750b4e7688c575c9a3a09043de1a34959d25
R
6,250
177
require(optparse) require(tidyverse) require(ggpubr) require(cowplot) require(scattermore) require(extrafont) # variables # formatting LINE_SIZE = 0.25 FONT_SIZE = 2 # for additional labels FONT_FAMILY = "Arial" # Development # ----------- # ROOT = here::here() # RAW_DIR = file.path(ROOT,'data','raw') # PREP_DIR = ...
de8802724dd77dfb92d2c427e23d1fc8468f64626d0f92a645633a0a801ed47c
R
6,252
164
# Plot relevant pathways from CellChat results - 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/Cell...