diff --git a/README.md b/README.md index 6f436bb..850a6cb 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Tools to gather evidence for structural variation via breakpoint detection. ## Documentation -Documentation can be found in the [docs folder](docs/01_Introduction.md). +More detailed documentation can be found in the [docs folder](docs/01_Introduction.md). ## Introduction to the `fgsv` Toolkit @@ -29,7 +29,7 @@ The `fgsv` toolkit contains tools for effective structural variant debugging but Instead, it is better to think of `fgsv` as an effective breakpoint detection and structural variant exploration toolkit. When describing structural variation, we use the term *breakpoint* to mean a junction between two loci and the term *breakend* to refer to one of the loci in a breakpoint. -Importantly, all point intervals (1-length) reported by this toolkit are 1-based inclusive from the perspective of the reference sequence. +Importantly, all point intervals (1-length) reported by this toolkit are 1-based inclusive from the perspective of the reference sequence unless otherwise documented. ### `fgsv SvPileup` @@ -42,10 +42,10 @@ fgsv SvPileup \ ``` The tool [`fgsv SvPileup`](https://github.com/fulcrumgenomics/fgsv/blob/main/docs/tools/SvPileup.md) takes a queryname-grouped BAM file as input and scans each group of alignments for structural variant evidence. -For example, a paired-end read may have an alignment per read: one alignment for read 1 and another alignment for read 2. +For a simple example, a paired-end read may have one alignment per read: one alignment for read 1 and another alignment for read 2 mapped to different reference sequences. Primary and supplementary alignments for a template (see the [SAM Format Specification v1](https://samtools.github.io/hts-specs/SAMv1.pdf) for more information) are used to construct a “chain” of aligned sub-segments in a way that honors the logical ordering of sub-segments and their strandedness in relation to the reference sequence. -These aligned sub-segments in a chain relate to each other through typical alignment mechanisms like insertions and deletions but also contain information about the relative orientation of the sub-segment to the reference sequence and importantly, jumps between reference sequences such as translocations between chromosomes or contigs. +These aligned sub-segments in a chain relate to each other through typical alignment mechanisms like insertions and deletions but also contain information about the relative orientation of the sub-segment to the reference sequence and importantly, jumps between reference sequences such as translocations between contigs or chromosomes. For each chain of aligned sub-segments per template, outlier jumps are collected where the minimum inter-segment distance within a read must be 100bp (by default) or greater, and the minimum inter-read distance across reads (e.g. between reads in a paired-end read) must be 1000bp (by default) or greater. In the case where there is both evidence for a split-read alignment and inter-read jump, the split-read alignment evidence is favored since it gives a precise breakpoint. @@ -65,16 +65,16 @@ fgsv AggregateSvPileup \ --output sample.svpileup.aggregate.txt ``` -Because of variability in typical short-read alignments, evidence for a single breakpoint may span a few loci near the true breakend loci. For example, if the breakpoint only has intra-read evidence, then the breakpoint could coincidentally occur within the unobserved bases between read 1 and read 2 in a pair. In other cases and due to sequence similarity or homology between each breakend locus, it is not always possible to locate the exact nucleotide point where the breakends occur, and instead a plausible region may exist that supports either breakend loci. - -The tool [`fgsv AggregateSvPileup`](https://github.com/fulcrumgenomics/fgsv/blob/main/docs/tools/AggregateSvPileup.md) is used to coalesce nearby breakpoints into one event if they appear to belong to one true breakpoint. +The tool [`fgsv AggregateSvPileup`](https://github.com/fulcrumgenomics/fgsv/blob/main/docs/tools/AggregateSvPileup.md) is used to coalesce nearby breakpoints into one event if they appear to support one true breakpoint. This polishing step preserves true positive breakpoint events and is intended to reduce the number of false positive breakpoint events. -Adjacent breakpoints are only merged if their left breakends map to the same reference sequence, their right breakends map to the same reference sequence, the strandedness of the left and right aligned sub-segments is the same, and their left and right genomic breakend positions are both within a given length threshold. +Because of variability in typical short-read alignments due to somatic mutation, sequencing error, or alignment artifact, evidence for a single breakpoint may span a few loci near the true breakend loci. For a more extreme example, if a true breakpoint only has paired read evidence, then the breakpoint could coincidentally occur within the unobserved bases between read 1 and read 2 in a pair. In other cases and due to sequence similarity or homology between each breakend locus, it is not always possible to locate the exact nucleotide point where the breakends occur, and instead a plausible region may exist that supports either breakend loci and evidence could be merged within this region. + +Adjacent breakpoints are only merged if their left breakends map to the same strand of the same reference sequence, their right breakends map to the same strand of the same reference sequence, and their left and right genomic breakend positions are both within a given length threshold of 10bp (by default). One shortcoming of the existing behavior, which should be corrected at some point, is that intra-read breakpoint evidence is considered similarly to inter-pair breakpoint evidence even though intra-read breakpoint evidence often has nucleotide-level alignment resolution and inter-pair breakpoint evidence does not. -The output of this tool is a metrics file tabulating the coalesced breakpoints with all previous breakpoint IDs listed for the new breakpoint event and an estimation of the allele frequency of the event based on the alignments that support the breakpoint. +The tool outputs a table of aggregated breakpoints and a modified copy of the input BAM file where each alignment is tagged with the ID of the aggregate breakpoint it supports (if any). ## `AggregateSvPileupToBedPE`