본문으로 건너뛰기
cccskills
무료GitHub에 공개

bioconductor-supersigs

Generate SuperSigs (supervised mutational signatures) from single nucleotide variants in the cancer genome. Functions included in the package allow the user to learn supervised mutational signatures from their data and apply them to new data. The methodology is based on the one described in Afsari (2021, ELife).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

supersigs

Workflows

Standard Workflow

Preprocess mutation data, build a trinucleotide feature matrix, and train a supervised mutational signature (SuperSig).

library(supersigs)
library(VariantAnnotation)
library(BSgenome.Hsapiens.UCSC.hg19)
library(dplyr)

# 1. Read VCF and add patient age to colData
fl <- system.file("extdata", "chr22.vcf.gz", package="VariantAnnotation")
vcf <- VariantAnnotation::readVcf(fl, "hg19")
vcf <- vcf[, 1]
positions <- geno(vcf)$GT != "0|0"
vcf <- vcf[positions[, 1],]
colData(vcf)$age <- 50

# 2. Process VCF to a simplified data frame
dt <- process_vcf(vcf)

# 3. Transform mutations into a trinucleotide matrix
input_dt <- make_matrix(dt)

# 4. Add the indicator variable (IndVar)
input_dt <- input_dt %>%
  mutate(IndVar = c(1, 1, 1, 0, 0)) %>%
  relocate(IndVar)

# 5. Train the supervised signature
set.seed(1)
supersig <- get_signature(data = input_dt, factor = "Smoking")

# 6. Simplify the signature for visualization
features <- simplify_signature(object = supersig, iupac = FALSE)

Note: Input is a VCF object or a data frame of mutations with sample IDs, ages, and genomic coordinates; output is a trained SuperSig S4 object and simplified signature features.

Partial Signature Adjustment

Remove the contribution of a supervised signature from a mutation data frame to adjust for a confounding factor.

library(supersigs)
# Adjust the mutation matrix by removing the signature's contribution
adjusted_dt <- partial_signature(data = input_dt, object = supersig)

Note: Input is a feature count data frame and a trained SuperSig object; output is an adjusted mutation feature data frame.

Predict Supersig

Apply a trained or pre-trained SuperSig to a new dataset to predict classification scores.

library(supersigs)
library(dplyr)
# Apply a trained SuperSig to a new dataset
newdata <- predict_signature(supersig, newdata = input_dt, factor = "Smoking")
# Or use a pre-trained signature from supersig_ls
newdata_pretrained <- predict_signature(supersig_ls[["SMOKING (LUAD)"]], newdata = input_dt, factor = "Smoking")

Note: Input is a trained SuperSig object (or pre-trained from supersig_ls) and a new feature count data frame; output is a data frame containing predicted classification scores and feature counts.

When to Use

  • Supervised Signature Generation: Generating supervised mutational signatures ("SuperSigs") from single nucleotide variants (SNVs) in cancer genomes (get_signature).
  • Exposure Classification: Predicting exposure classification scores on new datasets using custom or pre-trained TCGA signatures (predict_signature, supersig_ls).
  • Confounder Adjustment: Adjusting mutation datasets to remove confounding factors (e.g., aging) before downstream signature analysis (partial_signature).

When NOT to Use

  • Unsupervised Deconvolution: For unsupervised mutational signature deconvolution (e.g., standard NMF-based signature extraction).
  • Missing Clinical Metadata: When patient age or clinical exposure indicators are completely unavailable.

Data Requirements

  • Input mutation data containing sample_id, age, chromosome, position, ref, and alt columns.
  • A supported reference genome package installed (e.g., BSgenome.Hsapiens.UCSC.hg19 or BSgenome.Hsapiens.UCSC.hg38) for trinucleotide context extraction.

Key Parameters

  • data: Input data frame containing IndVar, sample_id, age, and 96 trinucleotide mutation count columns in get_signature.
  • factor: The clinical factor or exposure of interest (e.g., "Smoking", "Age") in get_signature and predict_signature.
  • object: A trained SuperSig S4 object in simplify_signature and partial_signature.
  • iupac (FALSE): Logical indicating whether to use IUPAC labels when simplifying signatures in simplify_signature.
  • newdata: New dataset to predict on in predict_signature.

Best Practices

  • Ensure the VCF object contains patient age in colData(vcf)$age before calling process_vcf.
  • Set a random seed (set.seed) before running get_signature to ensure reproducibility of cross-validation folds.
  • Use simplify_signature(..., iupac = TRUE) to group trinucleotide features into more interpretable IUPAC representations for plotting.
  • Adjust for confounding factors like aging using partial_signature before learning other signatures.

Common Pitfalls

  • Missing IndVar column: get_signature requires a logical/numeric indicator variable named IndVar in the input data frame. Fix: Add and relocate the IndVar column using dplyr::mutate and dplyr::relocate.
  • Reference genome mismatch: Using the wrong reference genome version (e.g., hg19 vs hg38) during make_matrix. Fix: Ensure the correct BSgenome package is loaded and matches the coordinates in your mutation data.

Alternatives

  • SomaticSignatures: For unsupervised mutational signature analysis.
  • MutationalPatterns: For comprehensive mutational signature extraction and visualization.

Citations

  • Afsari, B. et al. (2021). Supervised mutational signatures for cancer genomics. eLife.

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

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-kb7932026년 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-kb7932026년 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-kb7932026년 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-kb7932026년 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-kb7932026년 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-kb7932026년 6월 21일 업데이트

bioMate-AI의 스킬 모두 보기

이 스킬의 문제 신고