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

VariantRDD union creates multiple records for the same SNP ID #1644

Closed
devin-petersohn opened this issue Jul 27, 2017 · 6 comments
Closed

VariantRDD union creates multiple records for the same SNP ID #1644

devin-petersohn opened this issue Jul 27, 2017 · 6 comments
Labels
Milestone

Comments

@devin-petersohn
Copy link
Member

VariantRDD.union() does not combine by SNP ID. This leads to the potential for multiple records with the same SNP ID.

If we were to write out the VariantRDD as a VCF, it would not be correct.

@devin-petersohn
Copy link
Member Author

Link

@heuermh
Copy link
Member

heuermh commented Jul 27, 2017

We already split alternate alleles at the same position into multiple Variant records, so I would not expect VariantRDD.union to combine by Variant.name. I would in fact expect to see many records at the same position with the same value(s) for Variant.name.

  /**
   Zero or more unique names or identifiers for this variant. If this is a dbSNP
   variant it is encouraged to use the rs number(s). VCF column 3 "ID" shared across
   all alleles in the same VCF record.
   */
  array<string> names = [];

@fnothaft
Copy link
Member

+1 @heuermh, the union method specifies no contract WRT "duplicate" records.

Logically, in variant space, "duplicate" is not clearly defined, as two records with the same chr/pos/ref/alt could have conflicting annotations. I don't believe that the VCF spec says that dupe records are illegal, as long as both records are well formed and the data is properly sorted.

I suggest we close as won't fix.

@devin-petersohn
Copy link
Member Author

I was thinking along the lines of the VCFTools implementation here, such that the output is a merged VCF.

If we don't care about this use case, feel free to close the issue.

@fnothaft
Copy link
Member

union on GenotypeRDD/VariantRDD/VariantContextRDD implements both VCFTools merge and concat, albiet with possibly different semantics in the merge case.

@devin-petersohn
Copy link
Member Author

Closing as won't fix.

@heuermh heuermh added this to the 0.23.0 milestone Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants