samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
663 stars 240 forks source link

Absolutly All positions in mpileup (previously -aa) #2076

Open jlapaijmans opened 8 months ago

jlapaijmans commented 8 months ago

Dear developers,

I am looking to generate a VCF file in which all positions of the reference are represented - so also those where my input bam has no read coverage. In SAMtools mpileup, the option -aa exists which does what I need, but I understand SAMtools mpileup is depricated and shouldn't be used (?). I also am unable to pipe the output from SAMtools mpileup into BCFtools call for generating a VCF, have so far been unable to find another way to convert SAMtools' pileup format to a VCF. Is there a native option in BCFtools mpileup that would result the -aa behaviour from SAMtools, ie resulting in a VCF where all bases of the reference are present?

Any suggestions would be much appreciated! I'm attaching a small example file, in case that helps. XMEN.zip

way to reproduce: bcftools mpileup XMEN1_10.bam -f XMEN-reference_10.fasta

outputs only sites with coverage

samtools mpileup -aa XMEN1_10.bam

outputs all sites (in pileup format I think?)

Many thanks!

jlapaijmans commented 8 months ago

Hi, I am sorry to be a bother, but does someone perhaps have any suggestions for me? I realise this may be a bit of a niche requirement, but is there a chance the -aa flag from SAMtools will be introduced in bcftools mpileup? Or alternatively, will samtools mpileup remain supported in future? Many thanks

jkbonfield commented 8 months ago

Samtools mpileup isn't going anywhere, but it no longer has VCF output and nor will this be added back as the decision was made to limit calling code to bcftools only for ease of maintenance.

I can't comment on whether -aa will be added to bcftools mpileup though.

jlapaijmans commented 8 months ago

thank you for your response, it is reassuring to know that samtools mpileup will at least remain, as I build my pipeline around it. Perhaps -aa will return in bcftools one day too. Thank you!

pd3 commented 8 months ago

What is the motivation for this feature request?

jlapaijmans commented 8 months ago

Hi, thanks for getting back to me

So I am working with custom scripts written by the group I am in, that "add" variant information generated with other methods (that output in fasta format) together in a VCF for downstream analysis, if this makes sense. For this, we would need a "starting" vcf that represent all positions. I realise this is probably something very few people would use, but since -aa existed previously in samtools, I just thought I'd ask! Thank you