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

Preserving Info Fields with breakpointgr2bedpe() #41

Open
blex-max opened this issue Feb 8, 2023 · 2 comments
Open

Preserving Info Fields with breakpointgr2bedpe() #41

blex-max opened this issue Feb 8, 2023 · 2 comments

Comments

@blex-max
Copy link

blex-max commented Feb 8, 2023

Hello,

Thanks for maintaining StructuralVariantAnnotation! I'm attempting to convert VCFs to .bedpe files using the following code:

vcf <- VariantAnnotation::readVcf(opt$vcf_path)
brs <- StructuralVariantAnnotation::breakpointRanges(
    vcf,
    info_columns = names(vcf@info)
)
bp_df <- StructuralVariantAnnotation::breakpointgr2bedpe(brs)

I was hoping the info fields preserved by breakpointRanges() would also be preserved as additional columns but this is not the case. Could this be implemented as an option, or could you suggest a workaround? Thanks.

@d-cameron
Copy link
Member

This issue is that each bedpe record is a merger of two breakpointGRanges rows and those two rows don't necessarily have the same values. For example the partner field.

For simple DEL/DUP/INS events, it's a 1 to 2 to 1 operation so there's no ambiguity, so you could copy the INFO fields from info(vcf) as additional bedpe columns. For other events, you'll need to work out which is the 'correct'^ value.

^ in many cases there is no 'correct' value. For example, a breakpoint can be homozygous on one side and heterozygous on the other side (e.g. chr1<->chr2 breakpoint with a total loss of the other copy of chr2).

@SunWinner01
Copy link

Hello, sorry to bother you. I used StructuralVariantAnnotation packages when annotating on the vcf results of Gridss
software. This R package appears in the annotation script. I encountered some issues while running this script. I received the file, but it did not contain the expected columns. May I consult with you? Thank you very much!

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

No branches or pull requests

3 participants