sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
5a3d1118c152bd93f2ebd9da34f2154aa2941a61913fd78a42d3649797041212 | R | 12,324 | 302 | #' Density plot of observed and imputed data
#'
#' Plotting methods for imputed data using \pkg{lattice}. \code{densityplot}
#' produces plots of the densities. The function
#' automatically separates the observed and imputed data. The
#' functions extend the usual features of \pkg{lattice}.
#'
#' The argument \code{na... |
dbccd906eaa32b13abb9fc2fed7d7537e4967acf63b86a7e207cd0730b01cced | R | 12,334 | 336 | .findAS2 <- function(object) {
gtf <- slot(object, "transcriptome")
splice.out <- .runAS2(gtf[gtf$type == "exon"])
object@sets$AS@rowData <- .prepColData(splice.out)
slot(object, "transcriptome") <- .sortGTF(c(gtf, .prepASgtf(splice.out)))
return(object)
}
.runAS2 <- function(gtf){
## Prefilter for gen... |
ed92784cbd55122a9aea50571f89336ecf1f7ce74e8415a5b0679e38b46c48bf | R | 12,415 | 420 | ---
title: "Data treatment"
author: "Martin Dessart"
date: "11/09/2023"
output:
html_document:
toc: true
theme: united
pdf_document: default
word_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,fig.width=15,fig.height=8)
```
# Prepare data
```{r,warning=FALSE, messag... |
4b52ae58f02cf04b93e019e3c236159f31e86076eadf85c1c16197f7b2249827 | R | 12,434 | 322 | #' EnsembleAge Static Clock Predictions
#'
#' Predict age using the main EnsembleAge static clocks for mouse data.
#' This is the primary clock for mouse age predictions.
#'
#' For the simplest interface, consider using \code{\link{predictEnsemble}} which
#' automatically handles data loading, platform detection, and ... |
51ec42435d43cb1bd4a51cad3a2608037aff06d7ba8ead9c3fffdb612d30d390 | R | 12,449 | 445 | ## These functions are inspired by the position_*() functions in the ggtreeExtra
## package and have been subtly modified for ggcor. And this function will be removed
## when ggtreeExtra package is committed to CRAN or Bioconductor.
## Shuangbin Xu and Guangchuang Yu (2020). ggtreeExtra: An R Package To Add Geom
## ... |
722516acb48195bec8ddc0cf8c1bae4c33245c46e1fcb0e05df8570962dd9d38 | R | 12,477 | 340 | ##' @title Download clinical data in GDC
##' @description Download clinical data in GDC
##' either by providing the manifest file or
##' specifying the project id and data type
##' @param manifest menifest file that is downloaded from the GDC cart.
##' If provided, files whose UUIDs are in the manifest f... |
0f4df5c1f068212d956cd0fd7f272d15e3e9dd34dacf19512792454416eeda49 | R | 12,512 | 160 | ---
title: "Long-read RNA sequencing identifies region- and sex-specific C57BL/6J mouse brain mRNA isoform expression and usage"
author:
output: github_document
date: "`r Sys.Date()`"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
bioRxiv Preprint: [, '%d %B, %Y')`
## Welcome to MicrogliaMorphology!
MicrogliaMorphology is a user-friendly ImageJ macro that off... |
d17f172c3e05cad45843494ca832a7e093f825927ad5648ec91c66279f223d76 | R | 12,601 | 332 | #!/usr/bin/env Rscript
# load data and results
e.keep = readRDS('filtered_expression_matrix.rds')
keep.genes = readRDS('keep_genes.rds')
meta = readRDS('cayo_bulkbrain_combined_metadata.rds')
meta = meta[order(match(meta$LID, colnames(e.keep))),]
mash.results = readRDS('mashr_results.rds')
mash.ct.results = readRDS... |
c904e7c2b5501af6245df234956192ea0fef79433099c6c53dde181b5888024d | R | 12,609 | 240 | #Finding orthologs for the new GeneWeaver and Gemma .gmt files:
#Set working directory to load files:
#setwd("~/Documents/SideProjects/BrainGMT/GeneWeaver")
setwd("/Users/hagenaue/Dropbox (University of Michigan)/LaptopBackup_20221123/SideProjects/BrainGMT/GeneSet_Sources/GeneWeaver")
GeneWeaver_GMT_forAngela_Mouse<... |
fe79f487d4e976f123f08a01a7259f7977fc928770b708baeb95f46b9143791d | R | 12,633 | 317 | #' EnsembleAge: Ultimate One-Line Predictor
#'
#' The simplest possible interface - just provide data and sample sheet!
#' Automatically detects platform, preprocesses data, selects best prediction method,
#' and returns results in your preferred format.
#'
#' @param data Either a file path (string) or data object (dat... |
cb98b9bacca375ea0d2cef2fd1c5557cb3ffd7b2dcfcfcb8ba8b931191e95e02 | R | 12,679 | 339 | ##-------------------------------------------------------
## LOAD MODULES AND LIBRARIES
#-------------------------------------------------------
# module purge && module load shared slurm python/3.7.x-anaconda
# module load gcc/8.3.0
# module load hdf5_18/1.8.17
# module load R/4.1.1-gccmkl
rm(list = ls())
suppressPa... |
f59efaa01257e3e3260e98de24215617bf67e2836d49eaea42ffe66e390e47fa | R | 12,692 | 380 | # Function script for use with the EJMouseBrainIsoDiv project and was written by
# Emma Jones. The purpose of this script is to include all functions used in DTU
# analyses. The input "tissue" or "region" is a character vector denoting brain
# region. This file is broken up into sections with functions for each
# indiv... |
d550f1eba6a8ef4d01f5963b3c5d138f4dbd52b07c1e59accbac5b4fc0ac8df9 | R | 12,693 | 380 | # Function script for use with the EJMouseBrainIsoDiv project and was written by
# Emma Jones. The purpose of this script is to include all functions used in DTU
# analyses. The input "tissue" or "region" is a character vector denoting brain
# region. This file is broken up into sections with functions for each
# indiv... |
fd067ea88d88ffe415fdd21bc846e3e4ce163718a2c00053a69a0ec14fc5daa6 | R | 12,696 | 307 | # Author: B P Kailash
# Purpose: Find differentially correlated edges between two brain regions
rm(list = ls())
.libPaths(c("libraries/", .libPaths()))
library(tidyverse)
library(optparse)
# INPUT to be specified by the user ---------------------------------------
# Brain regions (BR) under study BM10, BM22, BM44,... |
a6d8cd35f13d3fb16afc9da16975749d656d41b4c88444f2eccb06b496b0ad1c | R | 12,722 | 301 | #'#################################################################################
#'#################################################################################
#' Download data for a meta-analysis in PRAD
#'#################################################################################
#'#################... |
1938b873f8a3d26712510d4ffc1ea3534203377dc4dc623198765ca179e70946 | R | 12,728 | 472 | ---
title: "01_geo_seurat_preprocessing"
author: "Tabea M. Soelter"
date: '2023-03-22'
output: html_document
---
**Pre-processing of snRNA-seq data from GEO (Accession #: GSE174367)**
__Goal__: Process GSE174367 (snRNA-seq) data for downstream analyses.
__Reproducibility__:
* GitHub: lasseignelab/230313_TS_CCCinHu... |
a270072e47aa0d7e0f8d16af2d9f488d3e333f82ccdbc33a8926319cc3967c68 | R | 12,758 | 352 | library(asreml)
# Calculation function
maxiter <- 1500
fit_REML <- function(df, parameter = "", use_weights=T) {
print(parameter)
df_orig <- df
# Set factors
df <- df %>% mutate(genotype = as.factor(genotype.id), year_site.UID = as.factor(year_site.UID))
# Filter out genotypes that exist in only one year... |
ab82bf1e52e02c8ed7705796b7d924ee039b8c7e7fea8b72a8fe9c027e57ce13 | R | 12,758 | 322 | setGeneric("getAScons", function(
object,
db = "phastCons",
type = "exon",
padding = 50) standardGeneric("getAScons"))
#' Quantify feature conservation
#'
#' @description Quantify sequence conservation scores of alternatively-spliced exons.
#'
#' @details
#' By default, this function qu... |
e9763a6c1a100e421c45ae3c9caeefc5ba6fba87e64da3b7435fd1c2f6e6b1d1 | R | 12,892 | 338 | ---
title: "wagg_plots"
author: "Sam Ozminkowski"
date: "12/19/2022"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(ggplot2)
library(dplyr)
library(RColorBrewer)
library(stringr)
```
# Universal Values
```{r}
cutoff = 40
in_path = "~/Documents/masters/research/baye... |
52022a51e2d65cdbb2684a1e909c57ec6ec0f47b64830334edee6e59e1d4e42e | R | 12,898 | 405 | #!/usr/bin/env Rscript
source(here::here("src/shared/R-helpers/get_settings.R"))
source(here::here("src/shared/R-helpers/memoise_decorator.R"))
source(here::here("src/shared/R-helpers/enrichGO_memoise.R"))
source(here::here("src/shared/R-helpers/remove_ensembl_version.R"))
suppressPackageStartupMessages({
library("... |
52b7bbdf63f7aaad2b914aae7a4830bf5c7ff5422fb88543d58261c1d3c33b80 | R | 12,937 | 203 |
#Fixing lurking issues with genes with date names (since that problem in the gene symbol annotation was only changed mid-2020):
DateGeneDecoder<-read.delim("DateGeneDecoder.txt", sep=",", header=TRUE, stringsAsFactors = FALSE)
str(DateGeneDecoder)
# 'data.frame': 28 obs. of 3 variables:
# $ OldSymbol: chr "Sept1" "... |
5046d40a96612df3491a36729d3fda2658787a93bc5c347ab7f6b47648d00bd2 | R | 12,958 | 383 | #' Multiply imputed data set (\code{mids})
#'
#' The \code{mids} object is an S3 class that represents a multiply imputed
#' data set. The \code{mids()} function is the S3 constructor.
#' The following functions produce a \code{mids} object:
#' \code{mids()}, \code{\link{mice}()}, \code{\link{mice.mids}()},
#' \code{\l... |
56e53d2b51023cd0dc2c2368122dd5a2494c944fb2a1c567011cd1a02a373e64 | R | 13,037 | 544 | ---
title: "figure_S7"
author: "Tabea M. Soelter"
date: "`r Sys.Date()`"
output: html_document
---
**Plotting Supplemental Figure 7**
__Goal__: This is a script for generating supplemental figure 7.
__Reproducibility__:
* GitHub: lasseignelab/230313_TS_CCCinHumanAD
* Docker: tsoelter/rstudio_ccc_ad
* Version: ... |
b064b0f9a3c3b46d44af68fb41026e979840feebaa808893762a25903f354c32 | R | 13,099 | 418 | # Laura Aarnos 030818
# Burst analysis - logISI
# Original creator: ellesec
# from: https://github.com/ellesec/burstanalysis/blob/master/Burst_detection_methods/logisi_pasq_method.R
#library(pracma)
#Function to run logISI method
logisi.pasq.method_mod<-function(spike.train, cutoff=0.1){
no_bursts_found <- matr... |
da862ab24afd4b36c7c5f49a9be922671f7367ac8f6533b1545f5730d5bd8a59 | R | 13,137 | 396 | rm(list = ls())
# libraries
library(ggplot2)
library(reshape2)
library(car)
library(geomorph)
library(ComplexHeatmap)
library(circlize)
# functions
se <- function(x) {
# standard standard error function
sd(x, na.rm = TRUE)/sqrt(length(na.omit(x)))
}
meanplus <- function(x) { mean(x) + se(x) }
meanminus <- functio... |
74a7a42c46b80b5ef315df45da47436e6056b1a3ee821bd4e19c48bf281ab0a3 | R | 13,186 | 251 | run_conf_LME_sexstr<- function(imp, sex, model,n_it=10){
# Calculates model results for a MIDS (Multiply Imputed Data Set) from mice.
# Model can take values "M1_VRF", "M2_exfunct" and "M3_globalcog".
#########################
# Frequentist statistics
#########################
# Pool using th... |
df92266c780b2502d6a54bd956857ded0fc16eea188ecf557cc333d6910d8937 | R | 13,284 | 370 | library(Signac)
library(Seurat)
library(SeuratWrappers)
library(EnsDb.Hsapiens.v75)
library(SeuratDisk)
set.seed(1234)
# download data
# # https://satijalab.org/signac/articles/pbmc_multiomic.html
file_path <- '/data/work/uniPort/signac_ATAC/'
# load the RNA and ATAC data
counts <- Read10X_h5(paste0(file_path,"pbmc_... |
117c82dd8abff8c4473884056ae97a7b14be2694545f5ef3d2ba6641aa35aacb | R | 13,320 | 301 | library(Seurat)
library(tidyverse)
library(FactoMineR)
library(factoextra)
library(uwot)
library(rliger)
library(harmony)
library(SeuratDisk)
library(SeuratWrappers)
options(stringsAsFactors = FALSE)
set.seed(1234)
# download data
# scRNA https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE113576
# MERFISH https://d... |
c09c4820c22b415efce8e336e1e558dbd9b97a996c242858d27a4b5fb5742786 | R | 13,331 | 405 | source('~/scripts/single_cell/atac.R')
source('~/scripts/single_cell/wrapper.R')
source('~/scripts/single_cell/markers.R')
source('~/scripts/single_cell/celltype.R')
source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/graphs.R')
source('~/scripts/grn/models.R')
setwd('~/projects/cutntag/')
select <- dp... |
d6fd90045bfcd36ff1bcd4f9acfde268d7a8e8dbeee15c54cee8f36d83d0a045 | R | 13,333 | 320 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(variancePartition)
library(BiocParallel)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(he... |
63d134f5c5945399b2b013574dd239de4c19e4529e3d84f263bddeb97c3d36ee | R | 13,392 | 263 | library(Seurat)
library(patchwork)
library(ggplot2)
input_directories <- c("../../DATA/b_cells_filtered_gene_bc_matrices/filtered_matrices_mex/hg19/",
"../../DATA/cd4_t_helper_filtered_gene_bc_matrices/filtered_matrices_mex/hg19/",
"../../DATA/cd14_monocytes_filtered_gene_... |
4ce433be218d0dafb41196ed127f409d4ab9d4ecf521d1c0cadeffbf751169cd | R | 13,416 | 384 | #' #################################################################################
#' #################################################################################
#' NetActivity on PROMOTE vis2 Figures
#' Figure 5 and Supp. Figure 14
#'
#' 1. Load data from differential... |
1a14b64f96e9070c3862b67b9777714a6f16236f8018783a5a59d08ec27f3251 | R | 13,425 | 281 | ---
Author: "Amin Haghani"
Paper: "DNA Methylation Networks Underlying Mammalian Traits"
Authors: "Amin Haghani1, 2 †*; Caesar Z. Li3, 4 †; Todd R. Robeck5; Joshua Zhang1; Ake T. Lu1, 2; Julia Ablaeva6; Victoria A. Acosta-Rodríguez7; Danielle M. Adams8; Abdulaziz N. Alagaili9, 10; Javier Almunia11; Ajoy Aloysius12; Nab... |
d8ddc86e00f4161c9561b0b97b2a46b34b01a6c2dd53bdfbe873fb8352ee1310 | R | 13,441 | 346 | #' Compute TF network and add it to hummus object
#'
#' Compute a protein-protein interaction layer from Omnipath request that will represent tf cooperativity.
#' This network is the top-layer of HuMMuS multilayer.
#'
#' @param hummus (Hummus_Object) - Hummus object
#' @param organism (integer) - Specie identifier fro... |
5eadfd9f07c21e002caaabe4c9aa0b7b143435ba9da5f204d278507c04096e0e | R | 13,444 | 308 | ######
# Parameters
#
path_home <- './R'
# Working directory with temperature data
setwd(path_home)
# Libraries to use
library(readr)
library(tidyr)
library(purrr)
library(ggplot2)
library(lubridate)
library(jsonlite)
library(dplyr)
library(stats4)
library(gridExtra)
library(grid)
library(stats4)
library(bezier)
libr... |
6705935bf62916816f68698f9cbd02d62f7fb1e41591fa67bae94eceba83395c | R | 13,450 | 382 | ---
title: "demux_visualisation"
author: "Luis Montano"
date: '2023-08-21'
output:
html_document:
toc: yes
toc_float: yes
code_folding: show
highlight: pygments
df_print: paged
params:
newsamplesheet: '~/metadata/10x_annotationsheet_2023-04_ncnb.xlsx'
datapath: '~/mnt_data/'
plotpath: '~/mn... |
e9c9ebf05fc9355bc7da1df481f6aab4ffe725ef26032cdc10ddb1fb3a4244d4 | R | 13,509 | 270 | library(tidyverse)
library(jsonlite)
library(org.Mm.eg.db)
library(WGCNA)
library(flashClust)
source(file.path("src","shared","WGCNA","enrichment_WGCNA_functions.R"))
perform_WGCNA <- function(datExpr,datTraits,result_folder,de_dir,literatureDF,als_markers,mapping=NULL,image_width=30,OrgDb=org.Mm.eg.db){
di... |
17f86728abcb8383aacaea4de05df4c268860686f68fa7d391890a39d9d2345d | R | 13,566 | 271 | #' STAAR procedure using omnibus test
#'
#' The \code{STAAR} function takes in genotype, the object from fitting the null
#' model, and functional annotation data to analyze the association between a
#' quantitative/dichotomous phenotype and a variant-set by using STAAR procedure.
#' For each variant-set, the STAAR-O p... |
b98c9b320dae8739ad30af7d9e4d3e641e39a77ce0bd37f74d8822e0cc20933a | R | 13,596 | 630 | # make objects for testfunctions
sigma <- matrix(data = c(1, 0.2, 0.2, 0.2, 1, 0.2, 0.2, 0.2, 1), nrow = 3)
complete.data <- MASS::mvrnorm(n = 100, mu = c(5, 5, 5), Sigma = sigma)
test_that("AMPUTE-001: all examples work", {
compl_boys <- cc(boys)[1:3]
expect_error(ampute(data = compl_boys), NA)
mads_boys <- a... |
f3a6fa85b0beaed7ab38260fdd6d3ab26fce23d3cdfe877da81d96a21d8376c7 | R | 13,632 | 381 | #!/usr/bin/env Rscript
source(here::here("src/shared/R-helpers/cohort_to_factors.R"))
source(here::here("src/shared/R-helpers/get_settings.R"))
source(here::here("src/shared/R-helpers/pca_fit.R"))
source(here::here("src/shared/R-helpers/pc_scores_loadings_plot.R"))
suppressPackageStartupMessages({
library("dplyr")... |
27dde54007c637b58a868c842573cb743c229d99765e930b5f7f82eece2eb7e3 | R | 13,755 | 378 | ##-------------------------------------------------------
## LOAD MODULES AND LIBRARIES
#-------------------------------------------------------
# module purge && module load shared slurm python/3.7.x-anaconda
# module load gcc/8.3.0
# module load hdf5_18/1.8.17
# module load R/4.1.1-gccmkl
rm(list = ls())
suppressP... |
ec31e3756ae80337903efa056fe2667c9ab488fec8fd9c24e55745a371379595 | R | 13,756 | 314 | rm(list = ls())
# Loading libraries -------------------------------------------------------
path_data <- "/data/kailash/DDP/data/"
.libPaths(c("/data/kailash/DDP/libraries/", .libPaths()))
source("/data/kailash/DDP/src/main/scripts/libraries.R")
source("/data/kailash/DDP/src/main/scripts/utils.R")
# CellCODE Ven... |
1cc19ef6c4c8cded09ae993bad92ab626a5ff6f747cabcc626d8c9c07d68c268 | R | 13,793 | 98 |
setwd("~/Documents/Microarray Gen/Angela_HRLR_EE_Stress/NAcc_Remove2outliers/11_FGSEA/UpdatedGMT_20210325")
HippocampalDE_AcrossDatasets<-read.csv("TableS4_HippocampalDE_AcrossDatasets_wAVEDirection.csv", header=TRUE, stringsAsFactors = FALSE)
Birt_Hagenauer_2020_BredLowRespondersToNovelty_Upregulated_HC<-unique(Hip... |
601cf493f64334bb9516b307b2547af09ba6a32366a53ca058b0e7747742136b | R | 13,804 | 303 | # Title: Rank order analysis
# Name: Heather White
# Date created: 02/12/21
# Last modified: 25/10/22
# License: MIT license
# Rank order analysis - between species and compared with the Krogman order (Krogman, 1930)
################################################################################################... |
cd705893093691ea75fd490e6591b228cdf9113c7cb255ba1aad0519abfe083b | R | 14,056 | 295 | library(coin)
library(dplyr)
library(ggplot2)
library(ggsignif)
library(ggpubr)
library(pracma)
library(extrafont)
font_import()
fonts()
dat.dir = ''
load(paste0(dat.dir,'data.RData'))
cpalette = c('#bebebe','#ff9900','#99ff00','#ff3333','#3366ff','#481567','#1f968b','#fde725')
ns = max(data$sbjno)
maxtrl = 12
maxli... |
f8deb82f6e3f98360843b006fbcdd9e0b43261a2869bb519d9d5e763b1794c88 | R | 14,134 | 283 | run_conf_LME<- function(imp, model,n_it=10, outdir="/data/pt_life_whm/Results/VRF_cSVD/LME/results/Conf/workspace_"){
# Calculates model results for a MIDS (Multiply Imputed Data Set) from mice.
# Model can take values "M1_VRF", "M2_exfunct" and "M3_globalcog".
#########################
# Frequentist... |
de81f333649192a9f7ac105c0d0ef2070a30848d50436add0b8e09b0e5374603 | R | 14,203 | 360 | ---
title: "Predict GRN from scRNA+scATAC data (Chen 2018 dataset)"
author: "Trimbour Rémi"
date: "2023-05-16"
output:
html_document: default
github_document: default
pdf_document: default
resource_files:
- figures/schema_HuMMuS.png
- figures/hummus_object_description.png
- figures/build_multilayer.png
- ... |
1ac91cdcbf0bc001199dea687ca86413a85d97a9a67ca7c30726b32c889b1702 | R | 14,219 | 352 | ##------------------------------------
## NA | WT | MAR 2021
##------------------------------------
# module purge && module load shared slurm python/3.7.x-anaconda
# module load gcc/8.3.0
# module load hdf5_18/1.8.17
# module load R/4.1.1-gccmkl
##------------------------------------
## Libraries
rm(list = ls())
libr... |
249c9459f3b352a3ca2b858ef021ebb0a7a914b53fefbb67a29c81bd45735e24 | R | 14,294 | 411 | source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/atac.R')
source('~/scripts/perturbator/de.R')
library(Pando)
library(destiny)
rename <- dplyr::rename
filter <- dplyr::filter
select <- dplyr::select
dist <- stats::dist
Matrix <- Matrix::Matrix
setwd('~/projects/cutntag/')
rank_cols <- function(x)... |
b9891cf3170a74647d3f7a3ec129f693ecf172d85daf96b41b57b4ca4a531758 | R | 14,295 | 367 | ---
title: "Functional enrichment analysis"
author: "Emma Jones"
date: "2023-10-11"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Functional enrichment analysis script
The purpose of this script is to perform functional enrichment analysis with the package gprofiler2... |
0bb761b4770bd2cebd6b176a83f4d387bb0d0b813c4e229092d9046c298fa37c | R | 14,308 | 512 | # function for running deseq2 across brain regions looking at sex
deseq2_all_regions_sex <-
function(counts_table,
metadata,
object_save_path,
results_save_path,
level) {
# create deseq data set
dds_region <- DESeqDataSetFromMatrix(
countData = round(counts_ta... |
4f3b0328539754e6f093793e9f3513e6e2a05ebec223b65e2bec5fe157dde86a | R | 14,368 | 380 | #!/usr/bin/env Rscript
source(here::here("src/shared/R-helpers/get_settings.R"))
source(here::here("src/shared/R-helpers/create_volcano_plot.R"))
suppressPackageStartupMessages({
library("cowplot")
library("dplyr")
library("DESeq2")
library("forcats")
library("ggplot2")
library("matrixStats")
library("p... |
0e5ecffc6e653315a85f353ab0dc80d15fe3e655e18a1c62634927a546b95897 | R | 14,376 | 241 | ## Modules
# module purge && module load shared slurm python/3.7.x-anaconda
# module load hdf5_18/1.8.17
# module load gcc/8.3.0
# module load htslib
# module load gsl/2.4
# module load macs/2.1.2
# module load R/4.1.1-gccmkl
## R Libraries
rm(list = ls())
library(devtools)
library(dplyr)
library(scran)
library(Seura... |
652a7ae037a70b8d0fd8cceff9124f66224c3fdf39d2133f541d33ca62ee23bc | R | 14,382 | 358 | ---
title: 'Saldana, Montano, et al. -- scRNA-seq: 052 Comparison of MUT vs. WT'
author: 'Florian Halbritter'
date: '`r format(Sys.time(), "%B %d, %Y %H:%M:%S %Z")`'
output:
html_document:
toc: yes
toc_float: yes
code_folding: show
highlight: pygments
df_print: paged
---
# Differential gene expr... |
0526d114a48d0c0dab209161eb6348b57c344a87bde8d6568be79436c8b08b78 | R | 14,407 | 405 | ####### Functions for logistic model
options(stringsAsFactors=F)
library(tidyverse)
library(data.table)
##############
myManPlot_PCP <- function(manPlot_dt, title = "Manhantton Plot",
chr_vec = 1:22, ntop = 3, sig_level = 2.5e-6, size = 20, chrGAP = 10){
# manPlot is a data frame containing columns: #CHROM, POS, ... |
10f4938c5dc7e57e799ccd9ff91ae2a9cffb1e7c9459c797c6b5ff9e0f876ec4 | R | 14,419 | 399 | # housekeeping: clear all existing data
rm(list = ls())
# load all the libraries
library(gprofiler2)
library(org.Dr.eg.db)
library(GOSemSim)
library(ComplexHeatmap)
library(circlize)
library(MASS)
library(ggplot2)
library(tidyverse)
library(WGCNA)
# set your current working directory (where all your files are)
se... |
8804d696968c8cdf30f2c2e8edcab008c107bae3f4190682edc7805e119f00f4 | R | 14,430 | 322 | #' STAAR-SPA procedure using omnibus test
#'
#' The \code{STAAR_Binary_SPA} function takes in genotype, the object from fitting the null
#' model, and functional annotation data to analyze the association between a
#' imbalanced case-control phenotype and a variant-set by using STAAR-SPA procedure.
#' For each variant-... |
9d0a543e215e68e8d18a4912026b4f9adfe9c48d028b7a7267f5c27e46bff72b | R | 14,433 | 464 | suppressPackageStartupMessages({
requireNamespace("argparse")
requireNamespace("broom")
requireNamespace("clusterProfiler")
requireNamespace("cowplot")
requireNamespace("digest")
requireNamespace("dplyr")
requireNamespace("gprofiler2")
requireNamespace("matrixStats")
requireNamespace("ggrepel")
requ... |
abad59ca9b4bb386d78d26bc2441fb64df3f38c4ed61ee0e4273aa421383144b | R | 14,451 | 435 | ---
title: "Working with custom transcriptomes using factR2"
author: "Fursham Hamid"
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
highlight: kate
toc: true
toc_depth: 3
number_sections: true
vignette: >
%\VignetteIndexEntry{factR}
%\VignetteEngine{knitr::rmarkdown}
bibliogr... |
66fe7d194c7fff8950940a2665f5556d9e846e3fd85cadfee84fb2103e506ec1 | R | 14,474 | 407 | ### Frame-by-Frame package ###
### activity parameters function ###
# below are functions which compute activity parameters
# i.e. parameters describing the overall activity of each fish
# without having to distinguish each active bout, contrary to activeBoutParameters
# these functions run on frame-by-frame deltapx d... |
dbc42c4d5e0a352b8bf24dd539a280f914596c3ebaa1ff88990c24503aa9298c | R | 14,478 | 413 | setGeneric("addTxCounts", function(object, countData, sampleData=NULL, psi=NULL,
verbose = TRUE) standardGeneric("addTxCounts"))
#' Expression/samples-related functions
#'
#' @description
#' A set of functions to incorporate expression data into factR object and
#' tests regulatory po... |
cc42c9a2ebf7dd5606066cf1209f0104d10ee083b0690cd00011840152950fd9 | R | 14,534 | 243 |
#Re-doing the same code for the NACC to make everything standard:
library(plyr)
library(dplyr)
setwd("~/Documents/SideProjects/BrainGMT/Gemma/NucleusAccumbens")
NACC_DatasetsOfInterest<-list.files()
#16
NACC_GeneSets_Temp<-data.frame(Dataset_Name=character(), Factor_Contrast=character(), Direction=character(), Taxo... |
ce1646cd8313d805af32fcfade43dde352a6b3af07814968c0587e7a7568d24d | R | 14,544 | 339 | ### Function defs
saveLog <- function(logName, opt, sampleTab, contrasts, mode) {
### Save a log file
modeMsg <- switch(mode,
salmon = "*** Differential expression analysis of Salmon counts using edgeR ***\n\n== Options ==",
vast = "*** Differential expression analysis... |
c4a9a538a6261b25abc021d2579b3eb7bb40ea8800605b1aa71262a749ed90ea | R | 14,570 | 401 | #!/bin/R
# Nicole Gay
# 1/11/23
# Updated 3/1/23
library(MotrpacRatTraining6mo) # also attaches MotrpacRatTraining6moData
library(data.table)
secret = "it's a secret"
secret2 = "it's also a secret"
#### Annotate objects in the data R package ####
objs = list_available_data(package="MotrpacRatTraining6moData")
types ... |
0bea7433211b7ece0de8ed914396f5f792b5ffb9c05b063874d3f3132c7fea81 | R | 14,664 | 340 | ### Function defs
saveLog <- function(logName, opt, sampleTab, contrasts, mode) {
### Save a log file
modeMsg <- switch(mode,
salmon = "*** Differential expression analysis of Salmon counts using edgeR ***\n\n== Options ==",
vast = "*** Differential expression analysis... |
0b698b81424ab05edb25094462b91af660072958ac049662e31f8ee1ee9b56c3 | R | 14,805 | 425 | # TODO: change track colours
# TODO: change arrow design
#' Plot exon and domain architectures
#'
#' @param object factR object class
#' @param ... Feature to plot. Can be the following:
#' \itemize{
#' \item{gene_id: }{ID of gene to plot}
#' \item{gene_name: }{Name of gene to plot}
#' \item{transcript_id: }{ID of ... |
ebb220eb94ed7511406e5e22d06739cc6868f38b9a872c770de71ebba9ac6706 | R | 14,836 | 294 | #Ok, now tackling the GMTs.
#This is going to be substantially more of a pain in the butt.
#Probably easiest to transpose the data.frames, run a for loop to replace gene symbols with orthologs and trim out missing values for each column, and transpose back.
#Old Code:
# str(c2.all.v7.3.symbols)
# str(t(c2.all.v7.3.sy... |
c342cbfa4b93608dfb8393cdfaab296ba08399211420ced593e359e5d15f70cd | R | 14,860 | 442 | ---
title: "L_R Brain"
author: "Christer Sylvén"
date: "`r format(Sys.time(), '%y-%m-%d')`"
output:
html_document:
self_contained: true
highlight: tango
df_print: paged
code_folding: hide
toc: yes
toc_depth: 3
toc_float:
collapsed: false
smooth_scroll: true
---
```{r setup, ... |
704162347bea2b303fb638a6f392ef3463ed5d9f83cedea00633e2d98e38e548 | R | 14,878 | 381 |
setGeneric("predictNMD", function(object, NMD_threshold = 50, verbose = FALSE) standardGeneric("predictNMD"))
#' NMD predictions at transcript and exon levels
#'
#' @description
#' Nonsense-mediated decay is an RNA surveillance mechanism which clears
#' transcripts harboring a premature stop codon. These transcripts... |
09d92b74a4044bc87c4cb191f6f8b5ad31a64d6470e1cf240ad308b838f2e6ce | R | 14,899 | 347 | ---
title: "Lateral analysis"
output:
word_document: default
html_document: default
pdf_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(pacman)
p_load(tidyverse, ggsignif,multcomp, broom, emmeans, DescTools)
setwd("~/Documents/ESYT1_spinal_locomotion_anal... |
1f9de9150a0b5263f4f8cb13836c1e4dc92906115c4d699ec1eb3264e44ae5a0 | R | 14,914 | 242 | #Gemma: Downloading HC Differential Expression Results
#Adapting the code from the Nucleus Accumbens analysis to make even more steps automated...
setwd("~/Documents/SideProjects/BrainGMT/Gemma")
DateGeneDecoder<-read.csv("DateGeneDecoder.txt", header=TRUE, stringsAsFactors = FALSE)
DateGeneDecoder_Human<-DateGene... |
e53eee61c8536a99f18501867135e2e967e7bd7dc298656248ec78267b645040 | R | 14,940 | 399 | ---
title: "NCNB WES Sarek-2.7.2 T-N-matched Variants Processing v3"
author: "Peter Zoescher"
date: "11/15/2023"
output: html_document
---
```{r install, echo=F, eval=F}
# to be run in ccribioinf/dockrstudio:4.0.3-v1
# dockerhub manifest digest: sha256:055a81938337a3fc2a15039476094058f5691e02b529578041af508352264323
... |
267db95f381d30c09cc9b6c79cce42a4dc762be09b158b8121fe6803b103cb49 | R | 14,981 | 349 | #!/usr/bin/env Rscript
### Score differential expression in RNA-seq data based on one of three quantification methods
### (salmon, vast-tools, or bam files and samtools idxstats)### using edgeR.
### Outputs a table of gene RPKM in each sample, a table of DE results, and several plots.
cArgs <- commandArgs(TRUE)
## Ch... |
20ea972358829b2c8a47a1606e47a73dbbb94c3b79800c1ab7378fdc845d06c6 | R | 15,022 | 581 | # This file contains the DelayedPLIER functions, and did not originate in the mousiplier project.
# For its original context, go here: https://github.com/wgmao/DelayedPLIER
library(HDF5Array)
library(glmnet)
rowNorm=function(x){
s=DelayedMatrixStats::rowSds(x)
m=DelayedMatrixStats::rowMeans2(x)
x=sweep(x,1,m... |
231ac1ad5d65caf7aa66b4c863285d9f126d30e082cc232501269e313af283e0 | R | 15,032 | 410 | ##-------------------------------------------------------
## LOAD MODULES AND LIBRARIES
#-------------------------------------------------------
# module purge && module load shared slurm python/3.7.x-anaconda
# module load gcc/8.3.0
# module load hdf5_18/1.8.17
# module load R/4.1.1-gccmkl
rm(list = ls())
suppressP... |
111d25419928780ee4392659b93093daf8a3a9bcda1053feb8dce270ade78fd2 | R | 15,092 | 331 | library(dplyr)
library(data.table)
library(getopt)
library(mr.raps)
library(RadialMR)
library(MRPRESSO)
library(TwoSampleMR)
##################
add_snp <- function(replace_snp_list, clump_out, exp_ma_data, outcome_ma_data, ref_path, cell_type){
additional_snps = c()
for (snp in replace_snp_list){
chr = clump_o... |
b96461ab7aa4bf50bd53399826c96cb35a93edfd33f90fb8d80e1d4577496749 | R | 15,100 | 331 | library(dplyr)
library(data.table)
library(getopt)
library(mr.raps)
library(RadialMR)
library(MRPRESSO)
library(TwoSampleMR)
##################
add_snp <- function(replace_snp_list, clump_out, exp_ma_data, outcome_ma_data, ref_path, cell_type){
additional_snps = c()
for (snp in replace_snp_list){
chr = clump_o... |
eba53c4fb08788f7c757bc16f6967ea72de98481d69e2dd2d36abd02b7b5a2a0 | R | 15,208 | 426 | source('~/scripts/single_cell/atac.R')
source('~/scripts/single_cell/wrapper.R')
source('~/scripts/single_cell/markers.R')
source('~/scripts/single_cell/celltype.R')
source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/graphs.R')
source('~/scripts/grn/models.R')
summarize <- dplyr::summarize
setwd('~/pr... |
1bd4df52ce67c7d8e65cc5b7c824b03f4292257bfa98437fcd1bdb4cd7473f51 | R | 15,316 | 310 | ################## Some functions to import XML DTS data
require("XML")
####################### Functions for importing data ##########################
#### Importing DTS data from an XML file####
flyDataImport <- function(xml_name) {
### Import the data from the .xml file.
flyData <- xmlParse(xml_name)
flyDa... |
2e8af023fcaf1eb99c467dd4134bfc1d02846ce4cce7eddc90f5df955cd16239 | R | 15,371 | 370 | #!/usr/bin/env Rscript
### Score differential expression in RNA-seq data based on one of three quantification methods
### (salmon, vast-tools, or bam files and samtools idxstats)### using edgeR.
### Outputs a table of gene RPKM in each sample, a table of DE results, and several plots.
cArgs <- commandArgs(TRUE)
## Ch... |
803e4ac3f64485846e3002bbe483377b4e7d47a6fd8f8d8420e0e4c24e188f70 | R | 15,504 | 409 | ---
title: "Saldana, Montano, et al. -- scRNA-seq: 07 chromosomal breakpoint mapping analysis"
author: "Luis Montano"
date: '2023-09-26'
output: html_document
params:
inputdata: '~/path/to/input_data/'
plotpath: '~/path/to/plots/'
cachedir: '~/path/to/cachedir/'
outpath: '~/mnt_out/figures/'
resourcepath: "~/... |
b429ce00dc2f3dee502e9c6b822aeca1d8445648e03fd4e178465bec090a9080 | R | 15,627 | 391 | ---
title: 'Saldana, Montano, et al. -- ATAC-seq: Genome snapshots'
author: 'Florian Halbritter'
date: '`r format(Sys.time(), "%B %d, %Y %H:%M:%S %Z")`'
output:
html_document:
toc: yes
toc_float: yes
code_folding: show
highlight: pygments
df_print: paged
---
# Intro
In this notebook, we gener... |
14a58e81c306add5a4c9f91590139220be459f514939b270ed644b4796a39e1d | R | 15,689 | 457 | ---
title: "Incorporating DE Results"
author: "Emma Jones"
date: "2023-05-23"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Incorporating differential expression results
The purpose of this script is to wrap in all DESeq2 significance values into my isoformswitchanal... |
f1c46dad0c5152dac93bc2bd316102b088b072953664b9738c769482aac79989 | R | 15,775 | 313 | #### Velocity estumation for single population ####
#### control - NSC-stage1 ####
#a_c(apropriate clusters, the interested cluster and its neighbors)
a_c_5 <- grep("NSC-stage1|NSC-stage2|RG-like",control@active.ident)
sc_5 <- subset(control,cells = a_c_5)
cell.colors_sc_5 <- sccore::fac2col(sc_5@active.ident)
# cur... |
fae666c740e688715ee2a6727387a9e6c049bf513d7b0515fd15a83cfe41a44b | R | 15,776 | 303 | # Cell-type gene expression correction using a linear model
rm(list = ls())
library(tidyverse)
# library(optparse)
# Loading necessary packages ----------------------------------------------
.libPaths(c("libraries/", .libPaths()))
.libPaths()
# source("scripts/libraries.R")
library(sva)
library(CellCODE)
library(... |
97970af913730f39d3fe7aceda2786a0fb4d35ee42b7af309f392b0871bc8889 | R | 15,792 | 428 | ---
title: "04_gene_regulatory_networks"
author: "Tabea M. Soelter"
date: '2023-10-02'
output: html_document
---
**Determination of signaling mediators using gene regulatory networks from MultiNicheNet**
__Goal__: Identify all potential signaling mediators (receptor -> target gene) by determining neighbors of all rece... |
fdcdf613be36edf52282780d69f827b6a9b7ba09a74c0d4540bfae84ac724998 | R | 15,836 | 487 | ---
title: "AROCM with Loglinear Transformed Age"
author: "Zhe Fei"
date: "2023-02-17"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
```
## LogliAge and Slopes
```{r}
states
statesPRC2
UseMaturity = FALSE ## 0.1Lifespan
```
```{r}
props = c(1:10)/10 ### 1.... |
e38657319508d41fb5481b1f4af72bd06d07fc683bedb9a3c773d62c4fd06e54 | R | 15,867 | 425 | source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/atac.R')
source('~/scripts/perturbator/de.R')
library(Pando)
library(destiny)
rename <- dplyr::rename
filter <- dplyr::filter
select <- dplyr::select
dist <- stats::dist
Matrix <- Matrix::Matrix
setwd('~/projects/cutntag/')
rank_cols <- function(x)... |
a1ab9f26134021c2819aa4014dd81c83bd704f6e23e84b576106b8757263b0eb | R | 15,919 | 405 | ###################################################
# ~~~ FramebyFrame package ~~~
# dvSorter
# function dvSorter to sort raw txt files from DanioVision
# for the most part, the function is a simpler version of vpSorter as DanioVision seems not to have ordering errors
# Francois Kroll 2024
# francois@kroll.be
######... |
e7d7e3c7b06264c0ca4db83d6cb7b0fbd1998ec8cea8ad04ab72d0b042c5c2ad | R | 16,028 | 444 | #' Make transparent theme
#' @param size border size. default value is 0
#' @importFrom ggplot2 theme element_rect element_blank
#' @export
transparent=function(size=0){
temp=theme(rect= element_rect(fill = 'transparent',size=size),
panel.background=element_rect(fill = 'transparent'),
... |
01b185f993fc2845918f3efb4337a96b1c3ad999c24b1329e95df4aeed775bad | R | 16,081 | 452 | #' Construct factR object class
#'
#' @description
#' Create a factR object from custom GTF transcriptomes
#'
#'
#'
#'
#' @param gtf Either path to custom transcriptome file (GTF) or a GenomicRanges
#' object containing GTF transcriptome data
#' @param reference Character value of the ID of genome used as reference. Se... |
efb8314ab3cfc1db4b8317a31d19253947d28f0df05b5a342dd70c311532cda8 | R | 16,106 | 402 | ######
# Parameters
#
path_home <- './'
# Working directory with temperature data
setwd(path_home)
# Libraries to use
library(readr)
library(tidyr)
library(purrr)
library(ggplot2)
library(lubridate)
library(jsonlite)
library(plyr)
library(dplyr)
library(stats4)
library(gridExtra)
library(grid)
library(stats4)
library... |
5bd3ec631df086a2400fed64cfb6e7fc2f470fc970811f413f748071813cfea9 | R | 16,116 | 444 | # Laura Aarnos 190213
# meaRtools: write burst summary
# original functions from meaRtools 2018, modification made by LAa and marked with _mod
# code for write_plate_summary_for_bursts
write_plate_summary_for_bursts_mod <- function(s, outputdir) {
master_sum <- .get_mean_burst_info_per_well_mod(s)
csvwell <- past... |
ec1db1f7f8f4d062ecfee961a2316986b0d600b38d5cf130482eb8a57b496502 | R | 16,125 | 495 | # MDB: This is what a real MorphyLib interface should look like. It is much
# simpler than what is being attempted. If we want to can some of the
# more time-intensive tasks inside of some C code, we can do that. But
# as it stands, the existing C-R interface for Morphy is attempting too
# many things within the body o... |
c2fcd4939239baefee7339f0e8e4d8e1cca6c2d8e18b58d72f0596d0c2b867a5 | R | 16,135 | 477 | ---
title: "DTU Analysis: Brain Region vs All"
author: "Emma Jones"
date: "2023-02-24"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Differential Transcript Usage (DTU) Analysis by Region in Mouse Brain lrRNA-Seq Data
For code review, I am tracking the amount of time... |
3b3148fb0f4c82fe2561daf3210d0bf323c873681cdda7d56e4ea117ea7f900e | R | 16,231 | 318 | workspace_path = "D:/Bio/data/20210510_data_reload/"
setwd(workspace_path)
# dataset_name = "coconut"
# dataset_name = "nc2020"
# dataset_name = "host2016"
dataset_name = "non_infected_as_4"
if (dataset_name == "coconut")
{
save_path = "./coconut/"
GSE_IDs = c("20346", "40012", "40396", "42026", "60244",... |
34357e400ace3c2fb2505983d5eb53d58620ba8d9ccd8f0700e86cd186fe6d6a | R | 16,241 | 337 | # to be run in ccribioinf/dockrstudio:4.0.3-v1
# dockerhub manifest digest: sha256:055a81938337a3fc2a15039476094058f5691e02b529578041af508352264323
unzip <- function(x) {
if(endsWith(x, ".gz")){
zz <- gzfile(x,'rt')
zz
}else{
x
}
}
vcf_col_parse <- readr::cols(
# "1" annotation can break the autom... |
bd14119385867e1cc558a801d84c1ccd9ad2edf048b258bdbc429abd7163b009 | R | 16,270 | 395 | #' Differential expression analysis
#'
#' WARNING: This script is work-in-progress
#'
#' Example usage:
#'
#' Rscript PATH/TO/diffexpression.R --rds-filename=sce.rds --model=~group --coef=group_MUT_vs_CTR --refgroup=CTR
#'
suppressMessages(library(futile.logger))
suppressMessages(library(getopt))
suppressMessages(l... |
2cbd4ae1726b42bd7b390364d21059070dfb8f95063d3f1850ebb8dad6dbf968 | R | 16,313 | 489 | ---
title: "DEGs_comparison_snclusters and hypergeometric distribution tests"
author: "Yuvarani Masarapu"
date: "2023-10-20"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Read the seurat object for the multiomics dataset to fetch the genecount
```{r}
mo_brain <- readRD... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.