This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bcftools consensus -m file.bed error

Hi everyone,

With bcftools consensus I'm trying to substitute the regions with low coverage with 'N'.

I made a BED file from the bam file with bedtools:

bedtools genomecov -bga -ibam [file.bam] | awk '$4<5' > low_coverage.bed

Output:

1       0       10001   0
1       10001   10002   2
1       10002   10003   4
1       10618   10620   5
1       10620   10621   4
1       10621   10622   1
1       10622   10643   0

And then I tried to use the command:

bcftools consensus -I -m low_coverage.bed [file.vcf.gz] > consensus.fa

but it prints the following error:

Could not parse tab line, expected 1-based coordinate: 1    0   10001   0
Failed to initialize mask regions

What can be the problem?

bed bcftools samtools consensus

0 answers

No answers yet.

Log in to answer this question.