sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
a57569ac7a6f28f88a1be837e103301752e00ab5bd34c061f4433bde319128f0
R
1,236
22
setwd("osmFISH_AllenVISp/") library(Seurat) allen <- read.table(file = "data/Allen_VISp/mouse_VISp_2018-06-14_exon-matrix.csv", row.names = 1,sep = ',', stringsAsFactors = FALSE, header = TRUE) allen <- as.matrix(x = allen) genes <- read.table(file = "data/Allen_VISp/mouse_VISp_2018-06-14_gen...
bfd41c67f709375a8c4a3de8b5f6e8d70057f7eeaf2f1b6138ed7466e843d719
R
1,236
22
setwd("STARmap_AllenVISp/") library(Seurat) allen <- read.table(file = "data/Allen_VISp/mouse_VISp_2018-06-14_exon-matrix.csv", row.names = 1,sep = ',', stringsAsFactors = FALSE, header = TRUE) allen <- as.matrix(x = allen) genes <- read.table(file = "data/Allen_VISp/mouse_VISp_2018-06-14_gen...
f2f359c3d0c8136ef111bfae61a63a0bbcbf88f4c2b9b3633d1705981f0d1419
R
1,236
63
# Siwei 10 Feb 2025 # plot use Sun et al. 2023 # init #### { library(ggplot2) library(stringr) library(lsr) library(RColorBrewer) library(ggpubr) library(readr) library(readxl) library(stats) library(rstatix) library(agricolae) library(DescTools) # library library(data.table) } df_raw...
299a49f060f12c8b780654ae7b7388718fd4d1ddafe2823cc83828d45768b1c9
R
1,237
22
# CytoTRACE cytotraceresult <- CytoTRACE::CytoTRACE(mat = as.matrix(cDC@assays$RNA@counts),ncores = 20, enableFast = F, batch=as.character(cDC$Batch)) # Monocle2 library(monocle) diff_test_res <- differentialGeneTest(monocle_data, fullModelF...
ebdd5810ad4ac4c265f491548bb902e44a9007072af685a595885a92b9d65341
R
1,243
50
# Siwei 22 Feb 2024 # plot Jubao's lysosome genes # init #### library(ggplot2) library(RColorBrewer) library(scales) library(readxl) df_raw <- read_excel(path = "plot_lysosome_genes.xlsx") df_2_plot <- df_raw df_2_plot$`-log10P` <- 0 - log10(df_2_plot$`p-value`) df_2_plot$Gene <- factor(df_2_plot$Gene, ...
6b83fe66a8adcf7e081dbfa3a4796b5cf7612abfcf051e32afbf40a991c4b630
R
1,255
49
# Siwei 01 Feb 2024 # Plot Jubao's Diseases bar plot # init #### library(readxl) library(reshape2) library(ggplot2) library(scales) library(RColorBrewer) # load data ##### df_raw <- read_excel("Jubao_Diseases_bar_plot_v2.xlsx") df_melt <- reshape2::melt(data = df_raw, id = c(1, 10)) colnames(...
5c9a4c5faef54fce48c3ec0a4156a197425ca6be9d6a98312901e43fa5f80350
R
1,256
38
library(tidyverse) # Because had accidentally kept events cryptic in only intermediate curve KDs, need to remove from BED to get accurate junction count jncs <- read_tsv("processed/2023-09-12_papa_as_ale_cryptic.le.end_shift.junctions.bed", col_names = c("chrom", "start", "end", "name", "score", "st...
51cd4f53abcbe6b125674bb52d4af29c80641848e2254e2e96e79c6e294a991c
R
1,259
51
library(FKF) # Observations df <- read.csv("results_kalman_filter_stata.csv") gdp = df$value lgdp = log(gdp) dlgdp = diff(lgdp) # Stata parameters params <- c( 0.40725515, 0.18782621, -0.01514009, -0.01027267, -0.03642297, 0.11576416, 0.02573029, -.00766572, 0.13506498, 0.08649569, 0.06942822, -0.10685783, 0.00...
d0cdb066b92d94478f4f974236ca542694d76db474f545ae294004b2e65c21c8
R
1,270
46
library(tidyverse) bed_file <- "/Volumes/T9/drosophila_nanopore/DRS_basic/results/NanoCount_output/flybase/tau_ctrl_results-nanocount_with_TPMs.csv" dfs <- read_csv(bed_file) cor() library(reshape2) # creating correlation matrix corr_mat <- round(cor(dfs[,12:17]),2) # reduce the size of correlation matrix ...
80969ec4ee66b0c7bc482eefc2d3a9c816c2a6d53fed424967730deab02531bd
R
1,277
50
# 18 Mar 2022 # make the input file of each disease (.ldct) # init library(stringr) library(readr) ld_files_list <- read_delim("ldscore_file_list.ldcts", delim = "\t", escape_double = FALSE, col_names = FALSE, trim_ws = TRUE) ld_files_list <- unlist(ld_files_list) # make name column ld_...
57eea728371859a26106c41fff34808e48c80ae1c5add7274e5f6eb5ab099ae9
R
1,286
48
# ============================================================================= # pySCENIC输出处理脚本 # ============================================================================= # 功能:处理pySCENIC转录因子分析结果 print("Hello world!") rm(list = ls()) # 加载配置文件 source("../config.R") # 设置工作目录 setwd(ENV_DIR) lf <- list.files("./") ...
659d34386ebf0592c0d94d138040712ec4e8ba754502094bfcad7dcdd756618e
R
1,290
48
#null simulation: take input data set #1: expression data sets #2: gene set directory. By default #3: output file directory args <- commandArgs(trailingOnly = TRUE) options(warn = -1) #load packages suppressMessages(library("here")) suppressMessages(library("magrittr")) suppressMessages(library("tidyverse")) #argume...
a52c05f2e0f27ea500e6088ae687c080bf3662e99e2575d3fb4df977a7cf467b
R
1,290
34
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 = element_blank(), ...
0129e5e6b84a00363694e002546d7fb9fbb34b3c441245dea2ce88a0ddcf6291
R
1,295
39
# find marker genes for clusters (e.g. cell types) library(scran) #----------------------------- # example from tran et al 2021 #----------------------------- # load data sce <- get(load("SCE_DLPFC-n3_tran-etal_processed.rda")) # subset cell types ctv <- sce$cellType which.ct <- sce$cellType %in% c("Astro", "OPC", "O...
f9f520be21010564fc19ece5474161178c4e486a3cc8d9567dcaef2c33bdc27f
R
1,298
42
# quantify VPS45 at rs2027349 site # Siwei 19 Dec 2019 # init library(stats) # VPS45_isogenic_counts_samples <- VPS45_isogenic_counts_all_45M[, c(7:14)] # VPS45_read <- data.frame(c(119, 106, 122, 113, 117, 107, 130, 50.7)) VPS45_read <- data.frame(raw_reads = 1:ncol(VPS45_isogenic_counts_samples)) VPS45_read$raw_re...
5d816574449bc0c8556997c7f6822ce515f6da4baa7b66d64728a38816639b3c
R
1,300
50
setwd("STARmap_AllenVISp/") library(Seurat) starmap <- readRDS("data/seurat_objects/20180505_BY3_1kgenes.rds") allen <- readRDS("data/seurat_objects/allen_brain.rds") # remove HPC from starmap class_labels <- read.table( file = "data/Starmap/visual_1020/20180505_BY3_1kgenes/class_labels.csv", sep = ",", ...
228b7f0ee87f6000f30e10085207ef898ae829b346f4002dbe86559cfd2c1ccf
R
1,313
40
#### Figure 4A #### #### upset plot for astrocytes #### library(stringr) library(ggplot2) library(UpSetR) library(here) # pairwise comparisons: # human vs chimp: h_c <- read.table(here("data/astrocytes", "Astro_human_vs_chimp_sig_genes.csv"), sep=",", header=TRUE) h_c <- h_c[h_c$padj<0.01 & (h_c$log2FoldChange<(-0.5...
d5e9248bfffe634034e30c43212d7455ba10a30b6a6965ac7e486baa01de7ac8
R
1,316
38
#' dmrff.sites #' #' Link genomic locations to a set of genomic regions. #' #' @param regions Data frame of genomic regions providing #' chromosome (chr), start and end coordinates. #' @param chr A vector providing the chromosome of each location. #' @param pos A vector providing the chromosomal position of each locati...
ef3b397be56ab73e0af3fcf07401f2b895f363983aa9858e09ef48a87fb28be4
R
1,319
32
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) list2env(rjson::fromJSON(file = "00_configs.json"), envir = .GlobalEnv) library(Seurat) library(qs) library(foreach) library(Signac) library(ClustAssess) objects_folder <- file.path(project_folder, "objects", "R", "seurat") qc_folder <- file.path(project_fold...
6c8119d8d8c4d618fabfbb723877b75ab44224b66ad2bde9fbb1d3cc4025e21f
R
1,324
52
#!/usr/bin/env R # # Author: Sean Maden # # Get the cell type statistic using findmarkers. # this is a comparison combining subjects and replicates # load data # load marker genes markers <- get(load("markerlist_celltypebroadk_dlpfc-ro1.rda")) # load marker gene summary expr lct <- get(load("lct-sstat-mean-median_nma...
b1da4f8a4e5138c7228d0fa305e83c06c11cbebaf72f842455e2e901615b8640
R
1,333
54
# Siwei 14 Feb 2024 # load HiC Data RDS files and export links # init #### library(Chicago) # load data #### CD11_0hr_5kb <- readRDS("/data/FASTQ/HiC_RData/CD11-0_5000bp.Rds") CD11_1hr_5kb <- readRDS("/data/FASTQ/HiC_RData/CD11-1_5000bp.Rds") CD11_6hr_5kb <- readRDS("/data/FASTQ/HiC_RData/CD11-6_5000bp.Rds") ...
7373fa917693ef788874eb3086fc0fbb56bb5e034bc16f0fda33b90b7cb9f5ca
R
1,334
37
library("utils") # Package list generated by local grateful report library("argparse") library("base") library("circlize") library("ComplexHeatmap") library("hdf5r") library("janitor") library("Matrix") library("patchwork") library("rhdf5") library("scales") library("scRepertoire") library("Seurat") library("SeuratDi...
09e00ce615e3d4b84173866f8bbef7f43254dbcd91d3117ef66a4a6ed839b69b
R
1,335
45
#Normalize samples ############################################################################################## #Load libraries library(Seurat) library(tidyverse) #Create directory to store results of normalized samples dir.create("2_results_norm", showWarnings=T) #Create function to normalize samples normalizeDat...
98b691667465ab65d63c52ae4d034b4739d8a0610b9964d9922b27036404693c
R
1,338
31
#! /work/home/sdxgroup01/00envs/anaconda3/envs/R4.2.0/bin/R library(optparse) library(Seurat) library(ggplot2) library(dplyr) library(reshape2) library(openxlsx) library(tools) library(grid) op_list <- list( make_option(c("-i", "--input"), type = "character", default = NULL, action = "store", help = "The input of S...
2dc83e1ce5e3d5e21135a416db0068b69969265af048576d76117820e9a87b55
R
1,341
41
# load packages require(tidyverse) require(Seurat) require(DropletUtils) # load Seurat objects (list) sdata.list <- readRDS('sdata_filtered_list.rds') # get meta.data meta.data <- lapply(sdata.list, \(obj) obj@meta.data) %>% bind_rows() # calculate scale factors x <- meta.data %>% group_by(time_point, sample_id) ...
e805e716cf3188c7f4bf8c298a0165c5fe2f96846dbe35d676beba59afc32a83
R
1,341
39
#### Figure S6B #### #### Upset plot for microglia - great apes #### library(stringr) library(ggplot2) library(UpSetR) library(here) # pairwise comparisons: # human vs chimp: h_c <- read.table(here("data/microglia", "Micro-PVM_human_vs_chimp_sig_genes.csv"), sep=",", header=TRUE) h_c <- h_c[h_c$padj<0.01 & (h_c$log...
322a6192335721c201bc95c62a0f7dffdcc527f763e54c99b4754e1875466ff5
R
1,350
36
library(RCy3) library(netZooR) library(twice) pbd_obj <- readRDS("data/pbd_obj.rds") data("hg19rmsk_info") # cluster 1 y_kznf <- kznf_infer %>%filter(age=="young") hs_p <- pbd_obj$hmc1_corr %>% filter(coef>0) %>% mutate(species="Hs") pp_n <- pbd_obj$ppc1_corr %>% filter(coef<0) %>% mutate(species="Pp") intersect_hs...
fa641b580d2186f89161a09abb63408fcdf03161d8648516826361e4fe075ae7
R
1,356
47
--- title: "GNN Enrich demo speed profiling" output: html_document params: input: "perf.tsv" --- ```{r} data <- read.table(params$input, header=TRUE, quote="", stringsAsFactors=FALSE, sep="\t") data$percent_CPU <- as.integer(gsub("%$", "", data$percent_CPU)) data ``` Reshape to have each n_proc in a column: ```{r...
833f210e788fec5afbad18f75c1c8d0934b1fd0a47e9fdcf57766b2b98536d9f
R
1,357
39
#### Figure S6I #### #### Upset plot for oligodendrocytes - great apes #### library(stringr) library(ggplot2) library(UpSetR) library(here) # pairwise comparisons: # human vs chimp: h_c <- read.table(here("data/oligodendrocytes", "Oligo_human_vs_chimp_sig_genes.csv"), sep=",", header=TRUE) h_c <- h_c[h_c$padj<0.01 ...
da8d73d648b37839f23655872526b7170eb380c47edf8dfaf529bf2c30ae2d43
R
1,357
19
```{r} # MERFISH brain receptor map suppressPackageStartupMessages(library(xfun)) pkgs = c("SingleCellExperiment","tidyverse","data.table","dendextend","fossil","gridExtra","gplots","metaSEM","foreach","Matrix","grid","spdep","diptest","ggbeeswarm","Signac","metafor", "matrixStats","remotes","ggpubr","ggridge...
e2c5d967b0777ef338f6dba78dbb40a88d1e40b027cdbc136ab99f4dcd47fe16
R
1,359
42
suppressPackageStartupMessages(library(readr)) suppressPackageStartupMessages(library(dplyr)) args <- commandArgs(T) # args = c(5e3, '~/Projects/circCenters/output2/visualize.circRNA/STAR_chimeric/STAR_chimeric/library/w1118_embryos_14_16_R1_RR.Chimeric.out.junction') max.length = args[1] min.read_counts = args[2] ...
77de6f1fe0e9718ae35c5b09d3d4494277df05adddf50884c5b20c53866b39db
R
1,360
46
## Generate PCCF reference values via OLS regression ## ## The partial cross-correlation at lag h between x and y is defined as ## the Pearson correlation between the residuals from regressing x[t] ## and y[t+h] on all intervening observations {x[t+j], y[t+j]: j=1..h-1} ## plus intercept. At lag 1 there are no interve...
a7a595ef91b5119442aa86769afc4bd05c34b47cbf6144cbf3f939a692559c3c
R
1,369
39
options(stringsAsFactors = FALSE) library(ggplot2) library(reshape2) library(dplyr) library(stringr) library(lme4) library(lmerTest) library(RColorBrewer) library(ggpubr) library(circlize) #### Circos plot of CTE cases #### # load PTA SNV calls in CTE snv_list <- read.table("data/TableS4_PTA_calls_snv.tsv", sep="\t",...
a1837dfb5ab06ffa98110c22a6f71f511d61ac86c0437db0d9ace4dfbbc1e508
R
1,375
52
library("SingleCellExperiment") library("rafalib") library("iSEE") library("lobstr") library("here") library("whisker") library("usethis") library("withr") library("rsconnect") library("sessioninfo") load(here("rdas", "revision", "regionSpecific_DLPFC-n3_cleaned-combined_SCE_LAH2021.rda"), verbose = TRUE) source(here...
f77be8237a380eecc372bb13b0aad419550daa332d34561042ffbe28fd0dff57
R
1,375
49
Component.Tendency <- function() { box( # 国内状況推移 title = tagList(icon("chart-line"), i18n$t("国内状況推移")), closable = F, collapsible = T, collapsed = F, enable_label = T, label = boxLabel( i18n$t("実況中"), status = "info" ), footer = tags$small(icon("lightbulb"), i18n$t("凡例...
df9966e9f02348122501409730e6ce848aea37ee78a717e9add538df955f8954
R
1,379
42
# library("SummarizedExperiment") library("tidyverse") library("here") library("sessioninfo") # library("jaffelab") #### Load data #### ## marker_stats load(here("processed-data", "06_marker_genes", "03_find_markers_broad", "marker_stats_broad.Rdata"), verbose = TRUE) marker_stats |> filter(ratio > 1) |> group_b...
b534ff81948eaacf557cf995b3ca4c10c9bb759196af10672f17fbf5c88ba909
R
1,382
42
#' @title plotbeta #' perform beta coefficient barplot on Cox results #' @param df results coxbycol function #' @param nb number of covariates to plot #' @param title title of the graph #' @param size size of labels #' @usage data(cancer) #' @usage library(dplyr) #' @usage cancer%>%select(3:7)->data #' @usage df<-coxb...
7754cfc02d3c071554257e3b7365460d904aabade17e25602fb731ba65522e72
R
1,392
46
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) list2env(rjson::fromJSON(file = "00_configs.json"), envir = .GlobalEnv) library(Seurat) library(ClustAssess) library(qs) objects_folder <- file.path(project_folder, "objects", "R") so_folder <- file.path(objects_folder, "seurat") ca_folder <- file.path(object...
3ba1d48211ab5d2b6b73f3f74590a1a44eab6f863e98ded42cde533d0b195a7c
R
1,395
54
# install packages install.packages("vegan") # load libraries library(vegan) library(ggplot2) library(stats) library(readr) # Load data values <-read_csv("../data/multi-voxels_dataset.csv",col_names = FALSE) # Create Gram matrices DMN<-t(values) DMN_XX<-crossprod(DMN) # Standardize the data DMN_XX.st...
8ef55cd534c75e66c0fe155fcc35f0802ef9bbb3b673183990cf270eb93b5d63
R
1,395
48
#Script with functions to modify function implemented in "DropSeq.util" package for reading in data of DropViz #Original function did not work well if (!require("Matrix")) { install.packages("Matrix") library("Matrix") } strStartsWith = function (theString, thePrefix) { return(strtrim(theString, nchar(thePrefi...
27d71395eadb76173f2cfc4228c8747e3d823f9985d9183a576d3d55eaf465b7
R
1,399
41
add_samplesize_info <- function(dat=dat,samplesize=samplesize) { load("/mnt/data/lijincheng/mGWAS/result/01UVMR_immune_BBB/immune_BBB_info.Rdata") message("dat= bulk harmonised data") message("samplesize= 'samplesize.exposure' or 'samplesize.outcome' ") library(dplyr) library(tidyverse) BBB_immune_i...
426c49c1fe1835a87e6fdcca1da93914d1bb5b1100d17a71d2c29dac3585ca36
R
1,402
49
#Find the perturbgenes which are shared across different cell types cells=c("Astrocyte","Oligodendrocyte","Microglial_cell","Excitatory_neuron") for (cell in cells){ for (el in c("Shared", "Contrasting")){ nam <- paste("Perturbator_genes", cell, el, sep = "_") path_file= sprintf("./%s/%s/BruteForcePertur...
6041fcc61b25808fdc6d39a839a3d9fb1b41ce1fda2fcfe0028d060a6d2e0420
R
1,404
46
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("SingleCellExperiment")) { if (!requireNamespace("BiocManager", qu...
3d9dc4cd37ffa611d56893072357b4d5d90066e582e0b1a7d084cfa530a82b72
R
1,406
49
#Script used to retreive number of unclassified/low quality classified and total reads load("Y:/Microbiome/NDcollect/HQ/tablesBS/2018-12-07workspace.RData") #Number of sequences for each sample classified and retained for relative abundances computation abbAmpSp=vector() abbAmpGn=vector() for (i in 1:length(matList...
6691e4dea99c4ec0e998fd4be35de68fe7ccbe9109b1cde88790e406baabe1f9
R
1,411
40
#!/usr/bin/env Rscript #### Combining counts after running Kallisto #### Authors: Somnath Tagore, PhD; Jana Biermann, PhD library(dplyr) library(tximport) library(biomaRt) library(readr) library(rhdf5) library(AnnotationDbi) sample_dir <- 'data/celllines_RNAseq' sample_names <- grep('-', x = list.files(sample_dir), ...
8ed7c87d54a3e876569fbcb3461637da3f607b4b8ca83fd4fad5212ef21f2f37
R
1,414
39
args <- commandArgs(trailingOnly = T) library(tidyverse) # gemma assoc is args[1]; # lmm output # chr rs ps n_miss allele1 allele0 af beta se logl_H1 l_remle p_wald assoc <- read.table(args[1], header = T, as.is = T) ## allele list is args[2]; no header; first 3 columns (SNP,A1,A2) allele ...
9b9085133de7990be9d7fd9e0a6f4cda66ff66a0cf1b281ba52158ad8d6549e6
R
1,414
46
# ============================================================================= # 巨噬细胞分化轨迹分析脚本 # ============================================================================= # 功能:使用CytoTRACE方法计算细胞分化潜能,识别高/低分化潜能细胞亚群 print("Hello world!") rm(list = ls()) # 加载配置文件 source("../config.R") # 设置工作目录 setwd(ENV_DIR) lf <- li...
7358a308cf41cba801e5516f3e86918178e59a708b3421320eaa0f50a4dec9fa
R
1,416
45
library(magrittr) library(data.table) library(dplyr) library(tidyr) library(ggplot2) library(ggrepel) library(Hmisc) library(cowplot) library(DescTools) setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) meth <- 'spearman' sanger_dat <- rbindlist(lapply(seq(5)-1, function(x) read.csv(paste0('../results/dat...
f39b30e7ab458658cb6d25206d1291ef62b4c6651bfb88eaa6c1146608120dc3
R
1,416
58
#!/usr/bin/env Rscript print("##################################################") print("# cisTopic #") print("##################################################") # Loading dependencies scripts library("optparse") parser <- OptionParser( prog = "create_cistopic_object.R", description = "Create cisTopic object ...
eccf20beec89c02b63c8718a436fb443595ff9ac2b207840e2d9b4b3bbec3b6f
R
1,417
25
context("compareRhythms") load("test_data_ma.rda") test_that("input validation works", { expect_error(compareRhythms(expr, NULL)) expect_error(compareRhythms(expr, exp_design[-1,])) expect_error(compareRhythms(expr, exp_design[,-2])) expect_error(compareRhythms(expr, exp_design[,-4])) expect_error(compareRh...
cb9c617f8ab76408a6a6560ea5ee00913d13fe6baab2bcecca0a84f85ef4ef8d
R
1,422
35
### MNT add 07Apr2021 ======= # Check Read 1 files for discrepant read lengths, as seen with Br5182-NAc: # Should be exactly 28bp = 16 [BC] + 12 [UMI] library(ShortRead) library(jaffelab) FASTQ.dir <- "/dcs04/lieber/lcolladotor/rawDataTDSC_LIBD001/raw-data/2021-10-15_Tran2021_published/" ### Read in preprint 'sa...
fcd9fa7808232f0675393320fcf86bce3fcfe20f203e7f0cc317b7958bb33f60
R
1,422
34
## TEST # test_markers <- list(A = paste0("Gene_000", 1:4), # B = paste0("Gene_000", 5:8)) # # plotExpressionCustom(sce = example_sce, features = test_markers$A, "A", anno_name = "Cell_Cycle") plotExpressionCustom <- function(sce, features, features_name, anno_name = "cellType", ...
a3d61580fc4b382631d30076e8122ebcc592ae9d26057a1574a875021bb63053
R
1,423
52
if(!require(limma)) if(!require(Seurat)) if(!require(dplyr)) if(!require(magrittr)) if(!require(devtools)) if(!require(ggplot2)) if(!require(scater)) if(!require(dplyr)) #BiocManager::install("org.Mm.eg.db") #BiocManager::install("org.Hs.eg.db") #BiocManager::install("org.Rn.eg.db") if(!require(msigdbr)) if(!require(fg...
f33eecc5abc1378dea3abe1fe3dfd6dfb266c958d63907a48b57b83731625ef5
R
1,426
52
library("SingleCellExperiment") library("rafalib") library("iSEE") library("pryr") library("here") library("whisker") library("usethis") library("withr") library("sessioninfo") load(here("rdas", "regionSpecific_HPC-n3_cleaned-combined_SCE_MNTFeb2020.rda"), verbose = TRUE) source(here("shiny_apps", "00_clean_functions...
e4c4b232a5364b33da8d3fbae7ac445feeba730800c7ea5f9bcdedb6dea8e8f4
R
1,428
53
# »æÖƽ«¼¸×é»ùÒòµÄ¸»¼¯·ÖÎö½á¹û½øÐÐ±È½ÏµÄÆøÅÝͼ setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(tidyverse) library(ggplot2) library(readxl) library(ggsci) compare_GO <- read_xlsx(path = "02-analysis/10-GO_enrichment_analysis/compare_GO_table.xlsx", sheet = 1) lwd_pt <- .pt*72.27/96 p1 <- ggplot(dat...
9dcd56f555e9eb01520066dba02667156527651261c6de267312372f78dab4a4
R
1,429
44
# Usage: Rscript 01.count_GeneReadNumber_ERCC.R gencode.v19.chr_patch_hapl_scaff.annotation.gtf xxx/bamfile/*.bam gencode.v19.chr_patch_hapl_scaff.annotation.gene.length.txt output.genecount.txt args= commandArgs(T) library(GenomicFeatures) library(GenomicAlignments) library(data.table) gtf=args[1] bam=args[2] geneL...
e45897b79ffde8b59b7b10d0fd0cce4872105cd39ffb51a05481886fb7fef8bc
R
1,430
67
# lncRNAµÄ¸»¼¯·ÖÎöÏÔʾºÍgland·¢Óý£¬ÑõÆøÓ¦´ðµÈÓÐ¹Ø # ÔÚ¸÷×éÖ¯Æ÷¹Ù¿´¿´ÕâЩlncRNAµÄ±í´ïpattern£¬ÍƲâÆä¹¦ÄÜ setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(tidyverse) library(biomaRt) library(curl) ncRNA_UCR_ensembl_id <- read.table(file = "02-analysis/16-New_classification/ncRNA_UCR_ensembl_id.txt") nc...
4d225b9612171e5bf47cbaeb56438c63b5a98d3e6af7c9386b75db7f44e0bd66
R
1,431
45
# quantify VPS45 at rs2027349 site # quantify multiple regions # Siwei 20 Dec 2019 # init library(stats) # VPS45_isogenic_counts_samples <- VPS45_isogenic_counts_all_45M[, c(7:14)] # VPS45_read <- data.frame(c(119, 106, 122, 113, 117, 107, 130, 50.7)) VPS45_read <- data.frame(base_1 = 1:ncol(VPS45_isogenic_counts_sa...
64ef19b4ddad78a4415d0d319c4168f576bd62b391f0a02033e47079074429a0
R
1,442
42
load('MSBB_methylation_EPIC_n201.rdata') load("MSBB_Mayo_RNA_bulk_count_meta.rdata") rm(bulk_mayo, meta_mayo, meth_msbb, meth_meta_msbb) library(readxl) multiplesheets <- function(fname) { sheets <- readxl::excel_sheets(fname) tibble <- lapply(sheets, function(x) readxl::read_excel(fname, sheet = x)) data...
943f46f647d3ea77e633674764c858c2a6742400738cc7a1e9a85b0c36ce0dc0
R
1,442
42
#' Run differential rhythmicity analysis for RNA-seq data using limma-voom #' #' @param counts A matrix of expression counts #' @inheritParams compareRhythms #' @keywords internal compareRhythms_voom <- function(counts, exp_design, period, rhythm_fdr, compare_fdr, amp_cutoff, just_clas...
542b6720730dcdc43dcafaf7f5f186949c1959cde9cd433cc3c555349bcf3772
R
1,445
46
library("SummarizedExperiment") library("spatialLIBD") library("here") library("sessioninfo") ## load our DLPFC data load(here("processed-data", "sce", "sce_DLPFC.Rdata"), verbose = TRUE) ## drop Ambiguous nuc sce <- sce[, sce$cellType_broad_hc != "Ambiguous"] sce$cellType_broad_hc <- droplevels(sce$cellType_broad_h...
acf9deaccc98600009a6611f43ff5802d5b894c7576a7b199f18c819b7c04e8c
R
1,447
48
--- title: "Home" site: workflowr::wflow_site output: workflowr::wflow_html: toc: false editor_options: chunk_output_type: console --- Laura Cook # Workflow and analysis of comparative craniofacial ChIP-seq work in the fat-tailed dunnart and mouse This project involves a number of analysis for the generation...
be4d2d9e669be7dcf8167e205343854ee5a16bee3b04e259bca1e9eafb1f24f8
R
1,447
24
get_UVMR_sig <- function(input = input ) { message("input = output of get_UVMR_collected function, a dataframe ") #significant association criteria: ##1. cML as primary analysis for quantify the effect due to its robustness to both correlated and uncorrelated pleiotropic effects and consideration of potential bai...
e5adaf0cf8facf10267eae32fbb2819f83c8a647c0514a1d58d9bedc30bd0c67
R
1,447
43
#' @title plotnlphr #' perform negative log10 pval. barplot on Cox results #' @param df results coxbycol function #' @param nb number of covariates to plot #' @param title title of the graph #' @param size size of labels #' @usage data(cancer) #' @usage library(dplyr) #' @usage cancer%>%select(3:7)->data #' @usage df<...
8e00ec0ca4d2038ac3c8368c993723027d9118dcc636873ef18fca24c2ad1686
R
1,453
34
## Resave ASD GWAS summary statistics for input into MAGMA gene set analysis ## library(data.table) #1. Load ASD GWAS results ======================================================================================================= res <- fread(paste0(MAGMApath, "iPSYCH-PGC_ASD_Nov2017"), data.table=F) dim(res) #9112...
a2a934761e3aaf2b453f97cc83935fa269a95a1f13f7fcdfc3ba8677828b884a
R
1,458
52
#### ========================================================= #### metaNeighbor #### ========================================================= #### Load Packages library(MetaNeighbor) library(SummarizedExperiment) library(stringr) library(ComplexHeatmap) #### 1. Load Data setwd("~/dat/Immune/03heatmap") sce <- read...
d283146991bcdee3ecf15acb02261a1a9a38dac428381055edebaa3f7408976d
R
1,458
30
library(data.table) number_check <- function(cases_sum_source, path) { cases_sum_source <- cases_sum_source[2:length(cases_sum_source)] cases <- fread("50_Data/byDate.csv") cases_sum_project <- colSums(cases, na.rm = TRUE) cases_sum_project <- cases_sum_project[2:length(cases_sum_project)] # クルーズ船 ca...
272db1f7b80feec4b43bf148abdf904373ffa6ad7e7a0af8c877f8ab3843ca13
R
1,463
49
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) seurat_path <- ...
9a0bcaa7e03e3b9bb8c893ef9a3fb03c0a42dcf71b5550e9b63e9a70b1cd5c9b
R
1,464
36
# ÏÈ»ñµÃÁ½¸ö´óÀࣺ1¡¢Óëµ°°×±àÂë»ùÒòÖØµþµÄcoding_UCR£»2¡¢ºÍ·Ç±àÂëRNAÖØµþµÄncRNA_UCR£¨Ö»ÓÐÒ»¸ö²»ÊÇlncRNA£© # setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(dbplyr) Gene_Non_Pr <- read.table(file = "01-data/16-New_classification/Gene_Non_Protein_Coding.bed", sep = "\t") Gen...
d0706b1b9eb04948a07de4e51f2dc7dd5e49b2dc55e3edbe73bad4a2939ebdfc
R
1,465
42
library(pscl) library(readr) # Load and save biochemists data ------------------------------------------ data("bioChemists", package = "pscl") head(bioChemists) #encode design matrix design <- cbind.data.frame(art=bioChemists$art, model.matrix(art~., bioChemists)[,-1]) colnames(design) <- colnames(bioChemists) head(...
9a92c1300312d151f1a5fb2786085c57ba6aeb46de98a30912d393c055c6e326
R
1,466
65
# ÓÃLncRNAsPathwayÎÄÕÂÀï¸øµÄÊý¾Ý²âÊÔÒ»ÏÂÎÒʹÓõķ½·¨¶Ô²»¶Ô setwd(dir = "D:/R_project/UCR_project/") rm(list = ls()) library(tidyverse) library(LncPath) library(stringr) diff_exp_lnc <- read.table(file = "01-data/38.1-LncRNAs2Pathway_example_test/Table_S3_DELncRNA_prostate_cancer.txt", sep...
23d43135aaabca6c34c0b7fb23f4f7f08ca3bd2946cba94c4fb1c21add4edf28
R
1,469
46
## ## Load packages. If missing, try installing from CRAN and Bioconductor. ## load_install_packages = function(package_list) { # create local user library path if not present (not present by default) r_libs_user_dir = Sys.getenv("R_LIBS_USER") if (!dir.exists(r_libs_user_dir)) { message("creating local R_...
eba9526627fa39aa236db1514ed00a69f9dd95b4315e7ca7871c3b3ef4b5165b
R
1,470
37
## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) require(dplyr) ## ----setup-------------------------------------------------------------------- library(SpliceFlow) library(GenomicAlignments) library(Rsamtools) library(Summari...
3307b75661754a13e8245461af7801632d82fa1b8ce0d945b194be9099d041be
R
1,472
66
rm(list = ls()) library(VennDiagram) library(RColorBrewer) library(ggplot2) myCol <- brewer.pal(4, "Pastel2") futile.logger::flog.threshold(futile.logger::ERROR, name = "VennDiagramLogger") cog <- read.csv("output/BULK_ROS/all_cog_corrected_genes.csv") cog <- cog[cog$p.adj < 0.1,]$gene adres <- read.csv("output...
3d93d2b40ebc93d763632340942aa0997e8401365bc1456e809fbf6f5c86ae26
R
1,489
42
library("DeconvoBuddies") library("SingleCellExperiment") library("tidyverse") library("here") library("sessioninfo") ## load our DLPFC data load(here("processed-data", "sce", "sce_DLPFC.Rdata"), verbose = TRUE) ## drop Ambiguous nuc sce <- sce[, sce$cellType_broad_hc != "Ambiguous"] sce$cellType_broad_hc <- dropleve...
64f17c235d3f15a0b32159f3255af2cd92706483892558dd428b71300116be5f
R
1,490
32
library(getopt) commonds = matrix(c("stat","W",1,"character","output","O",1,"character","batch","B",1,"character"),byrow=TRUE, ncol=4) opt = getopt(commonds) list.file = list.files(opt$stat, pattern = ".txt") list.file = list.file[grep("genecount",list.file)] filelist <- lapply(as.list(paste0(opt$stat,"/",list.file))...
39a4eb0dd19ae973d1372078cd38693298402c5fb426f7e4295df3e9621137ef
R
1,492
31
#### Figure panels: S6L #### #### Gene expression in oligodendrocytes #### library(ggplot2) library(here) # gene expression: data <- readRDS(here("data/oligodendrocytes","Oligo1_human_vs_all_dds.RDS")) norm.data <- DESeq2::counts(data, normalized=TRUE) gene = "CNTNAP2" ##gene of interest gene.counts <- data.frame(nor...
9d6f4c1d0b6e456dd640aaf0c2e3ffc838cb3c30959e18fae1902c09c626c65c
R
1,494
35
prepareFlowRegions <- function(refAnnotation.path, junctions){ intron_features<- retrieveIntrons(refAnnotation.path, junctions) regionsFlow <- RegionsFlow() # Make pair regions and remove redundancy # prepare metadata column message("preparing regions to quantify quantFlow") # prepare quantFlow regions # ...
eaa46e99b4316be28ee36b2071efc6dd6f084bc31558d8ff5e7614b1c3038e27
R
1,494
31
#### Figure panels: S6G #### #### Expression of disease risk genes in microglia #### library(ggplot2) library(here) # gene expression: data <- readRDS(here("data/microglia","MicroPVM1_human_vs_all_dds.RDS")) norm.data <- DESeq2::counts(data, normalized=TRUE) gene = "APP" ##gene of interest gene.counts <- data.frame(n...
2c56a5b1729737724a1a978768bdc44bfb35ee42f21f1f8bf6ae275d4c71c93a
R
1,495
46
#!/usr/bin/env Rscript suppressPackageStartupMessages({ library(diffUTR) library(SummarizedExperiment) library(rtracklayer) library(utils) }) # extract arguments args <- commandArgs(trailingOnly = T) input.df <- read.csv(args[1]) bed.rds <- args[2] out.file <- args[3] bamfiles <- list.files(input.df$folder_t...
1cb7bb72b8e98f4c27f4e91c178e4eedb06ad49a6c936d4b618ce5d80f5c05a6
R
1,502
31
setwd("osmFISH_Ziesel/") library(Seurat) library(hdf5r) library(methods) osm <- H5File$new("data/osmFISH/osmFISH_SScortex_mouse_all_cells.loom") mat <- osm[['matrix']][,] colnames(mat) <- osm[['row_attrs']][['Gene']][] rownames(mat) <- paste0('osm_', osm[['col_attrs']][['CellID']][]) x_dim <- osm[['col_attrs'...
dcf4fa0db43fee852844be6dd1e02aecd26775e9e05c68e9bc84af8ca01c1c64
R
1,502
38
local_clumb <- function (dat, clump_kb = 10000, clump_r2 = 0.001, clump_p1 = 1, clump_p2 = 1, pop = "EUR") { pval_column <- "pval.exposure" if (!is.data.frame(dat)) { stop("Expecting data frame returned from format_data") } if ("pval.exposure" %in% names(dat) & "pval.outcome" %in% ...
2c09cf7124624e2db297bc75da45666be696c24a9e091cde8466c461a5f7cd33
R
1,504
31
setwd("osmFISH_AllenSSp/") library(Seurat) library(hdf5r) library(methods) osm <- H5File$new("data/osmFISH/osmFISH_SScortex_mouse_all_cells.loom") mat <- osm[['matrix']][,] colnames(mat) <- osm[['row_attrs']][['Gene']][] rownames(mat) <- paste0('osm_', osm[['col_attrs']][['CellID']][]) x_dim <- osm[['col_attr...
41a1b618e24421a2857cbd8315344732c09278e8e93a6cd4b407657be5c29989
R
1,505
31
setwd("osmFISH_AllenVISp/") library(Seurat) library(hdf5r) library(methods) osm <- H5File$new("data/osmFISH/osmFISH_SScortex_mouse_all_cells.loom") mat <- osm[['matrix']][,] colnames(mat) <- osm[['row_attrs']][['Gene']][] rownames(mat) <- paste0('osm_', osm[['col_attrs']][['CellID']][]) x_dim <- osm[['col_att...
74ff06f092e441b59d7991176809c8d9756279b3ba37a31e0ca3cacdf18b59f1
R
1,515
45
#S1 library(dplyr) library(twice) # loading tables data("primateGRFs") kznf_infer_new <- kznf_infer gentree <- readxl::read_xlsx("~/Downloads/hg38_ver95_age(2).xlsx") kznf_infer_new <- kznf_infer_new %>% left_join(gentree[,c(1,3)], join_by(ensembl_gene_id==gene)) # 127 needs to be check kznf_infer_check <- subse...
1749b116e7d8da38a94b22623ec009df30dfc018a18235f9cb6e05df2fba63ce
R
1,516
31
#### Figure panels: 4G, 4I, S5F, and S5H #### #### Expression of cell surface molecules in astrocytes #### library(ggplot2) library(here) # gene expression: data <- readRDS(here("data/astrocytes","Astro1_human_vs_all_dds.RDS")) norm.data <- DESeq2::counts(data, normalized=TRUE) gene = "SLIT1" ##gene of interest gene....
4ac069ca67e1dd223c03d05c33adb28a7aba6f7f445b6b2a3f4519b9bbeca3de
R
1,516
45
# Preprocessing Quality Assurance # Supplemental Table 2 # Author: E. Pedapati # Version: 3/27/2022 pacman::p_load(labelled, compareGroups, tidyverse, BiocManager, filesstrings) # source(file = "_Common.R") source.demo <- "https://figshare.com/ndownloader/files/34517351" source.qi <- "https://figshare.co...
046682e49bb399b17b0613a520bee2cc4aadb871413af82a0803dec307f92874
R
1,518
48
library(Seurat) library(Signac) library(BPCells) library(ggplot2) object_sub <- readRDS("merged_object.rds") #ASTROCYTES astro <- subset(object_sub, cell_type=="Astro") astro <- FindVariableFeatures(astro) astro <- ScaleData(astro) astro <- RunPCA(astro) astro <- FindNeighbors(astro, dims = 1:15) ast...
66dacb495e256c44e1608cbff4d7284ae39fe2007fc82e50154d64d7804de7a8
R
1,518
34
library(data.table) pref <- list("福岡県" = "Fukuoka") signateDetail <- fread(paste0(DATA_PATH, "SIGNATE COVID-2019 Dataset - 罹患者.csv"), header = T) positiveDetail <- signateDetail[受診都道府県 == names(pref)] signateRelation <- fread(paste0(DATA_PATH, "/Signate/relation.csv"), header = T) relationDt <- signateRelation[`都道府...
8b7ef4e1f643594a55857f8c8791f0beea10e4bc14c0712e641dba724dd9c181
R
1,521
59
library(tidyverse) library(broom) library(readxl) library(rstatix) # n_df <- read_csv("data/number_foci_ratio.csv") n_df # ratio_df <- read_csv("data/nuclear_cyto_ratio.csv") ratio_df n_green_ttest <- t.test(n_df$Green, mu = 1) %>% broom::tidy() n_red_ttest <- t.test(n_df$Red, mu = 1) %>% broom::tidy() ratio_...
244413a162e47a35856fc7780a232154bf980ef8d37cc72f45e9988f8ad26d76
R
1,522
25
get_UVMR_mainfdr <- function(input = input ) { message("input = output of get_UVMR_collected function, a dataframe ") #significant association criteria: ##1. cML as primary analysis for quantify the effect due to its robustness to both correlated and uncorrelated pleiotropic effects and consideration of potential...
aa919309cad2d1d13b55f464b577ea2afa73b2fa234de2a836a69ec9a72cd99c
R
1,525
49
--- title: "SpliceFlow" author: "Carlos Alfonso Gonzalez" date: "2024-06-12" output: html_document editor_options: chunk_output_type: console --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) require(Rsamtools) require(GenomicAlignments) ``` ## Build intron database The function `prepareFlowRegion...
61d9a7aa22116ad68c2a4ac26b2bc3784b360baa6543d47d3357c750b0939f8c
R
1,528
34
## Resave SCZ GWAS summary statistics for input into MAGMA gene set analysis ## library(data.table) #1. Load SZ GWAS results ======================================================================================================== res <- fread(paste0(MAGMApath, "PGC3_SCZ_wave3.primary.autosome.public.v3.vcf.tsv"), d...
173d37a5bcad31273e7d679a575a699527b9a656645b604816a4d555d8b01cb8
R
1,532
25
get_UVMR_mainbonf <- function(input = input ) { message("input = output of get_UVMR_collected function, a dataframe ") #significant association criteria: ##1. cML as primary analysis for quantify the effect due to its robustness to both correlated and uncorrelated pleiotropic effects and consideration of potentia...
38e4d985547777b282be32d794a8fcb996a8c12bcad9a5582f42401b9ca208a6
R
1,534
55
fluidPage( fluidRow( column(width = 6, style='padding:0px;'), column(width = 6, uiOutput('kanagawaValueBoxes') %>% withSpinner(proxy.height = '200px') ) ), fluidRow( box( width = 12, title = tagList(icon('chart-line'), '神奈川県の発生状況'), closable = F, fluidRow( ...
64d0186af02e59a23dd14f2294dd44ec2630d1f233b90ba769b55fe096ff155a
R
1,535
23
Component.SymptomsProgression <- function() { box( title = tagList(icon("hospital"), i18n$t("症状の進行")), width = 8, closable = F, collapsible = T, collapsed = T, label = boxLabel("Archived", status = "danger"), dateInput( inputId = "selectProcessDay", label = i18n$t("日付選択"), ...
5424351a2139f2f602c584acf795066a4c397670c8fe553d947a72a7a7ead8a3
R
1,546
55
#!/usr/bin/env R # Author: Sean Maden # # Violin plots of DAPI intensity by slide, with some color annotations for star # slides. # library(ggplot2) #---------- # load data #---------- dpath <- file.path("HALO", "Deconvolution_HALO_analysis") fnv <- list.files(dpath, recursive = T) fnv <- fnv[grepl("\\.csv$", fnv)] ...
28aeda0cc7724a9cc232479371d3d62b6f9c426b83334abc7d62df529a28b21b
R
1,547
56
fluidPage( fluidRow( column(width = 6, style='padding:0px;' ), column(width = 6, uiOutput('AomoriValueBoxes') %>% withSpinner(proxy.height = '200px') ) ), fluidRow( box( width = 12, closable = F, title = tagList(icon('chart-line'), sprintf(i18n$t("%sの発生状況"), i18n$t...
a8c628e7e136d697f6ca2df30628c60e96e7c9ddb7880f67a7719891102ef1f3
R
1,549
58
fluidPage( fluidRow( column( width = 6, style = "padding:0px;" ), column( width = 6, uiOutput("MiyagiValueBoxes") %>% withSpinner(proxy.height = "200px") ) ), fluidRow( box( width = 12, closable = F, title = tagList(icon("chart-line"), sprintf(i18n$t("%sの発生状...
d3640ec82ac96a24418d3ba91c74862021b6a5dd346bd33cadd50c6c9aa9e4c8
R
1,550
51
rankEnrich <- function(exp, genelist){ if (!is.matrix(exp) || is.null(rownames(exp)) || length(genelist) == 0) { stop("Invalid input. 'exp' must be a non-empty matrix and 'genelist' must be a non-empty list.") } row_names = rownames(exp) num_genes = nrow(exp) num_samples = ncol(exp) R = matrixS...