-
Notifications
You must be signed in to change notification settings - Fork 22
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
Improved error messages for input data #52
Comments
Addendum: For other types of missing fields, the errors get even more confusing. The above happens when calling However, if instead the
The behaviour can be reproduced with these files (produced by freebayes), and calling
using rust-bio-tools =0.6.0, as well as rust-bio-tools =0.10.0 The field is present in the file, so I don't know exactly what is causing the issue here... Would be nice to have a fix for that, because otherwise, I cannot use rbt with freebayes. By the way, these errors occurred while adapting the dna-seq-gatk-variant-calling workflow to other types of callers (bcftools call, and freebayes), which seem to produce vcf files that confuse rbt. The error occurs in the stats rule for converting vcf to txt. All the best and thanks in advance |
Thanks a lot for reporting. Indeed, error messages should be improved here. This is now much easier with the thiserror and anyhow crates. I currently don't have the capacity, but it is certainly something we would either be happy to get a PR on, or that we will start looking at as soon as possible. |
Hi @lczech, I tried to reproduce your error message ( |
I can reproduce the error by supplying a I made a pull request (#243) to better inform the users of the error that occurred (at least now the offending tag is printed out instead of a generic message) and suggested the users to check their inputs. Hopefully @johanneskoester can chime in and give their view on this issue. |
On the error about the "AD" tag, I just found out the reason why The "AD" tag is defined as However, the samples with missing values in vcf files generated from Here is the file successfully parsed after changing
Maybe if the tag length is As a side note, I noticed that the value for the "AD" tag is filled with the last allele value in each sample. Looking at the code, assume that this is intended? Also, the missing value is encoded as |
Hi there,
I'd suggest to improve some error messages:
rust-bio-tools/src/bcf/to_txt.rs
Line 205 in d2a7750
The error simply states that
and it took me quite a while digging through rust-htslib to figure out that it actually wants to say something like
where "XX" is some format annotation shortcut for vcf files. The same probably applies for the info fields as well.
I'd provide a PR, but I don't know rust well enough to gauge whether the error message can occur in other circumstances as well, where my improved message would not be fitting.
All the best
Lucas
The text was updated successfully, but these errors were encountered: