For structural variants, when converted from vcf to bedpe, we have two breakends for each variant per row.
Now, it is necessary to merge the variant calls when both the breakend A and B overlaps for some calls.
It seems to be a very common taskm but it turns out to be much trickier as one thinks.
see posts:
Merging Structural Variant Calls from Different Callers
how to simplify / merge junction calls in bedpe format on bedtools google group.
There is no merging functionality for BEDPE files. I think your best option would be to use pairToPair to find junctions that overlap on both ends (the default), and then write a script around the output to merge the coordinates. I recognize that this is a non-trivial problem, as I have faced it myself. Essentially, what you are try to do is equivalent to structural variant clustering algorithms such as VariationHunter or my own Hydra. If the former solution is inadequate, you could consider using Hydra on the BEDPE input (you'd have to add a few dummy columns) to cluster the junctions.
Best, Aaron
tools I am now looking at:
mergeVcf. A post on it
lumpy-merge
svtools. migrating the lumpy-merge
to svtools
, still under active development.
see a workflow using svtools.
SURVIVOR Toolset for SV simulation, comparison and filtering.
mergeSVcallers from Zev who also developed Wham, a new SV caller. merging for translocations are not implemented yet, but in the plan of Zev.
I have written a blog post for this type of task using InteractionSet bioconductor pacakge
In the next release of bioconductor (April 22, 2016), the rtracklayer
package will have a way to represent GRange pairs.