sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
3309fbca3ac37f33a265be0df80a879c585336e40de0098d1a09b844b938c274 | R | 31,476 | 817 | #' Build and plot dendrogram from gene panel
#'
#' Build and plot a dendrogram using correlation-based average linkage hierarchical
#' clustering and only using a specified set of genes. The output is the expected
#' accuracy of mapping to each node in the tree, which gives an idea of the best-case
#' expected r... |
a76b062236a5cef672dd04b0e66a61482a8f4af3c6217202f0138c79d1a97ea8 | R | 31,515 | 1,058 | library(ggplot2)
library(ggrepel)
library(ggnewscale)
library(patchwork)
library(scales)
library(dplyr)
library(tidyr)
library(forcats)
library(stringr)
library(tibble)
library(readr)
library(purrr)
library(broom)
library(broom.mixed)
library(lme4)
library(ineq)
library(pheatmap)
library(RColorBrewer)
library(Matrix)
l... |
d56f23c6b048ffb3b9e1a9835e4bdac3e4ff67dc793d91b3ec437545583b4b79 | R | 31,682 | 789 | ---
title: "Figure2.Rmd"
author: "MM"
date: "2025-01-10"
output: html_document
---
# In Sugon
```{r setup, include=FALSE}
options(future.globals.maxSize = 10000 * 1024^2)
library(Seurat)
library(harmony)
library(Hmisc)
library(reshape2)
library(dplyr)
library(tidyr)
library(ggplot2)
library(ggpubr)
... |
29356a9b285a17c54b1da8451ecff1be89f0eec6cce0d83a530e2fe6ea0639e5 | R | 31,694 | 667 | #' Run Single-Dataset Biomarker Discovery using Genetic Algorithm
#'
#' Performs GA optimization to find biomarker definitions (e.g., feature weights
#' or region selections) for a single dataset, maximizing a custom fitness
#' function based on internal evaluation metrics.
#'
#' @param dataset_data List containing the... |
c985d2d2d82f00bf16f7b19d79979da70a52e476d189e6e549226d9cf6f183e7 | R | 31,961 | 635 | # Define a named vector for peak picking methods with descriptions
# This vector maps user-friendly descriptions to short method names
choices_peak <- c(
"MAD= Local maxima and SNR with noise based on local Mean absolute deviation (MAD)",
"Simple= Local maxima and SNR with constant noise based on Standard Deviation... |
95acfe6039f4d3ad714064c8d166bbe740d0987ccbb7ccf759aa0097d7369d0b | R | 31,973 | 696 | ---
title: "SVbyEye: A visual tool to characterize structural variation among whole-genome assemblies"
author: "David Porubsky"
date: "`r Sys.Date()`"
package: SVbyEye
output:
BiocStyle::html_document
vignette: >
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{SVbyEye: A visual tool to characterize st... |
bb33ed22b06f38822a4c110a6d292a4482605dd283f872a7ef4638591fe3715c | R | 32,051 | 721 | # various targets-safe helper functions for extra modeling stuff on canlabtools outputs ----
## voxelwise statmap data operations ----
# set all sub-threshold voxel values to 0
threshold_tvals_pre_statmap <- function (tvals,
threshold_t ... |
ffc08b8557b2ed60f1072f5d9304617de78c5cc55d6f7fe28344be0abf34c551 | R | 32,523 | 1,008 | # Create datasets for testing ----
## use npx_data1 ----
# Remove sample controls from npx_data1 to preserve test results
npx_data1_mod <- npx_data1 |>
dplyr::filter(
!stringr::str_detect(
string = .data[["SampleID"]],
pattern = stringr::regex(
pattern = "control|ctrl",
ignore_case =... |
bef720bf8dfb3babb169689987388691244c3c5074b3fbcf172b0b6dda5382b7 | R | 32,593 | 630 | # Utility Function
#
#
# Author: Jiaxin Fan, Xuran Wang
###################################################
#' @title MuSiC2_Deconvolution
#'
#' @description This function is used to deconvolve bulk RNA-seq data using single-cell reference generated under a different condition.
#' @param bulk.control.mtx Matrix of expr... |
9023f91861ead782aa87e7d909343a399c0cb1cfb560b2aad55e036165a7d04d | R | 32,746 | 669 | ## Script for merging our datasets with public datasets to investigate the origin of our FBs
## Follow-up script to process and explore the Fibroblast origin complete object in Figure 1 manuscript
## Rebuttal: different harmony settings and now added new Betsholtz data
library('Seurat')
library('dplyr')
library('gridE... |
21faeb6061ca81561fec7679294533354d8bc459241aac73fb15248f58990448 | R | 32,867 | 1,051 | ---
title: "Schmidt et al. - Figure 3"
author: "Anne Hoffrichter"
date: "2024/05/16"
output:
bookdown::html_document2:
code_folding: hide
fig_caption: true
toc: yes
toc_depth: 4
toc_float:
collapsed: yes
link-citations: yes
---
```{r loadLibraries, message=FALSE, warning=FALSE}
library(tid... |
6b5a05f314ce97945b533d2e350ea3ca16637fe975e8e169ac930faeffb07ce2 | R | 32,978 | 865 | ##NicheNet analysis
library(nichenetr)
library(Seurat)
library(SeuratObject)
library(tidyverse)
#Agrp neurons
ligand_activities <- predict_ligand_activities(
geneset = target_genes,
background_expressed_genes = expressed_genes_receiver,
ligand_target_matrix = ligand_target_matrix,
potential_ligands = ligand
... |
b3c40ca0d66e387a4ac7fc48a2ec628201fd1ca06e84c5c4fba5a71b9d88eaa0 | R | 33,010 | 743 | ## targets-optimized functions for generating plots from data targets ----
relabel_cols_for_plot_naturalistic <- function (data) {
data %>%
mutate(loom_col = if_else(has_loom == 1, "Looming", "No looming"),
animal_type = fct_relevel(animal_type, "food", "dog", "cat"))
}
relabel_cols_for_plot_control... |
f32931b7c1ed5361d1d673b825420853970d204c7d08db4881fdb39ec3c72ac7 | R | 33,327 | 736 | #' Robust multi-group comparison
#'
#' @description This function allows to compare multiple groups in
#' multiple outcome variables with violated parametric assumptions.
#'
#' @param df data frame or tibble object
#' @param outcome.var continuous variable/s
#' @param groups grouping variable/s
#' @param desc_only prin... |
b6bc03a22d40fcd8885309818283b57ed70aad707e5516dc3d7fe98e18be812f | R | 33,484 | 1,201 |
local({
# the requested version of renv
version <- "1.0.2"
attr(version, "sha") <- NULL
# the project directory
project <- getwd()
# use start-up diagnostics if enabled
diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE")
if (diagnostics) {
start <- Sys.time()
profile <- te... |
365429290233baeb5d10d7fbd80d5ba85b4eab64d9a9bac7da1e2a90ec9a0909 | R | 33,619 | 764 | ---
title: "Figure4&5"
author: "MM"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
options(future.globals.maxSize = 10000 * 1024^2)
library(Seurat)
library(harmony)
library(dplyr)
library(tidyr)
library(ggplot2)
library(ggpubr)
library(Nebulosa)
library(scCustomize)
li... |
4bc99bfff0b40866b1e23d70c81635b432c24ab68bf599d9a2480ae624e64ff9 | R | 33,679 | 564 | library(Seurat)
library(torch)
library(SummarizedExperiment)
library(ggplot2)
library(future)
library(scrattch.hicat)
library(data.table)
library(dplyr)
library(tibble)
library(pbmcapply)
library(SCISSORS)
library(MetaMarkers)
library(gplots)
library(scales)
library(scubi)
library(paletteer)
library(SeuratWrappers)
... |
a3ee57d8111a718b12199f236b09a0f9e8404fe05c684bc1e0502aab02c230ae | R | 34,281 | 756 |
####################################
## Set and retrieve factors names ##
####################################
#' @rdname factors_names
#' @param object a \code{\link{MOFA}} object.
#' @aliases factors_names,MOFA-method
#' @return character vector with the factor names
#' @export
#' @examples
#' # Using an existing ... |
9062e4126011b125ec7891d08181738cb0d33dfc9b52f5210a609d9057523b40 | R | 34,492 | 740 | # Script for performing statistical tests of results ++++++++++++++
# Authors: Meike Bielfeldt, Kai Budde-Sagert
# Created: 2025/05/12
# Last changed: 2025/11/10
# Delete everything in the environment
rm(list = ls())
# Close all open plots in RStudio
graphics.off()
# Show warnings as they appear
opt... |
f1decbbff3a3e5582ca7c9214b36929f4e5a287ee157b01c0949ba456fddb4bd | R | 34,618 | 581 | ---
title: "HCHS ACE Analysis"
output: html_document
date: "2023-03-10"
author: "Anne Klimesch"
note: |
This script combines the variables of interest of different data sets into one new dataset for analysis. The datasets that will be combined are:
1. SES data and ACE data ("HCHS_Data_SPSS_labelled_sozio_HCHS_SES_... |
e6ffa238d0d351085468cb85af2a6a476084732af09c99da073f6ef042781320 | R | 34,689 | 340 |
#Load necessary packages.
library(shiny)
library(EBImage)
library(jpeg)
library(ggplot2)
#library(writexl)
library(shinydashboard)
library(dplyr)
library(tibble)
library(ComplexHeatmap)
library(grid)
library(gridExtra)
library(cowplot)
library(DT)
library(waiter)
library(viridis)
library(shinycssloaders)
library(plotl... |
2b7404753a0cbcc602c5bef56ce725ba401792a3c8eb3f5cb7f1d0f5088944f3 | R | 34,712 | 672 | ####libraries####
library(lme4)
library(lmerTest)
library(readxl)
library(MuMIn)
library(DHARMa)
library(dplyr)
library(emmeans)
library(ggplot2)
library (bestNormalize)
library(tidyr)
library(corrplot)
library(ggpubr)
####Data importation and path setting####
setwd("YourOwnPath") #Your own path
di... |
cff23306ea9986b82d972b3914757b3eb85d854ac644afcb2a6998253d459d4e | R | 34,915 | 1,294 | #!/usr/bin/env Rscript
# Enable better error tracebacks
options(error = function() {
calls <- sys.calls()
if (length(calls) >= 2L) {
cat("Traceback:\n")
traceback(2)
}
if (!interactive()) {
quit(status = 1)
}
})
library(Signac)
library(Seurat)
library(ggplot2)
library(gridExtra)
library(GenomicR... |
37e40fc2cd719be6f79252cbc744d75cc4a518aa0b3901b90d4da872bcb19875 | R | 34,989 | 974 | #INFORMATION-----------------------------
#LOAD LIBRARIES ------------------------
library(clustree)
library(data.table)
library(dplyr)
library(DT)
library(ff)
library(ggfun)
library(ggplot2)
library(ggpubr)
library(ggrepel)
library(gplots)
library(gridExtra)
library(Matrix)
library(matrixStats)
library(plotly)
librar... |
41022063944432e357a04db0ada24621b8170f9dc8aefdcf16507a44547f3d16 | R | 35,167 | 923 | # ==============================================================================
# S6_ROI_select.R
# Server logic for Step 4: ROI Selection
# Handles definition of Regions of Interest (ROI) via clustering, cell types, or interactive selection.
# ======================================================================... |
2f56df86c84a7fb9e084dcc368de73c9ea9f16eddda34098a7ea866432df64fa | R | 35,268 | 700 | options(Seurat.object.assay.version = "v3") # use old Seurat object version
options(future.globals.maxSize = 4000 * 1024^2)
library(Seurat)
library(ggplot2)
library(sctransform)
library(dplyr)
library(rhdf5)
library(SeuratDisk)
library(data.table)
library(limma)
library(Matrix)
library(grid)
library(stringr)
library(r... |
94cba1b349e597bb5656673986c08ab83eb85e5306a9d4c9353d36f470183705 | R | 35,411 | 704 | options(Seurat.object.assay.version = "v3") # use old Seurat object version
library(Seurat)
library(ggplot2)
library(sctransform)
library(grid)
library(dplyr)
set.seed(123)
source("~/PD_project_analysis/manuscript_scripts/MV_utils.R")
dir.create("/home/ubuntu/MLO_merged_allsamples/25_01_24_replicating_everything")
... |
d465bbb47caf2756ca6e2cc81f26cf8fb414a2e176521eff729a33b5bfec8fa4 | R | 35,546 | 609 | #改写RunNiches
compute_edgelist <- function (sys.small, position.x, position.y, position.z, k = 6, rad.set = NULL)
{
df <- data.frame(x = sys.small[[position.x]], y = sys.small[[position.y]], z = sys.small[[position.z]])
df$barcode <- rownames(df)
df$x <- as.character(df$x)
df$y <- as.character(df$y)
... |
17ff58fda41e7a92db78bbe85c29ecf3bba4a3531b04b3a442ab0aa2f41cb8b4 | R | 35,567 | 613 | library(dplyr)
library(data.table)
library(scales)
library(heatmaply)
library(MatrixGenerics)
library(reshape2)
library(ggsankey)
library(gplots)
setwd("/mnt/DD/Sc RNA-Seq/LR/morpho")
################################################################################
#
# Compare connectivity score obtained and study... |
4958a9cc2b5b5631d2457674a2009008a26df8014aaab415c1eaf8213c2b295a | R | 36,080 | 741 | ---
title: "vignette-wizbionet"
author: "Zofia Wicik"
date: "2026-07-21 (wizbionet 1.3.0 update)"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{vignette-wizbionet}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
<!-- .markdown-block { -->
<!-- padding-top: 0 !important; -->
<... |
7455244e3360ab6e43fff7e46119dfddb5143e17cdacb7e09d5100eea4267a2b | R | 36,369 | 999 | # INFORMATION--------------------------------------------------
# WORK DIR ----------------------------------------------------
#LOAD LIBRARIES ---------------------------------------------
library(data.table)
library(dplyr)
library(DT)
library(GEOquery)
library(Matrix)
library(Seurat)
library(shiny)
library(shinydas... |
bdd1d3c64f0d6f2e1e3e314dab17b5519be1f16b355f9dbea72dba476296b573 | R | 36,456 | 859 | ################################################################################
# Analysis Pipeline for Rubber Voice Illusion Study
# Author: Suong Welp
# Date: July 21, 2025
#
# This script analyzes behavioral ratings, fundamental frequency (F0) changes,
# and N1 ERP responses in a voice feedback manipulation ... |
14c907d566388b18e6ca582849527196a2f1e8afe9637871e6a83d6a3dc68373 | R | 36,542 | 1,207 | rm(list=ls(all.names = TRUE))
set.seed(777)
# prepare parallel processing:
cores <- parallel::detectCores(logical = TRUE)
# Create a cluster object and then register:
cl <- parallel::makePSOCKcluster(cores)
doParallel::registerDoParallel(cl)
####################################################
# Data load... |
ad9d5a039c145e5937b593f20ec0308a762df1c3695da6fda5917181776054f0 | R | 36,611 | 1,059 | #' Function which performs an ANOVA per protein.
#'
#' @description
#' Performs an ANOVA F-test for each assay (by OlinkID) in every panel using
#' car::Anova and Type III sum of squares. The function handles both factor and
#' numerical variables and/or covariates.
#'
#' @details
#' Samples that have no variable infor... |
72b65f4dae2573cc846dda898a43b2dd6a4a71ab6b0a53dfb5632e34d58220c4 | R | 36,745 | 1,334 |
local({
# the requested version of renv
version <- "1.1.4"
attr(version, "sha") <- NULL
# the project directory
project <- Sys.getenv("RENV_PROJECT")
if (!nzchar(project))
project <- getwd()
# use start-up diagnostics if enabled
diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALS... |
91b14710906b684674f2af4eb17a7b34d53767a6953ccb01ee3f891d35106386 | R | 36,885 | 796 | # UI function for the data exploration module
# This function defines the user interface for exploring data, including m/z plots and spectra plots.
dataExplorationUI <- function(id) {
message("[DATA_EXPLORATION_UI] Initializing UI for module id: ", id)
ns <- NS(id) # Namespace function to ensure unique IDs for UI ... |
f543047e2578d85a29c61d9e5de43655e8fd1c8f39dbfa89f67d3743c675c1b1 | R | 37,052 | 1,023 | ---
title: "Summary of Behavioral Data"
author: "Kenji Fujisaki"
date: '`r format(Sys.time(), "%Y/%m/%d")`'
output:
html_document:
toc: true
toc_float: true
toc_depth: 4
number_section: true
code_folding: hide
---
**What does this script return?**
Descriptive statistics and test results of behav... |
630e0f728f7f80c182e1b25ef5b0293bfebf814d6bbf1489d6195223864aa620 | R | 37,057 | 972 | library(ggsignif)
library(ggpubr)
library(Seurat)
library(monocle3)
library(RColorBrewer)
library(ggthemes)
library(ggrastr)
library(base64enc)
library(ggplot2)
library(readxl)
library(Biobase)
library(ggbeeswarm)
library(cowplot)
library(stringr)
library(ggridges)
library(tidyverse)
library(stringr)
library(ggsignif)... |
7ca0025d7732b83bd396a19cd6c84f1ff9e3d7bf088cc3a13c4a3ca5eeea4309 | R | 37,271 | 924 | #' Calculate Age-Specific Prevalence from Longitudinal Data
#'
#' Estimates the prevalence of a condition in specified age ranges from a matrix or
#' data frame of patient-level time-to-event data.
#'
#' @param m_patients A data frame or matrix where each row represents a patient,
#' and columns include age at even... |
58bb8c70216ceea9529df2a8f4100db138965c79df005eb387d5dc6c2ba82cf8 | R | 37,524 | 926 | ############################
## iTReX UI script ##
## Author: Dina ElHarouni ##
############################
# Heatmap drop-down choices
choices <- c(
"euclidean", "maximum", "manhattan", "pearson", "spearman", "kendall"
)
# Download link to a file in inst/shiny/www/demo
fileDownloadButton <- function(filena... |
79b8106b689897ec7665a24f981ab07fe8f7a7c13bf33d2cd0a401e36bd3c209 | R | 37,675 | 1,321 | ---
title: "Real Data Analysis"
output:
html_document:
highlight: pygments
theme: yeti
toc: true
number_sections: true
df_print: paged
code_download: false
toc_float:
collapsed: yes
toc_depth: 3
editor_options:
chunk_output_type: inline
---
```{r setup, include=FALSE}
# Se... |
7ded6208ebfc7b5cde9409f81bc704da3fbb8f34950a039fe5f359b09f7f9fd2 | R | 37,713 | 741 | # ============================================================
# S4 generics + methods for new plotting functions
#
# Primary names use rich* prefix.
# Old gg* names are kept as aliases for backward compatibility.
# ============================================================
# -------------------------------------... |
cc5256aa507bda1f0628f90de695ebc015e806d39b36fe435c722401546d9c86 | R | 37,798 | 1,203 | # Test olink_normalization_bridgeable ----
test_that(
"olink_normalization_is_bridgeable - works",
{
skip_if_not(file.exists(test_path("data", "example_3k_data.rds")))
skip_if_not(file.exists(test_path("data", "example_HT_data.rds")))
data_3k <- get_example_data(filename = "example_3k_data.rds")
... |
1c9c85e869e68301ae510fe23cffb00ad31441855d9647a88331afe5d4e00681 | R | 37,858 | 812 | ##' @importFrom ggplot2 ggplot aes geom_segment geom_point coord_flip labs
##' @importFrom ggplot2 theme_minimal geom_bar coord_polar scale_fill_gradient
##' @importFrom ggplot2 scale_fill_manual geom_text scale_color_gradient
##' @importFrom ggplot2 scale_color_gradient2 scale_color_manual geom_vline
##' @importFrom g... |
5465e2429da0e612d2ccbe15da34aa4023294e4b13aba5aae6728defd03de089 | R | 37,955 | 1,300 | # Test check_is_arrow_object ----
# Test that relevant errors are thrown when non-ArrowObjects are checked
test_that(
"check is arrow object - ERROR",
{
expect_error(
object = check_is_arrow_object(x = c("I_Shall_Pass",
NA_character_),
... |
7f2565b055ec5b92d83506d34912d52c66930600959870bfb634ae57b1b35094 | R | 37,992 | 1,017 | suppressMessages(library(ggplot2))
suppressMessages(library(RColorBrewer))
suppressMessages(library(showtext))
suppressMessages(library(Cairo))
suppressMessages(library(networkD3))
suppressMessages(library(webshot))
suppressMessages(library(htmlwidgets))
suppressMessages(library(dplyr))
suppressMessages(library(Seurat)... |
2440b00c484951e308a0499119dc9e9f9bc041ddc24d92c8345c5c68626c8eaf | R | 38,144 | 715 | run.RCTD.replicates.local <- function (RCTD.replicates, doublet_mode = "doublet")
{
if (!(doublet_mode %in% c("doublet", "multi", "full")))
stop(paste0("run.RCTD.replicates: doublet_mode=", doublet_mode,
" is not a valid choice. Please set doublet_mode=doublet, multi, or full."))
for (i in 1:... |
8d49b7fb26ab4181bce6efe011fa02d03b4cb7de7875c950e54794e06a982e83 | R | 38,223 | 938 | #Set up environment----
setwd("/Users/elizabethmallott/Dropbox/Projects/Gut_microbiome/mouse_inoculation/16S/Experimental_only")
#Import data----
unweighted = as.dist(read.table("unweighted-distance-matrix-noinfant.tsv", header = T))
weighted = as.dist(read.table("weighted-distance-matrix-noinfant.tsv", header = T))
... |
26f5b723e593ca6d5e7311823a780b91f18a8f1263252348d3dc75061a1d7a4b | R | 38,226 | 999 | # Master script to look at qMRI vs ST across layers
# load in some libraries
library(ggplot2)
library(tidyverse)
library(reshape2)
library(ggpubr)
library(hydroGOF)
library(matrixStats)
# define directories
d0 <- getwd();
qMRI.data.dir <- paste(d0, "/../../raw_data/4layers_qMRI/", sep = "")
cell.data.dir <- paste(d0,... |
6e9af3191c283922b2f08b1701f935a412c6ab61c3f29fffc751103995d9a4c8 | R | 38,344 | 767 | ---
title: "Enriching a Microbiome Analysis"
author: "Thomaz F. S. Bastiaanssen"
output:
pdf_document:
keep_tex: true
---
# 0. Introduction
Here, we will demonstrate four strategies to enrich microbiome-gut-brain axis experiments. In this document we expand on the demonstration in the supplementary files of the... |
57ff4f04c2b20fa4ccfb2ec9b970af7ab7dffa0ea2547de22d4bb9fac103170c | R | 38,630 | 1,134 | #' Function that performs a linear mixed model per protein.
#'
#' @description
#' Fits a linear mixed effects model for every protein (by OlinkID) in every
#' panel, using `lmerTest::lmer` and `stats::anova`. The function handles both
#' factor and numerical variables and potential covariates.
#'
#' @details
#' Samples... |
2fce7ddc354f039cf91536a9027232f12e3327d1617fc5e86aff3fb2a1c4c6d9 | R | 38,671 | 1,244 | #############################################################################
#
# Clust 0 vs All
#
#############################################################################
library(devtools)
library(monocle3)
library(Seurat)
library(SeuratWrappers) # For conversion helper
library(scater)
library(TSCAN)
library(sl... |
1275b833b11024580e7dcaa7146c519ba5b0373a1d833a3e34fdc82da9f6ef49 | R | 38,832 | 1,081 | ---
title: 'Increased synaptic turnover in injured cortical axons: exploring the role
of SARM1 ablation'
author: "Ensieh Izadi, Jess Collins, Aidan Bindoff and Bill Bennett"
date: "2026-01-22"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message =... |
6b44d52969eed150bc418b2e688e78a9896564bb1f75737c268771ba6796b40b | R | 39,082 | 991 |
# Lazy BANKSY operator for implicit PCA
#
# Computes PCA on the BANKSY matrix without materializing the full
# [2*n_genes x n_cells] product. The BanksyLazy operator implements
# implicit forward (A %*% x) and adjoint (t(A) %*% x) multiplications
# that irlba needs, operating directly on the sparse expression matrix
#... |
422a6ba00a9f5938982f78fc73fa2e441380c8472dc13031a4f51c34864c4c73 | R | 39,341 | 699 | ---
title: "Incorporating CHOP pathology input to molecular subtyping calls"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
author: Jaclyn Taroni for ALSF CCDL, Jo Lynne Rokita for D3b
date: 2020
params:
is_ci: FALSE
---
_Authorship above refers to this notebook **only**._
## Background
As part of this... |
105728f82b5aff3dad8143aaf22c11702f341622cb8044b4432ee5bde2dca01f | R | 39,413 | 1,148 | library(ggplot2)
library(ggrepel)
library(ggnewscale)
library(patchwork)
library(scales)
library(dplyr)
library(tidyr)
library(forcats)
library(stringr)
library(tibble)
library(readr)
library(purrr)
library(broom)
library(broom.mixed)
library(lme4)
library(ineq)
library(pheatmap)
library(RColorBrewer)
library(Matrix)
l... |
fcd0f0a6584b701360efd34a92bd6c229c23838f1f5ab0e2e3aedea7650402b4 | R | 39,613 | 1,221 | # Test olink_bridgeability_plot ----
test_that(
"olink_bridgeability_plot - works - full data",
{
skip_on_cran()
skip_if_not_installed("ggpubr")
npx_3072 <- get_example_data(filename = "example_3k_data.rds")
npx_ht <- get_example_data(filename = "example_HT_data.rds")
expect_no_error(
o... |
da720d5d262bc74984eb1e7f04cb60dd0a824cf3f83efdd9d71edfeb0c972adb | R | 39,682 | 850 | options(Seurat.object.assay.version = "v3") # use old Seurat object version
library(Seurat)
library(ggplot2)
library(pheatmap)
library(dplyr)
library(Kendall)
library(UCell)
library(ggridges)
library(harmony)
library(networkD3)
library(webshot)
library(EnsDb.Hsapiens.v86)
library(reticulate)
library(AnnotationHub)
lib... |
cc43e14ecb376a6d041fe121da83486bd9e771098b66679fd5b7aec4c3e351bb | R | 39,778 | 819 | #' Run Multi-Cohort Biomarker Discovery (using a Genetic Algorithm by default)
#'
#' Performs GA optimization for biomarker definitions, evaluating fitness based
#' on aggregated performance across multiple specified datasets. The GA aims
#' to maximize the aggregated fitness.
#'
#' @param preprocessed_data List. The o... |
705edf5008734e8da3319c868d89835c1851da66e65a433d3d65be5866508128 | R | 40,055 | 928 | ---
title: "pbmc_analysis"
format: html
editor: visual
---
# 0 Setup
## 0.0 Load Libraries
```{r Load Libraries}
wd = ""
setwd(wd)
#general
library(tidyverse)
library(dplyr)
library(readxl)
#DE
library(DESeq2)
library(edgeR)
#graphing
library(cowplot)
library(ggplot2)
library(plotly)
library(ggrepel)
library(pheatma... |
7c796a070f12e1b00290770b410ae347648c418ce40ba8326b8e5cd5a6d4641c | R | 40,110 | 927 |
#' @title create a MOFA object
#' @name create_mofa
#' @description Method to create a \code{\link{MOFA}} object. Depending on the input data format, this method calls one of the following functions:
#' \itemize{
#' \item{\strong{long data.frame}: \code{\link{create_mofa_from_df}}}
#' \item{\strong{List of matrice... |
06b74c6f5637e80e4ba1e889204c6fec2d9cf9a04ddb1171709dc5bca030a5ca | R | 40,332 | 844 | # UI function for file upload module
fileUploadUI <- function(id, file1_ext, file2_ext = NULL) {
message("[FILE_UPLOAD_UI] Initializing UI for file extensions: ", file1_ext,
if(!is.null(file2_ext)) paste(", ", file2_ext) else "")
ns <- NS(id) # Namespace for module to avoid ID conflicts
... |
3194fbc66b755985900778f2e2ae09f553c29484449666ffa4319915852b6225 | R | 40,344 | 1,373 | #' Check NPX data format
#'
#' @description
#' This function performs various checks on NPX data, including checking
#' column names, validating Olink identifiers, identifying assays with \emph{NA}
#' values for all samples and detecting duplicate sample identifiers.
#'
#' @details
#' OlinkAnalyze uses pre-defined name... |
030154c8279a5a3abfef67d732a81d8b3e4ba42bdf2e67b9f92b9a0bee1bd3ee | R | 40,382 | 982 | #' Check product name and set plate size accordingly
#'
#' If plate size is not provided, function will use
#' accepted_olink_products tibble to map the product name to the plate size
#'
#' @param product (String) Name of product (needs to match one of names in
#' accepted_olink_platforms$name)
#'
#' @returns (Integer)... |
6456c51eee340d44270cf7702f66aac0409069d76380f1317b11fef5a99396e6 | R | 40,440 | 923 | # Meta-analysis of scRNA-seq data of E14 Neocortex - Part 3 : NSC subclustering ---------------------
# Rahul Jose
# SCB, RGCB
# October 2024
# Primary Aim :
# For the identification of NIHes1 and NDHes1 cells from Neocortex single cell data,
# Identifying PCA based clusters in scRNA-seq data from Loo, L., Sim... |
68a1fcd959cded0c58e52d7b7d1c02178609947fa7d07e98115b7317d215c5b5 | R | 40,582 | 1,320 | #' Define a Class Union
#'
#' Defines a class union accepting either a list or NULL. Used for optional
#' slots in S4 classes.
#'
#' @keywords classes
#' @rdname setClassUnion
setClassUnion("List_OR_NULL", c("list", "NULL"))
#' MethylResultSet Class
#'
#' An S4 class for storing and working with results from Illumina ... |
489734da5d4652a8d885b046bd3bc090b495ac8332322d782243c5a2228611c6 | R | 40,605 | 1,621 | library(rlang)
# Help functions ----
## Header matrix ----
# return the top 2x2 matrix in the first two rows of an Olink format wide file
olink_wide_head <- function(data_type) {
df <- dplyr::tibble(
"V1" = c("Project Name", data_type),
"V2" = c("Test", NA_character_)
)
return(df)
}
# extract NPXS v... |
3ff75c5177e1ce30086ddc1ef6e605ae3565a2f23c73972c1957115bd814c357 | R | 40,797 | 1,290 | #' @name lgb_shared_dataset_params
#' @title Shared Dataset parameter docs
#' @description Parameter docs for fields used in \code{lgb.Dataset} construction
#' @param label vector of labels to use as the target variable
#' @param weight numeric vector of sample weights
#' @param init_score initial score is the base pre... |
20af43868317cac8a8b5305a80aa772ae5f1961784e2e2d75951717effcd4f64 | R | 41,002 | 1,112 | ---
title: "metabolitic"
author: "MM"
date: "2025-11-08"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
setwd("E:\\BaiduSyncdisk\\honeybee\\metabolism\\")
library(data.table)
```
# 非靶向代谢
```{r}
neg<-fread("../非靶老师分析/neg.txt",sep = "\t",header = T)
dim(neg)... |
9268217ed6c6963931e7e6ea816ad0302c8dd24554bb3c7513a7b2f4baff972a | R | 41,123 | 857 | # Define ionization modes and assign names for user-friendly display
ionization_mode <- c("Positive", "Negative")
names(ionization_mode) <- c("positive", "negative")
# Define lipid databases and assign names for user-friendly display
lipid_databases <- c("LipidBlast", "HMDB")
names(lipid_databases) <- c("lipidblast", ... |
d9ddbaf295df7b5b356468b8a16213a882eb52b3a13215c4dfe55762bb5c38a9 | R | 41,312 | 1,338 | #' Clean proteomics data quantified with Olink's PEA technology
#'
#' @description
#' This function applies a series of cleaning steps to a data set exported by
#' Olink Software and imported in R by [`read_npx()`]. Some of the steps of this
#' function rely on results from [`check_npx()`].
#'
#' This function removes ... |
c64ace48d228fdba928d9047675b59f03316f14379a790bbe257f27b411ae6c1 | R | 41,419 | 1,738 | # Test get_olink_platforms ----
test_that(
"get_olink_platforms - works",
{
# all platforms ----
expect_true(
object = identical(
x = accepted_olink_platforms$name |>
unique() |>
sort(),
y = get_olink_platforms()
)
)
# broader platforms ----
la... |
8c395187b52938fd3bbf1892e609df81e89bc800b7f80c28f76340c32cba59b3 | R | 41,606 | 1,218 | #' Normalize two Olink datasets
#'
#' @description
#' Normalizes two Olink datasets to each other, or one Olink dataset to a
#' reference set of medians values.
#'
#' @details
#' The function handles four different types of normalization:
#' - \strong{Bridge normalization}: One of the datasets is adjusted to another
#... |
829b289c58967375784feedca71e6a3bf3d44dfd591bdb66a1049c7735469049 | R | 41,643 | 789 | #Set up environment----
setwd("/Users/elizabethmallott/Dropbox/Projects/Gut_microbiome/mouse_inoculation/16S/All")
#Import data----
unweighted = as.dist(read.table("unweighted-distance-matrix-noinfant.tsv", header = T))
weighted = as.dist(read.table("weighted-distance-matrix-noinfant.tsv", header = T))
metadata = rea... |
2579f6a592cab19e1431d9e60dba414154de803b2e6839c35298f3793d631306 | R | 41,843 | 1,011 | ---
title: "lg"
author: "Tingting"
date: "2024-03-05"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(ggforce)
library(pheatmap)
library(RColorBrewer)
library(vegan)
library(broom)
library(ggstance)
library(lubridate)
library(readxl)
library(ggpubr)
l... |
636daeb308e69c5983999c67d7e3b7392509e5a00141c4ba84d37717804fee69 | R | 42,029 | 1,112 | library(data.table)
library(nat)
library(ggplot2)
setwd("/mnt/DD/Sc RNA-Seq/LR/morpho")
################################################################################
#
# Prepare cell position into cortical column
#
################################################################################
... |
17263d836833e0b7187e05b9497f6cabf76b37abb1655650ad7ea0dfa7096adb | R | 42,040 | 1,084 | #INFORMATION-----------------------------
#LOAD LIBRARIES ------------------------
library(data.table)
library(dplyr)
library(DT)
library(ff)
library(ggplot2)
library(ggpubr)
library(ggrepel)
library(gplots)
library(gridExtra)
library(Matrix)
library(matrixStats)
library(plotly)
library(scran)
library(scuttle)
library... |
577529efb48542b0c19cfbaa8cc8383acad75215f2bd1e88c84b497548b28287 | R | 42,046 | 1,176 | ---
title: "MotiMus NIRS Processing"
Me: Ségolène M. R. Guérin
output:
html_notebook:
code_folding: hide
toc: yes
pdf_document:
toc: yes
html_document:
toc: yes
word_document:
toc: yes
editor_options:
markdown:
wrap: sentence
---
# Preambule
```{r preamble, warning=FALSE}
# ------ CL... |
58bc6df23dd5110c7ca189431bf5a137e4a7810046242553565d68eb64107453 | R | 42,382 | 759 | # The Osprey job file
Every **Osprey** analysis requires the user to provide a job file. The **Osprey** job file is the only direct point of contact between the user and the analysis. It contains paths to MRS data files and structural images, defines processing and modeling options, and determines whether (and where) ... |
fca03b15b20d835b6e622dfe2e1cf54a888cd69e6e4c35cbd17a49029b1d8811 | R | 42,618 | 912 | setwd("./")
options(stringsAsFactors = FALSE)
#### Seurat version 4.2 include sctransform v2
#### use sctransform v2 pipeline
library(future)
library(doFuture)
library(doParallel)
library(doRNG)
registerDoFuture()
plan("multisession", workers = 10)
#plan("sequential")
options(future.globals.maxSize = 400*1024^3, futur... |
dabd33602388afd7c0c82b067b6e05fd3beb40a65f7cd479effb797fd46a5104 | R | 42,835 | 1,206 | #' Plot Median Genes per Cell per Sample
#'
#' Plot of median genes per cell per sample grouped by desired meta data variable.
#'
#' @param seurat_object Seurat object name.
#' @param sample_col Specify which column in meta.data specifies sample ID (i.e. orig.ident).
#' @param group.by Column in meta.data slot to group... |
4ff7301b00766f7e7f6d58a2153f1868b97f9261be2bebfcdd72fcb5c4418c79 | R | 42,935 | 1,118 | #INFORMATION-----------------------------
#LOAD LIBRARIES ------------------------
library(bslib)
library(data.table)
library(dplyr)
library(DT)
library(ff)
library(ggplot2)
library(ggpubr)
library(ggrepel)
library(ggridges)
library(gplots)
library(gridExtra)
library(Matrix)
library(matrixStats)
library(limma)
library... |
d49fd2387be2982b524b96d028bf689332195d70e9ac9ec82c57aeb5f8d54c01 | R | 43,138 | 962 | ##
## Libraries (needed by functions in this file)
##
##
library("gamlss") ## need gamlss.family objects in all scripts
##
## Analysis Functions
##
##
gamlssWrapper <- function( Model, Data, Ctrl, ... ) { ##
## The problem:
## (a) The gamlss() function returns an object with the contrast functions, not the... |
698f7292ae79aca2582cc193f6471fa4f860f35d341e798e60a3ee34e8a051ce | R | 43,318 | 759 | ---
title: "Conducting a Microbiome Analysis"
author: "Thomaz F. S. Bastiaanssen"
output:
pdf_document:
keep_tex: true
---
# 0. Introduction
Here, we will demonstrate how a microbiome analysis may look in practice. For this demonstration, we have adapted some shotgun metagenomic data from the `curatedMetagenomi... |
0aaf6c43ae29c9433f4168495536be9c056fc217f477bbdbed6997ba7138cb46 | R | 43,529 | 656 | #' Preprocess Loaded Datasets
#'
#' Loads configuration and dictionaries, checks data structures, prepares SUV data
#' (renaming or subsetting columns based on dictionary match), filters datasets
#' based on minimum entries per ID and group-specific inclusion criteria, and
#' logs operations, warnings, and filtering co... |
d51c2dde3c49097545781c2d0bbb659b5fa71e72ca83550f57c07eae5ac1b55b | R | 43,913 | 1,193 |
# install.packages("R.matlab")
library(R.matlab)
library(dplyr)
library(tidyr)
library(broom)
library(lmerTest)
library(ggplot2)
library(ggpubr)
library(car) # for Yeo-Johnson transformation
##### SET PARAMS #######
#Set to 1 to generate new tables:
genTables = 0
# Specify ages, tasks, and cohorts
ages <- c("05", "... |
cdc839e19a9cba8990db86742a2e53e4fd2c16c57a81d4929c4cb44fd7ef0b53 | R | 44,327 | 1,059 |
suppressPackageStartupMessages(library(tidyverse))
suppressPackageStartupMessages(library(ids))
# This imports the annotate_long_format_table function
source('../long-format-table-utils/annotator/annotator-api.R')
# Function definitions ----------------------------------------------------
# Format numbers to percen... |
dbdc53d0bc95b250fd191ba487a9c6194943069cd977bfdf12350e068fc4931f | R | 44,465 | 993 | ################################################################################
### 6-Dataset Meta-Atlas: FindAllMarkers, Differential Abundance, Putative
### Cell Type Labeling, Marker Gene Heatmaps, Sex-Specific Gene Expression
################################################################################
l... |
cdbf22aace4e1a42dab7f3f94971cca953e61de6c329f823db8d7b5be6fb829c | R | 44,769 | 751 | ##该代码包含Seurat官方数据的分析流程,细胞定义,各种图形展示和细胞通讯文件生成等。可参考https://satijalab.org/seurat/articles/pbmc3k_tutorial.html
#install.packages("Seurat")#默认安装最新版本5.1.0,但空间可视化效果不好
#remove.packages("Seurat")#卸载最新版
#安装指定版本
#install.packages("devtools")
#devtools::install_version("Seurat", version=package_version('5.0.3'))
#install.p... |
c20006cbe1e37243682510ffb9dbe4c34d11f7491792c5e0a24eefcc3f7c7cd5 | R | 44,830 | 1,203 | #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#################### GENERAL OBJECT UTILITIES ####################
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#' Merge a list of Seurat Objects
#'
#' Enables easy merge of a list of Seurat Objects. ... |
1917ab083a9596ff0810685d94fc15d8e69c8a51046dc818c0f5a228e1620e68 | R | 45,977 | 1,422 | ---
title: "Area-analysis_filtered"
author: "Marika Oksanen"
date: "2024-01-17"
output: html_document
---
Selecting significant HNRNPU PPIs from the IP-MS data with
specifications described in Bish et. al., 2015
1. Include only proteins identified by at least one peptide in a minimum of
two biological replicates
2... |
583d2d43391f8bbfd23da9c2f9e190ebbd7842b9270389dd407fb0b11bd6d1a5 | R | 45,989 | 1,047 | ---
title: "Data Pre-release QC"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
toc_depth: 4
author: Eric Wafula for Pediatric OpenTargets
date: 09/04/2022
---
Purpose: Create a set of QC requirements for pre-release files which should pass before hand off between BIXU Engineering team to the OpenPedC... |
3d98ab08c92b76c508402799e9b5be751fd832faf1adb6e061debc040615edc2 | R | 46,026 | 1,568 | check_log <- check_npx(df = npx_data1) |>
suppressWarnings() |>
suppressMessages()
# Test olink_pathway_enrichment ----
test_that(
"olink_pathway_enrichment - error - missing args",
{
skip_on_cran()
suppressMessages(skip_if_not_installed("clusterProfiler"))
skip_if_not_installed("msigdbr", minimum... |
3651e276930b41e61fa7e7392a743127ad255b412519a028b2f510a1405938d7 | R | 46,326 | 803 | ########################################################################################################################################
## ENIGMA - Panic Disorder - Linear Mixed Model Mega-analyses ##
## by Willem Benjamin Bruin ... |
8756168e8d3714e905373ac3d767c537b4cb1ee031ade2bf28a2237f723be11c | R | 46,447 | 1,376 | #' Bridge and/or subset normalization of all proteins among multiple NPX
#' projects.
#'
#' @description
#' This function normalizes pairs of NPX projects (data frames) using shared
#' samples or subsets of samples.
#'
#' This function is a wrapper of olink_normalization_bridge and
#' olink_normalization_subset.
#'
#' ... |
63f3cfca6661735f1e817640cc5059e667fc9a1a0dca1aff2ad74fa7f25b5c5a | R | 46,602 | 1,279 | # ==============================================================================
# S9_pathway.R
# Server logic for Step 5: Functional Association and Annotation
# Handles pathway mapping, annotation statistics, and visualization (DotPlot, Venn).
# ====================================================================... |
7630d653318b0231d5937216852abf277c5b595cad6acc58e80a2c66468e3998 | R | 46,613 | 1,789 | ---
title: "MotiMus Statistics"
Me: Ségolène M. R. Guérin
output:
html_notebook:
code_folding: hide
toc: yes
pdf_document:
toc: yes
html_document:
toc: yes
word_document:
toc: yes
editor_options:
markdown:
wrap: sentence
---
# Preamble
```{r preamble, warning=FALSE, message=FALSE, in... |
04dd06edcde8d7cc3949deaa9a2191140972639b6cbb68494b61c49e645a653a | R | 46,801 | 1,036 | feature_feature_combined_plots <- function(seurat.combined, dir_n, range_percent.mt = c(0,0), range_nFeature_RNA = c(0, 0), range_nCount_RNA = c(0, 0)){
# seurat.combined - merged object containings all samples
# dir_n - name of the folder in which to save the combined plots
# range_percent.mt - a list contain... |
ac0ad8972f4891bde9f52ac6cf2577d7654a1df41482486eac1262a120ed3bc5 | R | 47,103 | 1,209 | ################################################################################
# Natural history model functions
################################################################################
#' Generate time to event data for base case (no screening) decision model
#'
#' @param l_params_model List with all parame... |
f5a9213ff7a6f48b03178b05f2378f22884d87db4a73b8c4c0545ff8577ca401 | R | 48,109 | 1,209 | library(Seurat)
library(SummarizedExperiment)
library(ggplot2)
library(future)
library(scrattch.hicat)
library(data.table)
library(dplyr)
library(tibble)
library(pbmcapply)
library(SCISSORS)
library(MetaMarkers)
library(gplots)
library(SeuratWrappers)
library(SeuratDisk)
library(slingshot)
library(scales)
library(vir... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.