sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
036f0a930d8655b652fb852c0de2f87c9a3a7ea28b15f93376ae4e9e0bcb20a0
R
28,111
368
#' Function to prioritise genes given a list of seed SNPs together with the significance level (e.g. GWAS reported p-values) #' #' \code{oPierSNPs} is supposed to prioritise genes given a list of seed SNPs together with the significance level. To prioritise genes, it first defines and scores seed genes: nearby genes, e...
c839ca9e372b578112090f876d0c4dfc0f500610e703648debd3ef7b02c9f591
R
28,165
659
#Generate the anatomical overview Video1 of the Platynereis 3d connectome paper #Gaspar Jekely 2021-2023 # load nat and all associated packages, incl catmaid source("code/Natverse_functions_and_conn.R") #create temp dir to store video frames mainDir = getwd() dir.create(file.path(mainDir, "videoframes"), showWarning...
2f707731a32375b6ecfb6047a533085428c1a9cb71cde55ca9d584889ac70b20
R
28,213
760
#******************************************************************************* # Filename : tmiic.wrapper.R Creation date: 24 march 2020 # # Description: Data transformation of time series for miic # # Author : Franck SIMON #*******************************************************************...
33832022c4d0b13d2d0d3f4bd86d780e98a840bc16c2c0cec760da9a0bbd19cf
R
28,298
830
context('Test helper functions') VCD_AVAILABLE <- requireNamespace("vcd", quietly = TRUE) .skip_if_vcd_not_available <- function() { if (!VCD_AVAILABLE) { testthat::skip("Optional testing dependency 'vcd' not found.") } } float_tolerance <- 5e-6 # disable some tests for 32-bit environment flag_32bit ...
63fd72419d9ff986ff54fa9473dd52ba3d361b941a5ee22223b9bbca52da2c29
R
28,490
648
--- title: "Single-cell based analysis of Tha astrocyte subpopulations" author: "Arpy" date: '2024-09-24' output: html_document --- ```{r libraries and functions, message=FALSE} library(tidyverse) library(ggplot2) library(dplyr) library(Seurat) library(Matrix) library(viridis) #library(randomForest) #library(ranger) ...
c2bacb994d624453424e4262c46935a7835734d06335a9815d1201862e985a5f
R
28,929
746
--- title: "SV2A_propagation_simulation_example_output" output: html_document --- # load libraries ```{r message=FALSE, warning=FALSE} library(psych) library(reticulate) library(corrplot) library(lm.beta) library(boot) library(plyr) library(tibble) library(lme4) library(lmerTest) library(NbClust) library(zoo) library(g...
6caf89a1fcee0ef7e20f0eeb49007cd8c7757a3d515737eb99af4a95b292e7db
R
29,342
615
#### load packages #### targetPackages <- c('tidyverse','arrow','ggtext','patchwork') newPackages <- targetPackages[!(targetPackages %in% installed.packages()[,"Package"])] if(length(newPackages)) install.packages(newPackages, repos = "http://cran.us.r-project.org") for(package in targetPackages) library(package, chara...
d876caaf3937fbf76e947eb9705e0b2f265dacc79bd097b3e847290ca8e93bbb
R
29,372
616
--- title: "Single-cell Pseudotime Trajectory Astrocyte Preprocessing" author: "Arpy" date: '2024-09-24' output: html_document --- ```{r libraries and functions, message=FALSE} library(tidyverse) library(ggplot2) library(dplyr) library(readr) library(Seurat) library(monocle3) #library(Matrix) library(viridis) source...
6f502a93a34a786b4c2e5a6446dbb7eaa118d6a7042fd8caab6c4b8f52972efb
R
29,439
719
#Generate Video of head neuropils for the Platynereis 3d connectome paper #Gaspar Jekely 2021-2023 rm(list = ls(all.names = TRUE)) #will clear all objects includes hidden objects. gc() #free up memrory and report the memory usage. Sys.setenv('R_MAX_VSIZE'=8000000000) # load nat and all associated packages, incl catma...
417b3d04b5639e3d1233cbbfa467026e604e47cb85add4381e127167589f637e
R
29,482
778
# # This file is for the low level reusable utility functions # that are not supposed to be visible to a user. # # # General helper utilities ---------------------------------------------------- # # SQL-style NVL shortcut. NVL <- function(x, val) { if (is.null(x)) return(val) if (is.vector(x)) { x[is.na(x...
b2a45cba039e3aed304a55f547bddd2532e72da394b526329bfd674be2540276
R
29,529
497
###### This scripts plots the output from the population genetics model for 2 clones. It produces ###### - For each patient the model fit vs data and the posterior probabilities of the parameters ###### - A summary of the 80%HDI estimates across the population ###### ###### ###### ###### ###### ###### ###### ###### ###...
644c6ec6d9d823835364ab37abbe4f3a9fe1004732129665de4a14149be01419
R
29,750
393
library(data.table) library(Biostrings) library(GenomicRanges) library(BSgenome.Hsapiens.UCSC.hg38) library(stringi) run_all <- function(args){ args <- as.list(args) # making the list repeatmasker_bed <-args[1] transcripts <- args[2] features <- args[3] is_umi <- args[4] is_ambiguous <- args[5] for (i in 6:l...
a4d54afc8bf69ff454dccfd8a9fbd967f307bc177e929ba0101fd30f8b767448
R
29,754
142
# R script to download selected samples # Copy code and run on a local machine to initiate download # Check for dependencies and install if missing packages <- c("rhdf5") if (length(setdiff(packages, rownames(installed.packages()))) > 0) { print("Install required packages") source("https://bioconductor.org/bio...
d2030ba6146bb96213e6c8fd898c28b80c8e227801ca6afef8d5b8c8e92ecfd9
R
30,136
1,015
# code to generate Figure 4 (cell types graph) of the Platynereis connectome paper # Gaspar Jekely 2023 # load natverse and other packages, some custom natverse functions and catmaid connectivity info source("code/Natverse_functions_and_conn.R") # network plot - read all skids based on cell type annotations ---------...
5bd00d1598cd0d18406e91b8b6d9226e89c85cbab0d39f11cb712ec3c5be9ddf
R
30,302
533
suppressMessages(library(Seurat)) suppressMessages(library(dplyr)) suppressMessages(library(tidyr)) suppressMessages(library(caTools)) #-------------------------------------------------------------- # Load own modules source('modules/utils.R') source('modules/global_params.R') source('modules/seurat_methods.R') sourc...
ca567158d4a8817fd86a98e30204c57ff31f42fb5008f12b98281938e94d7d46
R
30,383
752
library(JuliaCall) options(JULIA_HOME = "/Users/roman/.julia/juliaup/julia-1.10.2+0.aarch64.apple.darwin14/bin/") #julia_executable <- "/Users/roman/.julia/juliaup/julia-1.10.2+0.aarch64.apple.darwin14/bin/julia" julia_setup(JULIA_HOME = "/Users/roman/.julia/juliaup/julia-1.10.2+0.aarch64.apple.darwin14/bin/") # color...
73cdb075c1216a026d3c16c47bf92ce531df8d1d0daaccfcb4dad2c49f230dd6
R
30,526
746
### ST Functions ### Aunoy Poddar ### Written Monday Dec 12th to summarize separate functions written throughout ### the course of analysis, which were started in May 2022 ### Define the groups that each image is in post_TC_MS = c('TC_15', 'TC_14', 'TC_13', 'TC_12', 'TC_11', 'TC_10', 'TC_9', 'TC_8', '...
8f6de2a63bd7c766f1259c88f846fa98e95046be8b44df55c3711d844384d409
R
30,562
726
source("./Settings.R") ######################### ######################### ######################### ######################### ######################### library(cdata) # define where output is to be stored study.directory <- paste0("./data/Model_fits/Simulated_data/") sample.info <- read.xlsx(paste0(meta.data, "/Sampl...
d99bc1f8d7585cb490af802b93feb8b366b1e7b959d80c4c78506367b2df83c7
R
30,698
585
--- title: "Seurat Microglia Basics Plotting" author: "Arpy" date: '2024-11-12' output: html_document --- Neuron and Astrocyte Cytokine/Chemokine Production Gregory C. 04/2025 ```{r load libraries and source, echo = F} library(tidyverse) library(Seurat) library(Libra) library(patchwork) source("/Users/chingr/OHSU Dr...
ac749580e3010ce18ad86f6f587ee1cf82f06e951a125359a2132de9d3768ffa
R
31,708
589
library(Seurat) library(ggplot2) library(dplyr) #Merge all datasets hyp <- merge(GSE74672_seu, y = c(GSE87544_seu, GSE146692_seu, GSE132355_se, GSE125065_seu, GSE126836_seu, GSE93374_seu, GSE139923_seu, GSE113576_seu, Anderson_seu), add.cell.ids = c("GSE74672", "GSE87544", "GSE146692", "GSE132355", "GSE...
719eacae8ae8b1045bf55e277a548037190485a59b5496e108d19f0ac347c552
R
31,743
531
--- title: "Simulation and parameter estimation of mutation accumulation with SCIFER" author: "Verena Körber" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Simulation and parameter estimation of mutation accumulation with SCIFER} %\VignetteEngine{knitr::rmarkdown} %\Vign...
533961cd9c3577f6268f9bc87d2273b98b6053d69610320722b7224e0aa3012b
R
31,958
829
--- title: "st_physical" output: html_notebook --- Written by Aunoy Poddar July 9th, 2022 # Process the puncta quantified raw data ```{r eval=FALSE} current_file <- rstudioapi::getActiveDocumentContext()$path output_file <- stringr::str_replace(current_file, '.Rmd', '.R') knitr::purl(current_file, output = output_fil...
e7a45e76f6fa7770d07e9c713aa49da5c7f8803e5b6c77fac744b7476c67d65c
R
32,026
644
#' Run impute on the specified inputfile #' #' This function runs impute across the input using the specified region.size. #' @param inputfile Full path to a csv file with columns: Physical.Position, Allele.A, Allele.B, allele.frequency, id ,position, a0, a1 #' @param outputfile.prefix Prefix to the output file. Region...
35cdea6b30e0ded97cb6447553bcbe1c4064ced9790b3368e45f8d205f9d2b56
R
32,148
1,014
# R code to generate the connectome graph images in the 3d Platynereis connectome paper # Gaspar Jekely March 2022 # load natverse and other packages, some custom natverse functions and catmaid connectivity info source("code/Natverse_functions_and_conn.R") # plot graph with coordinates from gephi --------------------...
99ed7e6fb83481ab8c0f286698102a52208bb1b54023e358c15359c0386099fa
R
32,266
1,180
local({ # the requested version of renv version <- "1.0.3" attr(version, "sha") <- NULL # the project directory project <- getwd() # use start-up diagnostics if enabled diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE") if (diagnostics) { start <- Sys.time() profile <- te...
3cfbe4fc70af95f3df287003cd91529070179ab5a019f4c2a10b0f36b8385f12
R
32,370
606
#' Function that plots two types of data points against it's chromosomal location. #' Note: This is a plot PER chromosome. #' @noRd create.haplotype.plot = function(chrom.position, points.blue, points.red, x.min, x.max, title, xlab, ylab) { par(pch=".", cex=1, cex.main=0.8, cex.axis = 0.6, cex.lab=0.7,yaxp=c(-0.05,1....
813421cea5832627403579974264ed163329e3a976b1c77352255d0bd583c2e6
R
32,738
951
--- title: "Pre-processing of host cell expression responses to Tha and Tha2P4M mutations" author: "Arpy" date: '2024-09-24' output: html_document --- #Libraries and Source Files ```{r libraries and functions, message=FALSE} library(tidyverse) library(Seurat) library(Libra) source("~/OHSU Dropbox/Saunders Lab's share...
6154298c4415cd8d661c848861d2226d1f2ac278d46e97153fdf9b4b5da8bbc2
R
33,679
1,201
local({ # the requested version of renv version <- "1.0.5" attr(version, "sha") <- NULL # the project directory project <- getwd() # use start-up diagnostics if enabled diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE") if (diagnostics) { start <- Sys.time() profile <- te...
589b687e929771393b169bbca4a47d5463b1efff1cddb7b2bcc4231682340731
R
34,172
602
########################### #I/O ########################### library(tidyverse) library(ggplot2) library(Seurat) library(fgsea) library(pheatmap) library(cowplot) library(patchwork) library(scCustomize) library(CellChat) library(msigdbr) library(org.Hs.eg.db) library(readxl) library(xlsx) library(ggrepel) library(gridE...
ba13523b95d6289d44f846efba7c60b95dbbc563fd3248fffcdcc8aebf415fec
R
34,296
633
#' Run the Battenberg pipeline #' #' @param analysis The mode of Battenberg copy number analysis to be undertaken: 'paired' for tumour-normal pair, 'cell_line' for Cell line tumour-only and 'germline' for germline CNV of normal sample (Default: 'paired') #' @param samplename Sample identifier (tumour or germline), thi...
b6467a70847c0ae4ec31ce0df6981c393ae1966ddc4fe47243069e1498b3a6de
R
34,825
1,136
context("basic functions") data(agaricus.train, package = "xgboost") data(agaricus.test, package = "xgboost") train <- agaricus.train test <- agaricus.test set.seed(1994) # disable some tests for Win32 windows_flag <- .Platform$OS.type == "windows" && .Machine$sizeof.pointer != 8 solaris_flag <- (Sys.info()["sysnam...
04fef45f6d67be12fcac31c65bf67aea0495622c9922d6ef3a55ea9490a729cc
R
34,864
1,148
--- title: "st_dist" output: html_notebook --- Written by Aunoy Poddar Dec 25th, 2022 # Process the puncta quantified raw data ```{r eval=FALSE} current_file <- rstudioapi::getActiveDocumentContext()$path output_file <- stringr::str_replace(current_file, '.Rmd', '.R') knitr::purl(current_file, output = output_file) f...
095fdea7608ac2f639a2613614ff2a6b58203b4ed6c3a50de1d6ff47667bc624
R
35,050
749
--- title: "Rhabdomyosarcoma fusion oncoprotein initially pioneers a neural signature in vivo - RNA-seq Analysis" author: "Jack Kucinski" data: "04-10-2025" --- # RNA-seq analysis - P3F v. CNTL ## make directories ```{bash} WORKDIR="path/to/working/directory" mkdir rnaseq mkdir rnaseq/analysis mkdir rnaseq/cennypipelin...
e8278462d6e75db1861118a0e4ebeab947ee795f75cbc56e3af201c2487d1c66
R
35,243
660
#' Helper function to adjust the BAF segmented values. By default the segmentation #' takes the mean BAFphased for each segment, but that doesn't work very well with #' outliers (i.e. badly phased regions). This function is then called to adjust #' the segmented BAF. By default this now takes the median #' @param baf_...
b9b576af2d32ace615272e2d0967827dc1d9c109c17113646efff75348ef5901
R
35,375
916
# fNMES Study 6 analyses # add packages --------------------------------------------------------------------- library("dplyr") library("plyr") library("tidyverse") library("numDeriv") library("Hmisc") library("plyr") library("lmerTest") library("ggplot2") library("ggpattern") library("cowplot") library("moments") lib...
d68963c9c5b71d83149496be70917f8bef8ed7e9ac2852936d2517a0508d5912
R
35,456
738
library(igraph) library(ggraph) library(tidyverse) library(magrittr) library(tidygraph) library(sf) library(ggforce) library(patchwork) library(qs) setwd("~/DATA/BRAIN/STEREO/frequentGraph/plot/") # 15um ------------ project = "../soma15nn15.network" wsize = 100 chipID_region <- read.delim("../../cortex") %>% {setName...
a0ba7146634b5bcd9f871a52b7a394471d9f0d70ac4ee8d214b1d59c1bff32d1
R
35,583
713
#### load packages #### targetPackages <- c('tidyverse','data.table','slider','gtools','sf','arrow') newPackages <- targetPackages[!(targetPackages %in% installed.packages()[,"Package"])] if(length(newPackages)) install.packages(newPackages, repos = "http://cran.us.r-project.org") for(package in targetPackages) library...
d71e07bd1bdf46c4ed819f5b6340bbb92ff78316d0c779c389484de9a668b9ca
R
35,876
897
## ----eval=FALSE------------------------------------------------------------------------------------------------------------- ## current_file <- rstudioapi::getActiveDocumentContext()$path ## output_file <- stringr::str_replace(current_file, '.Rmd', '.R') ## knitr::purl(current_file, output = output_file) ## file.edit...
96b557a2b9e5cab421daf13cfb97ffd60cd961aeafb5a93a5336c28fd7416763
R
35,907
889
# Copyright 2024 Masahiro Ono # 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 by applicable law or agreed to in writing, s...
451a0ad988db533e5201dbc854337ce6a01f1008b1fd39d30023cfb4f812100e
R
36,222
1,313
local({ # the requested version of renv version <- "1.1.0" attr(version, "sha") <- NULL # the project directory project <- Sys.getenv("RENV_PROJECT") if (!nzchar(project)) project <- getwd() # use start-up diagnostics if enabled diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALS...
73416faf8b4758fd820cc9d45db09b0159f3d5d1c37b6d2115e0c5e3c8d3ee3f
R
36,479
859
#' Run all steps of \code{SC3} in one go #' #' This function is a wrapper that executes all steps of \code{SC3} analysis in one go. #' #' @param object an object of \code{SingleCellExperiment} class. #' @param ks a range of the number of clusters \code{k} used for \code{SC3} clustering. #' Can also be a single intege...
f2c0e58d9aa55f5e06f7840e112be5f269792dfd0c352613b0fceee6208aafab
R
36,639
908
--- title: "Genomic location and exon structure evolution analysis" author: "Sarah Lower" date: "`r Sys.Date()`" output: html_document: theme: cerulean toc: TRUE toc_float: collapsed: TRUE code_folding: hide editor_options: chunk_output_type: console --- ```{r setup, include=FALSE} knitr:...
9f9369358119257ca89753b1242fdddca42d5484dcb4bc00c3f3bcd9fbe48768
R
37,461
960
# scripts for running RCTD and CSIDE method to identify ctDEG library(spacexr) library(Seurat) library(Matrix) library(doParallel) library(ggplot2) library(plyr) library(data.table) library(msigdbr) library(fgsea) library(data.table) library(ggplot2) library(BiocParallel) library(EnhancedVolcano) library(viridis) libr...
09bce245b99b4b148a3a786b1260936add99aab30cc0239121de8719089803f7
R
37,507
950
--- title: "st_all" output: html_notebook --- Written by Aunoy Poddar July 21st, 2022 # Process the puncta quantified raw data ```{r eval=FALSE} current_file <- rstudioapi::getActiveDocumentContext()$path output_file <- stringr::str_replace(current_file, '.Rmd', '.R') knitr::purl(current_file, output = output_file) f...
c60bd7a17644caf0767309caf4536058c511aad2e20007b8524f19d7d6fe088b
R
37,696
1,049
--- title: "st_clumps" output: html_notebook --- Written by Aunoy Poddar July 21st, 2022 # Process the puncta quantified raw data ```{r eval=FALSE} current_file <- rstudioapi::getActiveDocumentContext()$path output_file <- stringr::str_replace(current_file, '.Rmd', '.R') knitr::purl(current_file, output = output_file...
bbe35e0a0aee6b6c99395916128b41d02a6eaa14cd257d65b56eceb5d5b8750a
R
37,838
1,105
--- title: "IQM measures" author: "Heejung Jung" date: "`r Sys.Date()`" output: html_document --- Here, we plot the FD means, DVARs and tSNR from spacetop individual tasks. For FD means, we also plot the UKB task FD values. ```{r include=FALSE} library(ggplot2) library(raincloudplots) library(gghalves) library(plyr);...
9c5cac7b39fa81472293f74ce51c39e74b18f16c1f14e12e4ea1e66335b6ee57
R
38,997
1,139
--- title: 'cellranger and kallisto snRNA-seq integration and normalization' output: html_document: theme: united pdf_document: default date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' --- ```{r setup, include=FALSE} all_times <- list() # store the time for each chunk knitr::knit_hooks$set(time_it = local({ ...
d8766b61234727c01525dda1833021be475c7894ab320cc5fdf462505051103f
R
39,607
1,015
# Copyright 2024 Masahiro Ono # 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 by applicable law or agreed to in writing, s...
bb44abfab0f3efdc9aac78bffe466e122e7b95e84dfb949c157d05145a02a606
R
39,695
1,171
# R code to generate the anatomical overview images of the Platynereis connectome in Figure 1 of the connectome paper # Gaspar Jekely 2021-2023 # load natverse and other packages, some custom natverse functions and catmaid connectivity info ----------- source("code/Natverse_functions_and_conn.R") # read graph conn.tb...
ff73d4fc48bd90e7569118e6fc7745d78b06e08614107d61095abb0e301e4b45
R
39,715
1,351
--- title: "st_nn" output: html_notebook --- Written by Aunoy Poddar July 21st, 2022 # Process the puncta quantified raw data ```{r eval=FALSE} current_file <- rstudioapi::getActiveDocumentContext()$path output_file <- stringr::str_replace(current_file, '.Rmd', '.R') knitr::purl(current_file, output = output_file) fi...
ea81d139c5e1296eb911b8916249083285c4ef5ec90d0cf9a9161dd8296d48eb
R
41,076
260
#' Function to extract eQTL-gene pairs given a list of SNPs or a customised eQTL mapping data #' #' \code{oDefineQTL} is supposed to extract eQTL-gene pairs given a list of SNPs or a customised eQTL mapping data. #' #' @param data NULL or an input vector containing SNPs. If NULL, all SNPs will be considered. If a input...
4d61ac4081c4c121e4f28a4351cef5424ae7f7e4e1eaddfa4f549dc7ac8dc216
R
41,120
516
library(data.table) library(seqinr) library(miRBaseConverter) library(Biostrings) library(stringi) library(GenomicRanges) library(BSgenome.Hsapiens.UCSC.hg38) run_all <- function(args){ hybrids <- args[1] sample <- args[2] repeatmasker_bed <-args[3] transcripts <- args[4] features <- args[5] mirna_db...
4001bb435ea1244218277dfd9acebbfb8edda9f3ebaeb74fde04e2598445b3fc
R
41,408
805
#' Chromosome notation standardisation (removing 'chr' string from chromosome names - mainly an issue in hg38 BAMs) #' #' @param tumourname Tumour identifier, this is used as a prefix for the allele count files. If allele counts are supplied separately, they are expected to have this identifier as prefix. #' @param no...
6c6e415b36d9755cfdef0ad56d87c04a6582285bff6361a0d236ff330255b680
R
41,749
806
###### This scripts plots the output from the population genetics model for Brain WGS data from Bae et al. It produces ###### - For each patient the model fit vs data and the posterior probabilities of the parameters ###### - A summary of the 80%HDI estimates across the population ######################################...
cd3be1e856175e7cdd5542606f170c1a0acf89ffa77bb0ff5d749c9b74f4f0ba
R
41,923
1,266
# Created by use_targets(). # Follow the comments below to fill in this target script. # Then follow the manual to check and run the pipeline: # https://books.ropensci.org/targets/walkthrough.html#inspect-the-pipeline # Load packages required to define the pipeline: library(targets) library(tarchetypes) # e.g. for t...
54df9236b80594e2d2a3c83363e7378c0e336342165c7ff3fa4785308aa03a22
R
42,368
1,074
#******************************************************************************* # Filename : tmiic.plot.R Creation date: 24 march 2020 # # Description: Plotting for temporal miic (tmiic) # # Author : Franck SIMON #****************************************************************************...
d8913a89fa2dd0cca546f892f94956f18a0430c7e077e047bade501799b3f03a
R
42,774
1,025
# LARYNX ANALYSIS CODE 2.10.2024 library(geomorph) library(Morpho) library(rgl) library(magick) library(webshot2) library(gifski) library(ggplot2) library(R.utils) library(ape) library(geomorph) library(Morpho) library(phytools) library(rgl) library(jpeg) library(pls) library(picante) library(adephylo) library(ade4) l...
954686f53c6c469bf65fcad93d16171f5971207abfe886b3f58b807b167f5182
R
42,776
1,111
### Analysis of genes or gene-sets of interest from Spatial Transcriptomics (ST) and snRNAseq datasets library(dplyr) library(viridis) library(data.table) library(ggpubr) library(rstatix) library(spacexr) library(Seurat) library(lmer) ############### ### Input ############### # analysis dir analysis_dir = "/Users/zac...
68377c4303e7b6c6f5d502f4a72121b95883c083bf1956744570afc020666d9b
R
43,133
1,133
--- title: 'Step 2: Multivariate analysis' author: "Sam Pring, Sarah Lower, Brian Vestal" date: "`r Sys.Date()`" output: html_document: theme: cerulean toc: TRUE toc_float: collapsed: TRUE code_folding: hide editor_options: chunk_output_type: console --- ```{r setup, include=FALSE} knitr:...
be9f03969b2f44c4ba119e8127d0867bdb75abad9c7f85d233036a7ceac845be
R
43,389
853
--- title: "Analysis of host cell expression responses to Tha and Tha2P4M mutations" author: "Arpy" date: '2024-09-24' output: html_document --- #Libraries and Source Files ```{r libraries and functions, message=FALSE} library(tidyverse) library(Seurat) library(Libra) library(clusterProfiler) library(enrichplot) libra...
20e0566d99fe9818f4b2552b45ecbac075c1f4f8825a733c2859fc42f98373cf
R
43,449
867
#### load packages #### targetPackages <- c('tidyverse','arrow','data.table','slider','gtools','sf') newPackages <- targetPackages[!(targetPackages %in% installed.packages()[,"Package"])] if(length(newPackages)) install.packages(newPackages, repos = "http://cran.us.r-project.org") for(package in targetPackages) library...
07b66df4bc512b3adcf1c50c637e555052a68b1c49372612a5db3e6efdf9b267
R
43,878
1,024
#### load packages #### targetPackages <- c('tidyverse','arrow','normentR') newPackages <- targetPackages[!(targetPackages %in% installed.packages()[,"Package"])] if(length(newPackages)) install.packages(newPackages, repos = "http://cran.us.r-project.org") for(package in targetPackages) library(package, character.only ...
c1af86079ca1a155601f14315bef11ac863106a5ed74caf85c2ecef36c8dc7d9
R
43,986
1,046
# LARYNX ANALYSIS CODE 2.10.2024 library(geomorph) library(Morpho) library(rgl) library(magick) library(webshot2) library(gifski) library(ggplot2) library(R.utils) library(ape) library(geomorph) library(Morpho) library(phytools) library(rgl) library(jpeg) library(pls) library(picante) library(adephylo) library(ade4) l...
f31755caa357cd4682817d548c7a3ba3e0d0267753afb53ba5c532aae10ef0e0
R
45,658
1,421
#genenames<-rownames(mydata_sub) #geeout<-H_M_names(genenames=genenames) #source('/home/clustor2/ma/w/wt215/BTC_project/BTC_R/deseq2_sup.R', echo=FALSE) #source('D:/Miriam_project/deseq2_sup.R', echo=FALSE) source('/home/clustor2/ma/w/wt215/RFILES/deseq2_sup.R', echo=FALSE) # library(One2One) # # Download and format t...
5255ad3230e5012535f4d34a48ad1335b39f382498653f9d2e52b1a0b9cf439f
R
45,872
1,303
# MagellanMapper stats in R # Author: David Young, 2018, 2021 # library to avoid overlapping text labels #install.packages("devtools") #library("devtools") #install_github("JosephCrispell/basicPlotteR") # To run stats: # - Select profiles in runStats # - Start R in clrstats folder # - Load source: "devtools::load_all...
aa5b0a8aec67075c1cd9a5a4bf9b2d9d06a383daef08c5a1965a43afbbe68408
R
46,202
1,011
#----------------------------------------------------- # UMI correlation between SP and ST umiCorrSpWithSt <- function(obj.sc, obj.sp.lst) { figs.dir <- file.path(out.figs.dir, "sc_cor_sp") dir.create(figs.dir, showWarnings = FALSE) gp.lst <- lapply(names(SC_MAP_SP), function(sn) { obj.sc.sub <- s...
74553a0db0076ed07ed92313032627d55d14d756304d4a36a98b4f1e2a58687f
R
46,295
1,177
--- title: "Rhabdomyosarcoma fusion oncoprotein initially pioneers a neural signature in vivo - Initial ChIP-seq Analysis" author: "Jack Kucinski" data: "04-10-2025" --- this rmd file contains initial analysis of PAX3::FOXO1, PAX3::FOXO1-minusHD, and H3K27ac ChIP-seq, which includes running through pipelines and figure...
5e8797bb878fc7b47e7eed461799b02bf2b7aa8c45c458c766cf284d4ebb8280
R
46,337
1,357
#' Construct xgb.DMatrix object #' #' Construct an 'xgb.DMatrix' object from a given data source, which can then be passed to functions #' such as [xgb.train()] or [predict()]. #' #' Function `xgb.QuantileDMatrix()` will construct a DMatrix with quantization for the histogram #' method already applied to it, which can ...
ffadadf8618e2eca1f214354292f08320c850f661e5a9c61bca24e4b5d0947fe
R
47,242
929
#******************************************************************************* # Filename : miic.R # # Description: main function of the miic the package (user front-end) #******************************************************************************* #==============================================================...
7078f556fd3b2770882c93e2c156404a6f705026e44a237061ff9b32b8b38f63
R
47,419
839
###### This scripts plots the output from the population genetics model for previously published data. It produces ###### - For each patient the model fit vs data and the posterior probabilities of the parameters ###### - A summary of the 80%HDI estimates across the population ##########################################...
c96ed8479ec1b9ec01504507026b6f42bd4ebc89e6a1c40bd4c02611f972ea2e
R
48,141
1,203
#******************************************************************************* # Filename : miic.utils.R # # Description: various utilities functions and constants for miic #******************************************************************************* #============================================================...
f691c43e92469d6acf90dd0b2421251c7ab17ddf92ba5f9fcbe7122cd11d5ab5
R
48,148
713
--- title: "CRISPR L1s differential expression analysis of TEs" output: html_notebook --- ## Here we perform differential expression analysis (DEA) of genes for our CRISPR experiments targeting young L1 elements. The experimental design is CRISPR inhibition on iPSC where L1s are usually highly expressed, and CRISPR a...
d442eaf3b6939ea0d2bc2fedd918c6c71bc7d57c748ac484ca9b1141dc250674
R
48,393
1,332
# Construct an internal XGBoost Booster and get its current number of rounds. # internal utility function # Note: the number of rounds in the C booster gets reset to zero when changing # key booster parameters like 'process_type=update', but in some cases, when # replacing previous iterations, it needs to make a check ...
aadd1e2055e054eeb5dfa80d0df15f6e1b6bb246ded5894fe36af22d1c7a1da3
R
49,229
1,205
--- title: "EEG EPE Analysis (Manuscript)" author: "Joey Heffner" date: "`r format(Sys.time(), '%d %B, %Y')`" output: html_document --- # Setup To run this analysis script you'll have to have the following packages installed (make sure `tidyverse` is updated): | Packages1 | Packages2 | Packages3 | Packages...
e176a46f61e5b8f3225705d8b07ae38a882d90f1fd7429f6cf981d9760dd0e6e
R
50,323
770
--- title: "L1-CRISPRi organoids: Cell cycle and commonly dysregulated genes" output: html_notebook --- This markdown relates to the visualization of day 15 cerebral organoids. Main questions: 1. Cell cycle 2. Biomarkers 3. Characterize the present clusters 4. Commonly down / up regulated genes overrepresentation te...
e3c6849dbfd3834e4f9965009f8b4852d8d7225c222d887bebcccb31328de69e
R
50,341
1,007
#' Function to conduct set enrichment analysis #' #' \code{oSEA} is supposed to conduct set enrichment analysis (SEA) given the input data, annotation and/or ontology. The annotation is provided as an object of class "SET", while the ontology as an object of class "igraph", usually direct acyclic graph (DAG). It return...
c3c543aeeed4148fcb4dd0f3903aeac7a8d1b3ba9087da564d72df4ca4278c12
R
51,192
1,091
--- title: "scRNA-seq analysis of Tha gene expression across cell types and experimental conditions" author: "Arpy" date: '2024-09-24' output: html_document --- #Libraries and Source Files ```{r libraries and functions, message=FALSE} library(tidyverse) source("~/OHSU Dropbox/Saunders Lab's shared workspace/arpy/man...
1393ea233f662a18aed699633efc9fa4c0ff77ffb18fea9bc5c966e11b6905f0
R
52,649
1,007
#' Chromosome notation standardisation (removing 'chr' string from chromosome names - mainly an issue in hg38 BAMs) #' #' @param GERMLINENAME The germline identifier, this is used as a prefix for the allele count files. If allele counts are supplied separately, they are expected to have this identifier as prefix. #' @a...
068a1e1a93febe9b78bfeb987f838c4acfb15b339d7fd1f45872dfca17ee0746
R
53,304
860
#' @title Fit XGBoost Model #' @description Fits an XGBoost model to given data in DMatrix format (e.g. as produced by [xgb.DMatrix()]). #' See the tutorial [Introduction to Boosted Trees](https://xgboost.readthedocs.io/en/stable/tutorials/model.html) #' for a longer explanation of what XGBoost does, and the rest of th...
f88d38439d6e9a1178b6c1b049f31637f5815d84bf1ae3d50a1a262bf0b3224e
R
53,457
1,272
#******************************************************************************* # Filename : tmiic.utils.R Creation date: 10 may 2023 # # Description: Utility functions for temporal MIIC # # Author : Franck SIMON #***************************************************************************...
8858368318ac909961fdcdd0fe4bd471f699942f50f9b87b3bc76e5398978a6e
R
54,178
1,379
#code to generate the mushroom body video for the Platynereis 3d connectome paper #Gaspar Jekely 2022-2023 #clear memory, load natverse and other packages, some custom natverse functions and catmaid connectivity info source("code/Natverse_functions_and_conn.R") #create temp dir to store video frames mainDir = getwd()...
ec8f06de040acf3aaea20a9054b4157dfe53cd3a48c63f7c1b71f4264eabc578
R
54,813
1,564
#!/usr/bin/env Rscript # ----------------------------------------------------------------------------- # PCL I/O library(plyr) library(dplyr) pcl.read <- function(datafile, metadata.rows = NA, rowfeatures=T, sep="\t") { # Read a pcl structure from a file # if metadata.rows is NA, it tries to guess...
ec22a15c45bc8e3cbd8e9ffdeb49b6fe218e0fa9df7ed55bf3e50eae119b179d
R
56,777
785
--- title: "CRISPR L1s differential expression analysis of TEs" output: html_notebook --- Here we perform differential expression analysis (DEA) of all TEs using a unique mapping approach for our CRISPR experiments targeting young L1 elements. The experimental design is CRISPR inhibition on iPSC where L1s are usually...
c38cda4b1ee701624b769dcece3b327da1a1a72455ec7fd829eb91cc582f969f
R
59,471
1,492
# Safe font family: fall back to system default if Helvetica is not available .fbt_family <- function() { if (nzchar(system.file(package = "systemfonts"))) { avail <- systemfonts::system_fonts()$family if ("Helvetica" %in% avail) return("Helvetica") } "" # ggplot2 default sans-serif } fbt_theme <- funct...
1902aeed338d54cf7f59c4160611d6d0a9cdf8b6574c8f5bea4bf5d91b36b278
R
60,563
1,609
prescreen.objective <- function(objective) { if (!is.null(objective)) { if (!is.character(objective) || length(objective) != 1L || is.na(objective)) { stop("'objective' must be a single character/string variable.") } if (objective %in% .OBJECTIVES_NON_DEFAULT_MODE()) { stop( "Objectiv...
49d81d9082c35cb7e8f5cca898b2179e906e697e93e416679bde8bc963147977
R
61,867
1,812
################################################################ # # # Supplementary analysis (comparing SMD for 1:1 vs 2:1 matching) of psychiatric symptoms, # diagnoses and service use using MatchIt for propensity score matching in the study: # # Only Anxiety Remains Reliably Associated with Paediatric # ...
008aaa222731b0ed00e6d3376dda4b9ec0b23eaded862d8c91f35e45083ca2dd
R
62,788
1,610
################################################################ # # MANY-TO-ONE PSM ANALYSIS # Analysis of psychiatric symptoms, diagnoses and service use using MatchIt # for propensity score matching in the study: # # Only Anxiety Remains Reliably Associated with Paediatric # Mild TBI at Two Years Follow-up ...
58d4a29d54bc9e8c7c6e8b1e7961d20fe299a1f6a71de52d01d96e2bce48303e
R
69,015
1,721
#################################################################################################### #' A helper function to split the genome into parts #' @param SNPpos A data.frame with a row for each SNP. First column is chromosome, second column position #' @noRd split_genome = function(SNPpos) { # look for gap...
b1c07d76095dca074b966bb3f9c407ef36c221557b1a512f35b02c585df19105
R
69,846
1,176
--- title: "Cell-autonomous functional inference of Cluster 1 and Cluster 2 Astrocyte Gene Signatures" author: "Arpy" date: '2024-09-24' output: html_document --- ```{r libraries and functions, message=FALSE} library(Seurat) library(tidyverse) library(readxl) library(dplyr) library(clusterProfiler) library(ReactomePA...
d1fa137b03c2ad5f20873577a332a26a1d10f1fcd5677b8d69c3be0f6b3c9874
R
70,562
2,270
--- title: "marcos_wgcna" output: html_notebook --- # Details Aunoy Poddar May 12th, 2024 This is a notebook to pre-process cellranger data. The chunks iteratively will display quality control metrics and ask the user to input the thresholds that should be used to generate a final dataset. Currently, these metrics wi...
923480329b5b0b6dd2a4c1db6f6d2ceed6931ea8011b964b2fa0348acbb0996a
R
71,793
1,311
source("./Settings.R") #################################################################################################################################################### ## In the paper, we show parameter estimates obtained with both the one-clone model and the 2-clone model. ## We first source the file "Assess_fits...
e5247d9f5cafbb9e3781d3a6475d9d973ad62fadf5aba81269a2ed2bc375961f
R
72,330
251
# R script to download selected samples # Copy code and run on a local machine to initiate download # Check for dependencies and install if missing packages <- c("rhdf5") if (length(setdiff(packages, rownames(installed.packages()))) > 0) { print("Install required packages") source("https://bioconductor.org/bio...
9a815bb448251d7b6f10010e7f972ccd70188cfa0c4f118eb1ac8f60ddeb0f86
R
72,876
1,892
#R/natverse code to generate Figure MB anatomy overview for the Platynereis 3d connectome paper #Gaspar Jekely 2022 # load natverse and other packages, custom natverse functions and -------- source("code/Natverse_functions_and_conn.R") # read MB neuron types ---------------------------------------------------- { ...
7ee435945f8454aa253056153d06266c3fd6e94428d59def0053acb054f0eb20
R
75,156
1,407
#' Fit copy number #' #' Function that will fit a clonal copy number profile to segmented data. It first #' matches the raw LogR with the segmented BAF to create segmented LogR. Then ASCAT #' is run to obtain a clonal copy number profile. Beyond logRsegmented it produces #' the rho_and_psi file and the cellularity_ploi...
61063d2fc3a1edc555d8cfa597ccf9f01aa3c233b9b9a7a014c662c1cff6a45b
R
75,228
2,402
library(ggplotify) library(directlabels) library(circlize) library(GenomicRanges) library(EnrichedHeatmap) #frequent used colors########## # message( # cyan$bold( # ' # Run plot_grid(qq2) to plot \n # DIY color: \n # Discrete: scale_color_manual(values=SpatialColors(7)) \n # or: colorRampPa...
149baddb8892e08cb8a9913e05fb429591784e5253f8df24b5a0c0e787be33d0
R
75,447
1,378
### example Seurat code for initial single cell RNA seq analysis ### ### written by Lay Kodama, Bang Liu, and Li Fan ### ### please reference https://satijalab.org/seurat/v3.1/pbmc3k_tutorial.html for details on the Seurat package parameters ### #set working directory ==== setwd("/athena/ganlab/scratch/lif4001/Human_P...
105b723bcaab207f1fefb689dce33ca108ef8e9d5732ddb31e061afcfbffc9a1
R
80,017
1,966
--- title: "Rhabdomyosarcoma fusion oncoprotein initially pioneers a neural signature in vivo - Integration of P3F ChIP-seq, ATAC-seq, H3K27ac ChIP-seq, and RNA-seq" author: "Jack Kucinski" data: "04-10-2025" --- ## make directories ```{bash} WORKDIR="path/to/working/directory" mkdir chip/p3f/2mil_pcChIP/outputs/bigwig...
1791eca59705d0abb4a5d241847be375cdb7aab3d511acf9beedfb27940315ca
R
81,225
1,906
#Platynereis 3d larva connectome paper Figure on segment 0 and segment 1 #Gaspar Jekely source("code/Natverse_functions_and_conn.R") # load all cell clusters by segment --------------------------------------- { head = nlapply(read.neurons.catmaid("^episphere$", pid=11), function(x) smooth_neuron(x...
58920d2aaccdb1176987fd84392c6e29fab73d83900152ef66363d28b26b09ec
R
81,637
2,303
# Code to generate Figure6 and 7 of the Platynereis 3d connectome paper # Gaspar Jekely # load natverse and other packages, some custom natverse functions and catmaid connectivity info source("code/Natverse_functions_and_conn.R") # read sensory cell clusters Dorsal_SO <- nlapply( read.neurons.catmaid("^Dorsal_senso...
72de7d4e437e8e45fe5b596871a0db7f80ed208674b7386f90ddbc2801829926
R
83,032
1,659
######################################################################################################################################### ####### Non-critical b-d-process ######################################################################################################################################### #' Non-cr...