Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/tools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: fgsv tools

# fgsv tools

The following tools are available in fgsv version 0.2.1-b54e45d.
The following tools are available in fgsv version 0.2.1-77ca3f0.
## Breakpoint and SV Tools

Primary tools for calling and transforming breakpoints and SVs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ case class AggregatedBreakpointPileup(id: String,
right_targets: Option[String] = None
) extends Metric with LazyLogging {

/** Returns the IDs of constituent breakpoints */
def pileupIds(): Seq[String] = id.split("_").toSeq.sorted
/** Returns the IDs of constituent breakpoints, sorted numerically */
def pileupIds(): Seq[String] = id.split("_").toSeq.sortBy(_.toInt)

/** Combines the comma-delimited list of target strings when aggregating the `left_targets` and `right_target` fields. */
private def combineTargetStrings(first: Option[String], second: Option[String]): Option[String] = {
Expand All @@ -317,7 +317,7 @@ case class AggregatedBreakpointPileup(id: String,
assert(pileup.right_strand == right_strand)

AggregatedBreakpointPileup(
id = pileupIds().appended(pileup.id).sorted.mkString("_"),
id = pileupIds().appended(pileup.id).sortBy(_.toInt).mkString("_"),
category = category,
left_contig = left_contig,
left_min_pos = Math.min(left_min_pos, pileup.left_pos),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class AggregateSvPileupTest extends UnitSpec {
)

val expAgg1 = AggregatedBreakpointPileup(
id = "112_456_5_7_8_9",
id = "5_7_8_9_112_456",
category = "Inter-contig rearrangement",
left_contig = "chr1",
left_min_pos = 100,
Expand Down Expand Up @@ -363,7 +363,7 @@ class AggregateSvPileupTest extends UnitSpec {
)

val expAgg1 = AggregatedBreakpointPileup(
id = "10_7_8_9",
id = "7_8_9_10",
category = "Inter-contig rearrangement",
left_contig = "chr1",
left_min_pos = 400,
Expand Down Expand Up @@ -426,7 +426,7 @@ class AggregateSvPileupTest extends UnitSpec {
)

val expAgg = AggregatedBreakpointPileup(
id = "10_7_8_9",
id = "7_8_9_10",
category = "Inter-contig rearrangement",
left_contig = "chr1",
left_min_pos = 400,
Expand Down Expand Up @@ -462,7 +462,7 @@ class AggregateSvPileupTest extends UnitSpec {
)

val expAgg = AggregatedBreakpointPileup(
id = "10_7_8_9",
id = "7_8_9_10",
category = "Inter-contig rearrangement",
left_contig = "chr1",
left_min_pos = 400,
Expand Down