sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
4139f4009e8bb6652997a785411db2303a625158660e0d1f069d4af6813c4d57
R
7,049
176
#Label Transfer library(SingleCellExperiment) library(Seurat) library(tidyverse) library(Matrix) library(scales) library(cowplot) library(RCurl) library(pryr) library(RColorBrewer) library(dplyr) library(textclean) clusters_seurat_integrated <- readRDS("directory/clustered_seu_obj.rds") Allen_seurat <- readRDS("dire...
7f6fca430fc7e3c27f7e9f782b2cb132ab901a2cbb75382d656eb033ed935351
R
7,061
249
--- title: "Nearest neighbour matrix" output: html_notebook --- ## Purpose of script **Input datasets:** - Protein to gene conversion excel sheet - shows what genes are associated to the shortlisted proteins - Unique gene excel sheet - gene list for which will be used to search on StringDB to find gene interactions ...
43a53d295709f808df5895a6bfd02af9c3eaccd16e0f4c44839bcd0e3e256d71
R
7,068
170
--- title: "Example analyses with VertexWiseR - Example 2" author: "Charly Billaud, Junhong Yu" date: "2025-07-16" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Example analyses with VertexWiseR - Example 2} %\VignetteEngine{rmarkdown::render} %\VignetteEncoding{UTF-8} bibliography: references...
e45f8831aca6bc2a3ce1f6ffcf3ae4925f5039eae0f9747e94f04a3aabe0b108
R
7,082
207
--- title: "SupplFig_VAME_80Clusters" author: "Fabienne Rössler" date: '2023-03-01' 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") li...
8f07b20eb91a528dbad77495a3472c73ffae2fb9c92512fdcad180ab5b9c8e33
R
7,088
228
# Creator: zchuri # Date: 30 March 2015 # Function: iEff_w # IEFF_W(CONNMX,TIPO) # Computes given 'tipo' global or local efficiency given a connectivity # matrix 'ConnMx'. # # The global efficiency is the average of inverse shortest path length, # and is inversely related to the characteristic path length. # The...
4406562887d2850199d31f0391afa6bfbfc72db0e1d74ff463865569d471e8c6
R
7,104
157
# --------------------------------------------------------------------------------- # # # # Hippocampal volumes in UK Biobank are associated with APOE only in older adults # # ...
6232d34b1a61b6f24ce63f7ff05274dd0d0ab1c31b4083d2b166a508e5a57c35
R
7,118
180
#-----Joint-Tissue-gene-expression-Imputation-(JTI)----- cat('\n---Joint-Tissue-gene-expression-Imputation-(JTI)---\n') library('glmnet') library("optparse") option_list = list( make_option("--tissue", action="store", default=NA, type='character', help="tissue name [required]"), make_opti...
f8c675747b59d7b4d71b4341dcfe202250789bca1a12b7f710c85b2db22a1f7b
R
7,134
214
--- title: "Cell_type_staining" output: html_document --- ```{r} library(tidyverse) library(ggforce) library(ggsignif) library(ComplexHeatmap) library(shiny) library(ggpubr) library(RColorBrewer) ``` ```{r} data <- readr::read_csv("Z:\\16-Our Papers\\In Preparation\\PD_Diabetes_Alise\\Figures\\Figur...
cdbbc1912989d1374b1e17dd5febe4665d64fd1f225eacdc8b4193c95f209886
R
7,141
194
#' mochims_thermo_model_results #' #' Evaluate thermo model results. #' #' @param mochi_outpath path to MoCHI thermo model fit results (required) #' @param temperature temperature in degrees celcuis (default:30) #' @param literature_free_energies path to literature free energies (default:NA) #' @param normalisation_di...
6e4a69c6e5c06977c343daf6f9a9e78425ce16f4ab0d769a6ee89736574528ed
R
7,158
134
## CellChat library(dplyr) library(tidyr) library(stringr) library(Seurat) library(CellChat) library(nichenetr) library(UpSetR) library(tibble) library(patchwork) library(openxlsx) library(reshape2) library(ggplot2) library(wesanderson) library(ggsci) library(ggtree) library(ggraph) library(igraph) library(tidyverse) ...
bfd359377b93169922ce3b4c45b74669a7470a7c625d7e618902282ed2359738
R
7,198
183
--- title: "SupplFigure IFS (OFT1 and OFT3)" author: "Fabienne Rössler" date: '2023-05-02' 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_Function...
67269697bf3b48225ff4646eb0a3fa4e1bce40de1e8c38945c7d9f35120028d1
R
7,231
212
AnalyseExperiment<-function(dr, dataname, resdr, cropLim, nn){ # crop data as given in cropLim # separate monomers from clusters based on k=th neares neighbour (given by nn) # Model fit: for monomers: CSR and Thomas, for clusters: Thomas and double (nested) Thomas based on envelope tests and pair correlation functi...
ca300722455da51c7c2838fde839d60eeed86fa8a2d43f5698a8841de473b881
R
7,232
190
#' @title One step cluster #' @description Creating poisson vector. #' @details Input an integer and return the log density of a poisson distribution with lambda equals the input integer #' @param norm.dat data input #' @param select.cells data ref #' @param counts meta input #' @param method meta input #' @par...
feba955190b92cf258c56d2d416059437d1ebacff04aaf72938888c50717f265
R
7,232
183
--- title: "MBTY_Analysis" author: "Lukas von Ziegler" date: '2024-01-19' 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 library(imput...
949aeffe675dff9543bd2fd4990554463fd7e8cbf0883641cab04cbb2cd3d35d
R
7,237
162
library(tidyverse) beh = 'Grip' f = 'ridgeCV_zscore_averaged-source_Schaefer400x17_WM+CSF+GS_hcpaging_695_zscored-beh_HCP_A_motor_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,...
128b96b30a281edc20d956cd72b595f835ecc7f7de1094d9e0882293d43c7cda
R
7,250
176
### R-4.3.1 # library library(TCGAbiolinks) library(SummarizedExperiment) library(limma) library(edgeR) library(biomaRt) library(glmnet) library(factoextra) library(FactoMineR) library(caret) library(gplots) library(RColorBrewer) library(gProfileR) library(genefilter) library(ggpubr) library(rstatix) l...
443984ce7596245947877a00761758722bb9d35341e0787e898a359411955416
R
7,252
127
.libPaths(c(.libPaths(),'/sc/arion/projects/roussp01a/pengfei/tools/R_4_0_3')) library(proActiv) library(rtracklayer) z=local({load('/sc/arion/projects/CommonMind/roussp01a/INGELHEIM/rnaseq/step2/files/step2Session_gtcheck.RData');environment()}) allInfo=z$allInfo allInfo$path1=gsub('hydra','arion',gsub('.Log.fina...
485862df3e0aee69cf64368ddd5c39113fd6e24c51f6bb71e17a5b67c9aef84f
R
7,254
171
#' assessPnts #' #' Assess semantic segmentation model using point locations #' #' 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, the class names ($Classes), count of samples per class #' ...
00edc9db98d76cb7d0c69d481d23083851d2d605514129b2b68a04ff0bf3dac8
R
7,257
157
library(Seurat) library(dplyr) library(ggplot2) # Map clinical data to the metadata merge_metadata <- function(sobj, metadata){ meta_data_sex <- inner_join(sobj@meta.data, metadata) rownames(meta_data_sex) <- rownames(sobj@meta.data) sobj@meta.data <- meta_data_sex return(sobj) } # Assign the AD variable a...
820283ab4193ac0f49b1bc82285617a48ac98d75f8dbbc1542797ecafb846936
R
7,259
259
options(max.print=500) options(stringsAsFactors=FALSE) library(ggplot2) library(reshape2) suppressWarnings(library(patchwork)) ## Args ================================ args <- commandArgs(trailingOnly = TRUE) PRED_SUMM_PATH <- args[1] CLF_NAME <- args[2] PLOT_PATH <- args[3] PLOT_WIDTH <- args[4] PLOT_HEIGHT <- args...
fbcf32fa89eeaf7ac3c2553101643cdd316ed1a353e7d24167d94ffab1192613
R
7,261
286
#### Markos et al 2024 #### Script used for analysis of 10X matrices #### Stage N5 # load prerequisities library(Seurat) library(patchwork) library(ggplot2) set.seed(10) # Data load #### AmphiN5stage.data <-Read10X(data.dir = "../10X_matrices/N5/filtered_feature_bc_matrix/") # read gene id conversion table gene_map ...
8b64c079b9437f068490eda3891c62fadb33ac7f26a66de9857aead1958a338c
R
7,265
220
# File: compute_TdP_error.R # Author: Kelly Chang # Date: Oct 2017 # Version: 1.0 # # Description: R script to perform Torsade de Pointes (TdP) risk # classification using ordinal logistic regression and # leave-one-out cross validation (LOOCV). # F...
42502382f83185e7357fa78f36a1efe6a1b82d14311faebe24a0b942f4b00b44
R
7,280
195
--- title: "leptin_arc_PT" author: "Yuqi Tan" date: "10/24/2021" output: html_document --- ```{r, message=FALSE} library(Seurat) library(Matrix) library(ggplot2) library(dplyr) library(patchwork) library(viridis) set.seed(123) save_dir = "./data/" ``` | | ARC | | ----------- | ----------- | | all...
84c65dee186c5e7d492838ffbb732759b305edf4bc96c5bd10b781e4eaa9d83e
R
7,291
201
#' Load Peaks from Data #' #' This function extracts peak information from a nested list and returns a structured data frame. #' #' @param data A nested list where the first level of names represent time windows, and the second level of names #' represent modes. Each mode contains a list with electrode, peak_tim...
efdc8b6cc2acdd42bf4d4a860ead0ef78bffde9d9156f2db2c6e8a2efc4c1ae2
R
7,302
180
#' viewChips #' #' Plot a grid of image and/or mask chips #' #' This function generates a plot of image chips and/or image masks. It serves #' as a means to visualize chips generated with the makeChips() or makeChipsMultiClass() #' function. It can be used as a check to make sure chips were generated as expected. #' #'...
f5dd3ad5d0f660962b9b8ebb3acf810ae0bb3dbf37a014f34b006134de288ec6
R
7,314
170
#' Print results of a leave-one-out meta-analysis #' #' @description #' Print results of a leave-one-out meta-analysis #' #' @aliases print.metainf #' #' @param x An object of class \code{\link{metainf}}. #' @param prediction A logical indicating whether prediction #' intervals should be printed. #' @param overall...
da3e8c32e3a442b7da145262d1ea6c1d3a5d4f9930965d30a44f58809e54655e
R
7,319
169
## ----------------------------------------------------------------------------- ## ## Somatic variant detection in lesional focal epilepsy ## This script plots the results of the dNdScv meta-analysis ## ## Author: Dr. Christian Bosselmann ## ## Date Created: 2023-09-05 ## ## Copyright (c) Christian Bosselmann, 2023 #...
2b0886dd6c4bcbc76d57580727d0ab1916eb9afd8dfa16171374e7e798431b35
R
7,326
153
--- title: "Convert to Allen Institute Cell Type Taxonomy Service (CTTS)" output: html_notebook --- This script takes standard output files form the Common Cell type Nomenclature (CCN) and converts them to the format required for input into the Allen Institute Cell Type Taxonomy Service (CTTS). It takes as input...
673c87b629e5317c508c6dc699f4d49945a0e21d0110f5f6de07ed19cbf81b72
R
7,373
171
library(dplyr) library(readr) library(lme4) library(ggplot2) library(effects) library(patchwork) # all_data_new <- list.files(path = "~/Desktop/accuracies", full.names = TRUE) %>% # lapply(read_csv) %>% # bind_rows #scripts_dir = 'Z:/Desktop/MINDLAB2020_MEG-AuditoryPatternRecognition/scratch/working_me...
fbb8bf5e7e61382a16aef651ff0de5f35e959ad3c9a871a05520ed2af764e797
R
7,373
220
suppressPackageStartupMessages(library('randomForest')) options(stringsAsFactors=F) # to avoid invalid factor level warning ## Command line args ================================ args <- commandArgs(TRUE) CHORD_MODEL_PATH <- args[1] MUTATION_CONTEXTS_PATH <- args[2] OUTPUT_FILE_PATH <- args[3] GLOBAL_LOG_LEVEL <- arg...
050c18896bfa040713568c207819389dfa67e941de0aacee82ca9dad205629e7
R
7,384
291
--- title: "How to perform a meta-analysis with R: a practical tutorial" author: "Sara Balduzzi, Gerta Rücker, Guido Schwarzer" output: rmarkdown::pdf_document: number_sections: false rmarkdown::html_vignette: toc: false number_sections: false bibliography: references.bib vignette: > %\VignetteIndexEntr...
557151496032c3984b9f0470392772a91c8d314afc4b18058423925331ae4456
R
7,384
189
--- title: "panel_hyperpol_diff_length" author: "Franz Xaver Mittermaier" date: "2024-06-14" output: html_document --- This script plots the graphs for the experiments, where different durations of hyperpolarizations after 800ms long depolarizations were induced. ```{r, message=FALSE, warning=FALSE} #load l...
4f31c6e2d60b3465d240a9e70c77c539dec9654e883a7dff43d2c5de9b9ccfe9
R
7,398
250
# Copyright 2022 HYBRID Team INCIA, UMR5287, CNRS, Université de Bordeaux # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required b...
df24b645862da692dedead8fd0c86c9c830e285090d13af6840a6dd400c10aee
R
7,407
191
--- title: "Correction_US_files" author: "Fabienne Rössler" date: '2023-07-13' 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...
3e2131996338212cac4eb765352df931b810d1943d05de01950326594f5bd4a7
R
7,419
227
#' @name DEPRECATED-read.txt.Shimadzu #' @concept moved to hySpc.read.txt #' #' @title (DEPRECATED) #' Read Shimadzu GCxGC-qMS - spectra files (`.txt`) #' #' @description #' #' These data input functions are **deprecated** and they will be removed in #' the next release of \pkg{hyperspec} package. #' Now functio...
6e9940924a13ed7fb6e9e6cd6dcc3b94429e2fc35606550bd3e276b0abf1b4ec
R
7,461
147
library(SingleCellExperiment) library(SummarizedExperiment) library(Seurat) library(edgeR) library(dplyr) library(scater) library(IHW) library(limma) library(org.Hs.eg.db) library(ggrepel) xx <- as.list(org.Hs.egENSEMBL2EG) load(url("http://bioinf.wehi.edu.au/software/MSigDB/human_H_v5p2.rdata")) de_res...
24429b33f4eff2ae5df14c748d7b8762fcfb70d5dfa4b7b544d2355a16ecd2f4
R
7,471
199
# run the snapping for a single set of electrodes doSnapDykstra <- function(X, V_all, adjacent, preSnapCloser = F, preSnapPial=F, stopval=-Inf, maxeval=100, xtol_rel=0.01) { # INPUTS: X - coordinates of electrodes (n x 3 matrix) # V_all - coordinates of all good dura vertices (go...
a908e7c5569474c5cff742ba92619462a69777fcd508a32c8a97d5b1db6f477c
R
7,473
234
--- title: "PermutationTest" output: pdf_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## R Markdown ```{r} install.packages("twot") ``` ```{r} library(coin) library(twot) ``` ```{r} install.packages("readxl") ``` ```{r} library("readxl") ``` ```{r} mutantDataSet <- read_excel("C...
fedc9f7ac651c844500d99b1bebba9a545c57ff2dcf1ccf1e4ab860d4b0f9c44
R
7,532
214
#' Convert principal component decomposition or the like into a `hyperSpec` object #' #' Decomposition of the spectra matrix is a common procedure in chemometric #' data analysis. `scores` and `loadings` convert the result matrices #' into new `hyperSpec` objects. #' #' Multivariate data are frequently decomposed by me...
5dc7eb6f4c3131000fbe470733ab77a2720f92e52d0cac5be3e25a149320b569
R
7,556
228
--- title: "KmeansClustering_CSI_70Clusters" author: "Fabienne Rössler" date: '2023-02-09' 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") l...
bfb690121a91fb3992f4c0addebad842eaabf05a55f4e1c8f032d249e43bb4ce
R
7,565
164
--- title: "Convert to Allen Institute Cell Type Taxonomy Service (CTTS)" output: html_notebook --- This script takes standard output files form the Common Cell type Nomenclature (CCN) and converts them to the format required for input into the Allen Institute Cell Type Taxonomy Service (CTTS). It takes as input...
af3f3e0fe49ddd182a4adafb6ec6b8c078b3962f90ba37277ea4f698b472d36e
R
7,591
158
--- title: "Convert to Allen Institute Cell Type Taxonomy Service (CTTS)" output: html_notebook --- This script takes standard output files form the Common Cell type Nomenclature (CCN) and converts them to the format required for input into the Allen Institute Cell Type Taxonomy Service (CTTS). It takes as input the ...
4aedc080d3dac68f1900905c4f031fd5aa23bcb9836a152f0f7dcc7db32fea43
R
7,594
219
library(tidyverse) library(lme4) library(broom.mixed) # Function to load all CSVs from a directory and add additional columns based on file name load_csvs_behavior <- function(path) { file_list <- list.files(path, pattern = "df_full\\.csv", full.names = TRUE) df_list <- map(file_list, ~{ df <- read_csv(.x) ...
7853245259d130a747e627069be3305eafb55f7e4434540da55fa2305e1928c3
R
7,622
198
suppressPackageStartupMessages({ library(SingleCellExperiment) library(scater) library(scran) library(DropletUtils) library(argparse) library(loomR) library(Seurat) library(purrr) }) # create parser object parser <- ArgumentParser() # specify our desired options # by default ArgumentParser will add an...
2e69212d1b395134775d4c98dc8239cdca87cf0efbef6a3f4d2d70ae15bc061d
R
7,630
119
#----Figure_S01_preparations_for_nuclei------------------------------------------ #------------------------------------------------------------------------------- # This is the code which has to be run in preparation for Figure S01 # for the connectivity analysis for Reinhard and Fukuda et al. # nucleus segmentati...
a77b3d65f6a0e57ac47233a425e843f8f532f3eb351d7e3dde0b3ef76889ba37
R
7,632
301
# Auxiliary functions # # Package: meta # Author: Guido Schwarzer <guido.schwarzer@uniklinik-freiburg.de> # License: GPL (>= 2) # estimate.missing <- function(TE, TE.sum, type) { # # 1. Center around mean # TE.c <- TE - TE.sum n <- length(TE.c) # # 2. Rank absolute values of centered values # r.star ...
68ea9649dd221ba14d30eb9dd385c389a2f95a6dd1f726639f0576daa1214bcf
R
7,640
140
#----Figure_01_E---------------------------------------------------------------- #------------------------------------------------------------------------------- # This is the code for Figure 01 Panel E for the connectivity analysis for # Reinhard and Fukuda et al. 2024 #-------------------------------------------...
2b7347e10a6f9a5aa3c75567665ef413d0d5ba7fd7dd12ae7683ed3a3e2d529a
R
7,644
195
#========================================== # Produce Table S3: 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/mega/m...
3502b94775644518a994a748a5293af86a2c1b4211b2d18d3d32c0757a2223bd
R
7,661
193
#' Fit AIPW ComBat model for batch effect correction #' #' This function fits an Augmented Inverse Probability Weighting (AIPW) ComBat model #' for batch effect correction using an empirical Bayes framework. #' #' Note: This function is experimental, and has not been tested on real data. It has only been tested with s...
1c5496748578e76760bb47f2e7841f83841255d47e0c5bedf750e8277a976050
R
7,666
199
library(magrittr) library(survival) library(dplyr) library(ggplot2) dat = t(assay(all_platforms)) # correlation to distance matrix d = as.dist( 1-abs(cor(dat))) #exp(1-abs(cor(dat)) )-1 # min threshold for clusters th_min = 2 # max threshold for clusters th_max = 50 re<- seq(0.15,1, 0.05) %>% # L-W alphas lappl...
26159a0dd0e4b222b7398ddf8f10aa81f46a2cf141286b939f64d315df783a1c
R
7,674
288
# Summary ----------------------------------------------------------------- # Run parcel-wise repeated-measures ANOVAs on ISC between movies, # after residualizing FisherZ for pairwise average framewise displacement # Packages ---------------------------------------------------------------- library(tidyverse) librar...
6773efe563f04d5aa48ebc7e383d92f162e063ba4740bc8f69f64735842b2ddc
R
7,674
200
#### Notes #### #### Libraries #### library(ggplot2) library(ggpubr) #### Sourced functions #### #### Functions #### # Annotate boxplot with number of observations per grouping annotate_n <- function(x) { return(c(y = -0.01, label = length(x))) } # Annotate boxplot with median per grouping annotate_median <- fun...
25650300fb74f4d423394d18dde451a0b1d00b2eb5adc6e50327784fe7805cb3
R
7,694
214
# Single cell RNA-Seq of Tlx3 WT vs KO samples # Budhaditya Basu library(Seurat) library(tidyverse) # Load RDS file tlx3.combined <- readRDS("sc_PN5_tlx3.combined_integrated.rds") DefaultAssay(tlx3.combined) <- "RNA" # Check the orig.ident names unique(tlx3.combined@meta.data$orig.ident) # Calculate the ...
15a1b5bfe23cb651e74b1e2947cdf926c65a31665e15707b43f5b99fc98eb27c
R
7,701
248
# Summary ----------------------------------------------------------------- # Run a multivariate classification to differentiate movies based on ISC values # Packages ---------------------------------------------------------------- library(tidyverse) library(ggplot2) library(glmnet) library(caret) # Prelude ------...
ca7d1eaaa1f1441542ecb7db8ecb78becfb02db192d8404ddb5fa9c770fd9cb2
R
7,703
139
--- title: "Supplementary Figure 5" author: "Greg Duncan, Katie Emberley and Jonathan Nelson" date: "`r format(Sys.time(), '%d %B, %Y')`" output: html_document: toc: yes toc_depth: 3 toc_float: true number_sections: yes theme: bootstrap df_print: paged code_folding: hide highlight: py...
c59f455b4ae7cd1d30c90bcb883fe3e7b888eb06bcb48480bd78e6d5ab25fc07
R
7,726
233
library(tidyverse) ### FIGURE 1A ### # HCP A plot results for Age prediction - violin plot beh = 'Age' plt_out = '/home/mgell/Work/reliability/plots/Figures/' f = 'ridgeCV_zscore_averaged-source_Schaefer400x17_WM+CSF+GS_hcpaging_695_zscored-beh_interview_age_wnoise_all.csv' d = read_csv(paste0('/home/mgell/Wor...
2323fdc2814e5ced42a9ec02ec5dc241b2d8b583921c8a21bfeaeaa0235df848
R
7,732
208
library(ggpubr) library(dendextend) library(ComplexHeatmap) library(Seurat) library(SeuratDisk) library(tidyverse) library(SeuratWrappers) library(RColorBrewer) library(circlize) library(UCell) library(clusterProfiler) library(monocle3) source(file.path("R","functions.R")) load(file.path("data", "v5_reference_mapped_...
8b528d5904f6cc51609f01d61a881a647ef206e7a6b9146c171a51dbfe471a33
R
7,740
221
--- title: "edgewise_analysis" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} require(ggplot2) require(energy) require(parallel) require(tidyverse) require(mltools) require(grid) require(gridExtra) ncores <- parallel::detectCores() - 1 alpha = .05 ``` ```{r} met...
6028cdf99be1cac6761e45a1eea47078b66aece0bd4cc2582efb1e7c879fcd61
R
7,751
175
library(tidyverse) # for data manipulation and visualization library(tidyr) # can use gather to convert wide to long format library(dplyr) # can use pipe FC <- read_csv("FC_PreRest_Learn.csv", col_names = FALSE) # This csv file was produced by FC_analysis_Fig4.m newheaders <- c("PreRest_Ch2_9", "Learn_Ch2_9", "PreRest_...
d7f3c44b60eeed427200c44f45706c6cf80ee9ad6101e65f78211a5749c71773
R
7,770
235
--- title: "Selection on organ-biased genes (*`r params$species.name`*)" author: "Bucao, Christabel Floi" output: html_document date: "`r Sys.Date()`" params: input.selection.rds.path: "../../results/08_Selection" input.tau.rds.path: "../../results/10_Expression_Specificity" output.rds.path: "../../results/11_Sel...
e73fa2b2287825ee1ce18b0d46115d59b459d4da181098a198b374c4a2821c07
R
7,832
187
###Spearman Scatter Plots #### Coded: Benjamin Saef #### Date as of commenting and documentation - 05/28/2024 #Scatter plots for best performing analytes from each platform (Benjamin) versus amyloid PET (x-axis): # Yellowish green: amyloid PET negative, CDR >0 #Blue: amyloid PET negative, CDR 0 #Orange: amyloid PET ...
9e97b190c72b91ca51bf9e2bad11f86116c2251759ed1e1061dbda4fc41594b4
R
7,846
188
#' Import RevMan 4 data files (.mtv) #' #' @description #' Reads a file created with RevMan 4 and creates a data frame from #' it. #' #' @param file The name of a file to read data values from. #' #' @details #' Reads a file created with RevMan 4 (Menu: "File" - "Export" - #' "Analysis data file...") and creates a d...
f8685bc34c4cb45f6f5dc7ff82d98baad6c2a7e9cf68e6aad9df0df6d8561044
R
7,897
291
--- title: "Extract supplementary tables" author: "Bucao, Christabel Floi" output: html_document date: "`r Sys.Date()`" params: input.var.path: "../../results/03_Variability_Plots" input.go.path: "../../results/07_GO_Enrichment" input.camera.path: "../../results/07b_GO_cameraPR" input.selectome.path: "../../res...
cc84ddd7f01b1a8b055edf7894bf89269252bf3d49a0ee9fcb2c18b74e46667a
R
7,907
221
--- title: "PREMS Analyse de données ANT" author: "Christophe Pallier" date: "`r Sys.Date()`" output: pdf_document: default html_document: default --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r, echo=FALSE, ouput="hide", message=FALSE, warning=FALSE} require(readr) require(stringr) r...
76c4a4ffa2f2f7c3c5f6fd72e16af50de7401a02d9ce02076600492ff1b5db4a
R
7,956
250
gm <- function(x, digits = 4, debug = FALSE) { if (inherits(x, c("metabin", "metainc", "metaprop", "metarate"))) { incr_not_0 <- sort(unique(x$incr[x$incr != 0])) # if (length(incr_not_0) == 1) incr <- incr_not_0 else if (length(incr_not_0) == 0) incr <- 0 else incr <- paste0(...
8b1eff8d532e5fd1c21b9902782df5ba96efb075862aaf85f1a4907906c8dbda
R
7,962
193
# docker run -ti --entrypoint /bin/bash -v /cis/project/ndmg/batch_effects/:/data -v /cis/home/ebridge2/Documents/research/graphstats_repos/causal_batch/:/base neurodata/causal_batch:0.0.1 # docker run -ti --entrypoint /bin/bash -v /mnt/nfs2/batch_effects/:/data -v /home/eric/Documents/research/graphstats-repos/causal_...
6158724b6c9d26db73aaf7b214f5ba4628757948165d3bfb553047aea969d080
R
7,966
245
#' @name DEPRECATED-read.txt.Renishaw #' @concept moved to hySpc.read.txt #' #' @title (DEPRECATED) #' Import Raman measurements from Renishaw ASCII-files #' #' @description #' #' These data input functions are **deprecated** and they will be removed in #' the next release of \pkg{hyperspec} package. #' Now func...
aa59c46676d34d971ee5773a97f7cf07d10cbd72ce058113ed963686eb71a7f2
R
7,986
185
#' Forest plot to display the result of a leave-one-out meta-analysis #' #' @description #' Draws a forest plot showing the results of omitting each study in turn, #' using the grid graphics system. #' #' @aliases forest.metainf #' #' @param x An object of class \code{\link{metainf}}. #' @param layout A character st...
4b7ae755b9d6a175b656101fa88642eec98207379f217c815b1f7c76a3872990
R
8,002
186
##################################################################### # # This script is used to conduct post-CCA statistics, including # 1. general CCA correlation between groups # 2. Network-wise CCA contribution # 3. Coupling between CCA map and time delay projection map # # Liang Qunjun library(tidyverse) library(...
c54808daabe613d43610932061d027179e121eeaca458519e47c540d2e029eb0
R
8,019
187
library(BayesSpace) library(ggplot2) library(SingleCellExperiment) library(dplyr) Juvenile15yr_DH1_1 <- readVisium("/scratch/mshruv003/visium_08_10_21/Hockman_Visium/X201SC21082979-Z01-F001_01/raw_data/run_spaceranger_count_DH1a/outs") set.seed(102) Juvenile15yr_DH1_1 <- spatialPreprocess(Juvenile15yr_DH1_1, platfor...
c330447ecb065aebbcdd641fcaec9663f7df4455afb2d368fb7e0b464654700b
R
8,038
204
# Plot distribution of demographic variables in both discovery & replication samples library(tidyverse) library(ggplot2) #library(ggthemes) library(cowplot) library(patchwork) # Clear workspace rm(list = ls()) # Load data from disovery/replication samples into dataframes work_dir = '~/Code/multimodal_psychopathol...
fa32f055ee4853f999f5cd7351b55030089b419be2a5d06a9cdbb1605508fc10
R
8,039
313
Notebook to test the preservedCoexp R package and add some plots to main figure 6. Showing how long it takes to generate co-expression matrices as the number of cells increases Showing how long it takes to compute preserved co-expression scores of genes as the number of genes increases Potentially run on my macboo...
50b6ab789b6f77feed0f18f77064dfe14618cfbcc3ea5b112dcb69da695ad65a
R
8,045
202
--- title: "Extract environmental variables" author: "Siyuan Feng" date: "12/6/2021" output: html_document: fig_width: 15 fig_height: 15 --- ## 0. setup paths and functions ```{r setup, include=T} knitr::opts_chunk$set( echo = TRUE, message = FALSE, warning = FALSE ) knitr::opts_knit$set(echo = F, ...
c36c443c546d0cf4116ece308e2ea07260a08321b23ce60650383516b72f688d
R
8,046
191
--- title: "Human FI vs. Human MTG" author: "Jeremy Miller" date: "March 8, 2019" output: html_notebook --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Overview This script identifies common and distinct ET-associated genes in human middle temporal gyrus as compared with human f...
c4d2e2d18f9781afce09647ab0d4161abd97b91a9ac17dba8816a3551fd37855
R
8,051
86
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...
56189bc3b8b00eb7b1c9f6c82212e61baf1e1e7558ebc9e402f4a575f487035d
R
8,060
228
lat_esq<-rep("ESQ",100) lat_dir<-rep("DIR",100) mov_rep<-rep("REP",100) mov_ped<-rep("PED",100) olho_oa<-rep("OA",100) olho_of<-rep("OF",100) pos_c<-rep("C",100) pos_f<-rep("F",100) pos_p<-rep("P",100) pos_o<-rep("O",100) idd<-c("I1","I2","I3","I4","I5","I6","I7","I8","I12","I13","I14","I15","I17","I18","I20","I21","I2...
24111811b4f93be19ebad47561c31f39cf4fc3b75e1f7c252fd06d1036cb4439
R
8,103
275
# Summary ----------------------------------------------------------------- # Run a whole-brain bootstrap test to detect differences in ISC between movies # Packages ---------------------------------------------------------------- library(tidyverse) library(ggplot2) library(ggpubr) library(broom) library(rstatix) ...
d20ff396299a2ac59d6d9aeada186bb3daeece3521461ddf30bef1ed8e5f13fe
R
8,111
192
library(natverse);library(reticulate);library(neuprintr); library(hemibrainr); library(nat); library(natverse); library(nat.jrcbrains); library(fafbseg); setwd(getSrcDirectory(function(){})[1])# set the working directory to where this code is source("Connectomics_functions.R")#library(RConnectomicsAnalysis) # ### pl...
ddc81bcb3ff945acd78cc73612b9d1b26e4a6dee7d03591ac5e44614ddca493b
R
8,143
168
library(GenomicRanges) library(data.table) library(stringr) library(RColorBrewer) library(ggplot2) library(ggpointdensity) library(viridis) library(readxl) library(ggdist) library(gghalves) #Plot Fig3a, example STR expansions dat.alleles<-data.frame(read_excel("plot_table_fig3.xlsx", sheet=1), stringsAsFactors = F) #...
1fae2fb902e21ce48417651ff55c6c03eb812b49c180d24a50b7b5bff4b7fd75
R
8,148
191
#' viewBatchPreds #' #' Generate image grid of mini-batch of image chips, masks, and predictions for all samples in a DataLoader mini-batch. #' #' The goal of this function is to provide a visual check of predictions for a mini-batch of data. #' #' @param dataLoader Instantiated instance of a DataLoader created using t...
1bfee7e1319316fdcd4cd3e35ac26dd1d4db4d3f6f4443d1bc875dfb425106f7
R
8,257
200
# Brain-Heart Arousal Movement analysis # this script does an LMM analysis of the effects of arousal and movement on the # brain-heart couplings within a ROI # 2024 by Antonin Fourcade # load packages ----------------------------------------------------------- library(ggdist) library(gghalves) library(raincloudplots...
7c7034ec191d79939e644b5e6b2e81545c6b3b3d072c7b7eb718987107ae6fe6
R
8,262
217
### https://github.com/klarman-cell-observatory/ivPerturbSeq/blob/master/CellComposition/AdamsMethod.R ### only modified to remove cell types of small cell number library(Seurat) library(dplyr) library(tidyr) ### redoing cell type composition collapsing germ layers load("/media/Scratch_SSD_Voyager/sammi/RNA_editin...
60b5255f16c0b8f8a656b98f1536c47b5baa0cf7515df7897de38e565e709bef
R
8,266
226
library(tidyverse) library(lme4) library(broom.mixed) # Function to load all CSVs from a directory and add additional columns based on file name load_csvs_behavior <- function(path) { file_list <- list.files(path, pattern = "df_full\\.csv", full.names = TRUE) df_list <- map(file_list, ~{ df <- read_csv(.x) ...
6a7447a99f1272424cb8f967868f2f2ebeb3d95cafa26826a7b2f177010bba41
R
8,274
191
if (!require(pacman)) {install.packages("pacman")} pacman::p_load('this.path', 'arrow', 'progress', 'magrittr', 'tidyverse') setwd(dirname(this.path())) # set working directory file location # Global Options + Functions -------------------------------------------------- options(dplyr.summarise.inform = FALSE) custom...
ed3f7e56356ebf9fbab8c1b23b1a49be9302cb6cd82365de3eb42d14b458ebe4
R
8,274
142
###Script 7 #Heatmap of cluster metadata library(dplyr) library(viridis) library(ComplexHeatmap) #get metadata md <- readRDS("output/atlas/metadata_integrated_neuronal_atlas.rds") %>% select(percent.mt, percent.ribo, nFeature_SCT, Region, Treatment, scType_class, cluster_name, harmony_clusters, subcluste...
9d5d58419092880691ba5388be4fd820431584bf73d6a7dc0bc2d81b876579db
R
8,279
242
require("RColorBrewer") require('directlabels') library(reshape2) library(knitr) options(stringsAsFactors = F) #plot mr result df<-read.csv("~/../Dropbox/DansPaper/data/mr/mr.csv",header = T,stringsAsFactors = F) df<-df[,c('geneid','sig_real_ci')] #---load annotation--- gene_anno_pos<-read.table('~/../Dr...
2ebb7ec8b1263230873c3e8e352ec74c50b5290817eadaefc7ea097b3737040a
R
8,281
181
# Load and install missing packages --------------------------------------- packages <- c("metrica", "ggplot2", "ggsci", "Hmisc", "pheatmap", "paletteer") package.check <- lapply( packages, FUN = function(x) { if (!require(x, character.only = TRUE)) { install.packages(x, dependencies = TRU...
c92b3578388a31a826b9608a110eb2aaab97b44694e6b68fa2b051807fe88ded
R
8,297
188
--- title: "Overlaying plots and transparent thresholding" author: "Charly H. A. Billaud" date: "2026-03-05" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Overlaying plots and transparent thresholding} %\VignetteEngine{rmarkdown::render} %\VignetteEncoding{UTF-8} bibliography: references.bib -...
d5fbd6ebc33a92da320a8c88e8371b0be200d0446cb3a7099fd5d4e351e02147
R
8,310
243
--- title: "Clustering_IFS_Shockbox" author: "Lukas von Ziegler" date: '2024-01-12' output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## Clustering the IFS shockbox sessions with kmeans.25 here we run a new kmeans 25 clustering for all IFS shockbox samples `...
a9132d0fd844ab561318d28b6542eeb23eaab52d74c2b19e0633a307b3307d3e
R
8,312
191
############################################ # Install required packages ############################################ install.packages("data.table") install.packages("dplyr") install.packages("GenomicRanges") install.packages("BSgenome") BiocManager::install("BSgenome.Hsapiens.UCSC.hg38") BiocManager::install("biomaRt"...
904cd7b6994834c09c0d6740161269e29a95cdde5340045cab5562ba2e4736dd
R
8,331
237
lat_esq<-rep("ESQ",100) lat_dir<-rep("DIR",100) mov_rep<-rep("REP",100) mov_ped<-rep("PED",100) olho_oa<-rep("OA",100) olho_of<-rep("OF",100) pos_c<-rep("C",100) pos_f<-rep("F",100) pos_p<-rep("P",100) pos_o<-rep("O",100) idd<-c("I1","I2","I3","I4","I5","I6","I7","I8","I12","I13","I14","I15","I17","I18","I20","I21","I2...
b3bf523597faeb183799a86448e22010945f43252436bedfd8e40145caa11c0e
R
8,338
174
#' 2D visualization plot of a neuroimaGene object #' #' Generates a 2D visualization plot of the neuroimaGene object. Neuroimaging #' regions are defined by the atlas parameter and colored according to the #' magnitude and direction of the aggregate effect from each gene in the #' NeuroimaGene object. Colors can be def...
4d35241b317a9c567ddbe7ad99d26bd29795c1ec25260fc2ebdfae2cf723e3bd
R
8,355
216
#' assessDL #' #' Assess semantic segmentation model using all samples in a torch DataLoader. #' #' This function generates a set of summary assessment metrics based on all samples #' within a torch data loader. Results are returned as a list object. For #' multiclass assessment, the class names ($Classes), count of sa...
69af66ffa448a2f30fdc17b8d4ef04e53232c4c26e29dac211cca01d325ed158
R
8,362
219
#' @include utils_internfunc.R #' NULL # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # Functions # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #' @title Functions for preprocessing data #' #' @importFrom stats lm qnorm rbinom varimax #' @importFr...
ba79843f790ce2015de3446ce0bd5f2ff786273f501893149eeaca52b3c501a2
R
8,403
237
library(Seurat) library(clustree) library(dplyr) library(plyr) library(ggtree) library(MetaNeighbor) library(Matrix) library(dendextend) library(SingleCellExperiment) flexsplit <- function(dat,char){ test=strsplit(as.character(dat),char,fixed=TRUE) n.obs <- sapply(test, length) seq.max <- seq_len(max(n.ob...
f27241f328bb276592a05215d94a58506b195cae18f8e1c7c16d7f61fd97ccef
R
8,414
255
--- title: "VAME_Clustering_AllData" author: "Lukas von Ziegler" date: '2024-02-23' 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...
fbb6c90c68dc11ac20b51c4bba80d9c0b762b30a415695d34c60d73bf95ca061
R
8,435
283
#' *Deprecated* Highlights and test the time-course of effects through crossvalidation #' #' *Deprecated* - it's best to set-up yourn own. Variant of 'decode_signal()', in which different IDs (i.e., participants) #' end up in different folds. In other words, data is not splitted by trials, but by #' individuals. All th...
e737bb24a8a3da017299aabc7c457e8f38b4672fc3841cb10600ab4171595615
R
8,453
109
#' @title SURFvextract #' #' @description Extracts whole-brain vertex-wise surface-based measures for each subject in a 'FreeSurfer' output subjects directory, resamples the data to a common surface template, and stores it as a .rds file. This function requires the 'FreeSurfer' environment to be preset in the unix envi...
ae4f36196ef1956c3eddd7b6b2655537e4dbe249860835201e6276bd4200413e
R
8,465
158
#----Figure_01_F---------------------------------------------------------------- #------------------------------------------------------------------------------- # This is the code for Figure 01 Panel F for the connectivity analysis for # Reinhard and Fukuda et al. 2024 #-------------------------------------------...
51b405827549468e57085d2b0e86a3913225f5771e44263c6546a471993728f2
R
8,485
284
#' Save a plot to a file #' #' Adapted from [ggplot2::ggsave()]. A general-purpose plot-saving function that #' works with any R plotting system. Accepts `ggplot` objects, `grid` objects, #' or any plotting call wrapped in a function. Unlike [ggplot2::ggsave()], which #' only supports `ggplot` and `grid` objects, `save...