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

bioconductor-beer

BEER implements a Bayesian model for analyzing phage-immunoprecipitation sequencing (PhIP-seq) data. Given a PhIPData object, BEER returns posterior probabilities of enriched antibody responses, point estimates for the relative fold-change in comparison to negative control samples, and more. Additionally, BEER provides a convenient implementation for using edgeR to identify enriched antibody responses.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.2 KB

SKILL.md(原文)

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

beer

Workflows

Standard Workflow

Identify enriched antibody responses to peptides in PhIP-seq data using edgeR and Bayesian (BEER) modeling.

library(beer)

# Load simulated PhIPData
data_path <- system.file("extdata/sim_data.rds", package = "beer")
sim_data <- readRDS(data_path)

# 1. Run edgeR to estimate peptide-specific dispersion
edgeR_out <- runEdgeR(sim_data, assay.names = c(logfc = "edgeR_logfc", prob = "edgeR_logpval"))

# 2. Run BEER (brew) to identify enriched peptides (hits)
assay_locations <- c(phi = "beer_fc_marg", phi_Z = "beer_fc_cond", Z = "beer_prob", c = "sampleInfo", pi = "sampleInfo")
beer_out <- brew(edgeR_out, assay.names = assay_locations)

# Identify hits by combining posterior probabilities and super-enriched peptides
was_run <- matrix(rep(beer_out$group != "beads", each = nrow(beer_out)), nrow = nrow(beer_out))
are_se <- was_run & is.na(assay(beer_out, "beer_prob"))
assay(beer_out, "beer_hits") <- assay(beer_out, "beer_prob") > 0.5 | are_se

# 3. Run beads-only round robin to estimate false positive rates
beer_beadsRR <- beadsRR(beer_out, method = "beer", assay.names = assay_locations)

# 4. Calculate expected reads/proportions and Bayes factors
expected_data <- getExpected(sim_data)
bf_data <- getBF(beer_out)

Input: A PhIPData object containing PhIP-seq read counts; Output: A PhIPData object updated with enrichment hits, posterior probabilities, and Bayes factors.

When to Use

  • Analyzing PhIP-seq (phage immunoprecipitation sequencing) data to identify enriched antibody responses to peptides.
  • When you want to run standard differential expression analysis using runEdgeR on PhIP-seq data.
  • When you want to apply a Bayesian hierarchical model via brew to estimate posterior probabilities of enrichment and relative fold-changes.
  • When you want to estimate false positive rates using a beads-only round robin via beadsRR.

When NOT to Use

  • For general RNA-seq differential expression without a PhIP-seq design or negative control (beads-only) samples. Use standard edgeR or DESeq2 directly.

Data Requirements

  • A PhIPData object (e.g., loaded from sim_data.rds in the vignette) containing read counts for samples and peptides, with designated beads-only control samples.

Key Parameters

  • assay.names (NULL): Named vector specifying where to store summarized MCMC output (e.g., phi, phi_Z, Z, c, pi).
  • beadsRR (FALSE): Logical indicating whether to run beads-only round robin within brew or runEdgeR.
  • de.method ("exactTest"): Method for edgeR differential expression, either "exactTest" or "glmQLFTest".
  • a_pi (2): Prior shape parameter for the beta distribution describing the proportion of enriched peptides.
  • b_pi (300): Prior shape parameter for the beta distribution describing the proportion of enriched peptides.
  • a_phi (1.25): Prior shape parameter for the gamma distribution describing fold-change for enriched peptides.
  • b_phi (0.1): Prior shape parameter for the gamma distribution describing fold-change for enriched peptides.
  • fc (1): Minimum fold-change for an enriched peptide.

Best Practices

  • Run runEdgeR first to quickly identify enriched peptides and provide a baseline comparison.
  • Identify and exclude "super-enriched" peptides (e.g., fold-change > 15) before running the MCMC to speed up BEER execution.
  • Use parallelization via BiocParallel::SerialParam() or BiocParallel::SnowParam() passed to BPPARAM to speed up the Bayesian model.
  • Verify MCMC convergence by saving samples to a directory and plotting trace/density plots using coda or plot.

Common Pitfalls

  • MCMC sampler getting stuck during execution. Fix: Ensure prior beta shape parameters (e.g., estimated via getAB) are greater than one.
  • Extremely slow execution times for large datasets. Fix: Set a conservative threshold for removing super-enriched peptides to reduce the number of peptides modeled by MCMC.

Alternatives

  • edgeR directly for standard negative binomial differential expression.
  • DESeq2 for alternative parametric differential expression analysis.

Citations

  • Chen A, Kammers K, Larman HB, Scharpf R, Ruczinski I (2022). Detecting antibody reactivities in phage immunoprecipitation sequencing data. bioRxiv.
  • Robinson MD, McCarthy DJ and Smyth GK (2010). edgeR: a Bioconductor package for differential expression analysis of digital gene expression data. Bioinformatics.

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 のスキルをすべて見る

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