Extract and assign COSMIC v3.4 mutational signatures (86 SBS / 11 DBS / 18 ID / 21 CN / 16 SV) from somatic VCFs using SigProfilerSuite, MutationalPatterns, MuSiCal (mvNMF), SigNet (deep learning for low mutation counts), or HRDetect (BRCA1/2 deficiency classifier). Covers de novo extraction vs refit-to-COSMIC choice by cohort size, FFPE-artifact-as-SBS30-not-SBS33 correction, Petljak 2022 APOBEC3A-dominance subtyping, and clinical actionability for PARP inhibitor (HRD) / ICI (MMR-D, POLE) / therapy-induced (5-FU SBS17b, platinum SBS31/35).
# SigProfilerSuite (recommended)
pip install SigProfilerMatrixGenerator SigProfilerExtractor SigProfilerAssignment
# One-time reference download: ~3 GB
python3 -c "from SigProfilerMatrixGenerator import install; install.install('GRCh38')"
# MuSiCal (mvNMF for non-uniqueness)
pip install musical
# SigNet (deep learning, low mutation count)
# git clone https://github.com/weghornlab/SigNet
# R: MutationalPatterns + BSgenome
# BiocManager::install(c('MutationalPatterns', 'BSgenome.Hsapiens.UCSC.hg38'))
# HRDetect
# devtools::install_github('Nik-Zainal-Group/signature.tools.lib')
Tell the agent what to do: - "Extract de novo SBS signatures from this 80-sample WGS cohort with SigProfilerExtractor; report stability gates" - "Refit my tumor cohort to COSMIC v3.4 with SigProfilerAssignment; identify dominant signatures" - "Run HRDetect on these BRCA1/2-status-unknown breast cancer samples; flag HRD-positive for PARP eligibility" - "Differentiate APOBEC3A vs APOBEC3B activity in this cohort using YTCA/RTCA tetranucleotide ratios" - "For my 5-FU-treated CRC samples, identify SBS17b therapy-induced contribution"
"For my 100-sample WGS cohort with putative novel mutagen exposure, run SigProfilerExtractor de novo with nmf_replicates=100, validate stability gates (min >= 0.2; avg >= 0.8), and report any signatures not in COSMIC v3.4."
"For my 30-sample cohort (below de novo threshold), use SigProfilerAssignment to refit to COSMIC v3.4 with strict forward-backward selection."
"Run HRDetect on this breast cancer cohort. Compute SBS3 + SBS8 + RS3 + RS5 + HRD-LOH + del-microhomology proportion; threshold BRCA_prob >= 0.7. Cross-check against germline BRCA1/2 + BRCA1 methylation status."
"For HR-deficient tumors without BRCA1/2 germline mutations, identify PALB2 / FBXW7 / CDK12 alterations and BRCA1 promoter hypermethylation."
"Distinguish APOBEC3A vs APOBEC3B activity in this bladder cancer cohort using YTCA vs RTCA 5' tetranucleotide ratios (per Petljak 2022). Co-locate kataegis loci."
"For this CRC cohort treated with 5-FU, separate SBS17b therapy-induced from SBS17a unknown-etiology contributions."
"For platinum-treated tumors, identify SBS31 + SBS35 + SBS86 + SBS87 contributions; report total platinum-attributable mutation burden."
"These are FFPE samples; identify FFPE-artifact signal (resembling SBS30, NOT SBS33 as legacy literature claims). Recommend running matched fresh-frozen controls or enzymatic uracil pretreatment."
"Run MutationTimer on this WGS cohort with Battenberg CN to time mutations relative to chromosomal-instability events. Identify clonal vs subclonal signature activity."
exome=True for WES).exome=True); WES-derived signatures NOT directly comparable to WGS without correction.tsb_stat=True or MutationalPatterns.