Skip to content

bcftools consensus -S not subsetting samples #2398

@RebekahMohn

Description

@RebekahMohn

Greetings,

The bcftools consensus -S setting is not working for me.

I am running:
samtools faidx reference.fa -r regions.txt | bcftools consensus samples.vcf.gz -S subsamples.txt -o consensus.fasta
my samples.vcf.gz file has 347 samples
my subsamples.txt has 2 samples formatted as follows:
sample1
sample2

However the stream says, "Note: applying IUPAC codes based on FORMAT/GT in 347 samples
Applied 37 variants" instead of two samples

If I write out the samples as in
samtools faidx reference.fa -r regions.txt | bcftools consensus samples.vcf.gz -s sample1,sample2 -o consensus2.fasta

the stream correctly says, "Note: applying IUPAC codes based on FORMAT/GT in 2 samples
Applied 30 variants."

Am I missing something about using -S or the formatting of the subsamples.txt? Or is this an issue with bcftools?

Thanks!

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