sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
1d9e5332de22242d37101e1c0056511bbbfd5591a440aa8c3fbc31bcc515ae66
R
5,992
163
#' Update plot data with a column that list all the represented tips and duplicates sequences, so this can be linked to the metadata #' #' This function updates the plot data by creating a new column where all the represented tips are stored in a list. #' It takes the original plot data, the column name for the new dat...
30beb71d2026aacbb8263ab90f07e2e98e1175390b61bbd16cb41f81fc91d232
R
5,998
185
#' (From Seurat) logs a command #' #' Logs a command run, storing the name, timestamp, and argument list. Stores in #' the Seurat object #' @param object Name of Seurat object #' #' @return returns the Seurat object with command stored #' #' @export LogSeuratCommand <- function(object, return.command = FALSE) { time...
2f40922f73393f068da219ba71c91c7c2ff51cb1cee7571aa12c1422d7e569ef
R
6,000
257
# Summary ----------------------------------------------------------------- # Run parcel-wise ANOVAs to detect differences in ISC between movies # Schaefer 2018 atlas: 300 parcels, 17 networks # Packages ---------------------------------------------------------------- library(tidyverse) library(ggplot2) library(rst...
6a9434c5e9e7c4474a1f31cde15d8c0d666899172555fcfb2213f08ded5e005a
R
6,010
198
#' @name DEPRECATED-spc.bin #' @concept deprecated #' #' @title (DEPRECATED) #' Wavelength binning #' #' #' @description #' #' These \pkg{hyperSpec} functions are **deprecated** and not maintained any #' more. You should not use these. #' Currently they are present due to back-compatibility reasons and will be #...
fa6ad650d302bd409b1ee8b9088cfa282185b3c04fb965def0ac7969312c49b0
R
6,024
121
library(ggplot2) library(stringr) library(ggridges) ## density basename and alternative base densBase <- 'debug_est_alt' altBase <- 'C' ## parse density data densDat <- read.table(paste0(densBase, '.alternate_density.txt'), header=TRUE) standardDensDat <- read.table(paste0(densBase, '.control_density.txt'), header=...
f9ad7dc3b0507079d3a5347c801e9e795397f8789371cbb46b753bc758d380ec
R
6,029
187
#' @name DEPRECATED-spc.NA.approx #' @concept deprecated #' #' @title (DEPRECATED) #' Impute missing data points #' #' @description #' These \pkg{hyperSpec} functions are **deprecated** and not maintained any #' more. You should not use these. #' Currently they are present due to back-compatibility reasons and w...
516c7f1deafd3834225119f0945a2b8b66258d4f7c9d53a175a51a6d7a1bd653
R
6,030
149
library(tidyverse) beh = 'Age' f = 'ridgeCV_zscore_averaged-source_Schaefer400x17_WM+CSF+GS_hcpaging_695_zscored-beh_interview_age_wnoise_all.csv' plt_out = '/home/mgell/Work/reliability/plots/simulation_res/' d = read_csv(paste0('/home/mgell/Work/reliability/input/',f)) d$test_MAE = d$test_MAE*-1 empirical = d[1...
363da956380cf5f4c76102d883c3f91f7f85d283ab7561ecdac2bf2e447206a7
R
6,043
176
#!/usr/bin/Rscript # Clear workspace rm(list = ls()) # Load libraries if(!require(emmeans)) install.packages("emmeans"); library(emmeans) if(!require(ggplot2)) install.packages("ggplot2"); library(ggplot2) if(!require(ggpubr)) install.packages("ggpubr"); library(ggpubr) if(!require(gridExtra)) install.packages("gridE...
bb8a47de6ce172832f26b85d9f0cdcb2fd3d62c4b27a08e656449aa9673f9079
R
6,049
172
# File: hERG_fitting.R # Author: Kelly Chang # Date: Oct 2017 # Version: 1.0 # # Description: R script to fit hERG drug binding model parameters to Milnes # protocol data. The drug data to be fitted must be specified # with "-d DRUG", where "DRUG" indicates the p...
59362c250c613be70dee1808a6736a9c7351afd849eecfb4fff152c74dc338c5
R
6,068
275
library(purrr) library(dplyr) library(vctrs) library(tidyr) library(ggplot2) library(tibble) library(data.table) # Will be the dataset "wang" or "pbmc" dataset <- commandArgs(trailingOnly = TRUE)[1] output_path <- "output" source("../utils/0-indices.R") gene_indices <- read_gene_indices(sprintf("data/%s-gene-indices...
5764d7873304b2d60e8da8a08a5d333c97df3f72d8c8fc07bb0d7ef4606e08cb
R
6,102
170
# Filename: iidp_regression.R # Date: 08-11-2023 library("tidyverse") library("gtsummary") library("broom") library("MASS") # upload data: iidp_mcaide <- read_csv("mcaide_v2_last.csv") iidp_caide <- read_csv("caide_v2_last.csv") # prepare data: iidp_mcaide$diagnosis <- as.factor(iidp_mcaide$diagnosis) iidp_mcaide$mca...
e3fb11bcba18c63e0fdfe05ba49ac7e2c3c6629ca0d934d58ad6aba53684fa89
R
6,108
117
#This script analyzes fluorescence kymographs to measure #and visualize the Contraction or diameter changes over time. #It involves: # 1. Reading and processing TIFF images. # 2. Computing the diameter of features using autocorrelation. # 3. Normalizing and plotting the results. # 4. Saving the results to fil...
2fe4a3fdeb64c3bde6581a098bd8887a1d24d04fdd91b90b258664d319433235
R
6,117
176
#set working dir setwd("E:\\platform-paper\\fig2modules_figs3neurites_1224\\\\") print(getwd()) #import df df = read.csv("middle_files\\fig2.csv") #create corr b_num = dim(df)[[1]] r_num = dim(df)[[2]]-2 corr = data.frame(matrix(ncol = r_num, nrow = r_num)) colnames(corr) = colnames(df)[1:r_num+1] rownam...
21941624cf0557d1a2f17d28e5fcd20298b69818dffe9e9eab0bbdbcb4a36d7f
R
6,139
211
# Function ------------------------------------------------------------------- .sample <- function(x, size, replace = FALSE, prob = NULL) { validObject(x) if (missing(size)) size <- nrow(x) # normal default does not work! s <- sample.int(nrow(x@data), size = size, replace = replace, prob = prob) x[s] } # ...
4a97900429e04bf9efdfd1384ebbc230234afe3b036199b0632037194ab345de
R
6,152
169
--- title: "Comparing group onsets using change point estimation: simulation using EEG-like noise" author: "Guillaume A. Rousselet" date: "`r Sys.Date()`" output: # pdf_document: # fig_caption: no # number_sections: no # toc: yes # toc_depth: 2 github_document: html_preview: yes toc: yes ...
77eee5cae57965a6af60c16d8f538aea4eef9aa20a3da4c784f216ec6e59b2d9
R
6,160
200
--- title: "Estimating onsets using cluster-depth statistics: simulation" author: "Guillaume A. Rousselet" date: "`r Sys.Date()`" output: pdf_document: fig_caption: no number_sections: no toc: yes toc_depth: 2 # github_document: # html_preview: yes # toc: yes # toc_depth: 2 --- Same a...
d1ed56b076c5bcea4d315dded35350372aac979296b3317a49f764381097c9c4
R
6,163
134
setwd("/home/wangmg/Documents/deconvolution/Data_and_code_for_reproduction") library(ggplot2) library(reshape2) #################### Run PANDA ### PANDA package can be installed by install.packages("Code/PANDA_1.1.0.tar.gz", repos = NULL, type = "source"). ### PANDA package is also available at https://github.com/...
d93e650863b2186f3bf6aa9e1d705c814ed38003a36fc06df45b87acdc4e8352
R
6,177
100
--- title: "Tutorial IV" author: "Juan A. Botía" date: "03/07/2018" output: pdf_document: default html_document: default --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## Introduction to randomization based enrichment In this part of the co-exp distribution we will explain how to incorpor...
9221dd660d62f475b88d40aa21d94d0e70aef6296f34ef77966fddf35f728d40
R
6,180
227
--- title: "Regression coefficients for interaction analyses" output: html_document: df_print: paged --- This notebook contains the regression coefficients for the interaction analyses (across all ancestries and all allele coding strategies). The results of this notebook are also available in Supplementary Tabl...
942791a673d1ba3090ffc403a5ab15c579a385af81f32c28d1e6505e0d9d63bf
R
6,205
150
### R-4.3.1 # library library(edgeR) library(RColorBrewer) library(pheatmap) colors = brewer.pal(8, "Set2") ### HCC data data = read.table('../data/pivot_160_FRepr.txt', sep = '\t', header = T) rownames(data) = data$Gene data = data[-c(1:13)] group = factor(ifelse(grepl('T', colnames(data)), 'Tumor', 'N...
5016b15c04eaa357844182967c50dfa2c26478db9edd154cecef219f5ff34cba
R
6,208
184
# load arguments args=commandArgs(TRUE) for(i in 1:length(args)){ eval(parse(text=args[i])) } source('loadFunctions.R') source('doSnapDykstra_experimental.R') libloc = '/home2/RAM_maint/R_packages' radius = 20 # radius around electrodes to keep vertices xtol_rel=0.001 # tolerance for optimization 0.01 - 0.000...
0b73b8b130154450cf1f1371e4eb798a80604906eb0987d1a07a86588fd06914
R
6,233
146
source("Code/utils/plot.R") split_dataset <- function(sc_counts, sc_labels, min_cells_per_type = 30, prefix = "", save_dir = "."){ if (!dir.exists(save_dir)){ dir.create(save_dir, recursive = TRUE) } unique_labels <- unique(sc_labels) keep_types <- unique_labels[table(sc_labels)[unique_la...
854640453c1375c6dbc111e2bb32c03a4d81f50e9aa65859e316b207a9e53c57
R
6,235
195
# Bulk RNA-Seq of Tlx3 WT vs KO samples # Budhaditya Basu library(clusterProfiler) library(enrichplot) library(tidyverse) library(msigdbr) library(fgsea) library(org.Mm.eg.db) library(paletteer) library(ComplexHeatmap) # Load diff expressed gene Anterior cerebellum Ant <- read.csv("Ant_WT_vs_KO.csv", ...
4931bbd6f6a961750c8b6012c3b034c5e730689213cc4141f8209dce65ffe73a
R
6,242
144
# FNIH Project 2 # make cross-sectional dataset #### Coded: Kellen Petersen #### Date as of commenting and documentation - 05/28/2024 # Load libraries library(tidyverse) library(here) #here::i_am("make_cross_sectional_dataset_CLEAN.R") out_project <- here() #Folder where you want all output written to, a results an...
a801269449cedecf6516415ab3ed11172d7b84c6c6f7c0985976576228de1eac
R
6,244
236
#' Radial plot #' #' @description #' Draw a radial plot (also called Galbraith plot) which can be used #' to assess bias in meta-analysis. #' #' @aliases radial radial.default radial.meta #' #' @param x An object of class \code{meta}, or estimated treatment #' effect in individual studies. #' @param y Standard err...
0f37890444474320b349db12def658bfc5baa3e3899a32ec771c635da37a9d96
R
6,252
188
.options <- list( debuglevel = 0L, gc = FALSE, file.remove.emptyspc = TRUE, file.keep.name = TRUE, tolerance = sqrt(.Machine$double.eps), wl.tolerance = sqrt(.Machine$double.eps), plot.spc.nmax = 25, ggplot.spc.nmax = 10 ) #' Options for package \pkg{hyperSpec} #' #' Functions to access and set \pkg{...
ee2ca541f406cdfa33ab9dd30d0603875e10b953746bbc6cb470fcbc942a52e6
R
6,259
130
# Get HCP A unrelated sample with all 4 REST scans library(tidyverse) # all data all_data <- tibble(read_csv('/home/mgell/Work/Preprocess_HCP/text_files/HCA_LS_2.0_subject_completeness.csv')) all_data <- all_data[-1,] #all_data <- subset(all_data, select = c(participant_id, session, SUB_STUDY, VISIT, age, sex, isPa...
8c50558c55fec65395cecae1acd402cc31a3421a47072bc49c6f3050bcd7ea3a
R
6,262
175
--- title: "Population identification with microarray signatures matching" output: html_document: df_print: paged --- In this script, we load the population signatures defined using our microarrays experiments We then select the top genes for each signature, and calculate a UCell score for each signature in each...
7b73f9d2ef9919e6f87424fe5013e91b4f510ce6b27b10deae178c3033270efc
R
6,264
211
ciAgrestiCoull <- function(event, n, level) { chknumeric(event, 0) chknumeric(n, 0, zero = TRUE) chklevel(level) # if (length(event) == 1 & length(n) > 1) event <- rep(event, length(n)) else if (length(event) > 1 & length(n) == 1) n <- rep(n, length(event)) else if (length(event) != length(n))...
37d3f322256c8428f12f253655b7b90d2a0336f7518faf0337a8abaa6e8f32f7
R
6,279
148
#' assessRaster #' #' Assess semantic segmentation model using categorical raster grids (wall-to-wall #' reference data and predictions) #' #' This function generates a set of summary assessment metrics when provided #' reference and predicted classes. Results are returned as a list object. For #' multiclass assessment...
6941a818b5c9f518d5819738316e504788ff4fb61a791c09a9a6b8612edd9565
R
6,279
139
# Load and install missing packages --------------------------------------- packages <- c("ggplot2", "httr", "jsonlite", "RCurl") package.check <- lapply( packages, FUN = function(x) { if (!require(x, character.only = TRUE)) { install.packages(x, dependencies = TRUE) library(x, c...
11fdd2d386f2cc8f30ae7fc83350e1008ad7de874fcbec72fd407a53254030d0
R
6,283
212
#' Summary of meta-analysis results #' #' @description #' Summary method for objects of class \code{meta}. #' #' @param object An object of class \code{meta}. #' @param \dots Additional arguments (ignored). #' #' @details #' Summary method for objects of class \code{meta}. #' #' @return #' An object of classes \code...
9d7bb0b080e040710e76df65276a8c9a1b8ab64cab756d003a3df82e935c009e
R
6,304
174
# Load necessary libraries library(ggplot2) library(clusterProfiler) library(org.Mm.eg.db) # Mouse gene annotation library(enrichplot) library(DOSE) # File path to RNA-seq data file_path <- "E:/seq/OPC/OPC seq lipao.csv" # Load the data rna_data <- read.csv(file_path) # Filter DEGs based on p-value thr...
e141141ad5880236981573854e06d390fe3fd0883e8c26be3419d0b87c82f1a8
R
6,307
152
```{r load-config, incluse=FALSE} source("config.R", local = knitr::knit_global()) ``` ```{r load-data} if(!SENSITIVITY){ df_fmerge = readRDS(paste("parts/patient_grouped_wo", paste(idmt, collapse=""), ".Rda", sep="")) }else{ df_fmerge = readRDS(paste("parts/patient_grouped_wo", paste(idmt, collapse=""), "_sens...
35317a13787844df953689a94feae1d4b130ad91325e5e8d201f7739142295ac
R
6,313
256
#' Highlights and test the time-course of effects through crossvalidation (uses glmer) #' #' Same as 'decode_signal()' except it is powered by #' 'glmer()' and thus performs generalized LMEMs. #' #' @param data A data.frame containing all the necessary variables. #' @param formula A 'lme4'-style formula, passed as a st...
77f3ba9ee7c7a0fa476842a2e527cd7268e31e9aec66c551a98048ecb0bcc12e
R
6,317
137
--- title: "Simulations for Causal Group Effects with Conditional ATE" author: "Eric W. Bridgeford" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{cb.simulations.cate} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} knitr::o...
ea079db5d5d602884f9e27951a0ac3c9cb276f228459b4a07b1ee656c5f157b1
R
6,324
149
setwd("...") library(ggplot2) library(ggpubr) library(dplyr) library(multcomp) data <- read.table("EM_gratios.txt",sep="\t", header=TRUE, fill=TRUE, quote = "") head(data) tail(data) dim(data) #753 3 dat <- subset(data, axon_diameter < 2.7) #exclude 5 outliers to the largest axonal diameter head(dat) dim(...
6a77d05fb1bf1ee66be153e5679742afb9f91ac50a991e588125a925cac6ddca
R
6,337
193
#========================================== # Produce Table 2: GWAS results summary #========================================== library(data.table) library(magrittr) library(rtracklayer) library(flextable) source("code/functions/find_closest_gene.R") source("code/functions/make_or_95_ci.R") bim <- fread("data/adc/adc...
d457bd41693ebefe736379ed665e78f5775e9b0c8bb83e970882c0e6465c2d02
R
6,356
241
# Summary ----------------------------------------------------------------- # Parcel-wise ISC variability and ISC-level correlation, # controlled for parcel-wise tSNR # Packages ---------------------------------------------------------------- library(tidyverse) library(ggplot2) library(broom) library(rstatix) library...
58c6784ab55e313e46aff7ee5beb0a4f5e69f2a318b1ea2748071dc92dbd584b
R
6,360
189
library(tidyverse) library(glue) # get path to script to load custom functions initial.options = commandArgs(trailingOnly = FALSE) file.arg.name = "--file=" script.name = sub(file.arg.name, "", initial.options[grep(file.arg.name, initial.options)]) source(paste0(dirname(script.name), "/Functions/functions.R")) ...
9970789693f60409fee5165d864d80c31ef46256bd62f5269a67c11cdea8df90
R
6,377
157
# --------------------------------------------------------------------------------- # # # # Hippocampal volumes in UK Biobank are associated with APOE only in older adults # # ...
ba6ab706c4ebc6d9c5d056a1fa3434e91c8dd6536e2a4ee8e7f42a2fb7665164
R
6,387
151
# Calcuate ICC for metrics. # args[1]: The input matlab .mat file. Has: 'AllVolume','CovW','CovB','time','sID','nSubj','nSession','nVoxels' # args[2]: The name for the output matlab .mat file. # Called by y_ICC_Image_LMM_CallR.m (in DPABI), which handles the input brain imaging file and covariates, and write out .nii I...
8d76f501906fa94ee21950784157e7bd22bbe5218cd24af8b77980b30683a555
R
6,393
200
--- title: "20240306_sim_data_plots" output: html_document date: "2024-03-06" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r load libraries} library(tidyverse) library(ggplot2) library(agricolae) library(ggsignif) library(multcomp) library(nlme) ``` ```{r load data} #manual_synbot_dat...
55cd300d6194e49e9ddf87d6fb79747edf408dacd11d522f24c9b6c5fe96d1d6
R
6,429
267
library(purrr) library(dplyr) library(vctrs) library(tidyr) library(ggplot2) library(tibble) library(data.table) # Will be the dataset "wang" or "pbmc" dataset <- commandArgs(trailingOnly = TRUE)[1] output_path <- "output" source("../utils/0-indices.R") gene_indices <- read_gene_indices(sprintf("data/%s-gene-indices...
c53319150aedd7950427b7ed6cf82eafd1b7fd871a4f18971eb0d94d467ed1d2
R
6,454
148
```{r setup_raincloud, include = TRUE, echo = TRUE} # required packages packages_to_install <- c("cowplot", "tidyverse","gridExtra", "readr", "ggplot2", "dplyr") # install and load required packages for (package in packages_to_install) { if (!requireNamespace(package, quietly = TRUE)) { install.packages(packag...
292b0ef59fed45b544d31b6dd11e0a19490958daf69b491a9f3db631df8dd08a
R
6,460
203
--- title: "Data input from website" author: "Jeremy Miller" date: "March 8, 2019" output: html_notebook --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Overview This script reads converts data downloaded from the Allen Institute Cell Types Database (http://celltypes.brain-map.o...
67c2725678a58c1fd3dee4c9994445bbaadbc4f8a5585d891ad62d0395b30999
R
6,469
170
library(scater) library(Seurat) library(tidyverse) library(cowplot) library(Matrix.utils) library(edgeR) library(dplyr) library(magrittr) library(Matrix) library(purrr) library(reshape2) library(S4Vectors) library(tibble) library(SingleCellExperiment) library(pheatmap) library(apeglm) library(png) li...
e41181c10847a952f1d32856d2879d323cb3a46bc28a95a9874a77e0b003c344
R
6,473
324
--- title: "SEFL10K9_Analysis" author: "Zach" output: html_document: fig_height: 4.5 fig_width: 4.5 highlight: kate number_sections: yes theme: journal toc: yes toc_depth: 6 editor_options: chunk_output_type: console --- # Set Global Options ```{r global_options} knitr::opts_chunk$se...
17aa647370143c1473d617842b93b99c6f248c240ccb9def61eb344eb4cdc45b
R
6,483
128
library(dplyr) library(ggplot2) library(ggrastr) #Load all RNAscope data exp.dt <- lapply(Sys.glob("raw data/*"), function(i){return(read.csv(i, row.names = 1))}) exp.dt <- do.call(rbind, exp.dt) exp.dt$final.celltype <- gsub("_", " ", exp.dt$celltype) exp.dt[grep("GABA", exp.dt$celltype),]$final.celltype <...
50b2f9895ff4f0e87cb1d9f506e26bc4d8a6917bef700a9b36578f83f4f29f9a
R
6,501
204
--- title: "TWAS" author: "Jack Humphrey" date: "2024-03-21" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(tidyverse) library(ggrepel) ``` ```{r} # twas_files <- list.files( pattern = "*fusion_res.tsv", recursive = TRUE, full.names = TRUE) # names(twas_files) <- base...
b3f0c84a21af3bee2905fe9d6735c32fce37258c2521d3dc8d37b42fa9fab6c4
R
6,515
158
#================================== # categorize the NACC NP variables # by outcome type, coding, etc. #================================== library(data.table) library(magrittr) np <- readRDS("data/adc/np.Rds") covar <- fread("data/adc/adc_np.covar") np <- np[IID %in% covar$IID] apply_exclusion_criteria <- function(d...
3e09a8fd2414cd1f07003b2b4c86da5a675c890d4b3ede4963a578439aaab1e4
R
6,516
131
library(rtracklayer) library(parallel) library(ggplot2) library(reshape2) options(mc.cores=8) bed2gr <- function(x){ a=read.table(x,sep='\t',comment.char = '',quote="",header = F) colnames(a)[1:6]=c('chr','start','end','width','strand','anno') makeGRangesFromDataFrame(a,keep.extra.columns = T) } setwd...
8c6801dc7be50f531f02e95c93a54d803104f66142965fea86db5001ee965e9b
R
6,518
124
run_SpatialDWLS <- function(st_counts_path, sc_counts_path, sc_labels_path, output_dir = ".", python_path = NULL){ library(Giotto) library(peakRAM) if (!dir.exists(output_dir)){ dir.create(output_dir, recursive = TRUE) } sc_counts <- read.csv(sc_counts_path, header = TRUE, row.names = 1) ...
829f6050d4c7ce4bcf7aa35405d6fd03a87c029156d763d12c2cf4ab52f48e2b
R
6,549
173
# docker run -ti --entrypoint /bin/bash -v /cis/home/ebridge2/Documents/research/graphstats_repos/causal_batch/:/causal_batch neurodata/cdcorr:0.0.1 # cd causal_batch/docs/causal_cdcorr_paper/Figure_reproduction/ source("../helpers/test_statistics.R") require(causalBatch) require(tidyverse) require(energy) require(json...
00426f69e7769ef1d9192c6b22a04c32098271ca61c58392d3985de7072224b3
R
6,552
175
### internal functions source(codes.makepath("autofocus/Backend_Modules.R")) #### Parse Input #### #' input #' #' Parses input data #' #' @param mol_files List of excel file names containing molecular data #' @param sample_sheet Excel file name containing sample data #' @param sample_id string, name of column in samp...
56090c686b9d1d46aa50d9a565c638e38e650092cbe898d939d44b892a60bcdc
R
6,563
189
library(ArchR) library(Signac) library(Seurat) library(Matrix) library(readr) celltype_list = c('EX', 'IN', 'ASC', 'ODC', 'OPC', 'MG') Human_Sample = c('HM2013017', 'HM20200905', 'HM20200927', 'HM20201129', 'HM20201213', 'HM20201222') Monkey_Sample = c('RM06013', 'RM07071', 'RM07333', 'RM08403', 'RM110...
c8d74e2e63b031899ca67dd6fc059293240fb72ce55c516cb5fed2e1d1871051
R
6,567
150
```{r setup_raincloud, include = TRUE, echo = TRUE} # required packages packages_to_install <- c("cowplot", "tidyverse","gridExtra", "readr", "ggplot2", "dplyr") # install and load required packages for (package in packages_to_install) { if (!requireNamespace(package, quietly = TRUE)) { install.packages(package...
107b85b7aa9e9689f8369eb15f2e3dea47b6d8f9b76740d0663836e6d1244d1d
R
6,573
79
source('./scripts/01_Setup.R') # A treemap R script produced by the Revigo server at http://revigo.irb.hr/ # If you found Revigo useful in your work, please cite the following reference: # Supek F et al. "REVIGO summarizes and visualizes long lists of Gene Ontology # terms" PLoS ONE 2011. doi:10.1371/journal.pone.0021...
a9e5c28a2f9c31c8bf88886cedaf60a22dc0ad18c2f1c00a9920115aef348cca
R
6,584
172
#This script is a modified version of reticulate's install_python(), which installs pyenv in a user-specified directory instead of the "r-reticulate" root folder. #As opposed to install_python() it does NOT check and handle a list of the different pyenv versions. It only installs the latest pyenv version at the user-s...
1c2be3b593201ce6dfae02afe88ce890e567a881a5bf052e51176811d76682c3
R
6,587
293
--- title: "Markos et al Transitions graphs" author: "Jan Kubovciak, Institute of Molecular Genetics of the Czech Academy of Sciences" output: pdf_document: number_sections: false toc: true df_print: paged --- last updated: `r Sys.time()` ```{r setup_glob, include=FALSE} knitr::opts_chunk$set( echo = ...
2efca207e4519300d678839d3b374f104ff012cc31bc730b62a3ddd790de01b5
R
6,602
124
library(GenomicRanges) library(data.table) library(stringr) library(RColorBrewer) library(ggplot2) library(ggpointdensity) library(viridis) library(qqman) library(readxl) #Plot Fig2a, QQ plot dat.results<-data.frame(read_excel("plot_table_fig2.xlsx", sheet=1), stringsAsFactors = F) #,header=TRUE) dat.results$p_adj<-a...
85fc9a3ec5bfe6dab8fd110aa770f5e948f42615129c4ff3cec449ab0023b6d1
R
6,609
185
--- title: "STADIA" author: Yanfang Li output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{STADIA} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", out.width="60%", fig.width=7, fig.heigh...
81433f96767bca7fac23b8c9a15da3fff762b8e2fa9afaf8a7212a8ef2a0d289
R
6,611
157
library(Seurat) library(sctransform) library(patchwork) library(dplyr) library(viridis) library(ggplot2) library(ComplexHeatmap) library(enrichR) library(RColorBrewer) library(MAST) library(ggrastr) library(ggrepel) library(fgsea) md <- readRDS("datasets/scGSEA_neuron_subset_metadata.rds") table(md$cell...
307c7cff769dd0c2834e51bf99a462cf6a38f3d742953a4d8c003547c311947d
R
6,636
203
--- title: "Roche_DiazAndYohimbie_Clustering" author: "Lukas von Ziegler" date: '2024-02-01' output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Clustering of Yohimbine and Diazepam data from Roche together ```{r, message=FALSE, warning = FALSE} source("DLCAna...
34f75fc309f61c31c18180a3c2893edd07b494c131af41a72d7616a1c81b186d
R
6,643
209
#' Convert between different wavelength units #' #' The following units can be converted into each other: #' *nm*, \emph{\eqn{cm^{-1}}{inverse cm}}, *eV*, *THz* and *Raman shift*. #' #' @param x data for conversion #' @param from source unit #' @param to destination unit #' @param ref_wl laser wavelength (required for...
f309aabbf79936c372894def6e5f6cf744ebb0edf14e65022c3a4c04618adf36
R
6,649
197
--- title: "SOX2-VSX2_Boxplots" author: "Abdullah Khan" date: "2024-09-25" output: html_document editor_options: chunk_output_type: console --- ```{r} library(DiffBind) library(rtracklayer) library(pheatmap) library(ggpubr) library(ggsignif) library(DESeq2) library(RColorBrewer) library(reshape2) library(BiocParall...
964e3c785f131033cba5e4e461f5e7fd9f67e3b1c9fcbdf388c06cc6ea23391f
R
6,656
180
--- title: "Analysis_IFS_Shockbox" author: "Lukas von Ziegler" date: '2024-01-12' output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r, message=FALSE, warning = FALSE} source("DLCAnalyzer.R") source("BFA_BFF.R") library(sp) #tested with v1.3-2 lib...
05a1a99cd6951ebfacfc8e0c5146ff86595b3d5f328ab97140f995f3cc7df1b3
R
6,683
224
# Functions ------------------------------------------------------------------ .na.if.different <- function(x) { if (length(unique(x)) > 1) NA else x[1] } # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .apply_workhorse <- function(data, MARGIN, FUN, ...) { if (length(data$spc) == 0...
c9270d570841d964f7e2babcd2e13d3de97da4613344a3f86d2a985e0d4f48a7
R
6,684
173
library(scCustomize) library(tidyr) library(scater) library(Seurat) library(tidyverse) library(cowplot) library(Matrix.utils) library(edgeR) library(dplyr) library(magrittr) library(Matrix) library(purrr) library(reshape2) library(S4Vectors) library(tibble) library(SingleCellExperiment) library(pheatmap) library(apeglm...
c3465b98e97c256224034070c9d8e34e19b904898b009167e9fc95b18162b976
R
6,708
175
--- title: "Figure3_BFF" author: "Fabienne Rössler" date: '2023-03-23' output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r, message=FALSE, warning = FALSE} source("../DLCAnalyzer_Functions_v4.R") source("../UnsupervisedAnalysis_Functions.R") library(sp) ...
43c48b0c689d88d3924c1b4be447b94522f55fe3f39d894ad86dc5b621b08195
R
6,724
217
--- title: "hclust_clean" author: "Kadi Vaher" date: "09/08/2022" output: html_document --- --- title: "TEBC faecal samples: Clustering of the samples (hierarchical)" author: - "Kadi Vaher" - "Hierarchical clustering with all samples together" - "Based on Bray-Curtis dissimilarity matrix calculated on the TSS-no...
7d684f2a7f48fb23ebe66da4dbac51e86fcef162965478441131f9bfdad6f1f3
R
6,742
264
# Summary ----------------------------------------------------------------- # Run IS-RSA using linear mixed-effects models # Schaefer 2018 atlas: 300 parcels, 17 networks # Packages ---------------------------------------------------------------- library(tidyverse) library(lme4) library(broom.mixed) # Prelude ---...
dc9b385bce0eb8ff047cd323bac5017c069ed6d8ac3a9c90fcce4e43248f918d
R
6,748
179
library(readxl) library(UCell) library(tidyverse) library(Seurat) library(SeuratDisk) library(tidyquant) library(ggpointdensity) library(viridis) library(ggrastr) library(extrafont) library(scCustomize) source(file.path("R","functions.R")) #all <- LoadH5Seurat(file.path("data","v5_reference_mapped_all.H5Seurat")) loa...
5af1d62cde158ead2b2570cc217ab88f69334cb22f1232442cee691eedcaf77b
R
6,772
200
# Spatial Prediction Example ------------------------------------------------------ # Preparation ------------------------------------------------------------- #Load libraries library(geodl) library(dplyr) library(torch) library(luz) library(ggplot2) setwd("Your Working Directory") #Get device device ...
4358daeb07174e92049af5b9adca253ec4b28a5e1b398342c7255f63bbcf726e
R
6,787
252
#' Conversion of a `hyperSpec` object into a data frame or matrix #' #' `as.data.frame()` returns `x@@data` (as data.frame), `as.matrix()` #' returns the spectra matrix `x@@data$spc` as matrix. #' #' @rdname asdataframe #' @name as.data.frame #' @aliases as.data.frame as.data.frame,hyperSpec-method as.data.frame.hyperS...
d1f9f223c7ffdb79c49bd08f61991a2299493ef75f13a91a765a159831e92725
R
6,802
227
--- title: "Estimating onsets using FDR and Bonferroni corrections: simulation" author: "Guillaume A. Rousselet" date: "`r Sys.Date()`" output: pdf_document: fig_caption: no number_sections: no toc: yes toc_depth: 2 # github_document: # html_preview: yes # toc: yes # toc_depth: 2 --- ...
5df622751a9d1d2fce97f4a7d0b86b2510ddfad75b17ce628157cab38472591d
R
6,811
183
# Correlate HCP test retest data to get a sense of reliability library(tidyverse) library(corrplot) library(psych) #net_cols <- c("#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7") # original order # Load T1 <- read.csv('/home/mgell/Work/reliability/text_files/HCP_YA_retest_T1_beh.csv') T...
d12a0de3682dafe4d15ecdb3094205c9f08820ae55416f134ab1b1a92bc599cb
R
6,816
197
library(ggplot2) library(lme4) library(lmerTest) library(effects) library(broom.mixed) library(patchwork) #scripts_dir = 'Z:/Desktop/MINDLAB2020_MEG-AuditoryPatternRecognition/scripts/working_memory/' scripts_dir = '/projects/MINDLAB2020_MEG-AuditoryPatternRecognition/scripts/working_memory/' setwd(scripts_di...
578567e922dedebc6140c0b77a7525f0a797ed5030e32a34145e6718d17e970a
R
6,848
167
#stats and figure for alpha diversity indices to compare timepoints # IMPORTANT TO RUN THIS SCRIPT ON THE COMMAND LINE # FOR SOME REASON FUNCTION lmer MAKES THE ENTIRE R SESSION TO CRASH SOMETIMES WHEN RUNNING IN RSTUDIO # change directory names as needed library(tidyverse) library(here) library(ggplot2) library(ggpu...
daa762391e71d123a1a8e705a09481955a2cde0bc0cffecc35b94695f72f1d4a
R
6,875
222
# Function ------------------------------------------------------------------- .aggregate <- function(x, by = stop("by is needed"), FUN = stop("FUN is needed."), ..., out.rows = NULL, append.rows = NULL, by.isindex = FALSE) { validObject(x) if (!is.list(by) || !by.isi...
16671317583b3326e414a7161b81c52b9fcfb29d8673a21c41d22ab3cb02de09
R
6,882
163
library(Seurat) library(sctransform) library(patchwork) library(dplyr) library(viridis) library(ggplot2) library(ComplexHeatmap) library(enrichR) library(RColorBrewer) library(MAST) library(ggrastr) library(ggrepel) library(fgsea) ###add dataset dt.sct <- readRDS("datasets/2_seurat_integrated_clustered....
a72d6d0c47d2ec11db4366e1c2fe39db825c1c2acce52db30cbeb32eedc754b5
R
6,889
145
library(ggplot2) library(tidyr) library(dplyr) library(cowplot) library(magick) theme_set(theme_bw()) # Parse the arguments args <- commandArgs(trailing=T) clusterProteinDomainPath <- args[1] clusterFusedExonPath <- args[2] circosPicturePath <- args[3] fontSize <- as.numeric(args[4]) fusionLegendRows <- as.numeric(a...
6b373a31f4236510791012b1e5a38fe7e8f4d1111dcae2f47635d3ba22f0fdd2
R
6,897
170
--- output: github_document --- <!-- README.md is generated from README.Rmd. Please edit that file --> ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) ``` # STADIA <img src="man/figures/logo.png" align="right" width="160" ...
3807f303f7f2bdc671aabd372b227ed55f21418f2f5e8cf771328bc95c951fdc
R
6,901
191
--- title: "Image_analysis" output: html_document --- ```{r} library(tidyverse) library(ggforce) library(ggsignif) library(ComplexHeatmap) library(ggpubr) library(RColorBrewer) ``` ```{r} setwd("Z:/16-Our Papers/In Preparation/PD_Diabetes_Alise/Figures/Figure2/originals/B") data <- readr::read_csv("TH...
e58e34ff139f005419468a59ff19cf9ec75d76e83b856e6dd7e796e76361e615
R
6,922
229
--- title: "AB Plaque load" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load packages ```{r} require(Seurat) require(data.table) require(tidyverse) require(ggpubr) require(cowplot) source("Helper_scripts/figure_themes.R") ``` The following code chunk was run on a GPU ...
8de603e23612ad9fee7181899ea55ffac9041b492cf9c0e7dddd4bc0d713799a
R
6,929
128
### generate plots for Figure 3 for both CO & H1 library(Seurat) library(dplyr) library(ggplot2) library(cowplot) ### for Cortical Organoid aei_co <- read.table("AEI_CO_v2/output_index_20230627/AEI_CO_v2_outputindex/EditingIndex.csv", header = 1, sep = ",") cluster_levels <- c("Progenitor","IP","Glia","Glutamaterg...
672d1ac54621c6aa09098d2522182bb93334ea31eda8243f8ba39dfed453cb77
R
6,931
105
#----Figure_06/07_preparations-------------------------------------------------- #------------------------------------------------------------------------------- # This is the code is needed as preparation for Figure 06/7 as preparation to run # the analysis for the connectivity analysis for Reinhard and Fukuda et ...
9f6730fdde0884a158f0d31c2690927902a16c762407a39a6db734a02d389f7c
R
6,933
192
--- title: "SupplFigure_BSOID_8Clusters" author: "Fabienne Rössler" date: '2023-02-23' output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r, message=FALSE, warning = FALSE} source("../DLCAnalyzer_Functions_v4.R") source("../UnsupervisedAnalysis_Functions.R") ...
05b84312d49a7b18fcecf0df4a89020d6f8fa1ebcb188a188dd0a4813654b801
R
6,942
182
############################################################################# # # Plot results # # # Liang Qunjun 2024/06/13 library(tidyverse) library(ggeasy) library(ggsignif) library(ggsci) library(patchwork) # load the data dat_use <- rio::import("inputs/Analysis2_collect_fMRI.xlsx") # define the cut-off cut_ha...
482f72d3d94865480ecf11e1d2c5a2b36b2d50ad5f65b4b04b04dc1937e4e7ae
R
6,945
131
#----Figure_05_A---------------------------------------------------------------- #------------------------------------------------------------------------------- # This is the code for Figure 05 Panel A for the connectivity analysis for # Reinhard and Fukuda et al. 2024 # The first run might take long as all syna...
cac042ed37f2b80dc4876f264a055b599d453f89cef83c7ec537664a9e2e30cd
R
6,962
132
library(neuprintr); library(hemibrainr); library(nat); library(natverse); library(nat.jrcbrains); library(fafbseg); library(reticulate) library(R.matlab) library(progress);library(bit64);library(pracma); # ### plotting packages # library(pheatmap);library(ComplexHeatmap);library(zoo);library(lsa) # library(RCol...
430791987a9a99455f76f71d22b3bf4d62c468a6461795121ee38ee871e33c9e
R
6,974
250
### ----------------------------------------------------------------------------- ### ### .getindex ### ### ## does the actual work of looking up the index for wl2i, .extract and .replace ## extrapolate = TRUE returns first resp. last index for wavelength outside ## hyperSpec@wavelength. ## extrapolate = FALSE returns ...
a5f24382a184526ecfd9a573b48ec6ab732c82ac0c3c59201f9ae31c4ae574d7
R
6,977
199
pcaUI <- function(id) { ns <- NS(id) fluidRow( column(width = 3, shinydashboard::box(title = "PCA settings", status = "warning", width = NULL, shiny::sliderInput(ns("pcaDims"), "Dimensions", min = 1, max = 10, value = c(1, 2)), checkboxInput(ns("showPolygons"), "...
7055e5205f04b3c25349d777959af9abab512f80d63f0d80c20d9a7e978a7ba7
R
6,989
116
source('./scripts/01_Setup.R') SampleInfo2= readRDS('./data/processed/rds/SampleInfo.rds') SampleInfo2$Amplification.Method= gsub("PicoPlex v2|PicoPlex v3", 'PicoPlex', SampleInfo2$Amplification.Method) delimiters = ".bowtie|.bt2" aa2= strsplit(SampleInfo2$File_name, delimiters, perl = TRUE) aa3= sappl...
77f7aeeb626651c977dc1661cee38e167a207f34f55cb2fde1697a84a3983c98
R
6,989
193
--- title: "plot_lookups" output: html_document --- ```{r setup, include=FALSE} library("scatterplot3d") library(ggplot2) MA = read.table("/data/clusterfs/lag/users/gokala/beat-dyslexiaevol/results/FUMA/FUMA_job178902_dys_rhyimp_MA/IndSigSNPs.txt", header = T) dys = read.table("/data/clusterfs/lag/users/gokala/beat-d...
fd34702321a6951e1001d77183f28b6fa4061a829ba26e92cd587b226fea0824
R
6,992
158
#making a panelled plots using the gg-objects saved in some previous scripts # In this script it is very important that all figures have been made with the same version of packages (e.g. ggplot, ggpubr etc) that is in the use # otherwise the plots will not display and you can't merge them together in panels # if you g...
afb041a72c503108580a6a25da0d71730bf8c0af31df3718a66cea8caa318d5f
R
7,001
152
library(reshape2) library(ComplexHeatmap) library(RColorBrewer) library(circlize) # for enhancers regulating genes and isoforms, respectively # for 5' and non 5' promoter isoforms # LDSC enrichment analysis for enhancers with ABC activity mytraits=list(`Neuropsychiatric and behavioral`=c("sz3",'asd', "bip2", #"bdAndSc...
953c21e3891a0ce1a31406b88f7edbed76d90f97e9cd91946bfe3826683cca31
R
7,009
212
# Bulk RNA-Seq of Tlx3 WT vs KO samples # Budhaditya Basu library(clusterProfiler) library(enrichplot) library(tidyverse) library(msigdbr) library(fgsea) library(org.Mm.eg.db) library(paletteer) library(ComplexHeatmap) # Load diff expressed gene Posterior cerebellum Post <- read.csv("Post_WT_vs_KO.csv", ...
6c489e83142edef8010ae22f10744426b036d7755d90f95e99af2ff21437f77d
R
7,031
305
library(purrr) library(dplyr) library(vctrs) library(tidyr) library(ggplot2) library(tibble) library(data.table) # Will be the dataset "wang" or "pbmc" dataset <- commandArgs(trailingOnly = TRUE)[1] output_path <- "output" source("../utils/0-indices.R") gene_indices <- read_gene_indices(sprintf("data/%s-gene-indices...
9563009c520f38ad3842697e286356e8f54084d9496a0222272448c559a90387
R
7,042
153
numModelVals <- 20 pseudoQuants <- seq(1/numModelVals,1-(1/numModelVals), 1/numModelVals) USE_COWPLOT <- FALSE plotMotifStats <- function(PlotDat, BaseDat, StatsDat, ModelDat, AltModelDat=NULL){ ylim <- 4 regions <- unique(PlotDat$Region) midReg <- regions[(le...