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
Logical operators #856
Comments
Say your VCF contains the per-sample depth and genotype quality annotations and you want to include only sites where one or more samples have big enough coverage (
On the other hand, if you need to include sites where both conditions met but not necessarily in the same sample, use the
This example is taken from http://samtools.github.io/bcftools/howtos/filtering.html |
Hello @pd3 , I somehow miss the notification about your response here. So please excuse my late response. As I wrote on biostars unfortunately this is not an answer on the question what's the difference between So please let me aks you to reopen this question. fin swimmer |
Well, sorry to demonstrate the difference on The manual page says it all:
Or you can try to run yourself:
|
Hey @pd3 , thanks for reopening and your additional informations. Your example showed it quite clear. It would be very good if the manual will be expanded by such a practical example as you show. Further more the part "&& (same as &)" should be edited, as it is not the same. fin swimmer PS: For the sake of completeness I will edit your answer on biostars and copy&paste the answer from here to there. |
Thank you. I'll update the documentation as well. |
Hello,
the manual says these logical operators can be used in filtering expressions:
&& (same as &), ||, |
I read it like: "It doesn't matter if one use
&
or&&
."But in the later examples there seems to be a different behaviour:
Furthermore I don't understand the difference between
|
and||
. Can someone please give me an example and usecase for both to get a better understanding of this?The manual says something about "select [...] samples". But which
bcftools
subcommand is able to select samples based on expressions?I've posted this question yesterday on biostars. But until now there are just a few guesses about the differences. So I decided to ask directly on the source :)
fin swimmer
The text was updated successfully, but these errors were encountered: