Skip to content

-R not work in bcftools view #1367

@biozzq

Description

@biozzq

Dear all,

I want to extract specified sites from VCF file and used following command, but it failed because many sites not in the specified sites have also been printed out. For example, the site 133089. Hope your help. Thank you very much.

bcftools-1.11/bin/bcftools view -R 18.sites --threads raw.vcf.gz -O v | grep -v "^#"
18      132827  .       C       A       5914.41 .       
18      132838  .       G       A       36067.9 .       
18      133089  .       GGACACCTGGGTGGGGGCTGGGCACCAAGACCTCACCTCTGAAGGTTAGTCCCCGAGAAAGGGCCGGGC   CGACACCTGGGTGGGGGCTGGGCACCAAGACCTCACCTCTGAAGGTTAGTCCCCGAGAAAGG
18      133137  .       G       A       226.82  . 
cat 18.sites
18      132827
18      132838
18      133137

Best wishes,
Zheng Zhuqing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions