new enum htsjdk.variant.variantcontext.StructuralVariantType describing the SV types #696

Merged
merged 2 commits into from Nov 1, 2016

Conversation

Projects
None yet
6 participants
Contributor

lindenb commented Sep 5, 2016

Description

As I'm playing with structural variation and the tool 'lumpy-sv', this PR introduces a new enum htsjdk.variant.variantcontext.StructuralVariantType describing the SV types defined in the VCFSpec 4.2:

##INFO=<ID=SVTYPE,Number=1,Type=String,Description="Type of structural variant">
Value should be one of DEL, INS, DUP, INV, CNV, BND. 
  • A constant SVTYPE was added in VCFConstants
  • getStructuralVariantType() was added to VariantContext
  • I've added a test and a test file src/test/resources/htsjdk/variant/structuralvariants.vcf that could become more complicated in the future (e.g: decoding the BND data).

Checklist

  • Code compiles correctly
  • New tests covering changes and new functionality
  • All tests passing
  • Extended the README / documentation, if necessary
  • Is not backward compatible (breaks binary or source compatibility)

lindenb added some commits Sep 5, 2016

@lindenb lindenb svtype dc21085
@lindenb lindenb typo get
01f913e

Coverage Status

Coverage increased (+0.03%) to 68.952% when pulling 01f913e on lindenb:svtype into c3d5a88 on samtools:master.

Contributor

droazen commented Sep 13, 2016

@cwhelan or @tedsharpe could one of you review this one?

droazen self-assigned this Sep 13, 2016

Contributor

cwhelan commented Sep 14, 2016

This looks good to me; we've added similar stuff to GATKSVVCFHeaderLines but they probably belong in htsjdk instead.

While we're at it there are a number of SV-related spec-defined header lines like SVTYPE and SVLEN that could be added to htsjdk's VCFStandardHeaderLines class, but those might be able to go in under a separate PR.

Contributor

yfarjoun commented Oct 2, 2016

@cwhelan is this good to go? if so, could you bless it with a formal :+1: and also merge it?

Contributor

cwhelan commented Oct 17, 2016

I can give this a +1 but I can't merge. @droazen?

@droazen droazen merged commit 1c66107 into samtools:master Nov 1, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.03%) to 68.952%
Details

yfarjoun referenced this pull request Nov 1, 2016

Open

Review "Party" #548

lindenb deleted the lindenb:svtype branch Nov 3, 2016

Contributor

d-cameron commented Dec 9, 2016

I for one, would love for all of the spec-defined SV headers to be included in htsjdk (ie, everything in https://github.com/PapenfussLab/gridss/blob/master/src/main/java/au/edu/wehi/idsv/vcf/VcfSvConstants.java and https://github.com/PapenfussLab/gridss/blob/master/src/main/java/au/edu/wehi/idsv/vcf/VcfStructuralVariantHeaderLines.java).

Be aware that some SV callers write SV types that are not in that enumeration (earlier versions of the the spec were less restrictive than v4.3). Notable callers include DELLY writing TRA, TIGRA writing CTX, and Pindel writing RPL.

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