sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
e862d1ad62e2933d38c709b628568e3259831dab9c3bea00a85f8b97edd1854e | R | 16,674 | 417 | ###### Main functions for mediation estimation and bootstrap ######
# Author: Shengxian (Naomi) Ding
# Email: naomidsx@gmail.com
# Date: 2025-07-19
### Model:
## Original:
# (1) FoS: M(t) = intercept(t) + Z*alpha(t) + epsilon'(t)
# (2) SoF: Y = sigma_0 + Z*gamma + sum_{j=1}^m (\int beta_j(t)*M_j(t)dt) + eta... |
92f008c519ceb2714340271a969032c8c19b3a3fb28c9ec707450dc307a45835 | R | 16,761 | 472 | args <- commandArgs(trailingOnly = TRUE)
fold <- args[1]
library(plyr)
library(dplyr)
library(tidyverse)
library(caret)
library(recipes)
library(devtools)
library(data.table)
load_all("/dcs04/scharpf/data/annapragada/useful.stuff.aa")
library(pROC)
cohort_name<-"LUCAS"
#fold="fold10"
#read in the cohort
train<-fread... |
95686fd904eeef590ac2b849c794635f2338d8618d0431028ee45e3d059a3ac6 | R | 16,766 | 472 | args <- commandArgs(trailingOnly = TRUE)
fold <- args[1]
library(plyr)
library(dplyr)
library(tidyverse)
library(caret)
library(recipes)
library(devtools)
library(data.table)
load_all("/dcs04/scharpf/data/annapragada/useful.stuff.aa")
library(pROC)
cohort_name<-"Liver_Risk"
#fold="fold10"
#read in the cohort
train<-... |
e3a688a389043e1c52448ff6f2e14c0f0906054ac4fe067eb1236fbfb463d5aa | R | 16,804 | 524 | ## C. Vriend - Amsterdam UMC - July '24
## perform regression analysis on pre-to-post-treatment CORE data and associate with percentage improvement
## Leave-one-sample-out validation (trial or treatment) and calculation of harmonic P-value across folds.
# clear variables
rm(list=ls())
#library(tidyverse)
library(dply... |
c8355a431555aec2ac9a13259525e0541550155831fb091db7117733d441cca8 | R | 16,882 | 489 | #' Write liger object to H5AD files
#' @description
#' Create an H5AD file from a \linkS4class{liger} object. This function writes
#' only raw counts to \code{adata.X}, while normalized and scaled expression
#' data will not be written, because LIGER use different normalization and
#' scaling strategy than most of the ... |
f0198afa7d6f3ada50e394df625250e9d7f8f39889cf77d65eb52a2f6b5b09a2 | R | 16,890 | 414 | #' Perform UMAP Dimensionality Reduction
#' @description
#' Run UMAP on the aligned cell factors (result from
#' \code{\link{alignFactors}}), or unaligned cell factors (raw result from
#' \code{\link{runIntegration}})) to generate a 2D embedding for visualization
#' (or general dimensionality reduction). Has option to ... |
d7e577fbdc9d9ab8be6aae208ee021997747b6eeaa909f34b0a3ea5ff4332f32 | R | 17,068 | 395 | #' ---
#' title: Experiencer Verbs -- Light Verb Constructions in Malayalam
#' subtitle: Behavioural Data analyses using Generalised Linear Mixed-effects Models
#' author: " "
#' output:
#' html_document:
#' code_folding: show
#' theme: flatly
#' highlight: kate
#' ---
#'
#' <style>
#' pre {
#' overflow... |
1e44760022fbb1ab696728ad2d56b427f3d022fbca763e89fecae91d3c98c621 | R | 17,157 | 329 | #### Please download data file from Zenodo (https://zenodo.org/record/7396399/files/isoform_analysis_files.RData?download=1) and put it in R working directory
#### NOTE you can load preprocessed big files from RData file with command bellow
load("isoform_analysis_files.RData")
### loading required libraries
library(tx... |
2e51b4106c53788db1f6ffb86fa3dd87f99e0f571cad80c62a7a7392b23684f1 | R | 17,261 | 382 | library('ggrepel')
library('RColorBrewer')
library('signs')
library('Cairo')
library('ggseqlogo')
library('Biostrings')
custom_breaks <- function(bmin, bmax, digits = 0, length.out = 8, zero = TRUE) {
bmin = floor(bmin * (10 ^ digits)) / (10 ^ digits)
bmax = ceiling(bmax * (10 ^ digits)) / (10 ^ digits)
if (bmin > ... |
cd809c22b79c4e10f074001907619dace09c983f919e24d4365a65ea35138b1b | R | 17,451 | 349 | ##This code is to make figure2 to demonstrate the performance of scTAPS and scCAPS on mESC
##module load R/4.0.3-foss-2020b
#.libPaths("/well/ludwig/users/ebu571/R/4.0/skylake")
suppressPackageStartupMessages(library(data.table))
suppressPackageStartupMessages(library(parallel))
suppressPackageStartupMessages(library(... |
3426093188288bc587cc88a06f7a7a477c74b5f8137df246424ee92a23cf006c | R | 17,931 | 370 | library(ggplot2)
library(ggpubr)
library(tidyverse)
# --------------------------------- SETUP ---------------------------------
repo <- 'path/to/psychosis-FC-prediction'
# Specify finer details of models
p_thresh <- '0.01' # supps also used p<0.05 and p<0.001
preproc <- 'dt_AROMA_8Phys-4GMR_bpf' # s... |
dadb19d175d3f6da60fe2cd40eece2e8c87142234f5b087994d34a0a6f768706 | R | 18,101 | 473 | #'*Inhibitor Treated Embryo Correlations *
# Libraries:
library(ggpubr)
library(cowplot)
library(patchwork)
library(tidyr)
library(ComplexHeatmap)
library(tidyverse)
library(svglite)
## Relevant Plots (Description):
# Correlations of Inhibitor Treated Effects (Global)
# Correlations of Inhibitor Treated Effects (Pat... |
5f326a88ec818bbcf461c311f1b6e592797b4e7a6ed2196ac368cb0e1b1b5c5c | R | 18,265 | 507 | options(warn=-1)
graphics.off()
print("Loading libraries required...")
list.of.packages <- c("shiny","shinyWidgets","shinyjs","igraph","stringr", "dplyr")
invisible(lapply(list.of.packages, library, character.only = TRUE))
#pip install pygraphml igraph torch torch-geometric numpy
library(reticulate)
library(tidyverse)
... |
0d16963a8b76774a9bf8cf9b65830e4f1b2aeef944b95b745ec7598a7d96d632 | R | 18,807 | 348 | library(ggplot2)
library(gghalves)
library(ggbeeswarm)
setwd("/Users/chixiangchen/Library/CloudStorage/OneDrive-UniversityofMarylandSchoolofMedicine/longterm_research/causal inference machine learning/multir_ml/real data/UKBmerge06082025/")
data <- readRDS("datalist.Rds")
dim(data)
data_image <- data$`df_WMage(ins2`
d... |
d864dffba63438edfc304340f30d749bfa2a684b96fb0c7aae16050d64f59a4c | R | 19,296 | 393 | ---
title: "Fig4"
output:
workflowr::wflow_html:
toc: false
editor_options:
chunk_output_type: console
---
I am going to exclude two replicates of H3K36me3-human_GM12878_ENCFF001WYF H3K36me3-human_GM12878_ENCFF001WYH as a search of the metadata shows that these were "hotspots" not "peaks" which seems to be thro... |
f6c151c25b9b37ee0f62a9aabd8855e890e7bf162a9d645cbdda0becb9d6d8f0 | R | 19,756 | 512 | ---
title: "S12"
output:
workflowr::wflow_html:
toc: false
editor_options:
chunk_output_type: console
---
ROCs for PCAWG T vs N
```{r}
library(here)
library(data.table)
library(tidyverse)
library(devtools)
library(ggplot2)
library(ggpubr)
library(cowplot)
load_all(here("code","useful.stuff.aa")) # L... |
df94c21571f74fe1c5a85d035fd767386a6dcde64d8eabc3bc4ce96fad648aaf | R | 20,050 | 515 | ---
title: "Distribution of DELFI scores by stage and histology"
site: workflowr::wflow_site
output:
workflowr::wflow_html:
code_folding: hide
toc: true
editor_options:
chunk_output_type: console
---
```{r caching, echo=FALSE}
knitr::opts_chunk$set(autodep = TRUE, echo=FALSE)
```
# DELFI score distribut... |
f5beb457554e0b773e9a82e6a15c67f4b690e27d43bb664c1d0ceb2ffd0cf8b9 | R | 20,134 | 537 | #' @section Matrix access:
#' For \code{ligerDataset} object, \code{rawData()}, \code{normData},
#' \code{scaleData()} and \code{scaleUnsharedData()} methods are exported for
#' users to access the corresponding feature expression matrix. Replacement
#' methods are also available to modify the slots.
#'
#' For other ma... |
436bd2399c396074163b876aa26c875c31e38477384fa9f375825380ca082181 | R | 20,160 | 505 | plotrocs <- function(data, mytheme, textsize=3.5, facet=TRUE) {
if(facet) {
lab <- data %>%
as_tibble() %>%
mutate(lower=format(round(lower, 2), nsmall=2),
auc=format(round(auc, 2), nsmall=2),
upper=format(round(upper, 2), nsmall=2),
... |
649051104fb035c21ad19a6f597389bdab1cf721636bbf1ca71ac504a6825a6b | R | 20,181 | 432 | library(ggplot2)
library(ggpubr)
library(tidyverse)
# --------------------------------- SETUP ---------------------------------
repo <- 'path/to/psychosis-FC-prediction'
# Specify finer details of models
p_thresh <- '0.01' # supps also used p<0.05 and p<0.001
preproc <- 'dt_AROMA_8Phys-4GMR_bpf' # s... |
6ad15f859fd68608b04d880f16450db594d7df283ef161ffbbc731bf09b431cd | R | 20,669 | 343 |
## scripts to characterize smsite data from the idenfiication of smsites.
library(readr)
library(stringr)
library(tidyr)
library(dplyr)
library(tidyverse)
library(biomaRt)
library(ggplot2)
library(gridExtra)
library(gtable)
library(ggpubr)
library(patchwork)
#import human_smsite_master and mouse_smsite_master
human... |
6e4df0da6fc64b629d94e1f154aee6042f66d20e169c6ea097212e9dd5317abb | R | 20,751 | 476 | #' Plot Heatmap of Gene Expression or Factor Loading
#' @param object A \linkS4class{liger} object, with data to be plot available.
#' @param features,factors Character vector of genes of interests or numeric
#' index of factor to be involved. \code{features} is required, while
#' \code{factors} is by default all the f... |
d2512fbcc140fcba0b47b8768dd66da9f59205fb79b271c8db268e057f56e80f | R | 20,789 | 529 | #' @importClassesFrom Matrix dgCMatrix dgTMatrix dgeMatrix
#' @importClassesFrom DelayedArray DelayedArray
#' @importClassesFrom HDF5Array HDF5Array
NULL
setClassUnion("dgCMatrix_OR_NULL", c("dgCMatrix", "NULL"))
setClassUnion("matrix_OR_NULL", c("matrix", "NULL"))
setClassUnion("matrixLike", c("matrix", "dgCMatrix", ... |
c7563c672e9a5ad40712f29b23bbf64ab45d0fae28a37fc1418191083f4fa9c0 | R | 21,008 | 609 |
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Dataset creatinfg function ####
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#' Check if a liger or ligerDataset object is made of HDF5 file
#' @param object A liger or ligerDataset object.
#' @para... |
cef896b864bccdf39668e452a7d7ae4d98776115aabc976509d4c1a78084d2d0 | R | 21,189 | 439 | #' @import ggplot2
#' @import grid
#' @importFrom dplyr inner_join
#' @importFrom dplyr group_by
#' @importFrom dplyr summarise
#' @import multcomp
#' @import patchwork
#' @importFrom fs file_move
#' @import stringr
#' @importFrom ape pcoa
#' @importFrom vegan vegdist
#' @importFrom vegan adonis
#' @importFrom ggiraph ... |
f8fc05261104b41496c8af9dac9752e3bff2692f24764ba3ce3be27d16b9fb78 | R | 21,314 | 523 | args <- commandArgs(trailingOnly = TRUE)
fold <- args[1]
library(plyr)
library(dplyr)
library(tidyverse)
library(caret)
library(recipes)
library(devtools)
library(data.table)
load_all("/dcs04/scharpf/data/annapragada/useful.stuff.aa")
library(pROC)
cohort_name<-"Cristiano"
#fold="fold10"
#read in the cohort
train<-f... |
e7f52e5ae349a2811851325935f22508f6f1fb51519b706c2cf1ca78d3a4e2e2 | R | 21,411 | 438 | ##This code is to make figure2 to demonstrate the performance of scTAPS and scCAPS on mESC
##module load R/4.0.3-foss-2020b
.libPaths("/well/ludwig/users/ebu571/R/4.0/skylake")
suppressPackageStartupMessages(library(data.table))
suppressPackageStartupMessages(library(parallel))
suppressPackageStartupMessages(library(d... |
c9a6c87f4d2f001563da7e0849eee01180b807b20b5f13fe6518413c219f22b5 | R | 21,531 | 393 | ---
title: "Import Data from Various Source"
author: "Yichen Wang"
date: "2024-04-24"
output:
html_document:
toc: 3
toc_float: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE)
```
This article only focuses on creating a [liger](../reference/liger-cla... |
c4da9a159374c49350ba1e96b9880c3a54e24e98ba39c75c75a245d65a5ac169 | R | 21,633 | 370 |
###Analysis of anti-Sm-RIP vs polyA-RNA
# for mouse: M(mr) vs D(mx), both aligned to mouse genome
# for human: H(hr) vs A(hx), both aligned to human genome
#load R libraries
library(readr)
library(stringr)
library(tidyr)
library(dplyr)
library(tidyverse)
library(biomaRt)
library(ggplot2)
library(gridExtra)
library(... |
f73cf1b3ec06c191c653d6a61cec8977301409f2b3e482c16f83c15131df17e9 | R | 22,161 | 541 | #' Impute the peak counts from gene expression data referring to an ATAC dataset
#' after integration
#' @description
#' This function is designed for creating peak data for a dataset with only gene
#' expression. This function uses aligned cell factor loading to find nearest
#' neighbors between cells from the queried... |
f4e8ac33a2a2d4b296e222ff12a46896827bb5425f90ece9bf7536c19a8c8c01 | R | 22,166 | 702 | ## C. Vriend - Amsterdam UMC - July '24
## perform regression / mixed model analysis on pre-treatment CORE data and compare between cases and controls
## use MatchIT to select healthy controls from a larger pool that are age and sex matched with the cases
## additional sensitivity analyses with trial/treatment as covar... |
653537a69d4798b510d8dcc369c26813decf7623f9614876df8ab168f937193f | R | 22,482 | 338 | ## Packages ##
library(ggplot2)
library(ggpubr)
library(gridGraphics)
library(simr)
library(rstatix)
library(devtools)
library(nlcor)
library(lsmeans)
library(ggthemes)
library(RColorBrewer)
library(tidyr)
library(openxlsx)
library(extrafont)
library(cowplot)
library(forcats)
library(dplyr)
library(purrr)
library(str... |
1f9b514868f48b2c0012a28ae74d7e05765a0a29c914755140e4fcb2e7b0becc | R | 22,522 | 593 | data("pbmc", package = "rliger")
rawDataList <- getMatrix(pbmc, "rawData")
withNewH5Copy <- function(fun) {
ctrlpath.orig <- system.file("extdata/ctrl.h5", package = "rliger")
stimpath.orig <- system.file("extdata/stim.h5", package = "rliger")
if (!file.exists(ctrlpath.orig))
stop("Cannot find orig... |
2ef432260bd2093f0777c701b168d9c1c70b4787cd8e91e231d6a5a634116200 | R | 22,646 | 862 | ---
title: "Synaptic receptors expressed in mice CSF-cNs along the rostrol-caudal axis "
author: "Nicolas Wanaverbecq - Elysa Crozat - Edith Blasco"
date: "`r Sys.Date()`"
output:
pdf_document:
toc: yes
toc_depth: 5
html_notebook:
toc: yes
code_folding: hide
toc_depth: 5
---
```{r setup, incl... |
96da65ce3293fbfec31f3feaffb27b985a0992a382a4a3179b90decf099391dd | R | 22,859 | 556 | #' Perform consensus iNMF on scaled datasets
#' @description
#' `r lifecycle::badge("experimental")` This is an experimental function and is
#' subject to change.
#'
#' Performs consensus integrative non-negative matrix factorization (c-iNMF)
#' to return factorized \eqn{H}, \eqn{W}, and \eqn{V} matrices. In order to
#... |
ee02d2bc6642175d4e2e7729c555ace2ebbca6d11168660bb9df02046c3a0c8a | R | 22,863 | 496 | #' Make dot plot of gene expression in cell groups
#' @description This function produces dot plots. Each column represent a group
#' of cells specified by \code{groupBy}, each row is a gene specified by
#' \code{features}. The color of dots reflects mean of normalized expression of
#' specified genes in each cell grou... |
aab34e0af1a9131bf967e8555d3d3338ef35795b8df956b2a2a6e7abc4ec3088 | R | 22,998 | 693 | ## C. Vriend - Amsterdam UMC - July '24
## perform regression / mixed model analysis on pre-treatment CORE data and associate with percentage improvement, (dYBOCS/dCAPS5) and responder vs non-responder analyses
## additional sensitivity analyses with trial/treatment as covariate
## Leave-one-sample-out validation (tria... |
1ec0a97876355cb21eead6c79446cff7753c5c5919263a9ad40a610497568c4b | R | 23,042 | 601 | #' Apply function to chunks of H5 data in ligerDataset object
#' @description h5 calculation wrapper, that runs specified calculation with
#' on-disk matrix in chunks
#' @param object A \linkS4class{ligerDataset} object.
#' @param FUN A function that is applied to each chunk. See detail for
#' restrictions.
#' @param i... |
da983b1e3890621eda9ad045c091c335e5dc8a5fd2e54d31dc6fcf7d8e5180a4 | R | 23,047 | 545 | # Quality control for SNPs and sample
# Written by Lucia Trastulla -- email: lucia_trastulla@psych.mpg.de
suppressPackageStartupMessages(library(argparse))
suppressPackageStartupMessages(library(doParallel))
parser <- ArgumentParser(description = "Quality control of genomestudio analysis for samples and SNPs" )
par... |
d65832ba231abd63a7aebaa3d7d5483f47911b6016ba133e78e2305b52c1196f | R | 23,820 | 533 |
library(edgeR)
library(ggplot2)
library(biomaRt)
library(dplyr)
##biomaRt Annotations ( to add more attributes use listAttributes(mart) )
mart <- useDataset("mmusculus_gene_ensembl", useMart("ensembl"))
#listAttributes(mart) # - to add more attributes
ID_QueryAttributes = c("ensembl_gene_id", "external_gene_name... |
dbf3929c161a35a4b48d50ce3ab4957c49ee91ac0ae56e44f5934bd9c12e36bd | R | 23,836 | 529 | #' Perform factorization for new value of k
#' @description This uses an efficient strategy for updating that takes
#' advantage of the information in the existing factorization. It is most
#' recommended for values of \code{kNew} smaller than current value (\code{k},
#' which is set when running \code{\link{runINMF}})... |
507926e4e6cff3421a865a4aac028ab4a7f7c7f0a8ba678c9b4ca4cf81bd5ed9 | R | 23,967 | 613 | ---
title: "Prior predictive distributions of DELFI and LDCT in screening"
site: workflowr::wflow_site
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
code_folding: hide
chunk_output_type: console
---
```{r caching, echo=FALSE}
knitr::opts_chunk$set(autodep = TRUE)
```
```{r packages, me... |
1b5be9be223f8759ce7c77774a9d6aae50cd02854af2791c4e00a158ecb4e7b3 | R | 23,981 | 570 | ---
title: "3B"
output:
workflowr::wflow_html:
toc: false
editor_options:
chunk_output_type: console
---
```{r LUSC, fig.width=8,fig.height=10}
library(here)
library(data.table)
library(tidyverse)
library(devtools)
library(ggplot2)
library(ggpubr)
library(cowplot)
library(caret)
library(recipes)
library(pROC... |
34a52fd564cde4df21f86a85f9a1d06994423660234f3a8102cc333c9d4ce07d | R | 24,000 | 493 | ---
title: "Ros_paper"
output: html_document
date: '2023-02-16'
---
# Copyright (C) 2023 University of Cambridge
This is a script by Jens Bager Christensen (jbc53@cam.ac.uk) to analyse the injury response of GCPs following neonatal injury.
```{r}
#Load packages.
library(Seurat)
library(tidyverse)
library(DESeq2)
libr... |
54e4bcae7cd4c3fdc13da08b657348b116d24278d274e1088ed0fb3b7981b963 | R | 24,035 | 595 | plotrocs <- function(data, mytheme, textsize=3.5, facet=TRUE) {
if(facet) {
lab <- data %>%
as_tibble() %>%
mutate(lower=format(round(lower, 2), nsmall=2),
auc=format(round(auc, 2), nsmall=2),
upper=format(round(upper, 2), nsmall=2),
... |
61bae99779be6f13265f7caa17fed719d51334d3e94eab3f5f0a52a213a00b6f | R | 25,094 | 506 | ---
title: "Ros_paper"
output: html_document
date: '2023-02-16'
---
# Copyright (C) 2023 University of Cambridge
This is a script by Jens Bager Christensen (jbc53@cam.ac.uk) to perform pseudobulk analysis on HOPX-NEPs to identify their transcriptional response to neonatal injury.
```{r}
#Load packages
library(Seurat)
... |
b15f7100902c370094753f62cfa8ed590aa8bfb58c6f638f1ccab4f9da2c27a3 | R | 25,281 | 933 |
local({
# the requested version of renv
version <- "0.15.4"
# the project directory
project <- getwd()
# figure out whether the autoloader is enabled
enabled <- local({
# first, check config option
override <- getOption("renv.config.autoloader.enabled")
if (!is.null(override))
return(... |
b545f29a8448e396c919d60817a411fea49c15d2c3fdb5e210de8b1e7d133d99 | R | 25,411 | 394 |
## this script takes the Sm-site identification pipeline output and assembles a new document based off transcript isoforms for mouse
## takes find_smsites.py output files (total of 10 files (Refseq and Gencode, U1, U2, U5, U7, Noncanonical) and crossreferences identified
## Sm-sites between both Refseq and Gencode a... |
4fa233ccfdc4023594e9946fafd0c9b66f95e162d1392088c794d4fadc33b56b | R | 25,512 | 517 | ---
title: "Ros_paper"
output: html_document
date: '2023-02-16'
---
# Copyright (C) 2023 University of Cambridge
This is a script by Jens Bager Christensen (jbc53@cam.ac.uk) to perform pseudobulk analysis on ASCL1-NEPs to identify their transcriptional response to neonatal injury.
```{r}
#Load packages
library(Seurat)... |
fd5195c1943d575133aee3e8aa549f430147c2422b9289ff38a1f132bc9796f1 | R | 25,527 | 1,123 | ---
title: "voltage-dependent ionic conductance expressed in mice CSF-cNs along the rostrol-caudal axis "
author: "Nicolas Wanaverbecq - Elysa Crozat - Edith Blasco"
date: "`r Sys.Date()`"
output:
pdf_document:
toc: yes
toc_depth: 5
html_notebook:
toc: yes
code_folding: hide
toc_depth: 5
---
... |
c6bba6861559dcc74da9baf93572f6099613f10b7dba7fce9f58aeabddfc4faa | R | 25,899 | 452 | library('biomaRt')
library('gprofiler2')
library('tidyverse')
source('helper.R')
###------------------------------------------------------------------------------------------------------------------------------------------------------
# examine conserved genes with tail lengthening during oocyte maturation in all thre... |
bbeb5fe15f3c7ec046ebfbf56dc4e5a644a33d76d306bed3b207630a977bd158 | R | 25,970 | 707 | .log <- function(..., level = 1) {
line <- paste(rep("...", level), collapse = "")
pref <- paste0(date(), " ", line, " ")
indent <- paste(rep(" ", nchar(pref)), collapse = "")
content <- list(...)
content <- lapply(content, as.character)
msg <- paste(content, collapse = "")
msg <- gsub("\n",... |
f99d6e46440f49735d8b9719cd94293245ca4c4768d66a3936d7bb6be89eb20e | R | 26,392 | 436 | ### This script can be adapted to get the UCell scores for each individual dataset.
library(Seurat)
library(dplyr)
library(UCell)
#### Obtaining meta-data
Datasets = c("Mathys","Grubman","Lau","Morabito")
BroadClusterTypes = c("Oligodendrocytes","Astrocytes","Oligodendrocyte_Precursor_Cell","Glut_ExcitatoryNeuron","E... |
5e31f28bfbc5a00e47b66b688caea644f03f3ac14c2a6b32ad97566f006de428 | R | 26,951 | 530 | library(BiocManager)
library(matrixStats)
library(ggplot2)
library(reshape2)
library(KEGGREST)
# Summary of Tiny Details Applied:
# Name-Value Pair (Glutamic aci3C5) is misplaced...
# Common Metabolites that aren't converted easily: {manually edited}
# 3-Aminoglutaric Acid -> isoglutamte -> C05574
# Ribose 5 phosphate... |
e700f5d80d54fbeeda3a18bc435faf86a0e9d2edda1d8f62dacaf719b7f6277b | R | 27,443 | 416 |
### this is script to analyze sequencing performed in sma models and asking whether there is a change in abundance for mRNAs with sm-sites in sma
# cdf plots for smsite
# filtering of downregulated transcripts shared in each and abundance of sm-sites.
# import libraries
library(readr)
library(stringr)
library(... |
9efa383e18ce5082cd037e227f1c964eb42d759af3a4cec36d5c0f0a3b08cb68 | R | 27,793 | 544 | ---
title: "Benchmarking"
author: "Yichen Wang"
date: "2024-10-15"
output:
html_document:
toc: true
toc_depth: 3
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE, cache = TRUE)
library(reticulate)
# DEVELOPER NOTE: please select your own conda environment p... |
dbccdd60b59d6fd3cbc429cae329b5cf998b8eb1db9f85192eb67f53674818fd | R | 28,093 | 720 | # Author: Han Wang
## 25 March 2025: Prepared scripts for publication.
## 12 July 2024: Added dataframe and figure for analysis on Gabor orientation deviance vs response.
library(car)
library(tidyverse)
library(NISTunits)
library(ggplot2)
library(ggsci)
library(ggeffects)
# Define some variables
numtrial_pretr... |
74b7455fac675adee14cb576b8c3f3dae4d906e64cf9308bb3a41e8b29bbe85f | R | 28,280 | 428 |
## this script takes the Sm-site identification pipeline output and assembles a new document based off transcript isoforms for human
## takes find_smsites.py output files (total of 10 files (Refseq and Gencode, U1, U2, U5, U7, Noncanonical) and crossreferences identified
## Sm-sites between both Refseq and Gencode a... |
396a53655a99306e45e3b47bea278ee4364ca15077b84e0ab5104aac62e4caf4 | R | 28,744 | 685 | #' SNN Graph Based Community Detection
#' @description
#' After aligning cell factor loadings, users can additionally run the Leiden or
#' Louvain algorithm for community detection, which is widely used in
#' single-cell analysis and excels at merging small clusters into broad cell
#' classes.
#'
#' While using aligned... |
d63964afb1dd9975866a997e145fde072f527636b616423b2194d0424abed7c6 | R | 28,919 | 380 | ---
title: "Joint definition of cell types from single-cell gene expression and chromatin accessibility data (human bone marrow mononuclear cells)"
author: "Jialin Liu and Joshua Welch"
date: "3/27/2020"
output:
html_document:
toc: 3
toc_float: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo ... |
e0f302e1afe5855db5f594ee6464a227591f928545b4a3f042191f54b960b4f3 | R | 29,065 | 700 | #CARNIVAL module
Carnival_opt <-function(iterator_index,
df_EM,
results_dir,
inputs_dir,
disease_filename_j,
violin_gene,
cloned,
GAP,
... |
800b91c71cc1b6906ff945f277530f72bfd8aec7bfd63681791d6e0952cc26cc | R | 29,211 | 648 | ---
title: "Fig5"
output:
workflowr::wflow_html:
toc: false
editor_options:
chunk_output_type: console
---
This makes the LUCAS ARTEMIS figure
```{r}
library(here)
library(data.table)
library(tidyverse)
library(devtools)
library(ggplot2)
library(ggpubr)
library(cowplot)
library(RColorBrewer)
load_all(here("cod... |
7576b36497ece52d1e6a71635877c379a73edef552ee1354686289f83259a4b9 | R | 29,401 | 710 | #CARNIVAL module
Carnival_opt <-function(iterator_index,
df_EM,
results_dir,
inputs_dir,
disease_filename_j,
violin_gene,
cloned,
GAP,
... |
af6f8b1e78ef469882218c79e7b40e154e03d8233704ce16a1e0a4b19e9d57bb | R | 29,639 | 693 | library(svglite)
####Heatmap with One-Hot Encoding of Pathways####
library(circlize)
library(scales)
#Finalized Functions
###For visualization here: convert NaN to 0
general_pathway_gsea_heatmap <- function(metab_df, metab_ids, metab_labels, pathways, plot_title, legend_title, file_id, w, h){
KEGGt2m<- read.csv("Da... |
865d56cd583ebe1b02dd5c4016db91141cc3d4b57c63cf7ca56737fdb28d46a4 | R | 30,104 | 863 | duncan.test <-
function (y, trt, DFerror, MSerror, alpha=0.05, group=TRUE,main = NULL,console=FALSE)
{
name.y <- paste(deparse(substitute(y)))
name.t <- paste(deparse(substitute(trt)))
if(is.null(main))main<-paste(name.y,"~", name.t)
clase<-c("aov","lm")
if("aov"%in%class(y) | "lm"%in%class(y)){... |
a954b86ee00f8adc8c717d5721f37e9325f1e7ed6218a0dd414046c16ac437e5 | R | 31,739 | 577 |
#--------------------------
# Process ATP vs no ATP conditions for hybrid species Sm-ring assembly reactions
# this corresponds to 2025 samples treated with 2M urea, 5 mg/mL heparin and washed in RSB-1000 + 0.4% NP-40
#--------------------------
library(tidyverse)
library(pheatmap)
library(tibble)
library(stringr)
li... |
26de45f41fc6f7bff4cf7e64db9a2d3e0282a476aed7a8b39c9de0aeadf52d96 | R | 32,546 | 545 |
#------------------------
# Identify the effect Splice site, branch-point, and intron has in Sm-protein enrichment from 2023 RSB-500 + 0.1% NP-40 RIP-seq datasets
#------------------------
library(readr)
library(stringr)
library(tidyr)
library(dplyr)
library(tidyverse)
library(ggplot2)
library(gridExtra)
library(gtab... |
0dde3f6d1b303adeda268567b43d6fe320e668e3fa024132a1e838d6b2c8d7f2 | R | 33,157 | 840 |
#### build pathway node coloring function without graphnel object (get only psf results from graphnel and proceed with data frames)
plot_kegg_pathway <- function(graphnel_df, group_graphics, pathway_image,
node_colors = NULL, custom_edge_mapping = FALSE, edge_mapping = FALSE, edge_... |
99f68f4c8d83b0f37a72d5b621424c0a1b49901817f4a779a7644465db679492 | R | 34,096 | 993 | ---
title: "S14"
output:
workflowr::wflow_html:
toc: false
editor_options:
chunk_output_type: console
---
Make the heatmap figure and curate some correlations for the text
Also some figures on healthy variation
```{r lib}
library(here)
library(data.table)
library(tidyverse)
library(devtools)
library(ggplot2)
l... |
35a0da32462c2a4712566dba64d5b73260a03c70bc425a76029dc9ab43caf268 | R | 34,174 | 1,245 | #!/usr/env/bin Rscript
library(here)
library(data.table)
library(WRS2)
library(progress)
library(gt)
library(ggplot2)
library(ggsignif)
library(ggtext)
### CONSTANT
REDOPLOTS <- TRUE
### INPUT
segm.lst <- valid.lst <- list()
## Trained segmentation methods: MALF & NLPB & CNN
for (segm in c("malf", "nlpb", "cnn")) {
... |
81a2b479f307f5d52d273506a5be4c3f327ae55ca40dc8159eb4887b43237bb1 | R | 34,310 | 557 | library(shiny)
library(DT)
library(shinyWidgets)
library(shinyjs)
library(visNetwork)
library(plotly)
library(shinyBS)
load("subtypes.RData")
shinyUI(
fluidPage(
tags$head(tags$script("
// Enable navigation prompt
window.onbeforeunload = function() {
return 'Your changes will be lost!';
... |
858535e1e11cc4ddcc0faeda0a49a3c86bb97df0214cf06e7479fb4f42be9c5a | R | 34,706 | 799 | library('signs')
library('Cairo')
library('RColorBrewer')
library('ggrepel')
library('ggseqlogo')
library('cowplot')
custom_breaks <- function(bmin, bmax, digits = 0, length.out = 8, zero = TRUE) {
bmin = floor(bmin * (10 ^ digits)) / (10 ^ digits)
bmax = ceiling(bmax * (10 ^ digits)) / (10 ^ digits)
if (bmin > 0 |... |
4f51085dcb7ee39218c041a723ad83429cffa65e6f8c2e335401a61efb99a04e | R | 34,760 | 915 | ####Inhibitor Treated WE metabolites####
####With p-values...
######NEED TO ACCOUNT FOR WHEN A METABOLITE APPEARS MORE THAN ONCE.
library(ggplot2)
library(ggprism)
library(rstatix)
library(ggpubr)
library(Hmisc)
#devtools::install_github("wilkelab/ungeviz")
library(ungeviz)
library(dplyr)
library(scales)
obtain_metabol... |
19889fb53f5a67515ff71fff088586c1d6de34a689945a92cb7de1a9eb463fa7 | R | 35,249 | 683 | ---
title: "License"
output:
workflowr::wflow_html:
toc: false
editor_options:
chunk_output_type: console
---
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim ... |
44c971c2b8e701e9070e4823c408e1b738bd80eac5591dfa9a65999f50476401 | R | 36,083 | 814 | library(data.table)
library(DT)
library(miniUI)
library(shiny)
library(Seurat)
library(ggplot2)
library(psf)
library(magick)
library(shinyjs)
library(visNetwork)
library(plotly)
# load("melanoma_spatial_demo_data.RData")
psf_subset <- function(psf_collection, pathway_name, sample_list) {
pathway <- psf_collectio... |
7eae334065f94d0778dac042d92714e998b49a8f48646b7f57f8abc007e246b2 | R | 37,095 | 585 | ---
title: "Joint definition of cell types from multiple scRNA-seq datasets"
author: "Yichen Wang, Joshua Sodicoff and Joshua Welch"
date: "2024-10-01"
output:
html_document:
toc: 3
toc_float:
collapsed: false
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning ... |
b848af11f7a210ee199d2f9f17994e40c17e1dc267cfc1febcdd16b6f97ef947 | R | 38,691 | 1,003 | # =============================================================================
# Platelet RNA-based classification of Glioblastoma (GBM) vs Healthy Controls
# =============================================================================
#
# This script performs the TDEA (Threshold-Based Differential Expression Analysi... |
03e419769518e3595e13dcf5d0c2adc1caf66c4057d89b28fd4889e0a42fa803 | R | 39,162 | 705 |
#------------------------
# Identify the overlap between transcripts enriched between Y12 and SmB/B'/N RIP and distribution of Sm-sites, Splice-sites, and Branch-points
#------------------------
library(readr)
library(stringr)
library(tidyr)
library(dplyr)
library(tidyverse)
library(ggplot2)
library(gridExtra)
libra... |
ccb66c735b912604a23806acf5dba20a316f0fc191ff8674ab21aa55a113f633 | R | 39,293 | 1,419 |
local({
# the requested version of renv
version <- "1.1.7"
attr(version, "md5") <- "dd5d60f155dadff4c88c2fc6680504b4"
attr(version, "sha") <- NULL
# the project directory
project <- Sys.getenv("RENV_PROJECT")
if (!nzchar(project))
project <- getwd()
# use start-up diagnostics if enabled
diagno... |
0fbf7dceab0668e662ea67d31e5b2412894877e33e6a76594fbc814b5c2e6b6a | R | 42,268 | 941 | #' Subset liger object
#' @description This function subsets a \linkS4class{liger} object with
#' character feature index and any valid cell index. For datasets based on HDF5,
#' the filenames of subset H5 files could only be automatically generated for
#' now. Feature subsetting is based on the intersection of availab... |
30b87efccb06fb3add8a62190796b4dd9c8d4d24aedea9d579752ccf7a0bb34d | R | 43,404 | 1,063 | library('Cairo')
library('ggrepel')
library('RColorBrewer')
library('viridis', quietly = T)
library('ggpointdensity', quietly = T)
library('signs', quietly = T)
library('circlize')
library('cowplot')
library('ggseqlogo')
custom_breaks <- function(bmin, bmax, digits = 0, length.out = 8, zero = TRUE) {
bmin = floor(bmi... |
12cf0db1a5db83dcca9f7c5c76a785185669ce58fa0bd397a6a005fdbd4ed72c | R | 45,293 | 1,058 | rm(list=ls())
library(methylKit)
workdir <- "~/My Drive/Bench/HP1/HP1_Manuscript/Ovation/"
setwd(workdir)
cov_dir <- "~/My Drive/Bench/HP1/HP1_Manuscript/Ovation/5hmC_extract" # 5mC and 5hmC overage files should be here
########################### ANNOTATIONS ###########################################
#RefSeq annot... |
64ac74e27fc40a6b7e9655ed1a6646439759000767958b071a3d1a4a3c9b5ffd | R | 45,314 | 1,049 | library(scales)
library(Seurat)
library(cowplot)
library(pheatmap)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
library(ggsci)
library(viridis)
options(bitmapType='cairo-png')
setwd("/users/ludwig/cfo155/cfo155/scTAPS_CAPS/mouse_neuron_update")
mycolors <- c("#7994C6","#e01a30","#039fcc","#7d2574")
#### genome... |
e18253c07bdf92f69c906bf734a189ea13cdb325b9e63bce99456c9a3fe34b47 | R | 45,704 | 892 | #!/usr/bin/Rscript
#=####################################################################O
# R Script with helper functions for using eeguana package on EEG data
#
# Author: R.Muralikrishnan
# 2024-05-10: V 1.0
# 2024-06-11: V 12.0
#. 2024-07-25: V 12.1 => Improved messages in F_Log_Output
# ... |
153092dd7736ec99e45d5c2bc3142f24d0f47295943c5b3d26e348fcba939f76 | R | 45,921 | 1,293 | #Reorganized Minshan's Pleth Script
#Set variables here------------------------------------------------------------------------------------------------------------------------
#directory containing all pleth-related folders
#(there should be a folder named "Raw" in here)
root_folder = "F:/01 Data/06 Pleth/Pl... |
32a66cb3a396d8d7664d7ebf8c78519da9dd5eb00009b6495358513d8365e6f5 | R | 47,844 | 2,112 | ---
title: "Synaptic receptors expressed in mice CSF-cNs along the rostrol-caudal axis "
author: "Nicolas Wanaverbecq - Elysa Crozat - Edith Blasco"
date: "`r Sys.Date()`"
output:
pdf_document:
toc: yes
toc_depth: 5
html_notebook:
toc: yes
code_folding: hide
toc_depth: 5
---
```{r setup, incl... |
179d5e97a3d4f205a9d13dfdb210fd12c620a35c8d7b8546b1bf44af531b73a9 | R | 48,109 | 824 | ---
title: "figure4"
author: "Ben Umans"
date: "2024-08-14"
output: workflowr::wflow_html
editor_options:
chunk_output_type: console
---
## Introduction
This page describes steps used to compare eQTLs to disease gene results.
```{r}
library(Seurat)
library(tidyverse)
library(pals)
library(RColorBrewer)
library(mas... |
c0bd2b80cbe26d840df1b41b7d2cbb35856fb5fd56773da0bdb845cab928015f | R | 49,397 | 1,247 | #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# From other things to liger class ####
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#' @rdname as.liger
#' @export
#' @method as.liger dgCMatrix
as.liger.dgCMatrix <- function(
object,
... |
2e33c0d3822db43547c1ee72481568697f21857670fbaf11f345a69fc05dff01 | R | 49,422 | 1,259 | #' Download a KEGG pathway from the web
#' @param id KEGG identifier of the pathway
#' @param dir The directory where the downloaded file should be saved
#' @return The filepath of the downloaded pathway or NULL the pathway was not downloaded
#' @export
download.KGML <- function(id, dir){
if (!dir.exists(dir)){
i... |
ccb8d3118f384eae7f03dc596b2885e515cb3eea82db2469a068a1a33da63fb9 | R | 50,307 | 1,130 | #' Generate scatter plot(s) using liger object
#' @description This function allows for using available cell metadata to build
#' the x-/y-axis. Available per-cell data can be used to form the color/shape
#' annotation, including cell metadata, raw or processed gene expression, and
#' unnormalized or aligned factor loa... |
de7bb316de3c2dd40cbca558e67f0513b00786a1cc2d3b888c7d27f5b3fdaa5c | R | 51,633 | 1,199 |
library(Rfast)
library(glmnet)
library(ranger)
library(datasets)
library(MASS)
library(dplyr)
library(rootSolve)
library(vtreat)
library(xgboost)
library(fastDummies)
library(nnet)
library(CVXR)
##input: Lagrange multiplier lambda and the calculated estimating function stored in the ZZ matrix
##output: calcul... |
23c820bae5379defb4ce64b0d3e6076ee73db6c4307784b3e55e1906f71404a2 | R | 51,645 | 1,199 |
library(Rfast)
library(glmnet)
library(ranger)
library(datasets)
library(MASS)
library(dplyr)
library(rootSolve)
library(vtreat)
library(xgboost)
library(fastDummies)
library(nnet)
library(CVXR)
##input: Lagrange multiplier lambda and the calculated estimating function stored in the ZZ matrix
##output: calcul... |
14e2cdc3aee5122e7415a27577543603d94ab72762ace9d2b1983110d2b703af | R | 51,909 | 1,193 |
library(Rfast)
library(glmnet)
library(ranger)
library(datasets)
library(MASS)
library(dplyr)
library(rootSolve)
library(vtreat)
library(xgboost)
library(fastDummies)
library(nnet)
library(CVXR)
##input: Lagrange multiplier lambda and the calculated estimating function stored in the ZZ matrix
##output: calcul... |
a71af3fce33746e7d2418fb15fca23ec596ae407357ffcd90048aa8028fa6547 | R | 51,922 | 1,194 |
library(Rfast)
library(glmnet)
library(ranger)
library(datasets)
library(MASS)
library(dplyr)
library(rootSolve)
library(vtreat)
library(xgboost)
library(fastDummies)
library(nnet)
library(CVXR)
##input: Lagrange multiplier lambda and the calculated estimating function stored in the ZZ matrix
##output: calcul... |
474aac3667a80c05f8f02f5895e2ce6fe995990b30587d44f3d6929d7238fc09 | R | 52,089 | 1,489 | #' Check if given liger object if under new implementation
#' @param object A liger object
#' @return \code{TRUE} if the version of \code{object} is later than or equal to
#' 1.99.0. Otherwise \code{FALSE}. It raises an error if input object is not of
#' \linkS4class{liger} class.
#' @export
#' @examples
#' is.newLiger... |
b5ad183ae7c5e54ad19c3a132bbd0ab3e8ed85dff00fb5cdf664edd6f8a9c24e | R | 52,124 | 1,260 | #' @importFrom fs file_move
#' @importFrom stringr str_count
#' @importFrom stringr str_split
#' @importFrom psych corr.test
#' @importFrom igraph graph_from_adjacency_matrix
#' @importFrom igraph V
#' @importFrom igraph delete.vertices
#' @importFrom igraph E
#' @importFrom igraph get.vertex.attribute
#' @importFrom i... |
36c28db38c5dbc0da7b8b0867a1b4ff1f25b495fcaab41e6898eadbc6bd391fa | R | 53,327 | 2,138 | ---
title: "Synaptic receptors expressed in mice CSF-cNs along the rostrol-caudal axis "
author: "Nicolas Wanaverbecq - Elysa Crozat - Edith Blasco"
date: "`r Sys.Date()`"
output:
pdf_document:
toc: yes
toc_depth: 5
html_notebook:
toc: yes
code_folding: hide
toc_depth: 5
---
```{r setup, incl... |
e2450961075c9fd8012816ab412c2e2b2e1c1413c90fd0c22800116eb19d1208 | R | 54,141 | 1,271 | #' @title Find DEG between groups
#' @description Two methods are supported: \code{"pseudoBulk"} and
#' \code{"wilcoxon"}. Pseudo-bulk method aggregates cells basing on biological
#' replicates and calls bulk RNAseq DE methods, DESeq2 wald test, while
#' Wilcoxon rank sum test is performed on single-cell level.
#' \cod... |
d1b4ab9b453d9f482e7ea6833f1e60d37bcc1a285bd5a0036d6dbb55cb0f7e36 | R | 58,753 | 1,098 | setwd("working/directory")
library(data.table)
library(tidyverse)
library(UpSetR)
library(ComplexHeatmap)
library(PheWAS)
library(igraph)
library(corrr)
set.seed(22)
range01 <- function(x){(x-min(x))/(max(x)-min(x))}
'%ni%' <- Negate('%in%')
st_Red <- "#e6194B"; st_Green <- "#3cb44b"; st_Yellow <- "#ffe119"; st_Blue... |
38637534e7c9b0b727bfd32ef41c325e7175a4b9127e4d3449679cddec6ca9d7 | R | 60,124 | 1,326 | CCLE2 <-function(disease_name,
PMA_user,
Age_user,
Sex_user,
OncotreeLineage_user,
target_gene,
do_GLM,
reg_type,
carnival_flag,
GLM_all,
new_version,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.