Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging SVs #29

Open
gdeoli opened this issue May 20, 2020 · 1 comment
Open

Merging SVs #29

gdeoli opened this issue May 20, 2020 · 1 comment

Comments

@gdeoli
Copy link

gdeoli commented May 20, 2020

I'm attempting to get a merged vcf file of two different SVs callers (Delly and Lumpy). So I used StructuralVariantAnnotation to get both vcfs into GRanges objects. I used findBreakpointOverlaps() and it does returns a dataframe with the expected indexes of records to be merged. I was wondering whether there is a function to get a GRange object based on these dataframe. I know I could use mergeByOverlaps() from IRanges, but I'm not sure how to make use of maxgap and sizemargin options. Furthermore, I'd like to have all non-overlaping records (of both vcfs) in the GRanges final object, as well.

Is there anything available to do that, already?

Thanks

@d-cameron
Copy link
Member

Not at this time. SV merging is a decidedly non-trivial problem requiring many design choices that make or may not be appropriate for a given use case.

For example, consider the calls A, B, and C, D. With a non-zero maxgap or sizemargin you can get into the scenario where

  • A overlaps B
  • B overlaps A & C
  • C overlaps B & D
  • D overlaps C

There is no good way merge overlaps in this case. Imprecise matching is not a transitive operation so the variant calls do not decompose into distinct sets of mutually overlapping variants. You either have to merge calls that don't overlap, or consider some overlapping calls as different calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants