-
Notifications
You must be signed in to change notification settings - Fork 116
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
The ivar_variants_to_vcf.py does not sort variant #335
Comments
@mattheww95 tagging issue 326 and issue 321 Okay, I thought that it might be a sample problem and that ivar_variants_to_vcf.py vcf file
For some reason the vcf file produced by your code is not sorted
EDIT 1
|
This appears to be similar to the issue I had but slightly different. The bug seems to come from when codons are being merged, but while looking through the code I am nervous to simply handle the StopIteration error directly in case an incorrect result is given. I was able to successfully run your file when not merging codons (adding the "-ic" flag) which is typically how I run the pipeline. Can you confirm that running your sample with the "-ic" flag solves the issue @Rohit-Satyam. |
Hi @mattheww95 and @Rohit-Satyam ! viralrecon/subworkflows/local/variants_ivar.nf Lines 56 to 59 in 3ee1fe9
And this only happens when merge codons functionality is performed as indels are outputted unordered, with the --ignore-merge-codons as the variants are already ordered in the ivar tsv, and the order is unaltered.We added the reference tag to the vcf header so it can be easily sorted after the script without including much complexity in the code. Something like this should work:
Please tell me if this fixes your issue! |
@saramonzon Thanks for confirming this and sharing your insights. I will use bcftools sort then. I wanted to make sure if it was a bug in |
Description of the bug
When trying to index the
ivar
vcf using tabix,, I get following error:In VCF I can see
Command used and terminal output
I was testing the new
ivar_variants_to_vcf.py
in the development branchand Ivar was run as
Relevant files
temp.ivar.zip
The text was updated successfully, but these errors were encountered: