本文へ移動
cccskills
無料GitHub で公開

bioconductor-mastr

mastR is an R package designed for automated screening of signatures of interest for specific research questions. The package is developed for generating refined lists of signature genes from multiple group comparisons based on the results from edgeR and limma differential expression (DE) analysis workflow. It also takes into account the background noise of tissue-specificity, which is often ignored by other marker generation tools. This package is particularly useful for the identification of g

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

mastR

Workflows

Standard Workflow

Generate and refine a group-specific gene signature from a single transcriptomics dataset, including background tissue expression removal and visualization.

library(mastR)
library(limma)

# 1. Build markers pool
data("lm7", "lm22")
LM <- get_lm_sig(lm7.pattern = "^NK", lm22.pattern = "NK cells")

# 2. Process data with customized contrast matrix
data("im_data_6")
con_mat <- makeContrasts(
  'NK-CD4' = 'NK - CD4',
  'NK-T' = 'NK - (CD4 + CD8)/2',
  levels = levels(factor(make.names(im_data_6$`celltype:ch1`)))
)

proc_data <- process_data(
  im_data_6,
  group_col = 'celltype:ch1',
  target_group = 'NK',
  contrast_mat = con_mat,
  summary = TRUE,
  gene_id = "ENSEMBL"
)

# 3. Visualize mean-variance relationship
plot_mean_var(proc_data)

Input: ExpressionSet object (e.g., im_data_6) and cell type metadata. Output: Processed list containing DGEList, design, and contrast-specific differential expression results.

Multi Dataset Signature Aggregation

Identify and aggregate robust gene signatures across multiple independent transcriptomics datasets using union, intersection, or Robust Rank Aggregation (RRA).

library(mastR)
library(limma)
data("im_data_6")

con_mat <- makeContrasts(
  'NK-CD4' = 'NK - CD4',
  levels = levels(factor(make.names(im_data_6$`celltype:ch1`)))
)

# Retrieve DE tables for downstream aggregation
DE_table <- get_de_table(
  im_data_6,
  group_col = 'celltype:ch1',
  target_group = 'NK',
  contrast_mat = con_mat,
  summary = TRUE,
  gene_id = "ENSEMBL"
)

Input: ExpressionSet data and contrast matrix. Output: List of differential expression tables for each contrast.

Single Cell Pseudo Bulk Signature

Convert single-cell RNA-sequencing data into pseudo-bulk samples and identify group-specific marker signatures.

library(mastR)
# Assuming pseudo-bulk ExpressionSet 'pb_eset' is prepared
# process_data internally handles DGEList conversion and limma/edgeR fitting
proc_data <- process_data(
  im_data_6, 
  group_col = 'celltype:ch1',
  target_group = 'NK',
  summary = TRUE,
  gene_id = "ENSEMBL"
)

Input: Pseudo-bulk ExpressionSet. Output: Processed differential expression results for identifying cell-type signatures.

When to Use

  • To perform simplified customized contrast design for differential expression analysis using process_data().
  • To build a markers pool from public databases like CIBERSORT (using get_lm_sig()) or MSigDB (using get_gsc_sig()), and merge them using merge_markers().
  • To visualize gene-set overlaps using UpSet plots with gsc_plot().
  • To extract all differential expression tables across multiple contrasts in a single call using get_de_table().

When NOT to Use

  • For performing single-cell differential expression directly on individual cells without pseudo-bulking; use Seurat::FindMarkers() instead because mastR relies on robust pseudo-bulk statistical methods like limma and edgeR.
  • For non-linear or complex random effects modeling; use lme4 or variancePartition because mastR is built on standard linear modeling via limma.

Data Requirements

  • Expression data as an ExpressionSet object (e.g., im_data_6) containing normalized counts (e.g., TMM normalized counts) or raw counts.
  • Phenotypic metadata with a grouping column (e.g., celltype:ch1) containing group/cell-type labels.
  • Gene identifiers matching the expression matrix row names (e.g., "ENSEMBL" or "SYMBOL").

Key Parameters

  • group_col (required): Column name in metadata containing group labels.
  • target_group (required): The specific group of interest (e.g., 'NK') for signature identification.
  • contrast_mat (NULL): A customized contrast matrix created using limma::makeContrasts().
  • summary (FALSE): Logical indicating whether to print a summary of up/down-regulated genes.
  • gene_id ("ENSEMBL"): Type of gene identifier used in the expression matrix.
  • lm7.pattern (required in get_lm_sig): Regular expression to filter LM7 leukocyte signatures.
  • lm22.pattern (required in get_lm_sig): Regular expression to filter LM22 leukocyte signatures.

Best Practices

  • Create the customized contrast matrix using levels derived from the design matrix of a dummy process_data() run to avoid level mismatch errors.
  • Merge multiple retrieved marker sets into a single GeneSet using merge_markers() to simplify downstream intersection.
  • Visualize the mean-variance relationship of the processed data using plot_mean_var() to check data quality.

Common Pitfalls

  • Contrast matrix level mismatch: If the levels in the contrast matrix do not match the expression matrix group levels, the analysis will fail. Fix by generating the contrast matrix using levels from proc_data$vfit$design.
  • Missing packages for visualization: Interactive Glimma plots require Glimma to be installed. Fix by installing Glimma and calling Glimma::glimmaMDS(proc_data).

Alternatives

  • limma for direct, low-level differential expression and contrast design.
  • edgeR for differential expression of RNA-seq counts using negative binomial models.
  • singscore for single-sample gene signature scoring.

Citations

  • Cursons et al. 2019 (for the Huntington gene list / NK markers)
  • Tosolini et al. (for LM7 leukocyte signature)

References

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

The package contains functions for exploratory oligonucleotide array analysis. The dependence on tkWidgets only concerns few convenience functions. 'affy' is fully functional without it.

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

This tool uses the label-tree function from HyPhy to annotate a phylogenetic tree. It allows users to select a subset of leaves using either a regular expression or a list of sequence names, and then apply a specified label to these selecte

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

This package provides a client for the Bioconductor AnnotationHub web resource. The AnnotationHub web resource provides a central location where genomic files (e.g., VCF, bed, wig) and other resources from standard locations (e.g., UCSC, En

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

apeglm provides Bayesian shrinkage estimators for effect sizes for a variety of GLM models, using approximation of the posterior for individual coefficients.

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

ASURAT is a software for single-cell data analysis. Using ASURAT, one can simultaneously perform unsupervised clustering and biological interpretation in terms of cell type, disease, biological process, and signaling pathway activity. Inputting a single-cell RNA-seq data and knowledge-based databases, such as Cell Ontology, Gene Ontology, KEGG, etc., ASURAT transforms gene expression tables into original multivariate tables, termed sign-by-sample matrices (SSMs).

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

AUCell allows to identify cells with active gene sets (e.g. signatures, gene modules...) in single-cell RNA-seq data. AUCell uses the "Area Under the Curve" (AUC) to calculate whether a critical subset of the input gene set is enriched with

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

bioMate-AI のスキルをすべて見る

このスキルの問題を報告する