sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
cc3bc588a1267c720bfa2bc8eee349c2ebf7067cf44fec079f9e7072e2952c2d
R
3,955
138
# code Figure 2 # Optional generic preliminaries: graphics.off() # This closes all of R's graphics windows. rm(list=ls()) # Careful! This clears all of R's memory! #------------------------------------------------------------------------------- # Load rjags library and the wiener module library(plyr) library(dplyr...
4edbb2c56ba83390079b4ac96cfaf4c6b6e734ecc249a14e9db6ec2cdd0b7892
R
3,961
104
--- title: "SupplFigure_AS24h" author: "Fabienne Rössler" date: '2023-06-08' 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(s...
84a0ac716bcea48c7b4a8aef0ac11a480b0fd658d1e9c040a04a572234bdbcbe
R
3,978
69
#' @title HIPvextract #' #' @description Extracts hippocampal vertex-wise surface-based measures for each subject in the 'HippUnfold' subjects directory, and stores it as a single .RDS file. #' @details The function searches for the hippocampal surface data by listing out files with certain suffixes, extract the data f...
2875da1e6563d8de686fc474841da0b42040643a103f618f7ad2dbcc0ea24eaf
R
3,986
116
#----- install and load packages -----# # Execute just once ## Install bioconductor packages #source("http://bioconductor.org/biocLite.R") #biocLite("annotate") #biocLite("AnnotationDbi") #biocLite("GO.db") #biocLite("org.Hs.eg.db") # ## Install R packages #install.packages('readr') #install.packages('tmod') #install....
c5ccb3dfbdbc6452de235eeeb40ccd835fb78c41773d7278a4d631f925ad19ea
R
4,007
112
##------------------------------------------- ## Pull DNA methylation data from Synapse ## and prepare for analysis ##------------------------------------------- library(data.table) library(GEOquery) library(synapser) library(magrittr) library(readxl) # login to synapse synapser::synLogin() ##----------------------...
b175b79a170fea8e5123de4b0e4f1dd81ced859bd6f7823811d63ffb25e5524b
R
4,011
89
#Set the variables path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/data/mri/conn_matrix/rs" beh_path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/data/" save_path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/results/...
e93543f447fe5d8a022a7b55daee105390b1a45a3e2cc52fbf9eaf870f1aabcc
R
4,011
142
#' @title Find an evenly spaced grid for x #' @description #' `makeraster()` fits the data to the specified raster. #' #' `fitraster()` tries different raster parameter and returns the raster that covers most of the #' `x` values: The differences between the values of `x` are calculated (possible step #' sizes). For ea...
c8b5850b5185e4d02eefcf49181fc0ed032b016b021b01e9823ff2b42abd7e91
R
4,014
115
#Plot violin plots instead of featureplots? #Markers from Hodge et al Middle temporal gyrus #Lake et al #Bakken et al # Load libraries library(SingleCellExperiment) library(Seurat) library(Matrix) library(scales) library(tidyverse) library(RCurl) library(cowplot) clusters_seurat_integrated <- readRDS("directory/clu...
3b3bb75b95251e672a347c227153a564d28c3684bd850e7ce54b1b691547d86c
R
4,015
119
# Load necessary libraries library(ggplot2) library(clusterProfiler) library(org.Mm.eg.db) # Mouse gene annotation library(enrichplot) library(DOSE) file_path <- "E:/seq/Neuron/Neuron seq lipao.csv" # Load the data rna_data <- read.csv(file_path) # Filter DEGs based on p-value threshold (p < 0.05) deg ...
421179207184d4936ff6572d0efc47c58108103ffc95799858f37f1db9c4ce76
R
4,017
84
#----Figure_S06_E--------------------------------------------------------------- #------------------------------------------------------------------------------- # This is the code for Figure S06 Panel E for the connectivity analysis for # Reinhard and Fukuda et al. 2024 #------------------------------------------...
7141c6b0b5999742c1754ebc55868277782265ce0e628cb7bcfea2a2d753cdac
R
4,017
116
--- title: "Graphical abstract" 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 --- # Dependencies ```{r, message=FALSE} library(g...
1e261a0b4bf978f8dc6a3cb359e0c7ba4b63dbb23b15f3d76cc242bb4513863d
R
4,023
139
--- title: "MBTY_Clustering" 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(i...
f51d7def42cd06b85711d096504caf72935efcf9f5d9f8dbf87eafbd1f428097
R
4,024
128
--- title: "ClusteringAnalysis_IFS_25Clusters" author: "Fabienne Rössler" date: '2022-12-20' output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load all libraries: ```{r, message=FALSE, warning = FALSE} source("DLCAnalyzer_Functions_v4.R") source("Unsupervised...
d3df6639755e20c15e2e539247be099439c92edf6833ca2e18bb8a9662bea7cb
R
4,025
88
#' Merge List of SE objects #' #' Merges a list of SE objects provided/ Combines assay, rowData, and colData data frames. Each #' SE object must satisfy the following requirements: #' \itemize{ #' \item{the name of the colData column containing sample identifiers must be the same across all SE objects} #' \item{t...
b7c7e6ff69f5748f21116a383f5c95ba935450a068cf022e3a210b2896788754
R
4,031
109
#' mochims__plot_additive_trait_3state #' #' Plot folding additive trait. #' #' @param mochi_outpath path to MoCHI thermo model fit results (required) #' @param input_dt data.table with model free energy estimates (required) #' @param RT constant (default:0.001987*(273+24)) #' @param trait_names additive trait name (d...
8b58f815ff3a718e9b7fe24cd58172c72b299a7995cb1e9e1c9b34b2e3bf8635
R
4,033
88
#Set the variables path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/data/mri/conn_matrix/rs" beh_path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/data/" save_path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/results/...
678e1d5f312f8a19b8db57fb2a1dbbb93f689991d1fa56d3b29a7a586b039a84
R
4,034
179
library(data.table) library(Matrix) library(ggplot2) library(tidyr) library(tibble) library(dplyr) source("../utils/0-indices.R") # Will be the dataset "wang" or "pbmc" dataset <- commandArgs(trailingOnly = TRUE)[1] qubic_path <- "~/QUBIC2/qubic" tmp_path <- file.path("tmp", sprintf("%s-qubic2", dataset)) if (!dir.e...
725515dd9cc2adc61ade3ed490dfaaca584b031f4742a8e13110b08f454a935f
R
4,041
98
--- title: "VAME_Analysis_25Clusters" author: "Lukas von Ziegler" date: '2024-02-29' 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 li...
4e9448b179c20438a2ffda7cf5ce18a08292c48d207d4760629bff2ce51dac1a
R
4,043
158
do not do that - but is in metadata # Host_latin_facet_df <- # get_ctg_data_geom_facet(explor_plot3d$data, "ctg_Host_latin", "Host_latin", "Host_latin_string") # HERE ADDED for simple label panel - we do not do that # labels_df <- # explor_plot3d$data %>% # dplyr::filter(isTip) %>% # dplyr::select(label) %>%...
af28b477d4ff7f7c37d7ef5af5390b66eefabfa9feabb5cd5012995be7a6d4e7
R
4,044
121
--- title: "Optic Nerve DEGlist creation" author: "Jonathan Nelson and Katie Emberley" 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: pygments -...
7c43744ffa3bc1a1cb9756a7a4dfac6931309a431b639711da4a9220b095b0d0
R
4,046
90
#Set the variables path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/data/mri/conn_matrix/rs" beh_path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/data/" save_path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/results/...
96422c95626f4565b845d1db6dcec8800bf25e4eb5c8a449e8bade3569bc2cca
R
4,051
170
--- title: "Markos et al data integration" 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 = TR...
2c84f6bc24bfe39fa21d5d78d833bd853569eef0a61993dab0d50f5733e8d531
R
4,053
118
###Script 2 #Normalize and Integrate Libraries require(Seurat) require(sctransform) require(patchwork) require(dplyr) timestamp() parallel::mclapply #load data neuM02 <- readRDS("datasets/neuM02.rds") neuM03 <- readRDS("datasets/neuM03.rds") neuM04 <- readRDS("datasets/neuM04.rds") neuM05 <- readR...
aa32faee98e501ab7c19162bc681106b73318f8f3da8f7471dc43f098d278917
R
4,066
130
simThomas3d<-function(id, k, mu, s1, rg) { # simulate 3d Thomas process gen0<-rpoispp3(k, domain = box3(c(rg[[1]],rg[[2]]),c(rg[[3]],rg[[4]]),c(rg[[5]],rg[[6]])), nsim = 1) while(dim(gen0$data)[1]==0){ gen0<-rpoispp3(k, domain = box3(c(rg[[1]],rg[[2]]),c(rg[[3]],rg[[4]]),c(rg[[5]],rg[[6]])), ns...
2d51e88012005eca997f85e6ce93c22c8c7176ff07f686e3ba8247ac4b270d3f
R
4,069
119
# Function ------------------------------------------------------------------- .all.equal <- function(target, current, ..., check.attributes = FALSE, check.names = FALSE, check.column.order = FALSE, check.label = FALSE, tolerance = hy.getOption("tole...
47d20a2343663410c6bfdfbac8963d289e96c6328de7e0a1c63ae6b1927e31fb
R
4,071
72
source('./scripts/01_Setup.R') all2= readRDS("./data/processed/rds/SignificantCells.rds") picocells_passing_mad_conf= all2$id Pico_76 <- readRDS("./data/processed/rds/Pico_76_250kb_lift_SegFixed_cnv_stat_genome.rds") Pico_76x= Pico_76[Pico_76$id%in%picocells_passing_mad_conf,] Pico_76x= Pico_76x[!Pico_76x$chr%in%c('ch...
96bff21da0eec800d497ead0fadcdbcbe5a03e543bd72ccd9503ab7bb2a89dcc
R
4,071
142
--- title: "Clustering Yohimbine Data from Roche" author: "Fabienne Rössler" date: '2023-05-31' 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...
7beff5d159e1fb42d8728bed7110a4f9dae127155f4719b4bd536833a999e0f3
R
4,073
67
#----Figure_S11_S12------------------------------------------------------------- #------------------------------------------------------------------------------- # This is the code for Figure S11/ S12 for the connectivity analysis for # Reinhard and Fukuda et al. 2024 #---------------------------------------------...
4e6879af8584e52acd5ff374dcc8ce59e983a2bb3d9bc0c2f9e0171a40fcde8f
R
4,080
62
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...
99e96792afd75864f3f33c52e6ae433dd24261e956aef270ba3c31c6831f11f6
R
4,094
99
# SPACING ###################### ############################################### neurod2_peaks<-readRDS("~/neurod2/neurod2_peaks.Rds") neurog2_peaks_motifs<-readRDS("~/neurog2/chipseq/neurog2_peaks_motifs.Rds") library(dplyr) # Compute which are the proportions of spacing between all E-boxes. proportion_spacing<-fun...
e4926caa70d08daab3f0ed782fb732849ebfb14a0f1fb661273890ca768c0a79
R
4,100
78
# --------------------------------------------------------------------------------- # # # # Hippocampal volumes in UK Biobank are associated with APOE only in older adults # # ...
531301a83c6dbbfb7dae04194ecb579193198bb00fadd9c0a735d5c01a983919
R
4,104
158
--- title: "scCoAnnotate - Benchmarking" output: html_document: df_print: paged theme: flatly toc: yes toc_float: yes toc_depth: 1 code_folding: hide params: tools: '' min_agree: '' ref_name: '' pred_path: '' fold: '' accuracy_metric: '' ontology_path: '' onto...
9e513851398b23fb1443e71fb86220d9863e272ab8a6c1d457d4750945f87a89
R
4,110
104
#' @title fs_stats() #' #' @description Extracts descriptive statistics, for the whole-brain and subcortical region-of-interests (ROI), within a FreeSurfer subjects directory. It reads them from the aseg.stats file, as generated by the default FreeSurfer preprocessing pipeline. #' #' @param sdirpath A string object ind...
1ec966467fafb1047a9761923e11f4a2f8ce28ec5c8f92efd580d52a85d81f10
R
4,115
114
library(psych) library(tidyverse) # load baseline <- read.csv('/home/mgell/Work/reliability/text_files/abcd/baseline.csv') followup <- read.csv('/home/mgell/Work/reliability/text_files/abcd/followup.csv') #summary(baseline) #summary(followup) # remove vars with too many nans behs <- c("src_subject_id","eventname", ...
3a351e5931cec7e73af9c0fa4cea689a98259b5f7585fb63fed621cb0618cf1e
R
4,124
110
##' An improved version for RRHO, which aims to correct the intepretation for top left region (up in x and down in y) and bottom right region (down in x and up in y). ##' ##' We improved the algorithm such that all four regions of RRHO plot are meaningful. ##' @title RRHO2 ##' @param RRHO_obj RRHO object. See RRHO2_ini...
2f941219cdc0362485aba5edf4cee1eb29dd15d1a0fda54888b4238508304a36
R
4,140
122
## ----------------------------------------------------------------------------- ## ## Somatic variant detection in lesional focal epilepsy ## This script plots the meta-analysis cohort size and phenotypes ## ## Author: Dr. Christian Bosselmann ## ## Date Created: 2023-09-05 ## ## Copyright (c) Christian Bosselmann, 20...
4ee6a2267553a6075d918fb476db651ad90f7b94f1295ae1b94c6eb73b5566a7
R
4,141
139
# Generate a g-factor from the behavioral data # Code adopted from Dubois et al. 2018: http://dx.doi.org/10.1098/rstb.2017.0284 # Original code for bi-factor analysis: https://github.com/adolphslab/HCP_MRI-behavior # Generate a fluid intelligence factor (latent score) # Generate a crystallized intelligence factor...
b6fe8120bd7b5c2c6bf25052bfb61619d50b7866e402ebe8b9defd9ee3998365
R
4,145
161
# Set generic ---------------------------------------------------------------- #' Functions `colSums()`, `colMeans()`, `rowSums()`, and `rowMeans()` for #' `hyperSpec` objects #' #' `hyperSpec` objects can use the base functions [base::colMeans()], #' [base::colSums()], [base::rowMeans()] and [base::rowSums()]. #' #' ...
91adcf397049626afee3f77de72950b9a5bf1dbd1c1886b304b6c2c362e4be08
R
4,160
121
# Modified script for IS-RSA with Movie as a Random Effect library(tidyverse) library(lme4) library(broom.mixed) # Load functions to import data 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) ...
1a4b91efbd6597df968e3bf88dd7d89b7cfe7ff2b0ce72ded47deef8ba7ab87c
R
4,167
72
#----Figure_S13----------------------------------------------------------------- #------------------------------------------------------------------------------- # This is the code for Figure S13 for the connectivity analysis for # Reinhard and Fukuda et al. 2024 #--------------------------------------------------...
a223b1b6f967fc2e4f250c415c8c5a36e961ac485f10b28e418612c0f9ce4e80
R
4,171
118
--- title: "T-Test" output: pdf_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## R Markdown <!-- https://www.statisticssolutions.com/manova-analysis-paired-sample-t-test/ --> <!-- We are interested be check the consistency of a DNN model before and after data transformation, and ana...
dc066dfee4799953dace8facf7f591c327e24ea45510f48d179778af57f0e08e
R
4,175
114
--- title: "SupplFigure_AS24h" author: "Fabienne Rössler" date: '2023-06-08' 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(im...
9c288fb661202ff122e1d17ae5d03e3ec0403a4df6bc8f6ca40dccc330048748
R
4,220
95
######################################################################### # # Gene expression across different MDD groups # The expression of Schaefer 400 was obtained from python package abagen # # # Liang Qunjun 2023-12-14 library(tidyverse) library(ggeasy) library(pls) # load the CCA loading map path_load <- "inpu...
4d2ce55928d28bd7777a53a3d7dbdb96f1a4bc1dc1eab59565cb48f87efd306b
R
4,221
101
library(readxl) library(ggseg) library(ggsegSchaefer) library(tidyverse) library(ggplot2) library(wesanderson) library(dplyr) setwd('/example/working/directory/') # Labels data to load # First column is an index not used # Second column should contain the region name matching what ggseg expects for the atlas # Third ...
e450db78e1c4495778de618f3a3037d482f1ee5b4ec1d3bc4fc23cc4140cc6d7
R
4,236
77
--- title: "Interpolation of covariance matrices" author: "Corson N. Areshenkoff" date: "`r Sys.Date()`" output: rmarkdown::html_vignette resource_files: - images/interp_determinant.png - images/interp_example.png vignette: > %\VignetteIndexEntry{Interpolation of covariance matrices} %\VignetteEngine{knitr::rma...
afef5492d283548c95ba2f38262d0258f32a52422c6289d990ba08e1d53ddc39
R
4,248
88
library(stringr) library(ggplot2) library(data.table) library(readxl) #Fig5a, nearest TSS GO analysis dat.plot<-data.frame(read_excel("plot_table_fig5.xlsx", sheet=1), stringsAsFactors = F) #,header=TRUE) dat.plot<-dat.plot[order(dat.plot$pvalue),] dat.plot$Description<-factor(dat.plot$Description,levels=rev(unique(da...
6651717ac42a5f7825004c2ead336304e63c624d429bdfc7575806fba095001e
R
4,255
117
## ----------------------------------------------------------------------------- ## ## 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 #...
a1294489540e2ddfb8bdb9bafdfc7ba5c8ebb70f616f64e0475d835809d8161d
R
4,262
116
--- title: "panel_axon_AP_hyperpol" author: "Franz Xaver Mittermaier" date: "2024-04-05" output: html_document --- This script was added for the revision (Nat. commun. 2024) This script plots the panels for the axonal AP shape changes in response to the 'hyperpol' subthreshold modulation paradigm. In brief, I ...
e27134d7a25cb82735e433fb9d3e9031a3572d66336eae23cb81f943e821a658
R
4,269
103
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 stadia_EM_SP <- function(x, position, batch_vec, adj_mat_mnn, hyper, init, platform, d = 15L, K = 7L, adj_cutoff = 50., icm_maxiter = 10L, em_maxiter = 5L, verbose = TRUE, verbose_icm = FALSE, ...
59f09a774c1607b32b2ead7e10834ddd27a612613581ee02f0db00f78cdd6469
R
4,274
131
tokenUI <- function(id) { ns <- NS(id) column(width = 6, box(width = NULL, title = "Reproducibility token", textAreaInput(ns("repToken"), "Token", placeholder = "Your token will appear here."), actionButton(ns("createToken"), "Create token") # bsModalNoClose(id = ns("tokenModal")...
803b85a1c29283351d37888055e2053dd1c8c67729d8485c10b8f6bb6017a700
R
4,277
169
# Function ------------------------------------------------------------------- #' @importFrom utils modifyList .labels <- function(object, which = bquote(), drop = TRUE, ..., use.colnames = TRUE) { validObject(object) if (!missing(which) & !is.character(which)) { warning( "labels are not guaranteed to ...
bf4026f7a289fe29223b4eb169455334cdbb596225e5ffa090299b5860bbeb99
R
4,279
90
#' generate_type4_data #' #' This function generates data and plots for selected clusters. #' #' @param meta_data_file Path to the metadata file. #' @param gene_count_file Path to the gene count file. #' @param selected_clusters A named vector specifying the clusters to include. #' @param Prefix Prefix for the output C...
6331a707857c313f4b58166e4f9b5effeb513c2858c9c6d5e01e4977dac6cb3a
R
4,280
168
#' Merge additional extra data into an object #' #' Columns from `y` that are not in `x` are merged into `x`. Columns in `x` and #' `y` are considered equal if they have the same name, the same content, and #' the same label. #' #' Columns with different content than a column in `x` with the same name will #' get `".y"...
05484003ffdb03fb29d00e0bb7d1ee1ccbbe557453ae19c79808d4d2a35f8948
R
4,283
100
library(lmerTest) library(coefplot) library(MuMIn) library(qtl2) library(sjPlot) library(magrittr) library(emmeans) library(interactions) ################################################################################ # Description of the data # `df_log` contains the behavioral data including the raw facs composite ...
ba9d3d4fe2ccc174bda6baf653de860ba0d96f595801123f58ac7aea8ead62a5
R
4,289
102
# 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/ require(causalBatch) require(ggplot2) require(tidyverse) require(parallel) source("../helpers/test_statisti...
f1e83c5c2b83b24498dcbb453761d1f9d1efce34b30c20af569ecbca36727df1
R
4,294
144
--- title: "CRS1_LDB_Clustering" author: "Lukas von Ziegler" date: '2024-01-26' 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 libra...
4ecbfbb6798d2f113cbde360657009ec8fe586cf694291ae144814ab812972a6
R
4,295
145
#' Interactively select a polygon (grid graphics) and highlight points #' #' Click the points that should be connected as polygon. Input ends with right click (see #' [grid::grid.locator()]). Polygon will be drawn closed. #' #' `map.sel.poly` is a convenience wrapper for [plotmap()], `sel.poly`, #' and [sp::point.in.po...
ac467aca2d7212e5e00debb3ee7d456eaca17ceb47e358e74e575ebb0547dcc5
R
4,296
167
library(abind) library(glmnet) library(caret) library(waveslim) library(dplyr) # Parse command-line arguments manually args <- commandArgs(trailingOnly = TRUE) # Initialize default values for arguments train_observations <- 80 test_observations <- 10 align <- FALSE # Default to false (no alignment) # Loop through a...
553f814234c1a9874abccb8345b1e0218e0d94a1ab3b9569a8a06985df6aba0d
R
4,301
110
# RNA-seq reanalysis for Dr. Witt lab # The input will be raw-count matrix # The KO_3 sampels are hetero, will be removed for DE analysis # The DESeq2 will be used for DE analysis, if you prefer Limma/ edgeR, I can re-run later setwd("C:/Users/13831/OneDrive - LSU Health Shreveport/analysis for other labs/Siyuan an...
9b48bbbb13c12951117b12f08937bb6a256f279e07c5b5326fb4878b991e0be5
R
4,301
108
args <- commandArgs(trailingOnly = T) filenamex= as.character(args[[1]]) standardize_name <- function(name) { return(gsub('[^0-9a-zA-Z]+', '_', name))} selectedCells = read.table(file.path('./data/processed/', filenamex, 'analysis'), header=TRUE) delimiters = ".bowtie|.bt2" samp <- readRDS("./data/processed/rds/Samp...
583d402df205190740f6e2d1c2569b542d17ef93e446cd483d5e78257e51de41
R
4,303
126
#BiocManager::install("rhdf5") setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) library(rhdf5) library(Matrix) library(tibble) female_5_6 <- h5read("../raw_data_full/blum/GSM4911292_female5_6_25.h5", "matrix") female_5_7 <- h5read("../raw_data_full/blum/GSM4911294_female5_7_30.h5", "matrix") male_...
2fdff2e5a3a409af71164c87d4e2f333c5494fcf59f47df7d8b8a8ccb41ba5f1
R
4,308
152
#' @title Rubberband baseline correction #' #' @description #' Baseline with support points determined from a convex hull of the spectrum. #' #' Use `debuglevel >= 1` to obtain debug plots, either directly via function #' argument or by setting hyperSpec's `debuglevel` option. #' @param spc `hyperSpec` object #' @param...
272880927329342c9d1fe38891519868ac440ff0ccc1c67458c09d1aaa5edcb5
R
4,313
146
#========================================================================================# # Author: James M Roe, Ph.D. # Contributors: Didac Vidal-Piñeiro, Ph.D. # Center for Lifespan Changes in Brain and Cognition, University of Oslo # # Purpose: Cross validation grid search for ML # Script requires individu...
6f9342e80078ab1a48c946da3a36155ae7f3aec695143a7e25708d97d6cf21bb
R
4,315
89
# Load and install missing packages --------------------------------------- packages <- c("devtools", "Seurat") package.check <- lapply( packages, FUN = function(x) { if (!require(x, character.only = TRUE)) { install.packages(x, dependencies = TRUE) library(x, character.only = TR...
2a1ee499f57802cfa1c4dac7b6a67b46dccca1b7afb06aa37695a1183ed5b607
R
4,316
96
library("lmerTest") library("multcomp") library("emmeans") library("readxl") options(max.print=1000000) X2P_TBI_data<- read_excel("GitHub/Bibineyshvili_2019/2P_TBI_data.xlsx", col_types = c("numeric", "numeric", "numeric", "...
8824f12568a50c005f9981db03943fdde806b45a54faf81587711a41ae4ba8a4
R
4,316
99
library(stats) library(data.table) library(readr) library("scatterplot3d") library(robust) # receive cmd arguments Args <- commandArgs(T) wd <- Args[1] dd <- Args[2] para <- Args[3] # # parameters for test only # wd <- "/Users/siyuansmac/bioinfo/project/suzukii_WGS/genetic_diff/PCA/plot" # dd <- "/Users/siyuansmac/bi...
516e8ceec00426b88f4286ca8d34dd20f684adf4c1a4c946effe3559ab0ff7a1
R
4,320
121
#' @details #' Nicolet uses some more keywords in their header file. #' They are interpreted as follows: #' \tabular{ll}{ #' description \tab giving the position of the first spectrum \cr #' z plot titles \tab wavelength and intensity axis units, comma separated \cr #' pixel size \tab interpreted as x and y step s...
c980c892c6772db10a8b72e402601eede672a9ee63905d3cfed2eb83a44b9da5
R
4,321
137
#' Produce weighted bar plot of risk of bias assessment #' #' @description #' Produce weighted bar plot of risk of bias assessment #' #' @param height An object of class \code{rob}. #' @param overall A logical indicating whether to include a bar for #' overall risk of bias in the figure. #' @param weighted A logica...
c9b4c4a751370260302d6915f117b35240c243074e0ab97a3e8158bca7dfd68e
R
4,326
115
#seurat analysis library(Seurat) library(tidyverse) library(Matrix) setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) counts <- readMM(file = "../raw_data_full/seurat_analysis_data/master_matrix.txt") genes <- read.csv("../raw_data_full/seurat_analysis_data/master_genes.csv") metadata <- read.csv...
3cb19f033909610e6211396d101afe8829bffd95341e80c6993530d79477343b
R
4,332
95
run_RCTD <- function(st_counts_path, sc_counts_path, sc_labels_path, output_dir = ".", doublet_mode = "full", max_cores = 10){ library(spacexr) library(Matrix) library(peakRAM) if (!dir.exists(output_dir)){ dir.create(output_dir, recursive = TRUE) } sc_counts <- read.csv(sc_counts_pat...
6fbbcc0c0d541ea04f904c3cc19db8e9638ca23d2ca75c91fdde89b73143508b
R
4,335
129
--- title: "Example analyses with VertexWiseR - Example 1" author: "Charly Billaud, Junhong Yu" date: "2025-07-16" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Example analyses with VertexWiseR - Example 1} %\VignetteEngine{rmarkdown::render} %\VignetteEncoding{UTF-8} bibliography: references...
49568ba9360155dd858ad3d1c0f69bb0a0c4121dd8105f6567b93b3b3dcf5919
R
4,336
97
library(tidyr) library(magrittr) library(dplyr) library(readr) library(ggplot2) library(reshape2) #----- USER INPUT -----# ## specify the working directory ('wd') wd="/Users/jshinb/Downloads/CellTypeThickness-master" ## specify an output directory ('od') in the working directory: default name: 'output' od <- 'output'...
4acb60fed41d8d0749399ff1914245cf66820469147d949e87dde84fc616017e
R
4,362
95
#' Center a collection of covariance matrices #' #' Center a dataset of covariance matrices by parallel transport #' #' @param d A dataframe. See details. #' @param covmats An optional list of covariance matrices. #' @param group_by Variable in d to group by. #' @param from_constraints Logical expression indicating sub...
2d87e91eb036d5dc1220c874561fb7fb9a1b9b4688d8c8d0a6a9234173153e2c
R
4,363
152
#### Markos et al 2024 #### Script used for analysis of 10X matrices #### Zebrafish markers on Amphioxus data # load prerequisities library(Seurat) library(patchwork) library(ggplot2) # load output of AmphiG4stage.R AmphiG4stage<-readRDS("../timepoints_rds/Amp_G4.RDS") # load output of AmphiN0stage.R AmphiN0stage<-...
83ee5328ae2acfb8c6986647f973afe0a964b5ec592d3cc21f8bec28f65d9a2e
R
4,372
162
# Generate spectroscopic data for testing and exploration -------------------- #' @name generate_test_data #' #' @title Generate spectroscopic data #' #' @description #' These functions generate hyper-spectral datasets that are mainly used for #' exploring and testing functionality of \pkg{hyperSpec}. #' #' - `genera...
b2860c8e59c3aaa5fd6a249003f1e824b256097477fa50a8b9dc46b9b5d5bf35
R
4,380
118
library(tidyverse) # Load data d = read.csv('/home/mgell/Work/reliability/res/ABCD_reliability_accuracy.csv') # Plot Reliability and accuracy plt = ggplot(data = d, aes(x = beh, y = reliability_r)) + geom_bar(stat = "identity", width = .75) + theme_classic() + theme(axis.text.x = element_text(angle = 90), ...
1ed27aa0955494de0c2bfae778f00dafcc36295793303eb8b2fd6f5224797320
R
4,399
132
# Single cell RNA-Seq of Tlx3 WT vs KO samples # Budhaditya Basu library(Seurat) library(tidyverse) # Create control seurat object control.data <- Read10X("JJ_2_count/filtered_feature_bc_matrix/") control <- CreateSeuratObject(counts = control.data, project = "Control", ...
55c580dfe1ff4f3f73cef4d28a62765c01cc10385d45692b2e40eae5aa9a5acc
R
4,400
161
#author Justin Savage #js664@duke.edu #Version 1.0 #8/16/21 #This script is for combining the data from the coloc_results file output of the # Syn_Bot ImageJ Macro. You should be able to simply select the entire script (Ctrl/Cmnd + A) # and click the Run button in the top right corner. You will then select the same f...
c9c3cda7b6cf40d28b563b17c85ed200a30825e379ed623cff07ecd572eb59be
R
4,402
161
# Set generic ---------------------------------------------------------------- # make generic functions without default #' @noRd setGeneric("mean_sd", function(x, na.rm = TRUE, ...) standardGeneric("mean_sd")) #' @noRd setGeneric("mean_pm_sd", function(x, na.rm = TRUE, ...) standardGeneric("mean_pm_sd")) # Function...
5cccc2763be3086b6b5291b7f343c9375ae9c87e902db6b0433938f7cd2cd250
R
4,412
125
library(tidyverse) #net_cols <- c("#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7") # original order net_cols <- c("#0072B2", "#009E73", "#D55E00", "#56B4E9", "#E69F00", "#F0E442", "#CC79A7") # reordering for 3 colours only plt_in = '/home/mgell/Work/reliability/input/' plt_out = '/hom...
ddd32ba9fbeb47fd49c3c3e39874faf085a54554a01ed4447b21dc098ae53082
R
4,414
191
library(tibble) library(dplyr) library(ggplot2) library(purrr) library(tidyr) 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.txt", dataset)...
f47abfc518679f91db5157f6ad7e300b050e24e561ed60ef667daf20a09deab6
R
4,440
79
#----Figure_04D_S14------------------------------------------------------------- #------------------------------------------------------------------------------- # This is the code for Figure 04 Panel D and S14 for the connectivity analysis # for Reinhard and Fukuda et al. 2024 #-----------------------------------...
ec0b2abbee965b291d4f4a36bb37a20bca2a45e030203f2e470e26b093b48c8c
R
4,445
87
# Description: Extract highly variable genes of drosophila (DR) scRNA-seq data. # Author: Jiaqi Zhang <jiaqi_zhang2@brown.edu> # Reference: # https://www.science.org/doi/10.1126/science.abn5800 # https://shendure-web.gs.washington.edu/content/members/DEAP_website/public/ library(Seurat) library(stringr) subsampleC...
05710122c89afba67a05e31632832fcc0d26bd67b37cc040250127e44f200d5c
R
4,463
142
#### Notes #### #### Libraries #### library(GOstats) #### Sourced functions #### #### Functions #### # Retrieve low, mid, and high variability genes retrieve_variability_gene_lists <- function(jack.summary, ev.percentile=0.20, col="Mean_Local_Rank_Log2CV") { bgd.genes <- jack.summary$GeneID lv.genes <- jack.sum...
23dbc43e5c1b67e78d2b560c7fea7f12be9ade3f7f68263d7f411008a5d712a1
R
4,483
160
# load libraries and arguments library(rBayesianOptimization) library(tidyverse) set.seed(1234) 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(dirname(script.name)), "/Fu...
0fda80035d388f2d6e0b9eb7604a045e592cb0f5100e054b648a94fd62cb1d9a
R
4,485
201
--- title: "Markos et al Pseudotime and Transitions" 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( ...
a5cd7bb210be322497108f31cbdf167a505b34967e6564efbb44da06c4759e2a
R
4,491
123
test_that("funnel back transforms supported proportion transformations", { dat <- data.frame(event = c(2, 5, 8, 12, 18), n = c(30, 40, 35, 50, 45)) pdf(tempfile()) on.exit(if (dev.cur() > 1) dev.off()) for (sm in c("PLOGIT", "PLN", "PAS", "PFT")) { m <- metaprop(event, n, data = dat, ...
4231e28d64266560e2d96599c84a9fe64f0713eff33b2c86fcdebea8f3fe1bb2
R
4,493
156
#' Highlights and test the time-course of effects through mixed-effects models #' #' This function performs (g)lmer for each timepoint. #' Data are first separated for each time-point, and a LMEM as specified by the 'formula' #' parameter, which is passed to 'lmerTest::lmer', is performed. #' The function returns t/z v...
a39b23cc71118b01aa9f2e7c9e938873b526fa0e8801da4cbedb1edc974a807c
R
4,493
88
## RMANOVA or RMANCOVA script (one-way or two-way) with pairwise comparisons that are corrected for multiple comparisons library(stats) library(psych) library(rstudioapi) library(readxl) rm(list=ls()) #Print warnings as they come up for troubleshooting purposes options(warn=1) # Import Data in long format data <- ...
47bf994f86d0e111c2f3ddd49cb2ccb3f8faf35cb49b358f59ffaec6f0d79fc7
R
4,494
128
# Script for converting nomenclature to TaxonomyNodes file, for use by EBI ontology and AIBS engineering teams suppressPackageStartupMessages({ library(dplyr) }) setwd("~/MOp_taxonomies_ontology-main/mouseM1_CCN202002013") # Function to concert nomenclature table to taxonomy nodes CSV nomtable_to_taxonomy_nodes <-...
57979ba25ae11f6e531d02afd5dbac09a398da325f1dad9e9fa4b315c38ffd19
R
4,505
160
########################################################## # Program to produce the combined ADNI and NACC dataset ########################################################## library(tidyverse) library(dplyr) library(broom) library(MASS) library(gtsummary) library(ggplot2) setwd("/Users/elinorvelasquez/Desktop/adni_na...
e7d8ed51fb5e1b27396fbc96509c796cf501e673929e87b666acdd211b6469f2
R
4,510
133
test_that("metagen Fleiss1993bin example matches rma.uni", { data(Fleiss1993bin) ma_bin <- metabin(d.asp, n.asp, d.plac, n.plac, study, data = Fleiss1993bin, sm = "RR", method = "I") ma <- metagen(TE, seTE, studlab, n.e = n.e + n.c, data = ma_bin, sm = "RR") rma_c <- me...
44ab49c317a3608e86cf8b93fb60057bf4e3d6259da0c596584c08ee44427d79
R
4,532
121
--- title: "AIPW Conditional ComBat" author: "Eric W. Bridgeford" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{cb.correct.aipw_ccombat} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TR...
c377655c2e6faceaeb3d97b361f3dfcbadace5dd606944630ed6a39ad25eeef7
R
4,534
129
library(geodl) setwd("Your Working Directory") # Make terrain derivatives ------------------------------------------------ inDTM <- terra::rast("data/elev/dtm.tif") terrOut <- makeTerrainDerivatives(dtm=inDTM, res=2, filename="data/elev/tstac...
4f746ee3a0f21d74496c2fa4c9fbbcc9809ab799efa2d4a1e7c0698be515a914
R
4,535
125
## ----------------------------------------------------------------------------- ## ## Somatic variant detection in lesional focal epilepsy ## This short script calculates the proportion of cases explained by each gene ## ## Author: Dr. Christian Bosselmann ## ## Date Created: 2023-09-05 ## ## Copyright (c) Christian B...
5032efed3a178ebcd3fd0a1397b91693174297da77935c3816002b5650c07327
R
4,535
83
# CENTRAL DINUCLEOTIDE ###################### ############################################## ###### NEUROD2 # Detect motifs in NEUROD2 peaks neurod2_peaks<-read.table("e14.5.neurod2_highconfsubpeaks_summit.bed") colnames(neurod2_peaks)<-c("chr","start","end","summit","peak_id") neurod2_peaks<-find_motifs(neurod2_peaks...
c09e2dbe0bcea599501fa17a84e0df9111370b4976b6f38dbde253cc855fd74e
R
4,535
121
library(forestplot) #list.files(path = "/home/kau232/locuszoom_test/lincoln/Forest_plot/") cil = function(beta, se) { cil = exp(beta - 1.96 * se) } ciu = function(beta, se) { ciu = exp(beta + 1.96 * se) } # NACC # apoe33 -0.163 0.056 # apoe34 -0.248 0.055 # apoe44 -0.190112 0.103950 # apoe24 -0.56 0.246 # ap...
8d2f31e58d2469f97dbb4a5647da7146d614ce6aa67a9ceccd396bd0a4619136
R
4,538
114
# This is an example of how to load and display the functional (fMRI) and # structural (sMRI) ICA maps, provided for the 2014 MLSP Competition, using # R 3.1.0. # # It also includes an example of how to compute the correlation between the # fMRI and sMRI maps, like was done in reference [2] below. # # This script requi...
3f6cc091b4b46e8aed0f0d8f66816af4db5e786c28a6ac71e49d07988c33ab55
R
4,539
132
##################### ldsc for ABC promoter ## peak width= 1000 ## 5' ## non 5' Dist <- c('1k','2k')[1] .libPaths(c(.libPaths(),'/sc/arion/projects/roussp01a/jaro/programs/R_libs_4_0_2/')) primarySourceDir="/sc/arion/projects/roussp01a/jaro/atacseq_ad/NYGC_AD_R01/" #primarySourceDir="/sc/arion/projects/roussp01a/li...
530411f21c3242527ba435a153261415cd523e30520ba82f25ee8bf3b0d5404e
R
4,542
177
#' mochims #' #' Main analysis script. #' #' @param startStage Start at a specified analysis stage (default:1) #' @param stopStage Stop at a specified analysis stage (default:5) #' @param base_dir Base directory for all input files (default:NB private CRG server path; change accordingly) #' @param output_dir Output di...