|
@@ -1,3 +1,63 @@
|
|
|
|
|
+//! # SomaticPipe
|
|
|
|
|
+//!
|
|
|
|
|
+//! End-to-end somatic variant calling and annotation pipeline.
|
|
|
|
|
+//!
|
|
|
|
|
+//! `SomaticPipe` orchestrates the complete workflow for detecting,
|
|
|
|
|
+//! filtering, annotating, merging, and exporting high-confidence
|
|
|
|
|
+//! somatic variants from paired tumor/normal sequencing data.
|
|
|
|
|
+//!
|
|
|
|
|
+//! ## Main Features
|
|
|
|
|
+//!
|
|
|
|
|
+//! - Multi-caller somatic variant integration
|
|
|
|
|
+//! - Germline and constitutional filtering
|
|
|
|
|
+//! - BAM depth and allele support annotation
|
|
|
|
|
+//! - Sequence complexity and entropy filtering
|
|
|
|
|
+//! - External annotation (COSMIC, GnomAD, VEP)
|
|
|
|
|
+//! - Structural insertion annotation via NanomonSV
|
|
|
|
|
+//! - Export to JSON, VCF, BIT, and Pandora container formats
|
|
|
|
|
+//! - Detailed QC and filtering statistics
|
|
|
|
|
+//!
|
|
|
|
|
+//! ## Supported Variant Callers
|
|
|
|
|
+//!
|
|
|
|
|
+//! - ClairS
|
|
|
|
|
+//! - DeepSomatic
|
|
|
|
|
+//! - DeepVariant
|
|
|
|
|
+//! - NanomonSV
|
|
|
|
|
+//! - SAVANA
|
|
|
|
|
+//! - Severus
|
|
|
|
|
+//!
|
|
|
|
|
+//! ## Pipeline Overview
|
|
|
|
|
+//!
|
|
|
|
|
+//! 1. Initialize prerequisite components
|
|
|
|
|
+//! 2. Load somatic and germline variants
|
|
|
|
|
+//! 3. Remove germline/constitutional calls
|
|
|
|
|
+//! 4. Annotate constitutional BAM support
|
|
|
|
|
+//! 5. Filter low-depth and high-alt variants
|
|
|
|
|
+//! 6. Annotate sequence context and entropy
|
|
|
|
|
+//! 7. Annotate external databases (COSMIC/GnomAD)
|
|
|
|
|
+//! 8. Filter likely polymorphisms
|
|
|
|
|
+//! 9. Annotate VEP consequences
|
|
|
|
|
+//! 10. Merge and export final variants
|
|
|
|
|
+//!
|
|
|
|
|
+//! ## Outputs
|
|
|
|
|
+//!
|
|
|
|
|
+//! - `*_somatic_variants.json.gz`
|
|
|
|
|
+//! - `*_somatic_variants.bit`
|
|
|
|
|
+//! - `*_somatic_variants.vcf.gz`
|
|
|
|
|
+//! - `*.pandora`
|
|
|
|
|
+//! - QC/statistics JSON reports
|
|
|
|
|
+//!
|
|
|
|
|
+//! ## Notes
|
|
|
|
|
+//!
|
|
|
|
|
+//! The pipeline conditionally executes missing upstream analyses
|
|
|
|
|
+//! and tracks filtering statistics throughout processing.
|
|
|
|
|
+//!
|
|
|
|
|
+//! This module also defines:
|
|
|
|
|
+//!
|
|
|
|
|
+//! - [`SomaticPipeStats`]
|
|
|
|
|
+//! - [`InputStats`]
|
|
|
|
|
+//! - Pandora export helpers
|
|
|
|
|
+//! - Annotation matrix generation utilities
|
|
|
use crate::{
|
|
use crate::{
|
|
|
annotation::{is_gnomad_and_constit_alt, Caller},
|
|
annotation::{is_gnomad_and_constit_alt, Caller},
|
|
|
create_should_run_normal_tumoral, init_solo_callers_normal_tumoral,
|
|
create_should_run_normal_tumoral, init_solo_callers_normal_tumoral,
|