Skip to content

Commit

Permalink
Fix coordinate conversion for BEDPE files
Browse files Browse the repository at this point in the history
  • Loading branch information
clintval committed May 9, 2024
1 parent dcf91e7 commit 3a50a5f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/com/fulcrumgenomics/sv/BreakpointPileup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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).
* @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).
* @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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 positions.
|""")
class AggregateSvPileup
(@arg(flag='i', doc="Input text file of pileups generated by SvPileup") input: FilePath,
Expand Down Expand Up @@ -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)
* @param left_max_pos Maximum coordinate of left breakends (1-based)
* @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)
* @param right_max_pos Maximum coordinate of right breakends (1-based)
* @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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/com/fulcrumgenomics/sv/tools/SvPileup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ object TargetBedRequirement extends FgBioEnum[TargetBedRequirement] {
|
|1. `<output-prefix>.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. `<output-prefix>.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:
Expand Down

0 comments on commit 3a50a5f

Please sign in to comment.