This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bcftools CHROM POS tab-delimited file not working

I generated tab limited txt file with positions that I want mpileup to look at:

chr1    114708534
chr1    114708535
chr1    114708536

However command

bcftools mpileup -R regions.tab  -f genome.fa aln.bam | tee /dev/tty | gzip > output.vcf.gz 

stalls and no output is produced. Running the same command with a three column bed file like below instead works.

chr1    114708534   114716771
chr12   112477986   112489161
chr21   34792516    35048898
bcftools

Since you know that a 3-column file works, what exactly is your question?

I would imagine that a file called regions.tab should be with at least 3 columns, as it needs to specify a chromosome name, followed by starts and ends of regions to be used.

I have interest only in certain loci and not whole regions, so it would be a huge computational waste to run pileup over whole regions. This is from bcftools documentation:

Regions can be specified either on command line or in a VCF, BED, or tab-delimited file (the default). The columns of the tab-delimited file can contain either positions (two-column format) or intervals (three-column format): CHROM, POS, and, optionally, END, where positions are 1-based and inclusive.

Plus I tried it with one base intervals in bed format and also bed interval which were really small and it still seems to fail. Only having intervals larger than a certain size seems to be working. I should mention my bam contains long read data, not sure if that has to do with it.

0 answers

No answers yet.

Log in to answer this question.