I have a BAM file containing sorted, aligned reads from a number of single cells. Each read has an associated cell barcode (CB tag). I would like to consider all aligned reads and produce a VCF file of SNP variants from my single cell data. I have looked over the documentation for
bcftools mpileup and found useful options such as
--ignore-RG to ignore the readgroup when assigning a genotype probability. I therefore wanted to run something like:
bcftools mpileup -Ou --ignore-RG --no-reference -b <input.bam> | bcftools call -mv -Oz -o calls.vcf
My question is: will mpileup group reads by barcode when calculating genotype probability? Will this method successfully output SNP variants present within my aligned reads?