-
Notifications
You must be signed in to change notification settings - Fork 4
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
Output VCF file is empty #2
Comments
Hi Luca, thank you for catching this. GRC standard does not contain "chr", and any VCF files generated based on GRC reference genome won't contain "chr". |
Ok, I see... but the problem occurs exactly when the reference genome and the VCF share the same chromosome name standard. Indeed, both the VCF and the reference I linked in my previous message follow the GRC standard. The problem, if I understood correctly your code, is that you add "chr" before the reference of each VCF line but you don't do that when parsing the reference FASTA. It's like vargeno assumes that the VCF follows the GRC standard whereas the reference doesn't: the files in the test folder don't follow the same standard (the ID in the FASTA file contain "chr", the IDs in the VCF don't contain "chr"). Moreover, I think that there is also a (possible) problem when the reference genome contains a character different from A,C,G,T,N (ie. a character from the IUPAC code such as an M or an R, as happens in the reference genome I linked in the previous message). In such a context, vargeno crashes during the index step printing:
Right now, I solved this by modifying the input FASTA. |
Hello,
I tried to run vargeno (last commit, 00ee0f0) on the following data: reference, VCFs (provided by 1000genomes), and sample sequenced from NA12878 individual.
I ran some tests on different chromosomes but I always got an output VCF file that contains only the header. I tried to figure out the reasons of this and these are my hypotheses.
I think the main problem is in the index step. Indeed, in my various tests, I obtain
From here, I started digging in the code and I saw that there could be some problems on how you index the input reference. In more details:
vargeno/src/generate_bf.cc
Line 206 in 00ee0f0
vargeno/src/generate_bf.cc
Line 47 in 00ee0f0
vargeno/src/qv.cc
Line 2345 in 00ee0f0
vargeno/src/generate_bf.cc
Line 47 in 00ee0f0
but when you parse the VCF file, you consider as chromosome name only the unique identifier since you get the chromosome number from the first column of the VCF (this should not affect the .chrlens file since you use a different function to read the reference FASTA when you write the .chrlens file)
I tried to solve these two problems by changing some lines in your code but I'm not sure if what I've done is right and enough (I'll anyway open a pull request: it could be a good starting point for you). With my fixes, now the output is not empty anymore.
Moreover, I think that this behaviour occurs also if the input VCF contains the field GT specified in the header and the GT columns (as in the VCFs provided by the 1000genomes project). If I run vargeno index, I obtain:
Currently, I solved this problem by removing out from the VCFs the line in the header and the ~2500 columns of the samples. Maybe you could find a better solution to this or maybe you can update the readme accordingly.
Thanks in advance!
Best,
Luca
The text was updated successfully, but these errors were encountered: