I am trying to transform a .bam file with the lenght of a genic region into .fasta format, as i've been reading, y may have to transform it into .vcf file to see the variant calls, and then create a consensus using bcf tools.
the pipeline seems very straightforward when transforming into vcf format, first i need to run mpileup from samtools to the original .bam file, then call command with bcftools, to call the variants.
Now, my problem comes when i run the mpileup, i ran the next argument:
samtools mpileup -g -f chr19ref.fa filename.bam > desiredfile.bcf
it actually gave me a desidedfile.bcf , but on the terminal, it gave me loads of lines saying:
[E: :faidx_fetch_seq] The sequence "6" not found
this message filled the screen, and at the end i got a .bcf file, which when converting to .vcf gave an empty document, i guess there's an issue with the conversion to .bcf, but i can't find out what it is, it has something to do with the warning message i describe, can someone help me with that?