-
Notifications
You must be signed in to change notification settings - Fork 17
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
Working PoC of VCF import API #4498
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice.
I suppose this depends on the data model behind how to handle the VCF contents. So we either should standardize or we should make a map of 'adapters' that can choose how to translate the VCF in the backend (based on the profile that was used to create the schema).
@@ -0,0 +1,78 @@ | |||
package org.molgenis.emx2.beaconv2.vcfimport; | |||
|
|||
import htsjdk.variant.variantcontext.VariantContext; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what VIP uses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly
private Table individuals; | ||
|
||
public VcfImport(File vcfTmpFile, Table genomicVariations, Table individuals) { | ||
this.vcfTmpFile = vcfTmpFile; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would call it 'vcfFile' (might or might not be tempfile, doesn't matter here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
for (VariantContext variant : vcfFileReader) { | ||
|
||
Row row = new Row(); | ||
row.set("variantInternalId", UUID.randomUUID()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this would then need to be an adapter. I.e. using the 'strategy' design pattern where the way on how to handle rows from the VCF file can have different implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, but this needs to be fully transparant to the user so I think we need to make https://github.com/molgenis/GCC/issues/775 into a more general GUI tool
|
||
public static void main(String[] args) { | ||
String vcfFilePath = | ||
"/Users/joeri/git/molgenis-emx2/backend/molgenis-emx2-beacon-v2/src/test/resources/sample.vcf"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ofcourse, this was just for playing around with HTSJDK
Quality Gate failedFailed conditions See analysis details on SonarQube Cloud Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE |
Started writing VCF import API, got very minimal PoC working using
But many things still to do