sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
a9829c2a3191890ae813739e4bb30d4dac25ce373a6f3b20e6dcef98db30dee7 | R | 6,542 | 167 | #prepare phenotype file and covariates file
load('ROSMAP_rawcounts_38704genes.RData')
load('rosmap_s1112_deconvolution.RData')
setwd('rosmap_ieqtl')
mrna<-bulk[,match(rownames(mrmeta),colnames(bulk))]
# 1. normalization
library(edgeR)
logcpm = cpm(calcNormFactors(DGEList(counts = mrna),method = 'TMM'),log=T)
... |
ece701ad3f6d04f30dd4a8d9ce65267db183b92a5d4368c360974b7e2adafb87 | R | 6,546 | 149 | #!/bin/R
# Nicole Gay
# 15 May 2020
# Fix and merge ATAC-seq QC
#Usage : Rscript src/merge_atac_qc.R -w ~/test_mnt/PASS/atac-seq/stanford/batch4_20200928/Output/final/sample_metadata_20200928.csv -q ~/test_mnt/PASS/atac-seq/stanford/batch4_20200928/Output/final/qc/atac_qc.tsv -m ~/test_mnt/PASS/atac-seq/stanford/bat... |
a584c3c8f7d6b1e4b91d967e832344e85c665b09bcdae344539cc80ead67a3a6 | R | 6,547 | 91 | ---
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... |
6e50ebe87865bf41dcac159105eb5e084b5f3add05427cb95abeee172c5a145f | R | 6,601 | 179 | # run master model in batch
rm(list=gc()); gc()
library(dplyr)
library(doParallel)
library(glmnet)
# load annotation data
anageCaesar <- read.csv(paste0(stuffcaesar, "anAgeUpdatedCaesarVersion49.csv"),
stringsAsFactors = FALSE)
source('./utilities_analysis.R')
#### Calibrations ###########... |
8d95dcb5fa06c021e0798ecc9c1c0e7771b0904df0aa7a83ed2373d273918ff1 | R | 6,625 | 170 | # Load libraries ----------------------------------------------------------
library(tidyverse)
library(here)
# Arguments ---------------------------------------------------------------
args <-
list(
ENCODE_files = list.files(here::here("data", "ENCODE_LR"), full.names = TRUE, recursive = TRUE),
path_to_par... |
b104cc4a99ceed39c3ef76fd363dfe725c7be39dd1e71810b9da8c3a66570256 | R | 6,626 | 143 | ## WGCNA analysis
filter_outliers <- function(expression, z_threshold = 2.5){
# Input: an expression matrix
# Output: an expression matrix with
# outliers removed
... |
d3a995bf3cee2340a58457bfa140ccddce78486caff1f3b6e38c8a0e281c3905 | R | 6,631 | 182 | source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/atac.R')
source('~/scripts/perturbator/de.R')
source('~/scripts/perturbator/enrichment.R')
library(Pando)
library(harmony)
filter <- dplyr::filter
select <- dplyr::select
dist <- stats::dist
setwd('~/projects/cutntag/')
#### Read data ####
drugs_d21... |
278e6c43f2261c9c4ffab125e5aad66c528cdd2c8d8a6f552bf99ea8b65df391 | R | 6,633 | 186 | source('~/scripts/single_cell/de.R')
source('~/scripts/perturbator/de.R')
library(Pando)
library(Signac)
library(doParallel)
registerDoParallel(36)
setwd('~/projects/cutntag/')
feature_plot(rna, features=c('OPRM1', 'OPRK1', 'OPRD1', 'BTK'), order=T)
H3K27me3_ac_v_n <- read_tsv('data/results/diff_expression/H3K27m... |
3671cf0e329d27dc3d56836449733e2646f71a423d89efc43ea1e024c7c785fc | R | 6,638 | 143 | ## WGCNA analysis
filter_outliers <- function(expression, z_threshold = 2.5){
# Input: an expression matrix
# Output: an expression matrix with
# outliers removed
... |
fe9f0f3be3c39184b3dc5508fb6f7cd70a5da673cb6e0ab1b766919335035949 | R | 6,655 | 145 | ## WGCNA analysis
filter_outliers <- function(expression, z_threshold = 2.5){
# Input: an expression matrix
# Output: an expression matrix with
# outliers removed
... |
fd538cf6638b57a19391c9bd5930175f1ddc78499b2ab7cfe0d290408993024a | R | 6,679 | 171 | #' Multivariate amputed data set (\code{mads})
#'
#' The \code{mads} object is an S3 class that contains an amputed dataset,
#' i.e., a dataset with simulated missing values. The \code{\link{ampute}()}
#' function produces a \code{mads} object.
#' The \code{mads()} function is the S3 constructor.
#' The S3 class \code... |
15e0b89af367b805c7d155110dde7906fdfa9a4a8579ffe6f6bf4360e55c0141 | R | 6,681 | 161 |
######################################################################################
############## Leave One Clade Out Predictor ############################
# leave one clade out
library(dplyr)
library(doParallel)
library(glmnet)
## This string controlls what the outcome is. In this case it's maximum lifespan
... |
cdfaf4f51af790c63535fd779cefe5f599c2c68b5b724666e07b0dd1ead3896c | R | 6,728 | 156 | source('~/scripts/single_cell/graphs.R')
source('~/scripts/single_cell/de.R')
source('~/scripts/perturbator/de.R')
library(Pando)
setwd('~/projects/cutntag/')
select <- dplyr::select
#### Read data ###
marks <- read_rds('data/all_marks_list_v3.3motifs.rds')
rna <- read_rds('data/RNA/RNA_all_srt_v2.2matched.rds')
c... |
acbdd8ff4f9649cdfb820d272cebf63a719ac683b57a0321c6c65e11e7e0e19a | R | 6,729 | 195 | ################################################################################
reinstall = F
if(reinstall) {
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
# Bioconductor version 3.16 (BiocManager 1.30.17), R 4.2.0 (2022-04-22)
library(devtools)
install_version("reshape2... |
da7a3330774442f0cdf2ac4778684dfae8f3c6b9658128075b0cc0251aeb67b0 | R | 6,749 | 72 | ###########################################################################
## Author: Youtao Lu <luyoutao@sas.upenn.edu>
##
## Copyright (c) 2021-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania
## Copyright (c) 2021-2023, James Eberwine, Perelman School of Medicine, University of ... |
e3ee40305cea6b44a0349261acbf639d9b0172a8bf95e15d29fe693da3e0141f | R | 6,790 | 205 | #!/usr/bin/env Rscript
############ PREPARATIONS ############
library('clusterProfiler')
library('biomaRt')
library('stringr')
library('ggplot2')
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_m... |
0c8e9380e82c87c60d5eba40b94cadc0a83237ac0f93920e91fb48806ff8d50d | R | 6,801 | 193 | ---
title: "Processing and demultiplexing of G14-G27"
author: "Luis Montano"
date: '2023-07-19'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Processing of samples G14-G27 on cellranger
These samples from 10X Genomics were obtained in 2023 and are an extension to the o... |
09e39812ebb3c7f1eb59bf8bc2c0f8415d6939f0aa2eba2f223ffce5a86865a9 | R | 6,811 | 200 | ##' @title Functional enrichment analysis
##' @description Performs Gene Ontology (GO), Kyoto Encyclopedia of Genes
##' and Genomes (KEGG) pathway and Disease Ontology (DO) enrichment
##' analyses by \pkg{clusterProfiler} and \pkg{DOSE} packages
##' @param gene a vector of Ensembl gene id
##' @param simplify ... |
01111af9b4b8ee67f431bb59acf2886cce8ff6e04dc2eb70c8a5396e2b87ca03 | R | 6,837 | 224 | source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/atac.R')
source('~/scripts/perturbator/de.R')
library(Pando)
rename <- dplyr::rename
filter <- dplyr::filter
select <- dplyr::select
dist <- stats::dist
Matrix <- Matrix::Matrix
setwd('~/projects/cutntag/')
#### Read data ####
marks <- read_rds('dat... |
fc26d3560f6267f0d407f2a7e4ac78c9523015f51a4f9ac3aa9d11fb0648a12b | R | 6,844 | 260 | #' Decoration plot
#' @title Decoration plot
#' @param plot,x a "gg" or "dplot" object.
#' @param obj a "gg" object.
#' @param width,height scala numeric value.
#' @param pos one of "left", "right", "bottom" or "top".
#' @param ... extra parameters.
#' @return a "dplot" object.
#' @rdname dplot_utils
#' @importFrom ggp... |
4a9bce6ff0f56dd28e1309002c65bad58da05440f649924a27610e5466045806 | R | 6,853 | 214 | #' Imputation by logistic regression
#'
#' Imputes univariate missing data using logistic regression.
#'
#' @aliases mice.impute.logreg
#' @inheritParams mice.impute.pmm
#' @param ... Other named arguments.
#' @return Vector with imputed data, same type as \code{y}, and of length
#' \code{sum(wy)}
#' @author Stef van B... |
b6f11055dc5371f65c620b97d9a9b30bf18415cb7b7bfc4e48480243cff40983 | R | 6,871 | 144 | library(limma)
library(edgeR)
library(ggplot2)
library(cowplot)
library(tidyr)
library(reshape2)
library(plyr)
library(dplyr)
library(grid)
library(gridExtra)
current = getwd()
folder = "7_WOS_effects"
setwd(current)
system(paste0("mkdir -p inputs/",folder,"/corrected_expression_QN/"))
system(paste0("mkdir -p outputs/... |
81e0fc694fad9e733f708f07aedb74e02c0e81975f9e5ab39a7f58853a73c925 | R | 6,873 | 178 | # Load libraries ----------------------------------------------------------
library(tidyverse)
library(here)
library(plyranges)
library(ggtranscript)
library(cowplot)
# Load data ---------------------------------------------------------------
# snRNAseq
snRNA_files = list.files(here::here("data", "5prime_CUTRUN"),
... |
d74f48a3d662b3a883422978be2890b8e2f90e0e479f1778752fe1114690a763 | R | 6,883 | 185 | #' @noRd
.anno_circular <- function(data,
mapping = NULL,
geom = "tile",
orientation = NULL,
position = "auto",
space = 1,
width = 0.2,
... |
cf799fef5ae0825e1f6545080f7a1c9adb7829d13c7e60d9bd56ca6a3243cc1d | R | 6,891 | 171 | # Load libraries ----------------------------------------------------------
library(tidyverse)
library(here)
library(ggpubr)
# Load data ---------------------------------------------------------------
multi <-
read.csv(
here::here("data", "Full_multimap_parent_genes_data_combined_with_NAs.csv"))
GBA_GBAP1_mul... |
524104704a922bb138f83feab08ee25948f88d8715c75154e3493a79f2225156 | R | 6,899 | 307 | #########################
# TEST 1: Simple problem #
#########################
set.seed(123)
# generate data
n <- 1e3
y <- rnorm(n)
x <- y * .3 + rnorm(n, 0, .25)
x2 <- x + rnorm(n, 2, 3)
x <- cbind(x, x2)
y <- as.numeric(cut(y, 2)) - 1
# make missingness
y[sample(1:n, n * .3)] <- NA
ry <- !is.na(y)
wy <- !ry
# Use ... |
14b7d4897af4eb8d1c82658d5798ab70832327a1b55584a20a5cf68654e9ee8a | R | 6,931 | 172 | ############################################################################################
# Copyright (c) 2022 - Mucosal Immunology Lab, Monash University, Melbourne, Australia #
# Author: Matthew Macowan #
# This script is provided under the MIT l... |
4fbf01405400ed710cbec7b40cabeaf5e090f44cdc706c3d361b6052acb55fda | R | 6,970 | 162 | library(clusterProfiler)
library(enrichplot)
library(ggplot2)
library(org.Mm.eg.db)
library(pathview)
make_go_enr = function(genelist,
fname,
folder,
fromType="SYMBOL",
OrgDb=org.Mm.eg.db,
prefixes=c("... |
cb7730df22b0541e87d844b59d6b2bd8d07207ebaadffde52a452a01cfbcb5c2 | R | 6,972 | 154 | ---
title: "Untitled"
output: html_document
date: '2023-03-29'
---
```{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_analysis/Increasing N/Ventral/data 20230811 USE THIS (... |
d76e4dfdf90462c09c2efddc5f4f281cc20f28befdb0d4c74fabc3ac774e48cd | R | 6,977 | 227 | # library(vioplot)
library(glmnet)
library(WGCNA)
library(foreach)
library(doParallel)
library(tidyverse)
#out1 = ArrayConverter_EPICtoMM(cgname,
# InputEPIC = betas_epic)
#
ArrayConverter_EPICtoMM <- function(MammalianList = NULL,
InputEPIC, m... |
e8699993c06a37c67ce6c795bf9af51570d9fb0638df36261df8ea9a05754a74 | R | 6,987 | 150 | ## WGCNA analysis
filter_outliers <- function(expression, z_threshold = 2.5){
# Input: an expression matrix
# Output: an expression matrix with
# outliers removed
... |
55a5139fb0bdbd98cecc343942a7e8fca000b31bbcd9de47a1370565bab14458 | R | 6,988 | 157 | library(limma)
library(edgeR)
library(tidyr)
library(reshape2)
library(plyr)
library(dplyr)
library(grid)
library(gridExtra)
library(mgsub)
current = getwd()
folder = "4_cisRegression_model"
setwd(current)
system(paste0("mkdir -p outputs/",folder,"/cis_regressed/"))
## inputs
expression_dir <- paste0("inputs/",folder... |
e5b0668de4cba340b0c2ff46771ae124a61c3b16bdafb94b9b8555b7fc9948bf | R | 6,990 | 163 | #' Output co-network object
#' @description Functions to output edges or nodes data of co-network
#' to a file.
#' @param x \code{R} object can be convert to \code{cor_network}.
#' @param file a character string naming a file for writing. "" indicates
#' output to the console.
#' @param what either "edges" (def... |
cd993fe439950c957874f85184395d651f2ec4402b8984763b325adffa1bebcb | R | 6,993 | 150 | ## WGCNA analysis
filter_outliers <- function(expression, z_threshold = 2.5){
# Input: an expression matrix
# Output: an expression matrix with
# outliers removed
... |
475e6e1ea267bbed32dda1339a948fec460fa4f0876ab2fd8c95f1e1a10d3594 | R | 6,999 | 180 | ---
title: "01_ambientRNA_removal"
author: "Tabea M. Soelter"
date: '2023-07-17'
output: html_document
---
**Ambient RNA removal in snRNA-seq data from GEO (Accession #: GSE157827)**
__Goal__: Remove ambient RNA from GSE157827 (snRNA-seq) data for downstream analyses, especially since 4 samples returned the ambient RN... |
84a50f423af1d8fa7f4cd4822314694e0890246c456803d8724d6024601742e6 | R | 7,005 | 150 | ## WGCNA analysis
filter_outliers <- function(expression, z_threshold = 2.5){
# Input: an expression matrix
# Output: an expression matrix with
# outliers removed
... |
d34d8306983d2afd194a546a47964c1c03387b386f97bbbd97816b172c097f9b | R | 7,007 | 212 | ##################################################################################
# Load data
##################################################################################
df <- read.table("table_ind_params_covs.csv",
header = TRUE, sep = " ", as.is = TRUE)
df <- df[- which(is.nan(df$CTC)), ] ... |
c5164f3e0b841b7161afb4da7b6b411fabbd22afc586473256b79b62607a3080 | R | 7,019 | 195 | library(SpATS)
library(dplyr)
library(readr)
# Marginal AIC: since estimation is based on REML
# the penalty component only includes the number of
# variance parameters
compute.mAIC <- function(model) {
p <- length(model$var.comp) + 1
aic <- model$deviance + 2 * p
aic
}
# Marginal BIC: since estimation is base... |
20dd83daec76de7f9c892d9cab32d2e5ef33498f1d446ad95506f3e959c232e2 | R | 7,025 | 131 | ###########################################################################
## Author: Youtao Lu <luyoutao@sas.upenn.edu>
##
## Copyright (c) 2021-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania
## Copyright (c) 2021-2023, James Eberwine, Perelman School of Medicine, University of ... |
82309097877c3a466aae82842493b6b90a6532505f05adf83699f44847a610b5 | R | 7,026 | 250 | library(tidyverse)
library(fgsea)
library(biomaRt)
library(epitools)
### Read Data
metaData <- readxl::read_xlsx("ALS_Consortium_RNA_Metadata_01042021.xlsx")
metaData <- metaData %>%
mutate(ExternalSampleId = gsub("-", "_", ExternalSampleId))
MC_DEA_res <- read.csv("15Sep22_MC_HighHERVPtsvCtrls_CompModel_DEA.csv")... |
cd8ccab8616410bced885a538806a8d37320a76d9a6170c32e732999946f760b | R | 7,048 | 153 | ##---------------------------------------------------------------------------##
## 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
##-----------... |
d0fc662c5c1aa7a4eeb40d29fbe1de4e1ca4682a38838b7c97bf9a6783995134 | R | 7,052 | 207 | #' Multivariate amputation based on continuous probability functions
#'
#' This function creates a missing data indicator for each pattern. The continuous
#' probability distributions (Van Buuren, 2012, pp. 63, 64) will be induced on the
#' weighted sum scores, calculated earlier in the multivariate amputation function... |
ea9a5b6b14ca438a8868d43c49e1a863576ab765fa99085d5613317f6d8f726a | R | 7,066 | 226 | #' Display correlation matrix with nice format
#' @description Functions to display correlation object.
#' @param x any \code{R} object.
#' @param byrow a logical value indicating whether arrange the 'spec' columns on y axis.
#' @description Format an correlation matrix for printing.
#' @param corr a correlation matrix... |
98ab0f19fbefef72366bcea8e59869d51e08ded8e7bcea0204aa9fd227052436 | R | 7,085 | 177 | library(limma)
library(edgeR)
library(tidyr)
library(reshape2)
library(plyr)
library(dplyr)
library(grid)
library(gridExtra)
current = getwd()
folder = "2_calculate_residuals_and_DE_analyses"
setwd(current)
system(paste0("mkdir -p inputs/",folder,"/corrected_expression/"))
system(paste0("mkdir -p outputs/",folder,"/2_... |
e71b2ed9ddaff4e885bc7c031449d6f992f467256a12144f26ba95692bf550ca | R | 7,089 | 278 | ---
title: "Prep SC data for deconv"
author: "Asa Bjorklund"
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
---
Steps:
Load the R objects from multiomic... |
6a562f93133f4ab2fdc5da1ea7b930a3ebcf32f280180496d8f2d95044ad69a2 | R | 7,095 | 132 | getwd()
library(ggplot2)
library(ggsignif)
# vdj0
df = read.csv("df_exp2_vdj0.csv")
head(df)
df$Model=factor(df$Model,level=c("NetTCR-1.0","NetTCR-2.0","ERGO_LSTM","ERGO_AE","DLpTCR","HeteroTCR"))
df$based=factor(df$based,level=c("Pair-based","TCR-based","Antigen-based","Strict-based"))
p = ggplot(data=df,aes(x=Model... |
aeaec812da80947dff45af64212f12fa229a3b04ddf3362db838c9f5636bc04e | R | 7,113 | 202 | #' Title
#'
#' @param ffpath
#' @param sentinel
#' @param genopath
#' @param onlyGrp
#' @param zhstartsd
#' @param zhstopsd
#' @param px_thr
#' @param nframes_thr
#' @param extendBefore
#' @param extendAfter
#' @param replaceBy
#'
#' @return
#' @export
#'
#' @examples
replacePulses <- function(ffpath,
... |
7df3bfa1435c218a9b05063b6eb590cdeef8470c9b601f5be3ce811d83cf2703 | R | 7,196 | 194 | #' Compare two nested models fitted to imputed data
#'
#' This function is deprecated in V3. Use \code{\link{D1}} or
#' \code{\link{D3}} instead.
#'
#' Compares two nested models after m repeated complete data analysis
#'
#' The function is based on the article of Meng and Rubin (1992). The
#' Wald-method can be found ... |
b7c34a581711abef34acc6f836022d3204e924090c72fdd5c15567c1e1ee796c | R | 7,206 | 237 | library(gdata)
library(lme4)
library(ggplot2)
library(reshape2)
library(LMERConvenienceFunctions)
library(parallel)
library(viridis)
library(readr)
library(plyr)
library(readr)
library(gdata)
library(lmerTest)
library(multcomp)
install.packages("readxl")
library(readxl)
library(dplyr)
library(ggstatsplot)
install.pack... |
391ff17194137c273640b86d6cf5f73d6270eb4e2c3638b6fbf7d611cf55321f | R | 7,209 | 157 | #' Cross-valiation for Joint Principal Trend Analysis.
#' @param x A N * P * T Longitudinal data tensor. N is the number of subjects, P is the number of features, T is the number of time points.
#' @param y A N * Q * T Longitudinal data tensor. Q is the number of features.
#' @param timevec A vector for time points.
... |
9a138aa563f754fe11861af5e89d21cd5f61a11367f2dcdec5f7cc929902410f | R | 7,210 | 228 | # Author: Dominik Kraft
# This code performs data loading and handling of the ABCD data and subsequently performs
# Combat, Covbat, and Relief harmonization and saves raw/combat/covbat/relief data files for .py scripts
# This code outputs results from the "naturalistic setting" - i.e., harmonization is performed in t... |
ec6fe8cf8c6c3bc3b09de1e472f8b7718589fdeb2620cb7e24f6cb19976c4a26 | R | 7,216 | 167 |
## Since Mammalian lifespan predictor is trained on species-level data, we need to average all-sample data by species
## This is just a singled out convenience step, produce the averaged data and save it,
## so we don't have to run it many times for subsequent different predictor training
## In the end, save the file ... |
688fe42bc64b559ced50c325f27e7ddb7c954a027223bbd3328c21ad5eb83dbe | R | 7,234 | 192 | #!/usr/bin/env Rscript
## load normalized expression data
e.keep = readRDS('checkpoints/filtered_expression_matrix.rds')
keep.genes = readRDS('checkpoints/keep_genes.rds')
meta = readRDS('checkpoints/cayo_bulkbrain_combined_metadata.rds')
## Remove batch effects
library(limma)
meta = meta[order(match(meta$LID, col... |
22fa3a5aa9fd40a2d47e1fd06ddabff2432957cf5d9e49c351af0241a600326c | R | 7,266 | 252 | library(tidyverse)
library(DESeq2)
library(glmnet)
library(caret)
library(ROCR)
library(caTools)
set.seed(1)
#########################################
# Function originally from:
# https://www.jihongzhang.org/post/2019-02-19-lasso-regression-with-glmnet/
##########################################
coeff2dt <- functio... |
8db8a860e2a997de8b911db2899283be5c5e27c0d1481e656d566876cae00503 | R | 7,289 | 232 | source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/atac.R')
source('~/scripts/perturbator/de.R')
source('~/scripts/perturbator/enrichment.R')
library(Pando)
library(SeuratWrappers)
library(harmony)
library(future)
plan('multiprocess', workers=36)
filter <- dplyr::filter
select <- dplyr::select
setwd... |
ab806aeba24575e267680d0eeca890338f582abc879df1bd4f2975c73834158e | R | 7,289 | 187 | rm(list = ls())
# Using BM44 gene-coefficients, making scatter plots
# with other CellCODE models
# Global variables --------------------------------------------------------
path_results <- "/data/kailash/DDP/results/"
path_data <- "/data/kailash/DDP/data/"
path_geneExp <- "/data/srivatsan/Original_Expression_Files/... |
1afe584d89163a2873da07f1cd8099ec43cae7e6f7d3be09647efee3c012f389 | R | 7,297 | 173 | ---
output:
md_document:
variant: gfm
bibliography: refs.bibtex
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
options(width = 60, digits = 3)
set.seed(1)
```
# mice... |
a65c98d05234056a10ef3daabce7e06c2add610f55766177d7f678819bdb6450 | R | 7,309 | 246 | # Author: Dominik Kraft
# This code performs data loading and handling of the ABCD data and subsequently performs
# Combat, Covbat, and Relief harmonization and saves raw/combat/covbat/relief data files for .py scripts
# This code outputs results from the "controlled setting" - see manuscript for additional informati... |
7504fa9ba86c71df54fcd5055fbdf3c26348d79dbeab0c3f980cea71dcaaf2d7 | R | 7,347 | 158 | ##---------------------------------------------------------------------------##
## 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
##-----------... |
9174e30f65d8a229638a20155bd0e4663f9f0f6a5640928ce603f43b9bc4d7b5 | R | 7,360 | 200 | ###################################################
# ~~~ FramebyFrame package ~~~
# genotypeGenerator
# Francois Kroll 2022
# francois@kroll.be
###################################################
# genotypeGenerator used to be a standalone script
# which went up to v8
# accordingly, this counts as v9
# -----------... |
27fa5eba969d375a8514f4dcfca8c15306b13dc853c6830757359123c0b8fd6d | R | 7,388 | 202 | rm( list=ls(all=TRUE ) )
# Load and install necessary packages
load_required_packages <- function(packages){
new.packages <- packages[!(packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
invisible(lapply(packages, library, character.only = TRUE))
}
requ... |
d5268d7831050cf1059daa0f90913149bcb6c399f5363b57cf5932564385fe7e | R | 7,392 | 202 | rm( list=ls(all=TRUE ) )
# Load and install necessary packages
load_required_packages <- function(packages){
new.packages <- packages[!(packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
invisible(lapply(packages, library, character.only = TRUE))
}
requ... |
345d9d4561cf27050d5756d679f09c4d200bb395106ff0001d0dfb6a99d280e0 | R | 7,446 | 240 | # This script downloads and preprocesses gene-level data and metadata from
# all samples in recount3
#
# Output:
# A tsv file containing an array of gene expression data, and a metadata file
# R version used: 4.1.0
# Some conda issue causes the installation of GenomeInfoDbData to fail silently, preventing
# recount3 ... |
1b2aa2c0841d0c8dd0fe270c50d143e3e0ec58af481f25b7fb09bae9877acbc0 | R | 7,480 | 194 | ##' @title Shiny correlation plot
##' @description A simple \pkg{shiny} app to show scatter plot of correlations
##' between two genes/miRNAs on local web browser
##' @param gene1 a vector of Ensembl gene ids or miRBase v21 mature miRNA ids
##' @param gene2 a vector of Ensembl gene ids or miRBase v21 mature miRNA ... |
5983e696f1316b84674447f3531144ba4821567e89fede417d3f89625967a6b8 | R | 7,480 | 228 | # Given list of corr vals r, return p-vals ----------------------------------------
pvalfromtcor <- function(r, n)
{
tstat = r * sqrt( (n-2) / (1 - r^2) )
p = 2 * pt(-abs(tstat), n-2) # 2* because two tailed test
rm(tstat) #reduce memory footprint
stopifnot(length(p) == length(r))
p[abs(r)==1] = 0
return(p... |
13e32583a6e7120741f176738e4b55097ce1bc1f111da85ec72c1fe1ad4ed91a | R | 7,483 | 173 | #' Imputation under MNAR mechanism by NARFCS
#'
#' Imputes univariate data under a user-specified MNAR mechanism by
#' linear or logistic regression and NARFCS. Sensitivity analysis under
#' different model specifications may shed light on the impact of
#' different MNAR assumptions on the conclusions.
#'
#' @rdname mi... |
a487c2e9384e05d4084f92d88ca12b2595566445707a7bb3415c83c6f17e5881 | R | 7,502 | 231 | ## Compare expression between maternal and foetal placentas
library(limma)
library(edgeR)
library(DESeq2)
library(magrittr)
library(tidyverse)
experiment_data <-
snakemake@input[['expression_results']] %>%
readRDS() %>%
{DGEList(
counts = assays(.) %>% extract2("counts"),
samples = colData(.),
gene... |
bdd809969e735e9b37510a16f3580a76375dea431ecb81c460a03cfa054d978c | R | 7,526 | 256 | ###############################################################################
#
# Optimize MARA model parameters (find maximum likelihood estimates)
#
# AUTHOR: Maciej_Bak
# AFFILIATION: University_of_Basel
# AFFILIATION: Swiss_Institute_of_Bioinformatics
# CONTACT: wsciekly.maciek@gmail.com
# CREATED: 20... |
03cda1ea399ac6944ff8595492c8b4f98bd07024ba817652de55f68aab7cc525 | R | 7,535 | 201 | options(warn=-1)
suppressPackageStartupMessages({
library(tidyverse)
library(RColorBrewer)
library(optparse)
})
option_list = list(
make_option(c("-a", "--abundance"), type="character", default=NULL, help="input NORMALISED abundance file: gene_normalised_abundance.txt [REQUIRED] [default= %default]", metavar=... |
f696d44d3f32d6f2b09ba5b32f8288347ef950d2ba97c6afb07025acfbfa0183 | R | 7,573 | 150 | #!/usr/bin/Rscript
# Source: https://github.com/opain/Calculating-FUSION-TWAS-weights-pipeline/
library("optparse")
option_list = list(
make_option("--RDat_dir", action="store", default=NA, type='character',
help="Directory where FUSION LD reference files are stored [required]"),
make_option("--coord... |
861badf17fb4fb21757562915d04dd2d3b1257917d1c8c7124b6aa7818890159 | R | 7,590 | 123 | # 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; N... |
c7c7aa0933c4b0cc835ffb75bca5dcb79176034b92e0732f1c7c4f0528133d08 | R | 7,596 | 231 | ---
title: "OFT"
output:
word_document: default
html_document: default
pdf_document: default
date: '2022-12-05'
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Load data
```{r}
setwd("~/Documents/Systemic ESYT1 project locomotion, behavior, survival, anatomical data/Behavioral paradigms ... |
0eb401aef343bc7fa693639554fcab91109a30d6cbabd17579c869b0fd549613 | R | 7,601 | 193 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
5afc6c80e57b90644facc914a114c995522d11f1f1e352260930ede4380d44d2 | R | 7,601 | 193 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
7a3970903cc2abf8108da1cdd5e2accf5859de7fe6622ec6168749899947f7b0 | R | 7,611 | 160 | #' Conditional score test for individual variants in a given variant-set
#'
#' The \code{Indiv_Score_Test_Region_cond} function takes in genotype,
#' the genotype of variants to be adjusted for in conditional analysis, and
#' the object from fitting the null model to analyze the conditional associations between
#' a qu... |
04a1c3cba893ae79e1d39a737ac912964932f8ad088fae430a1ea35b1a96f8ca | R | 7,619 | 178 | #####load Libraries ####################
library(readxl)
library(dplyr)
library(tidyr)
library(matrixStats)
library(ggplot2)
library(gridExtra)
library(reshape2)
library(lubridate)
library(readr)
rm(list = ls())
Sys.setenv(TZ = "Etc/GMT-1")
##########
# Temp and RH Data, 1 cm above ground, and irradiance
##########
... |
b2b20ae0f6b1c10a2b37c297bbb6dad8f34b10cf927329eb21fc45056b043c3b | R | 7,620 | 219 | #' Wrapper function that runs MICE in parallel
#'
#' This is a wrapper function for \code{\link{mice}}, using multiple cores to
#' execute \code{\link{mice}} in parallel. As a result, the imputation
#' procedure can be sped up, which may be useful in general. By default,
#' \code{\link{futuremice}} distributes the numb... |
f7a3cc8ec768f52e73f789335268d362483b7be0c7f602c67cf88bcdaa5407c9 | R | 7,638 | 134 | # code for reading and preparing data for environment
# load in packages
library(tidyverse)
library(here)
# proc time
ptm <- proc.time()
# read in metadata
sample_collection_metadata <- read.csv(
here("doc", "sample_collection_metadata.csv")
)
# read in counts data
merged_counts <- read.table(
here("data", "nex... |
3b627964b6b92531469e2388baa24c0963c8e3cf62b7ad9e18ca72ca4d197034 | R | 7,649 | 237 | ---
title: "Nasa Brain GSEA Recon3D pathways analysis"
author: "Deanne Taylor PhD, Children's Hospital of Philadelphia, UPenn"
date: "2022-11-21"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(fgsea)
library(dplyr)
```
```{r configurable variables}
#Configure this s... |
82de7e41150218eddd0846181cc0976b85c26517281e6cf1c2c5f475f538f36a | R | 7,666 | 173 | # set working directory
setwd("~/Desktop")
maindir <- getwd()
datadir <- file.path("~/Desktop/")
# load packages
library("readxl")
library("ggplot2")
library("ggpubr")
library("reshape2")
library("emmeans")
library("hrbrthemes")
library("umx")
library("interactions")
library("car")
# import data
socialdoors_model4 <-... |
329ff1d2b0b14b25d8894f401c82b29a794103d109c8faf2cf480d0f86a81bf1 | R | 7,675 | 183 | # Title: Fusion vs skull size
# Name: Heather White
# Date created: 02/12/21
# Last modified: 25/10/22
# License: MIT license
# Correlation between suture fusion and skull size
#######################################################################################################
rm(list = ls())
library(tidyve... |
83572ef683d15499b176f34af050e983846f3151f36e0ad6f3250bd76f9e2a23 | R | 7,679 | 286 | #### Code for plotting survival curve in Lam, Ndayisaba et al 2024 Neuron FIGURE S7D
#### Figure uses data from IL-HCNT61-A53T RFP250
# 7/14/22: Plotting survival curves of RFP+ neurons (A53T +/- PFF; NoNAC +/- PFF) irrespective of inclusion status (for manuscript figure)
# Based on 3/1/21 script
# HCNT61-A53T (ve... |
9d2f87686f10a8706b6eb4da7720e82348ad6da116582f3b5d73f92bdcfe9682 | R | 7,689 | 107 | #' Fit generalized linear mixed model with known relationship matrices
#' under the null hypothesis for related samples.
#'
#' The \code{fit_null_glmmkin} function is a wrapper of the \code{\link{glmmkin}} function from
#' the \code{\link{GMMAT}} package that fits a regression model under the null hypothesis
#' for rel... |
7b3064c58ac8774d8078bacab3f468bd10527c990f5196daf7d8d11b3c5a7745 | R | 7,736 | 206 |
# source("../Data/fns.R")
confidence = FALSE
# source("../Data/readdata_run.R")
AllSamp = read.csv("/Users/feiz/Dropbox/MammalianMethCombined/StuffCaesar/datSampleCombinedfinal.csv")
tmpdat = anAge %>%
select(SpeciesLatinName,Order,
maxAgeCaesar,weightCaesar,Gestation.Incubation..days.,
averaged... |
5ba7eb150c713459f1eb4d3a0b83185d9eada16091a468feea72270825d43679 | R | 7,747 | 197 | ---
title: "WS analysis"
output:
word_document: default
html_document: default
date: '2023-03-14'
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(pacman)
p_load(tidyverse, ggsignif, multcomp, broom, emmeans, DescTools)
setwd("~/Documents/Systemic ESYT1 project locomotion, beh... |
f5213421eda971e4fe27db1d7850321950cb9dc81afae140be135df65ebc5c4b | R | 7,778 | 198 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
535ddd8c4c72968b1a0ef87997775c42b47f04532a2436c1a05769aae8a741f6 | R | 7,797 | 198 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
54f36bd18ed59c039fe9d2d6315a1744f68b2ded2bd629e3ab80868bdd393c5e | R | 7,797 | 198 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
98cffc8eecd907400df1b3316a5de33d5b10d0ace131367e7fa1acae5c5a006e | R | 7,806 | 184 | setwd("/home/luroth/PycharmProjects/phenoflow_early_growth/Data_soy_Track")
library(plantecophys)
library(readr)
library(lubridate)
library(dplyr)
library(ggplot2)
# Field data BSc Philip Braun
files <- list.files("CSV_Martrack_Field")
df_soy_TRACK_outdoor <- data.frame()
for (file in files) {
df_ <- read_delim(pas... |
188bda83edf6db1cdc45408fdd4265636643a7fa5bed8d3a597c04ec9c0fdef0 | R | 7,821 | 198 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
cdf833d8bcadc68614a9d0663b9830ea6c85a0d988fd7de398813fa8c6be83a5 | R | 7,821 | 198 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
f96f78d0d0f2b8bc79f6c903efae3a9272f299b5dbd8d50f8eb228a4cd38e74b | R | 7,821 | 198 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
94b67a3e92437880e24fbd6c49da74ee4fd8ab7c34531f33cf0c701f48033298 | R | 7,848 | 208 | # This script outputs plots of the correlation with reference placenta clusters: paper Fig 1C
# code adapted from https://github.com/archavan/covid-placenta
suppressPackageStartupMessages({library(org.Hs.eg.db)
library(tidyverse)
library(Seurat)
library(clusterProfiler)
library(org.Hs.eg.db)
library(ComplexH... |
0b12733969d11bddd2ee886c879838dc9bccab8423ae2e032c17ef51f984ca27 | R | 7,858 | 204 | ### Frame-by-Frame package ###
### activity parameter ###
# function activityParameter(...) -----------------------------------------
# it expects dn, i.e. frame-by-frame data splitted by day/night in a list
#' Title
#'
#' @param dn
#' @param parameter
#' @param dayduration
#'
#' @return
#'
#' @examples
#' @importF... |
6ba7b7210d54f0d39812b9b406ac4e1712f971c025120d32c431e3074433071d | R | 7,861 | 199 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
08657222c6016f9d6be25f25608417e2daa9fae42de8233f74a9277fca8c3631 | R | 7,885 | 199 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
fcb32161a4644cbf5cd42d2bce809f28d505a42abf657f2c335d1af5f2ed470b | R | 7,914 | 350 | # ---- complete ----
nhanes_mids <- mice(nhanes, m = 2, print = FALSE)
nhanes_complete <- complete(nhanes_mids)
test_that("MICE-001: No missing values remain in imputed nhanes data set", {
expect_gt(sum(is.na(nhanes)), 0)
expect_equal(sum(is.na(nhanes_complete)), 0)
})
test_that("MICE-002: Data set in returned m... |
4503944d8ccb08dfedb6a1180b5d27bdc8788f2af397ec7a26f28e221c75a020 | R | 7,915 | 193 | library(dplyr)
library(gridExtra)
library(ggplot2)
library(plyr)
library(reshape2)
library(tidyr)
library(mgsub)
library(stringr)
current = getwd()
setwd(current)
folder = "6_calculate_cisRegression_effect/median_obs_population_differences_effect_cisRegression"
## inputs
celltypes <- c("B","CD4T","CD8T","monocytes","... |
a8aec1341d023440eb55f76e087b9de57c7ccfa52d004bf3d8fa7063496182e9 | R | 7,925 | 200 | ## Differential expression analysis with limma-voom
## Sex-specific analysis for specific brain region
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(optparse)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
save_volcanoPlot <- function(top... |
917e61536f482e93b75dd15a3c2156c09eab6d1d8b8839dbab50eb2b5988d4d1 | R | 7,929 | 275 | #' Creates a \code{formulas} argument
#'
#' This helper function creates a valid \code{formulas} object. The
#' \code{formulas} object is an argument to the \code{mice} function.
#' It is a list of formula's that specifies the target variables and
#' the predictors by means of the standard \code{~} operator.
#' @param ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.