diff --git a/docs/04_Metrics.md b/docs/04_Metrics.md index 87b9c5e..1cd4c78 100644 --- a/docs/04_Metrics.md +++ b/docs/04_Metrics.md @@ -29,12 +29,12 @@ Aggregated cluster of breakpoint pileups |id|String|Combined ID retaining the IDs of all constituent breakpoints| |category|BreakpointCategory|Breakpoint category| |left_contig|String|Contig name for left side of breakpoint| -|left_min_pos|Int|Minimum coordinate of left breakends| -|left_max_pos|Int|Maximum coordinate of left breakends| +|left_min_pos|Int|Minimum coordinate of left breakends (1-based)| +|left_max_pos|Int|Maximum coordinate of left breakends (1-based)| |left_strand|Char|Strand at left breakends| |right_contig|String|Contig name for right side of breakpoint| -|right_min_pos|Int|Minimum coordinate of right breakends| -|right_max_pos|Int|Maximum coordinate of right breakends| +|right_min_pos|Int|Minimum coordinate of right breakends (1-based)| +|right_max_pos|Int|Maximum coordinate of right breakends (1-based)| |right_strand|Char|Strand at right breakends| |split_reads|Int|Total number of split reads supporting the breakpoints in the cluster| |read_pairs|Int|Total number of read pairs supporting the breakpoints in the cluster| @@ -82,10 +82,10 @@ the only information comes from read-pairs and the breakpoint information should |------|----|-----------| |id|String|An ID assigned to the breakpoint that can be used to lookup supporting reads in the BAM.| |left_contig|String|The contig of chromosome on which the left hand side of the breakpoint exists.| -|left_pos|Int|The position (possibly imprecise) of the left-hand breakend.| +|left_pos|Int|The position (possibly imprecise) of the left-hand breakend (1-based).| |left_strand|Char|The strand of the left-hand breakend; sequence reads would traverse this strand in order to arrive at the breakend and transit into the right-hand side of the breakpoint.| |right_contig|String|The contig of chromosome on which the left hand side of the breakpoint exists.| -|right_pos|Int|The position (possibly imprecise) of the right-hand breakend.| +|right_pos|Int|The position (possibly imprecise) of the right-hand breakend (1-based).| |right_strand|Char|The strand of the right-hand breakend;. sequence reads would continue reading onto this strand after transiting the breakpoint from the left breakend| |split_reads|Int|The number of templates/inserts with split-read alignments that identified this breakpoint.| |read_pairs|Int|The number of templates/inserts with read-pair alignments (and without split-read alignments) that identified this breakpoint.| diff --git a/docs/tools/AggregateSvPileup.md b/docs/tools/AggregateSvPileup.md index 77d2424..012d262 100644 --- a/docs/tools/AggregateSvPileup.md +++ b/docs/tools/AggregateSvPileup.md @@ -36,7 +36,7 @@ of the overlapping target regions are copied from the `SvPiluep` input (if prese The output file is a tab-delimited table with one record per aggregated cluster of pileups. Aggregated pileups are reported with the minimum and maximum (inclusive) coordinates of all pileups in the cluster, a possible putative structural variant event type supported by the pileups, and the sum of read support from all -pileups in the cluster. +pileups in the cluster. Positions in this file are 1-based positions. ## Arguments diff --git a/docs/tools/SvPileup.md b/docs/tools/SvPileup.md index 6d43246..a6290ec 100644 --- a/docs/tools/SvPileup.md +++ b/docs/tools/SvPileup.md @@ -15,9 +15,9 @@ Two output files will be created: 1. `.txt`: a tab-delimited file describing SV pileups, one line per breakpoint event. The returned breakpoint will be canonicalized such that the "left" side of the breakpoint will have the lower (or equal to) - position on the genome vs. the "right"s side. + position on the genome vs. the "right"s side. Positions in this file are 1-based positions. 2. `.bam`: a SAM/BAM file containing reads that contain SV breakpoint evidence annotated with SAM - tag. + tag. The `be` SAM tag contains a comma-delimited list of breakpoints to which a given alignment belongs. Each element is semi-colon delimited, with four fields: diff --git a/docs/tools/index.md b/docs/tools/index.md index 7992e29..495675b 100644 --- a/docs/tools/index.md +++ b/docs/tools/index.md @@ -4,7 +4,7 @@ title: fgsv tools # fgsv tools -The following tools are available in fgsv version 0.1.1-acc9276. +The following tools are available in fgsv version 0.2.0-d603e95. ## Breakpoint and SV Tools Primary tools for calling and transforming breakpoints and SVs. diff --git a/src/main/scala/com/fulcrumgenomics/sv/BreakpointPileup.scala b/src/main/scala/com/fulcrumgenomics/sv/BreakpointPileup.scala index 0be0b17..bcc61a5 100644 --- a/src/main/scala/com/fulcrumgenomics/sv/BreakpointPileup.scala +++ b/src/main/scala/com/fulcrumgenomics/sv/BreakpointPileup.scala @@ -11,11 +11,11 @@ import com.fulcrumgenomics.util.Metric * * @param id an ID assigned to the breakpoint that can be used to lookup supporting reads in the BAM. * @param left_contig the contig of chromosome on which the left hand side of the breakpoint exists. - * @param left_pos the position (possibly imprecise) of the left-hand breakend. + * @param left_pos the position (possibly imprecise) of the left-hand breakend (1-based, inclusive). * @param left_strand the strand of the left-hand breakend; sequence reads would traverse this strand * in order to arrive at the breakend and transit into the right-hand side of the breakpoint. * @param right_contig the contig of chromosome on which the left hand side of the breakpoint exists. - * @param right_pos the position (possibly imprecise) of the right-hand breakend. + * @param right_pos the position (possibly imprecise) of the right-hand breakend (1-based, inclusive). * @param right_strand the strand of the right-hand breakend;. sequence reads would continue reading onto * this strand after transiting the breakpoint from the left breakend * @param split_reads the number of templates/inserts with split-read alignments that identified this breakpoint. diff --git a/src/main/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileup.scala b/src/main/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileup.scala index 15e1453..01fb081 100644 --- a/src/main/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileup.scala +++ b/src/main/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileup.scala @@ -46,7 +46,7 @@ import scala.collection.mutable |The output file is a tab-delimited table with one record per aggregated cluster of pileups. Aggregated |pileups are reported with the minimum and maximum (inclusive) coordinates of all pileups in the cluster, a |possible putative structural variant event type supported by the pileups, and the sum of read support from all - |pileups in the cluster. + |pileups in the cluster. Positions in this file are 1-based inclusive positions. |""") class AggregateSvPileup (@arg(flag='i', doc="Input text file of pileups generated by SvPileup") input: FilePath, @@ -230,12 +230,12 @@ object BreakpointCategory extends Enumeration { * @param id Combined ID retaining the IDs of all constituent breakpoints * @param category Breakpoint category * @param left_contig Contig name for left side of breakpoint - * @param left_min_pos Minimum coordinate of left breakends - * @param left_max_pos Maximum coordinate of left breakends + * @param left_min_pos Minimum coordinate of left breakends (1-based inclusive) + * @param left_max_pos Maximum coordinate of left breakends (1-based inclusive) * @param left_strand Strand at left breakends * @param right_contig Contig name for right side of breakpoint - * @param right_min_pos Minimum coordinate of right breakends - * @param right_max_pos Maximum coordinate of right breakends + * @param right_min_pos Minimum coordinate of right breakends (1-based inclusive) + * @param right_max_pos Maximum coordinate of right breakends (1-based inclusive) * @param right_strand Strand at right breakends * @param split_reads Total number of split reads supporting the breakpoints in the cluster * @param read_pairs Total number of read pairs supporting the breakpoints in the cluster diff --git a/src/main/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileupToBedPE.scala b/src/main/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileupToBedPE.scala index 61e473e..a25bf64 100644 --- a/src/main/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileupToBedPE.scala +++ b/src/main/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileupToBedPE.scala @@ -73,11 +73,11 @@ object AggregateSvPileupToBedPE { def apply(pileup: AggregatedBreakpointPileup): BedPE = { new BedPE( chrom1 = pileup.left_contig, - start1 = pileup.left_min_pos, - end1 = pileup.left_max_pos + 1, + start1 = pileup.left_min_pos - 1, + end1 = pileup.left_max_pos, chrom2 = pileup.right_contig, - start2 = pileup.right_min_pos, - end2 = pileup.right_max_pos + 1, + start2 = pileup.right_min_pos - 1, + end2 = pileup.right_max_pos, name = pileup.id, score = pileup.total, strand1 = Strand.decode(pileup.left_strand), diff --git a/src/main/scala/com/fulcrumgenomics/sv/tools/SvPileup.scala b/src/main/scala/com/fulcrumgenomics/sv/tools/SvPileup.scala index 25d9ee1..5b2eeca 100644 --- a/src/main/scala/com/fulcrumgenomics/sv/tools/SvPileup.scala +++ b/src/main/scala/com/fulcrumgenomics/sv/tools/SvPileup.scala @@ -47,9 +47,9 @@ object TargetBedRequirement extends FgBioEnum[TargetBedRequirement] { | |1. `.txt`: a tab-delimited file describing SV pileups, one line per breakpoint event. The returned | breakpoint will be canonicalized such that the "left" side of the breakpoint will have the lower (or equal to) - | position on the genome vs. the "right"s side. + | position on the genome vs. the "right"s side. Positions in this file are 1-based inclusive positions. |2. `.bam`: a SAM/BAM file containing reads that contain SV breakpoint evidence annotated with SAM - | tag. + | tag. | |The `be` SAM tag contains a comma-delimited list of breakpoints to which a given alignment belongs. Each element is |semi-colon delimited, with four fields: diff --git a/src/test/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileupToBedPETest.scala b/src/test/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileupToBedPETest.scala index 078e4db..e408598 100644 --- a/src/test/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileupToBedPETest.scala +++ b/src/test/scala/com/fulcrumgenomics/sv/tools/AggregateSvPileupToBedPETest.scala @@ -17,18 +17,18 @@ class AggregateSvPileupToBedPETest extends UnitSpec { id = "112", category = "Inter-contig rearrangement", left_contig = "chr1", - left_min_pos = 100, - left_max_pos = 100, + left_min_pos = 101, + left_max_pos = 101, left_strand = '+', right_contig = "chr3", - right_min_pos = 200, - right_max_pos = 200, + right_min_pos = 201, + right_max_pos = 201, right_strand = '-', split_reads = 1, read_pairs = 1, total = 2, - left_pileups = PositionList(100), - right_pileups = PositionList(200), + left_pileups = PositionList(101), + right_pileups = PositionList(201), ) /** A companion test BEDPE record. */