Skip to content

Enforcing filter criteria on _all_ samples. #126

@arq5x

Description

@arq5x

The following works:

bcftools view -Ou -s 1805 trio.trim.vep.bcf | \
    bcftools view -i 'FORMAT/GT=="1/1"' | \
    grep -v ^# | \
    head -3 | cut -f 10
1/1:0,6:6:18.05:207,18,0
1/1:0,35:35:99:1268,102,0
1/1:15,88:104:99:2850,265,0

But when extracting multiple samples, the condition seems to be an OR:

bcftools view -Ou -s 1805,4805 trio.trim.vep.bcf | \
    bcftools view -i 'FORMAT/GT="1/1"' | \
    grep -v ^# | \
    head -3 | cut -f 10,11
1/1:0,6:6:18.05:207,18,0    ./.:.:.:.:.
1/1:0,35:35:99:1268,102,0   1/1:0,1:1:3.01:38,3,0
1/1:15,88:104:99:2850,265,0 0/1:114,107:224:99:2688,0,2507

How do I enforce AND logic such that the only variants returned are those where both samples are homozygous alternate?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions