Strelka2 Documentation

repository·v2.9.x·Indexed 18 days ago

https://github.com/illumina/strelka

A high-performance small variant caller optimized for germline and somatic (tumor/normal) variant detection. Strelka2 detects SNVs and indels using haplotype models and empirical rescoring via random forest. The documentation covers the User Guide for installation and workflow execution, a Developer Guide for C++11 build processes and coding standards, and technical Methods descriptions.

Tokens
26.7K
Snippets
78
Records
133
Agent score
57%

What's inside Strelka2

  1. Overview of Strelka2 Small Variant Caller

    v2.9.x

    Strelka2 is a fast and accurate small variant caller designed for two primary use cases:

    1. Germline Variation: Optimized for small cohorts. It uses a tiered haplotype model that adaptively switches between assembly and alignment-based haplotyping, and a mixture-model indel error estimation method to handle indel noise.
    2. Somatic Variation: Optimized for tumor/normal sample pairs. The model accounts for potential tumor cell contamination in the normal sample, making it suitable for liquid and late-stage tumor analysis.

    Both callers include an empirical variant re-scoring step using random forest models to improve precision.

    Input and Output

    • Inputs: Accepts read mappings in BAM or CRAM formats. It can optionally take candidate and/or forced-call alleles from a VCF file.
    • Outputs: Reports all small variant predictions in VCF 4.1 format. Germline reporting follows gVCF conventions to represent both variant and reference call confidence.
  2. Overview of Strelka2 capabilities

    v2.9.x

    Strelka2 is a small variant caller designed for rapid clinical analysis of germline and somatic variation.

    Key Features:

    • Germline Calling: Uses a haplotype model to improve call quality and provide short-range read-backed phasing. It employs a probabilistic model using indel error rates adaptively estimated from the input data.
    • Somatic Calling: Optimized for tumor/normal sample pairs. It can handle tumor purities as low as 5-10% and accounts for up to 10% normal sample contamination.
    • Variant Types: Detects SNVs and indels (default maximum indel size is 49 bases).
    • Rescoring: Both callers use a final empirical rescoring step via a random forest model to improve call reliability.
    • Integration: For optimal somatic indel performance, it is recommended to run Strelka2 alongside the Manta structural variant and indel caller.
  3. Use Strelka utilities for noise profiling and data processing

    v2.9.x

    Strelka includes several specialized utilities for data preparation, parameter estimation, and noise profiling:

    • strelkaNoiseExtractor: A utility used to develop 'panel of normal' (PoN) noise profiles.
    • GetChromDepth: Samples sequences in BAM/CRAM files to create a median depth estimate for each chromosome.
    • GetSequenceAlleleCounts: Reads segments from BAM/CRAM files and reports counts of various sequencing edits.
    • MergeSequenceAlleleCounts: Merges binary error counts files produced by GetSequenceAlleleCounts.
    • DumpSequenceAlleleCounts: Provides debugging summary output for the binary error counts files generated by GetSequenceAlleleCounts.
    • EstimateParametersFromAlleleCounts: Estimates various calling model parameters from error counts.
    • MergeRunStats: Merges runtime statistics from individual genome segments.
  4. Operating System compatibility for Strelka

    v2.9.x

    Linux

    Strelka is known to build and run on:

    • Ubuntu 12.04, 14.04, 16.04
    • CentOS 6, 7

    OS X

    Strelka builds and passes basic tests on OS X 10.9, but full WGS (Whole Genome Sequencing) analyses are not tested on this platform.

    Windows

    Strelka does not build or run on Windows. Library-level compilation is possible for Visual Studio users (see developer guide).

  5. Access Strelka documentation

    v2.9.x

    Strelka documentation is organized into three primary sections depending on your needs:

    • User Guide: The main resource for running Strelka, including installation, usage, and general workflows.
    • Developer Guide: Guidelines and instructions for contributors involved in methods development.
    • Methods: Detailed technical descriptions of the underlying methods and mathematical models used by Strelka.
  6. C++ coding and formatting guidelines

    v2.9.x

    Core methods are developed in C++11. Developers should follow these formatting and naming conventions:

    Formatting:

    • Use spaces instead of tabs.
    • Use 4-space indents.
    • Use "ANSI" bracket style.
    • An astyle script is used to enforce these rules.

    Naming:

    • Variables/Types: Use self-documenting names (e.g., sampleCount, breakpointRegion).
    • Variables: Use lowercaseCamelCase.
    • Types: Use UppercaseCamelCase.
    • Private Members: Start with a leading underscore (e.g., _sampleName).
  7. Understand demo dataset characteristics

    v2.9.x

    The demonstration datasets in Strelka have the following characteristics:

    • Reference Alignment: All demo read alignments are mapped to an abstract chromosome named demo20 (representing chr20:862001-867000 from the hg19 assembly).
    • Configuration: The demos use default configurations with two specific exceptions:
      1. The --exome option is enabled because the data is not Whole Genome Sequencing (WGS). This prevents standard filters based on locus depth relative to average chromosome depth from being applied.
      2. The --disableSequenceErrorEstimation option is used in the germline demo because the input data is too small for dynamic indel error estimation. Using this flag prevents warnings during the demo run.
  8. How the Error Pattern Analyzer works

    v2.9.x

    The error pattern analyzer is a two-step process used to evaluate models of spurious basecall and indel errors in sequencing data.

    1. Allele Counting Workflow: Analyzes BAM or CRAM files to produce per-locus allele distributions across the genome. It segments the genome by allele type and context. Counts are processed in parallel for genome segments and then merged into a single binary counts file.
    2. Error Modeling: Uses the generated counts file to run various error models. These models evaluate model fit or parameterize models to specific sequencing conditions, typically outputting results in CSV format to stdout.
  9. Understand sequence allele counting terminology

    v2.9.x

    Strelka2 uses specific terminology to describe how sequence observations are stratified and counted during data gathering, parameter estimation, and data compression. Understanding these terms is essential for interpreting error analysis and data processing steps.

    Core Terms

    • CONTEXT: The pattern used to stratify observation counts. This is typically the contextual reference sequence pattern around a variant location, but it can also include the encoding of the alternate allele type (e.g., a specific homopolymer expansion).
    • CONTEXT INSTANCE: A single occurrence of a CONTEXT.
    • OBSERVATION: The sequence patterns observed at a single CONTEXT INSTANCE.

    Compression Terms

    When compressing many observations, the following terms are used:

    • OBSERVATION PATTERN: A sequence pattern that can be observed at zero to many CONTEXT INSTANCEs.
    • OBSERVATION PATTERN COUNT: The total number of CONTEXT INSTANCEs where a specific OBSERVATION PATTERN was present.
  10. Understand the C++ genomic coordinate convention in Strelka

    v2.9.x

    When working with Strelka's C++ components, be aware of the internal genomic coordinate convention used for positions and intervals:

    • Zero-indexing: All internal position numbers are zero-indexed.
    • BED convention for intervals: All internal intervals are zero-indexed and follow the BED convention, where the end_pos is exclusive (it represents the position immediately after the last position in the interval).

    Example: An interval with start_pos: 0 and end_pos: 100 represents the range [0, 100) in zero-indexed terms, which corresponds to positions 0 through 99.

  11. Integrate Strelka2 with Manta for improved indel detection

    v2.9.x

    For optimal somatic indel performance, Strelka2 is designed to be run in conjunction with Manta (a structural variant and indel caller).

    Manta provides additional indel candidates up to a specified maximum size (49 by default). When run together with default settings, Manta and Strelka provide complete coverage across all indel sizes, in addition to SNVs and SVs.

  12. How the Strelka2 workflow works

    v2.9.x

    The Strelka2 workflow follows these general stages:

    1. Statistics Estimation: Estimates genomic/regional statistics, including sequence depth distribution and (for germline) indel error rates.
    2. Segmentation: The genome is segmented for parallel processing.
    3. Joint Analysis: Within each segment, input samples are jointly analyzed to identify candidate alleles.
    4. Realignment & Inference: Reads are realigned, and model-specific variant inferences are made.
    5. Filtering & Recalibration: Properties of each variant are computed to apply filters or empirically recalibrate confidence.
    6. Joining: Parallel segment results are merged into the final VCF output.