sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
860f1ce92361e7ee31db54290097129c4c377bf5615a49a2e72adf8ec1500501 | R | 16,340 | 374 | ##-------------------------------------------------------
## SEURAT ANALYSIS | MODULES & 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
# NA104, NA108,... |
10905a26a4dc34d761f3b2aad4a907b6e45691a1a2a0dfdb9f52688de8551f48 | R | 16,345 | 610 | LIB='/cluster/tufts/patralab/rbator01/R_libs/4.4.0'
.libPaths(c("",LIB))
suppressPackageStartupMessages({
library(openxlsx)
library(tidyverse)
library(tools)
})
setwd('/cluster/tufts/slonimlab/rbator01/covid-placenta-edlow/')
meta = read.xlsx("data/AGE 9.20.21 sample_metadata.xlsx")
unique(meta$folder)
meta... |
09de1d2c86b03bbc4cc1b5f51ef6e627f784991cb27945898d8a24eef141d3fa | R | 16,383 | 379 | library("lme4")
library("lmerTest")
library("BayesFactor")
library(DiagrammeR)
# ensure that lmerTest doesn't mask lmer, which would cause us multiple problems
lmer <- lme4::lmer
library(broom.mixed)
library(kableExtra)
library(tidyverse)
library(modelsummary)
library(robustlmm)
library(performance)
library(DiagrammeR... |
a3252951756a140d12e9be97ad78256309563c62b8791e989c37db85cea8fa6e | R | 16,453 | 484 | # Code copied from https://github.com/mcdonohue/longpower/blob/master/R/lmmpower.R at 2023/06/01
# this fixes the following issue: https://github.com/mcdonohue/longpower/issues/6
# When calling lmmpower(), it is required that "exactly one of 'n', 'delta', 'power', and 'sig.level' must be NULL".
# When calling lmmpower ... |
a7a2b278cab0a93c6c7378f1fcfc4322b3df1a3cd2d08eed805061714ef088b5 | R | 16,472 | 435 | source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/atac.R')
source('~/scripts/perturbator/de.R')
library(Pando)
filter <- dplyr::filter
select <- dplyr::select
setwd('~/projects/cutntag/')
#### Read data ####
marks <- read_rds('data/all_marks_list_v3.3motifs.rds')
rna <- read_rds('data/RNA/RNA_all_... |
81b5b3684436ca2a9e32e94221286dee5998124948983abb8e90cd38dd8d35f1 | R | 16,499 | 410 | #' Compute links between TFs and DNA regions (ATAC peaks)
#'
#' Compute and add bipartite between TFs and DNA regions to hummus object.
#' Links are computed based on the binding motifs of TFs and their locations
#' on a reference genome.
#' Currently based on Signac AddMotifs function (--> motifmachR, itself based on
... |
c5ade92ec0635b242a902ba51e0a49f9788d691d2140b8e7f074722846a08303 | R | 16,732 | 422 | library(ggeffects)
library(ggplot2)
library(cowplot)
library(dplyr)
comp_plot <- function(model, predictor, dir, impdata){
#function to plot effects for one model and predictor
wd=dir
#load imputed dataset
miceadds::load.Rdata(objname = "imp", paste0(impdata))
#Generate values to pl... |
52352ccb958f42fbed0df9e50b7b170d992b0f04ac86c37e47248b993b46a180 | R | 16,744 | 489 | ---
title: "01_differential_ccc_multinichenet"
author: "Tabea M. Soelter"
date: '2023-07-19'
output: html_document
---
**Differential Cell-Cell Communication Analysis using MultiNicheNet**
__Goal__: For every dataset, perform MultiNicheNet analyses between AD and CTRL to identify ligands, receptors, and potential down... |
a48fd18f052427329083f8dd3abcd7ade19b42e977e3b8c4b960de0d24af2cd6 | R | 16,814 | 363 | #' Choice Reaction Time task, linear ballistic accumulator modeling
#'
#' @description
#' Individual Bayesian Modeling of choice/reaction time data with the following parameters: "d" (boundary), "A" (upper boundary of starting point), "v" (drift rate), "tau" (non-decision time).
#' The model published in Annis, J., Mil... |
23d6f67ec7cb80e6b1565e8bb4800a991a567d7f2c9008a1a9799cf862233f6b | R | 16,828 | 246 | ###########################################################################
## 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 ... |
e157a1aab81a80cd14770f4380a76112d6b65c8d3d676a515150d3595b4f6e6e | R | 16,868 | 430 | library(tidyverse)
library(jsonlite)
suppressPackageStartupMessages({
library(clusterProfiler)
library(enrichplot)
library(DOSE)
library(org.Mm.eg.db)
library(org.Hs.eg.db)
library(ggplot2)
library(pathview)
library(tidyverse)
})
library(argparse)
library(WGCNA)
library(flashClust)
get_args <- functi... |
818a8b90528f497e93d521211f22621d247a5346293439fe7cb232aff0f23633 | R | 16,981 | 491 | ---
title: "Protein Domain Information"
author: "Emma Jones"
date: "2023-05-15"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Use Pfam to annotate protein domains
Now, I want to try using external tools for analysis. To do this I need to extract nucleotide and amino... |
758f755a4bf33fffc51800ae9397ad95af9211bf97367d73fc189dc6f641a992 | R | 17,035 | 150 | library("VennDiagram")
venn.diagram2 <- function (x, filename, height = 3000, width = 3000, resolution = 500,
units = "px", compression = "lzw", na = "stop", main = NULL,
sub = NULL, main.pos = c(0.5, 1.05), main.fontface = "plain", ... |
4fd64ab68a0bf7653c17717be6c104593f2a1e295977d769f299d20612307ec1 | R | 17,037 | 557 | ---
title: 'DTU Analysis: Brain Region and Sex'
author: "Emma Jones"
date: "2023-02-27"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Differential Transcript Usage (DTU) Analysis across Sex in Mouse Brain lrRNA-Seq Data
For code review, I am tracking the amount of ti... |
44c3d9e3ff4d9fe1bc43685e2e62f6a4ac4b458fcf5fee24877013ae8c452af5 | R | 17,120 | 394 | ################################################################################
# Status: finished
# How to use it: just go to line 207 to plot the proportion of genes using a threshold of 5% of individuals.
# ------------------------------------------------------------------------------
# This script contains the cod... |
56e12748ea230c8949bd1ae39c83da76f896c273b9c597b0486f69a0b8ff7243 | R | 17,131 | 527 | source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/atac.R')
source('~/scripts/perturbator/de.R')
source('~/scripts/perturbator/enrichment.R')
library(Pando)
filter <- dplyr::filter
select <- dplyr::select
dist <- stats::dist
setwd('~/projects/cutntag/')
#### Read data ####
drugs_all <- read_rds('dat... |
d2d63555ee9f40255aca3c929b2db9b8a8777eb95a255c87ffa7230474615841 | R | 17,196 | 327 | #' STAAR procedure for conditional analysis using omnibus test
#'
#' The \code{STAAR_cond} function takes in genotype, the genotype of variants to be
#' adjusted for in conditional analysis, the object from fitting the null
#' model, and functional annotation data to analyze the conditional association between a
#' qua... |
28d2d26336fd1c52a228394f346d599f7cc801ef9501476690ac691ababa387a | R | 17,226 | 334 | library(ggplot2)
library(dplyr)
library(ggprism)
library(pheatmap)
### set the working directory
if (rstudioapi::isAvailable()) {
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
} else {
# If running as a script, finding the file is harder
# https://stackoverflow.com/a/55322344/10930590
this_file <... |
71f484943f8dc857c758fa6512ecea2bf8b028c02d6dd1253248a6fd921f27d5 | R | 17,274 | 177 |
#Genes with strong evidence supporting their differential expression in psychiatric disorder (meta-analysis):
Gandal_2018_PsychTranscriptomeVsGenetics_MicroarrayMetaAnalysis<-read.csv("Gandal_2018_PsychTranscriptomeVsGenetics_Suppl_TableS1_MicroarrayMetaAnalysis.csv", header=TRUE, stringsAsFactors = FALSE)
Gandal_20... |
c856acefc921a5423c831382940753ceb6661869d8c3eddbb8032ae243c22a0f | R | 17,291 | 491 | ---
title: 'DTU Analysis: Pairwise Brain Regions'
author: "Emma Jones"
date: "2023-02-23"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Differential Transcript Usage (DTU) Analysis in Mouse Brain lrRNA-Seq Data
For code review, I am tracking the amount of time that t... |
d6731f19a51b7a95a588c1d3de65b78f5c6296b0c87d9e7ace08e86e566f4156 | R | 17,507 | 510 | ---
title: "Neurological Disease Gene Enrichment"
author: "Emma Jones"
date: "2023-03-14"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Differential Transcript Usage (DTU) Analysis across Sex in Mouse Brain lrRNA-Seq Data
The goal of this script is to compare my DTU ... |
2d788f704c5fe1983de40f5c22f516824d8260347c1847706563443a6b510bbd | R | 17,819 | 474 | #' EnsembleAge Easy Workflow Functions
#'
#' These functions provide a simple 4-step workflow for users:
#' 1. load_methylation_data() - Load methylation data
#' 2. load_sample_sheet() - Load and prepare sample information
#' 3. preprocess_data() - Automatically detect platform and preprocess
#' 4. predict_ages() - R... |
acd89cb16dde2c4bc74281d673e83f81f53d6f4570d615354c65e07288d2ef66 | R | 17,856 | 422 | # protected areas shapefile cleaning
# WDPA shapefiles can be obtained from Protected Planet's website
library(sf)
prot1=st_read(dsn="./WDPA_WDOECM_May2022_Public_all_shp/WDPA_WDOECM_May2022_Public_all_shp_0", layer="WDPA_WDOECM_May2022_Public_all_shp-polygons")
prot2=st_read(dsn="./WDPA_WDOECM_May2022_Public_all_s... |
b89b568f15f11a6f75ea30a55b86761f3f45f3a5fdb9f84edee6742fb347ebd3 | R | 17,863 | 512 | library(readxl)
library(dplyr)
library(DESeq2)
library(ggplot2)
library(EnhancedVolcano)
############################################
# Plot Function
library(scales)
numColors <- 2 # How many colors you need
getColors <- scales::brewer_pal('qual', palette = "Set1")
myPalette <- getColors(numColors)
names(myPalette) ... |
baf5a74018577a6d64441d36828c52a445850dce1059bd08e838c0edf7f5cc72 | R | 17,920 | 316 | ## 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... |
ad819f1ea760a0923731bdfe6c9e93521c4c54db41acd0e4adb407ffdc2bfcc5 | R | 17,941 | 388 | #' Choice Reaction Time task, linear ballistic accumulator modeling
#'
#' @description
#' Hierarchical Bayesian Modeling of choice/reaction time data with the following parameters: "d" (boundary), "A" (upper boundary of starting point), "v" (drift rate), "tau" (non-decision time).
#' The model published in Annis, J., M... |
2576bb985416d8955dcae58bb943f82901069026635cfa00dd1b6a60c3ac714d | R | 17,969 | 551 | ---
title: "02_gse_seurat_preprocessing"
author: "Tabea M. Soelter"
date: '2023-07-13'
output: html_document
---
**Pre-processing of snRNA-seq data from GEO (Accession #: GSE157827)**
__Goal__: Process GSE157827 (snRNA-seq) data for downstream analyses.
__Reproducibility__:
* GitHub: lasseignelab/230313_TS_CCCinHu... |
4dd27af7a2691a09dc202f64b1111c556bd6e13b4416c5f2f2627d0ed2ed7953 | R | 18,043 | 554 | ---
title: "01_pseudobulk_dea"
author: "Tabea M. Soelter"
date: '2023-09-27'
output: html_document
---
**Pseudo-bulk differential gene expression analysis using DESeq2**
__Goal__: For both datasets, I am pseudo-bulking counts by cell type in order to perform a differential gene expression analysis using DESeq2 between... |
03c46674775d70438874cd39d151b040d58d0f781203f6a5b0ae44f9165ea284 | R | 18,190 | 455 | .cumsum0 <- function(x, left = TRUE, right = FALSE, n = NULL) {
xx <- c(0, cumsum(as.numeric(x)))
if (!left)
xx <- xx[-1]
if (!right)
xx <- head(xx, -1)
names(xx) <- n
xx
}
get_gains <- function(gains, pos, sample_ids, h){
gains_new <- gains
for (i in 1:length(pos)){
... |
75df364dfec1ae6624c0e78b1acf694fd55dd2c841631e233fef0e1b8c64d2a9 | R | 18,323 | 464 | ### Frame-by-Frame package ###
### fingerprint ###
# function calculateFingerprint(...) --------------------------------------
#' Title
#'
#' @param paDir
#' @param controlGrp
#' @param mergeExp1
#' @param mergeExp2
#' @param mergeExp3
#' @param mergeExp4
#' @param singleFish
#' @param grporder
#' @param skipNight0
... |
6023b9980dd2a308b8a2b3606ea2a0c10abf8c28125fc233dbb30c06f7ce659e | R | 18,506 | 494 | # Analyzing Community 715
rm(list = ls())
# Loading libraries -------------------------------------------------------
.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")
# Loading datasets -----------... |
cea27160e41b305b8b442b69268ae208d5ae6174351b5798f6b539711174adfe | R | 18,644 | 560 | # Laura Aarnos 190213
# meaRtools: aggegate features (burst)
# original functions from meaRtools 2018, modification made by LAa and marked with _mod
###############################################################################
# Purpose: Functions for aggregating data from s objects into single #
# ... |
f2cb9d36aeab6d800fb211f83e68b832fff80a42cba830d3a86c4526ac12a25f | R | 18,652 | 401 | # the following Rscript is intended to be submitted to a cluster system
# the accompanying .sbatch file and submission scripts (.sh) files are included and should be modified as necessary (currently, they are written for the slurm scheduler)
# RUN WITH 90G RAM
##########################################################... |
263a88b281fc0e9f7e853cbc355a4dda3d772b35f5ac2c8dfc39dc3443260128 | R | 18,761 | 697 | ---
title: "figure_4"
author: "Tabea M. Soelter"
date: '2023-10-17'
output: html_document
---
**Plotting Main Figure 4**
__Goal__: This is a script for generating figure 4 of my manuscript.
__Reproducibility__:
* GitHub: lasseignelab/230313_TS_CCCinHumanAD
* Docker: tsoelter/rstudio_ccc_ad
* Version: 1.0.5
* H... |
b44b5ccf92495338e70736a33e9b2eba8b7aa1b43595b31c7d1669101c35d460 | R | 18,773 | 426 | ##-------------------------------------------------------
## SEURAT ANALYSIS | MODULES & 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
##-------------... |
33428dd5833c360685b0c4e0164949505121d2047152d8059ce65b5747be30b6 | R | 18,902 | 411 | library(tidyverse)
source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/wrapper.R')
source('~/scripts/single_cell/atac.R')
source('~/scripts/perturbator/de.R')
library(ggraph)
library(tidygraph)
library(Pando)
library(BSgenome.Hsapiens.UCSC.hg38)
mutate <- dplyr::mutate
summarize <- dplyr::summarize
gro... |
16917cdb94eea6aace502c4a439465f6e0b53b9c247d09e3c94bef3d36f8d036 | R | 19,248 | 505 | #!/usr/bin/env Rscript
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")
library("tidyr")
library("readr")
library("tibble")
lib... |
035978f17c587fd9d0b55457d0a79cd32bf4fba18ebe0c060dfbf331147ecd25 | R | 19,810 | 336 | ##-------------------------------------------------------
## SEURAT ANALYSIS | MODULES & 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
##-------------... |
55fd865f1d54605123dbb3cf844f2daa2480cad559377f903cb258192228cdc4 | R | 19,874 | 380 | # train: data.frame of training data where rownames are cell line names/IDs and columns are features
# test: data.frame of test data where rownames are cell line names/IDs and columns are features
# method: name of ML algorithm (either "boosting_trees", "elastic_net", or "random_forest")
# method_parameters: named l... |
472d5816a55e13ba83986ee77adea6f67a48a4b056471a62b509bd34868a7a6c | R | 19,931 | 711 | # function to create dataframe with overlaps (small)
create_stacked_dataframe <- function(region_1, region_2, region_3, region_4) {
stacked_dataframe <- data.frame(
"brain_region" = c(
rep(region_1, 7), rep(region_2, 7),
rep(region_3, 7), rep(region_4, 7)
),
"Analysis" = rep(c(
"DGE only... |
563f35f7d297c39a22146189e8c7ceb5e226eeec18582d576f1a8f671d1c5001 | R | 20,084 | 594 | ---
title: "Tree mapping"
date: '`r Sys.time()`'
output:
bookdown::pdf_document2:
toc: no
extra_dependencies: ["float"]
csl: "https://raw.githubusercontent.com/citation-style-language/styles/master/palaeontology.csl"
link-citations: yes
bibliography:
- ../TreeSearch/REFERENCES.bib
- ../../larva... |
aaf1a0edb1d7ce9a484a40b969a457007dc7af331ef29ac65808b0d3cacce4a1 | R | 20,175 | 636 | #' Jamshidian and Jalal's Non-Parametric MCAR Test
#'
#' Test whether missingness is contingent upon the observed variables,
#' according to the methodology developed by Jamshidian and Jalal (2010) (see
#' Details).
#' @param x An object for which a method exists; usually a `data.frame`.
#' @param imputed Either an obj... |
3aa028e7f6e7499c07ce99a0db521a1f96c8b137b2b9e016b378e42fd8d693c4 | R | 20,192 | 482 | #eqtl_colocalizer.R
#This script performs colocalization between a trait of the user's interest and the GTEx single trait eQLTs from
# the GTEx online GUI. It will perform colocalization for each gene-tissue pair in the GTEx csv file downloaded
# from the online GUI. NOTE it currently assumes you wish to use The GTEx_v... |
1adebf74b5111dd60eb3e9cd5adefb4c1d3ac5a16f99b93878f9ec57b8d42c05 | R | 20,229 | 580 | ---
title: "BrainAge_VidalPineiro_Tests(Lifebrain replication)"
author: "dvp"
date: "11/2/2020"
output:
html_document: default
pdf_document: default
---
# Setup
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(magrittr)
#library(itsadug)
#library(lavaan)
#library(reshape2)
... |
ffd334a9ad0ae5182d9f15367c7fd4684f78533f1ab7ac99e7ad612df2acccc6 | R | 20,437 | 599 | ---
title: "wagg_plots"
author: "Sam Ozminkowski"
date: "12/27/2023"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(ggplot2)
library(dplyr)
library(RColorBrewer)
library(stringr)
library(grid)
library(gridExtra)
library(cowplot)
```
# Universal Values
```{r}
cutoff =... |
a8440088e7518406164e4d64ec7c19458da8f198155741a79ff657ef2143c899 | R | 20,536 | 590 | source('~/scripts/single_cell/de.R')
source('~/scripts/perturbator/de.R')
library(Pando)
library(destiny)
library(dtw)
setwd('~/projects/cutntag/')
rank_cols <- function(x){
xr <- presto::rank_matrix(t(x))$X_ranked
colnames(xr) <- colnames(x)
rownames(xr) <- rownames(x)
return(xr)
}
#### Read data ... |
6d3438aaa578b915f00feb2c0f603c8aed674dbbfde5d442051da6f0ae951715 | R | 20,539 | 678 | ---
title: "Dataset Overview Figure"
author: "Emma Jones"
date: "2023-06-07"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Dataset Overview Figure
The purpose of this script is to provide a dataset overview to serve as manuscript figure 1. It is dependent on scripts ... |
cf13b484b34d8823ee627872ffaa375f18230aa5544dc6dad1ceeca0d34e4719 | R | 20,907 | 546 | # Laura Aarnos 190527
# NB from github updated 190430
# There are four things to modify for bin time. Use Ctrl+f to find 'neuro group mod'.
.graythresh <- function(I) {
## Implement the Otsu (1979) thresholding algorithm.
I <- as.vector(I)
if (min(I) < 0 | max(I) > 1) {
stop("Data needs to... |
fd6e67eea1d6434bd1da6b676ff304cd5b28c311cbf484da4e09620cc19e2328 | R | 21,055 | 590 | ---
title: "Saldana, Montano, et al. -- scRNA-seq: 08_WT_slingshot"
author: "Luis Montano"
date: '2023-09-06'
output: html_document
params:
inputdata: '~/path/to/input_data/'
plotpath: '~/path/to/plots/'
cachedir: '~/path/to/cachedir/'
outpath: '~/mnt_out/figures/'
resourcepath: "~/mnt_resources/"
gtfpath: ... |
087f27f325c20c162eae65d22f2f1da229e146197853d837892b0877e310917e | R | 21,198 | 385 | ###########################################################################
## 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 ... |
ee4f069ccd8b883a9ab2c9217cd4ff42a1917abd277e0297d31f42a5488516a5 | R | 21,330 | 545 | library(readr)
library(dplyr)
library(ggplot2)
library(emmeans)
library(lme4)
library(lmerTest)
library(pbkrtest)
library(multcomp)
library(ez)
library(stringr)
path_home <- './'
# Rohdaten einlesen
df_kammer <- read_csv(paste0(path_home, "Data_wheat_LLT/Climate_chamber/Klimakammer_R.csv"), na = c("N/A"))
# Faktoren... |
4fe78428ea2385837dd6e8f4979bbafc95c042ccfcf89dc0853d8477c2bd3de4 | R | 21,523 | 743 | #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Class definitions
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#' factRObject Class
#'
#' @description
#' A container for storing and processing custom transcriptome.
#'
#' @details
#' The factRObject... |
72d904f15a47d410d4c3dafc8ca8a2fae924bd4705732ac962339fd21011bd9d | R | 21,583 | 341 | ---
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... |
14f8c00ab490a246b6014bfb867bce05d748c2014ceefb3510feab257fa56a51 | R | 21,613 | 668 | ---
title: "compare single region to pairwise"
author: "Emma Jones"
date: "2023-09-26"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Compare region to pairwise specific gene lists
The purpose of this analysis is to determine how many DTU genes or DEGs are specific to ... |
9456599855947ee5c086e070c92732773f3996437489a32b91e329329e562836 | R | 21,746 | 509 | #!/usr/bin/env Rscript
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("cowplot")
library("dplyr")
library("DESeq2")
library("forcats")
... |
fb3983f77346188986b759d0b818b2833a7694b73d1cfad5e1d3eff54c3642b7 | R | 21,861 | 404 | ## 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... |
f28abaa30751d5d4c3e2f995dedfc984f2d9bda1d5c321aa06e1b6aac2a2f063 | R | 22,082 | 563 | source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/atac.R')
source('~/scripts/perturbator/de.R')
library(Pando)
filter <- dplyr::filter
select <- dplyr::select
setwd('~/projects/cutntag/')
#### Read data ####
marks <- read_rds('data05/all_marks_list_v3.4lines.rds')
rna <- read_rds('data05/RNA/RNA_a... |
f9b0a30be7ba7cf75a1b2673a4e75fc7b21fe4c47b95973aef9ba2b1d57659c5 | R | 22,265 | 394 | ##-------------------------------------------------------
## SEURAT ANALYSIS | MODULES & 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
##-------------... |
463a026b07186a5eefe2cc5a5a3640cb24dd04c3722981d9f5a2feba54008283 | R | 22,271 | 493 |
library(ggplot2)
library(dplyr)
library(RColorBrewer)
library(stringr)
make.filename <- function(path,simnum,pi,mu,R,nu,n_microbes,type,samplesize,simtype=NULL,edge_mu=NULL)
{
if(is.null(simtype))
{
return(sprintf("%sR=%s_mu=%s_n_microbes=%s_nu=%s_out=%s_pi=%s_samplesize=%s_simnum=%s.csv",
... |
cd6112ca746a908d4de430bd45e15cf3866bd577bb7f9a72a6d08556030da7d0 | R | 22,271 | 573 | # Analyze DEG, Fig 2 and Fig 3 C,D
LIB='/cluster/tufts/patralab/rbator01/R_libs/4.0.0'
.libPaths(c("",LIB))
suppressPackageStartupMessages({library(org.Hs.eg.db)
library(tidyverse)
library(Seurat)
library(clusterProfiler)
library(org.Hs.eg.db)
library(ComplexHeatmap)
library(ggrepel)
library(openxlsx)
... |
bebbcb05575746eb5d5ab1f0c2659b0307e353d4d4136176291ca14d069bc5d4 | R | 22,457 | 610 | #' Detect methylation array platform
#'
#' This function detects the methylation array platform based on the number of CpG sites
#' and specific probe patterns in the data.
#'
#' @param dat0sesame Data frame containing methylation data with CGid column
#' @return Character string indicating the detected platform: "Mam... |
a6927084bf3be996e77de436506175c4de0fb931b0c35283e70416ac5ade7c61 | R | 22,746 | 615 | 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... |
c5a9fb037cf16d12a98a1ba738ac0f7acfa61d8a4aceae186eb57dba7287ae22 | R | 22,746 | 615 | 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... |
33b4a344515354f57337eb18e51169b7dec54560767b52bad80dfb0e54981501 | R | 22,925 | 472 | RutActivity<-read.csv("MasterRuttingActivity.csv")
######## Packages #######
install.packages("ggplot2")
library("ggplot2")
install.packages("dplyr")
library("dplyr")
install.packages("ggpubr")
library("ggpubr")
install.packages("itsadug")
library("itsadug")
install.packages("mgcv")
library("mgcv")
install.packages("... |
940a60f82e7a32102370ec97f125e3491fa66982d1acaabfeb8f7ce11858ff6a | R | 22,938 | 619 | #' Format multiplex names for python hummuspy package config functions
#'
#' @param hummus_object A HuMMuS_Object
#' @param multiplex_names A vector of multiplex names considered. It must be
#' a subset of the names of the multiplexes in the hummus object.
#'
#' @return A list of multiplexes names formatted for hummusp... |
0c00fb8aea64404a68c26c2b383a00af1559bc8e1c34b906ede9b8459be1212e | R | 23,016 | 616 | ---
title: "timepoint 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/Systemic ESYT1 project loc... |
4172d6ef28ed3ffcc76fd097c05fe09ae886d3ad9eb8eb783b1f5bbd7d2d5f96 | R | 23,044 | 705 | #' @importFrom methods setClass
#' @importClassesFrom Signac Motif
#' @importClassesFrom SeuratObject Seurat
#' @importClassesFrom TFBSTools PWMatrixList
NULL
#' @title Motifs database class
#'
#' @description MotifsDatabase object stores motifs(PFM matrices)
#' and tf2motifs (TF to motifs names mapping) data.
#'
#' ... |
31f80fe87f2948dfb13f8beb2c20ed295fc2e7a5044e68f24f64721a74e18623 | R | 23,074 | 622 | ---
title: 'Saldana, Montano, et al. -- ATAC-seq: Differential accessibility analysis and modules'
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
---
# In... |
40c88357afb4e4536449874f29db47ffdf03f4856202ec6a91f09d8170167118 | R | 23,166 | 309 | ###########################################################################
## 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 ... |
d0a69d50b6cb36a94618bae6f506c39ef14c5d76ad6881d4f0900ef09a48afde | R | 23,211 | 309 | ###########################################################################
## 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 ... |
5111d764eed349319addfb5add433d5f4ff68b6574f5393c80f6a6824643a798 | R | 23,222 | 563 | ---
title: "Tutorial for MotrpacRatTraining6moData R package"
output:
rmarkdown::html_document:
toc: true
code_folding: show
toc_depth: 4
toc_float:
collapsed: false
smooth_scroll: false
theme: sandstone
highlight: tango
vignette: >
%\VignetteIndexEntry{Tutorial for MotrpacRatT... |
e11dc2de833b92e63f670ccd10d0eb51cdcada7283d43478985809e6f16185dc | R | 23,249 | 553 | source('~/scripts/single_cell/de.R')
source('~/scripts/single_cell/atac.R')
source('~/scripts/perturbator/de.R')
library(Pando)
filter <- dplyr::filter
select <- dplyr::select
setwd('~/projects/cutntag/')
#### Read data ####
marks <- read_rds('data05/all_marks_list_v3.4lines.rds')
rna <- read_rds('data05/RNA/RNA_a... |
8be85c3b5ed5545f9d949bf94b2baeb42a7b39332063197c7103871c25362b88 | R | 23,384 | 732 | ---
title: "Comparing DTU, DTE, and DGE"
author: "Emma Jones"
date: "2023-06-01"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Comparing DTU, DTE, and DGE
The purpose of this script is to compare genes with differential gene expression, differential transcript usage, ... |
65800f32aaf0cc6533adee91a852c8493f0e0a42875d0bdeebe97fbf766cca38 | R | 23,457 | 576 | ### Frame-by-Frame package ###
### active bout parameters, one fish functions ###
# the following functions are given data for one time window/one fish, namely;
# ffc = frame-by-frame data, ffc for frame-by-frame column
# aic = active/inactive transitions, aic for active/inactive column
# and they calculate a paramete... |
109b926d24e05838243876defbab8ac8622c020fc31699941e85abdc35d8e9ae | R | 23,469 | 650 | #------------------- Basic includes -------------------
source('includes.R')
setwd('figures/fig2/G')
library(ape)
#------------------- Functions -------------------
#Plot an arc with radius between rstart and rend, theta between theta start and theta end
plot.arc <- function(r.start, r.end, theta.start, theta.en... |
af00194e683d4850bdeda17fff0b47de381d6a28d7f35fc0b6a83e84a92e9351 | R | 23,656 | 318 | ###########################################################################
## 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 ... |
6205e99c15a5b25cd05533cd85116548ad4f64941129820bc4808a12338f7954 | R | 23,669 | 753 | ---
title: "figure_3"
author: "Tabea M. Soelter"
date: '2023-10-16'
output: html_document
---
**Plotting Main Figure 3**
__Goal__: This is a script for generating figure 3 of my manuscript.
__Reproducibility__:
* GitHub: lasseignelab/230313_TS_CCCinHumanAD
* Docker: tsoelter/rstudio_ccc_ad
* Version: 1.0.6
* H... |
fcedbf0cbad0b8c6cc855ca0610ecae62d757670a21b903cb2fb3814d9707b07 | R | 23,747 | 336 | ###########################################################################
## 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 ... |
8380a0c9231a97898c97588fa02cad0d70f17989b83fe1466d98273a1cd763f1 | R | 23,859 | 774 | ---
title: "figure_S5"
author: "Tabea M. Soelter"
date: '2023-10-12'
output: html_document
---
**Plotting Supplemental Figure 5**
__Goal__: This is a script for generating supplemental figure 5 of my manuscript.
__Reproducibility__:
* GitHub: lasseignelab/230313_TS_CCCinHumanAD
* Docker: tsoelter/rstudio_ccc_ad
... |
0ad46a16d9a69b5f83c154c2ca37bee5d420707b126963feb1b40d053542951c | R | 23,879 | 942 | #!/usr/bin/env Rscript
library(data.table)
library(biomaRt)
setGeneric(
name="merge_enrich_terms_0.05",
def=function(
Input,
cutoff=0.05,
envir=.GlobalEnv
){
standardGeneric("merge_enrich_terms_0.05")
}
)
setMethod(
"merge_enrich_terms_0.05",
signature(
Input="list"
),
definition=... |
e650b5fb61e6efb3476c6f964e6936b08776845fd051284c2c234120f12ab012 | R | 23,940 | 649 | # Cell-type gene expression correction using a linear model
rm(list = ls())
# Loading necessary packages ----------------------------------------------
setwd("F:/Brain-Disease-networks-version-2/")
.libPaths(c("libraries/", .libPaths()))
# Global variables --------------------------------------------------------
p... |
af755fae695e6c92b118ae6275b18625fb99d2da1cb3f84d413934e3b0c82a8a | R | 24,174 | 522 | # Author: B P Kailash
# Purpose: Analyze the DC relations observed - Part 1
# 1) Find the sample size of the analysis
# 2) Convert all DC edges from ensids to HGNC symbols
# 3) Add M, NM, cell type labels to each DC edge
rm(list = ls())
# Global variables --------------------------------------------------------
sou... |
62ce568d4d9975ca4e165b665e7b8308fbb79f2f1cebc350a44adb8a9a214884 | R | 24,219 | 575 | ##-------------------------------------------------------
## SEURAT ANALYSIS | MODULES & 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
##-------------... |
ab9eb3b73dc028eb5c632d7f9a05654addfa3a3b7846f86236a90d7b86b6f973 | R | 24,228 | 627 | ---
title: "final plots - ee revisions"
author: "Sam Ozminkowski"
date: "2023-10-22"
output: pdf_document
---
```{r, setup}
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_knit$set(root.dir="~/Documents/masters/research/bayesian_network_regression/bayesian_network_regression_imp")
library(lubridate)
library(dplyr)
m... |
9169735bad15a3631a7fcabe8764bd76eb4a7305fc4dc75b09edb06552ccfe37 | R | 24,243 | 674 | ##############################################################################################################
# This code will check if the relevant packages are already installed in R.
# If not, a prompt will appear requiring the user to select a download site for installing these repositories.
# This installation ... |
ab5d1475bc4076aae3436ec98c1cb2b644e28d6414a29fb920cf45fed4929e36 | R | 24,462 | 612 | #' hBayesDM Model Base Function
#'
#' @description
#' The base function from which all hBayesDM model functions are created.
#'
#' Contributor: \href{https://ccs-lab.github.io/team/jethro-lee/}{Jethro Lee}
#'
#' @keywords internal
#'
#' @include settings.R
#' @include fit_cmdstan.R
#' @importFrom utils head
#' @importF... |
711e05bf3489cfdfc7855b9c2f8f066e3924b923c08f94dbfb14eb51a12bcc4c | R | 24,496 | 502 | #!/bin/R
# FOR REFERENCE ONLY
# This script was **not** re-run to generate `FEATURE_TO_GENE`.
# Instead, `master_feature_to_gene` from gs://motrpac-data-freeze-pass/pass1b-06/v1.1/analysis/resources/master_feature_to_gene_20211116.RData
# was used to make `FEATURE_TO_GENE`, which was output by the original version of... |
8557c9533cb8c716f5754fab25373b8b241187bd5206345293b4e7de05bb90c6 | R | 24,585 | 552 | ###############################################################################
##### DESeq2 #####
###############################################################################
# housekeeping: clear all existing data
rm(list = ls())
# libraries
library(... |
e9343d4fef57a39b8915b58f1ed70a49efed421615332cf510a632766b2277dc | R | 24,884 | 466 | run_exp_LME<- function(imp, model, n_it, outdir='/data/pt_life_whm/Results/VRF_cSVD/LME/results/Expl/workspace_'){
# Calculates exploratory models results for a MIDS (Multiply Imputed Data Set) from mice.
# Model can take values "E2a_sex", "E2b_DBP", "E2c_WHR", "E3_exfunct" and "E3_globalcog".
################... |
f78d3d910b47a1a814a4a9d8263264c6ed84250036f5443dfb23319ad546b235 | R | 24,971 | 596 | 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
setwd('~/projects/cutntag/')
#### Read data ####
marks <- read_rds('data05/all_marks_list_v3.3m... |
bd786905293fb619f62267f61b1e3376955f617d33ab2d3dd88b035112310e7f | R | 25,113 | 557 | #' Multivariate Imputation by Chained Equations (MICE)
#'
#' Generates Multivariate Imputations by Chained Equations (MICE)
#'
#' Generates multiple imputations for incomplete multivariate data by Gibbs
#' sampling. Missing data can occur anywhere in the data. The algorithm imputes
#' an incomplete column (the target c... |
c26cd2c660bf8b71bec09322c76733115a7c66816ab488298fc2b9ac660c7715 | R | 25,119 | 651 | #' Generate missing data for simulation purposes
#'
#' This function generates multivariate missing data under a MCAR, MAR or MNAR
#' missing data mechanism. Imputation of data sets containing missing values can
#' be performed with \code{\link{mice}}.
#'
#' This function generates missing values in complete data sets.... |
6fcd5790ee6a3ac3ef75b0b5ef205188eec764a6b6b22f9f72cf55da8d0a1648 | R | 25,122 | 697 |
#DEG analysis of RNAseq
#AVC 9/23/19
############################################################################################################################################
## code for taking counts.txt file outputs from FeatureCounts and importing into R for EdgeR and/or limmavoom analysis
## loops through eac... |
a90d4c09fce3015ff0a5d43d4eea265006427056f9e29cb2d3f760717fd32b18 | R | 25,177 | 435 | #Determining formal orthologs between the data from different species:
setwd("~/Documents/Microarray Gen/GeneOrthology_HumanRatMouse")
#I downloaded formal ortholog information from: http://www.informatics.jax.org/homology.shtml
#Let's reorganize it to make it easier to work with:
Orthologs<-read.delim("InformaticsJa... |
610048a3a8dabde123a3053ce63e17cf8be43163731968f8bd5e23b73c123572 | R | 25,377 | 562 | library################## An R-script to read YAML DTS project files, visualize and statistically evaluate data
library(ggplot2)
library(tidyr)
library(dygraphs)
library(grid)
library(reshape2)
library(dplyr)
library(gridExtra)
library(yaml)
library(ggsignif)
library(effsize)
library(pwr)
library(BayesFactor)
library(... |
0bd41eb401982f38aeb4336da95383c95d909329c1a9c5d2aa4e5abe9152c272 | R | 25,460 | 624 | # Title: Calculation of suture closure scores
# Name: Heather White
# Date created: 02/12/21
# Last modified: 25/10/22
# License: MIT license
# Calculating suture closure scores and total suture closure scores
# following protocol in Goswami et al. 2013
##########################################################... |
06e98884fdc048cb6721835a482bfa5d07866e65bbdb9cb7ec4fa759cba3a9fe | R | 25,644 | 830 | ---
title: "Dataset Overview Figure"
author: "Emma Jones"
date: "2023-06-07"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Dataset Overview Figure
The purpose of this script is to provide a dataset overview to serve as manuscript figure 1. It is dependent on scripts ... |
4458754a5c05ccf3a94e6e7624f76a46f9ab58ac764c4dcd4e0ea4a8eae55179 | R | 25,652 | 528 | ################### Plotting functions for DTS data ######################
######## Plot fly behavior and position data for each period ########
fly_pos_traces <- function(temp)
{
##modify a_Pos to introduce gaps between -180° and 180°
pos <- temp$a_pos
for(p in 2:nrow(temp))
{
if (abs(as.numeric(pos[p]))... |
386e79c6b4a573068d3b599f925c11769858b43645b0e9e05e59c9a0a76016f8 | R | 25,664 | 509 | ## 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... |
96835c013c7428b1cca792640eef9c5a611275207a6938500f7382af12e3cd94 | R | 25,775 | 650 | ##-------------------------------------------------------
## SEURAT ANALYSIS | MODULES & 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
##-------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.