Hello, I am trying to generate consensus bam file sequences. For this I used the commands recommended by the link below.
I did a test and managed to generate a consensus in fasta format. but when I used the command below (first command) I received a message that my sample was considered diploid because I did not specify the ploidy. in my case it is mitochondrial dna and i need to specify in first command. How do I do that?
bcftools mpileup -Ou -f NC_012920.1.fasta 1-321.bam | bcftools call -mv -Oz -o 1-321.vcf.gz bcftools index 1-321.vcf.gz
other sequential commands:
(base)liene@gar:~/Desktop/doc_liene/vcfs$ (base)bcftools norm -f NC_012920.1.fasta 1-321.vcf.gz -o 1-321N.bcf Lines total/split/realigned/skipped: 38/0/3/0 (base) liene@gar:~/Desktop/doc_liene/vcfs$ bcftools filter --IndelGap 5 1-321N.bcf -Ob -o 1-321NI.bcf (base) liene@gar:~/Desktop/doc_liene/vcfs$ cat NC_012920.1.fasta |bcftools consensus 1-321.vcf.gz > 1-321MTconsensus.fa Note: the --sample option not given, applying all records The site NC_012920.1:8270 overlaps with another variant, skipping... The site NC_012920.1:8272 overlaps with another variant, skipping... (base) liene@gar:~/Desktop/doc_liene/vcfs
Another question I have is whether I made all the other commands right. although it generated bcf files, they were not used in the consensus extract command syntax. I would like to understand that. Thanks