I have extracted one chromosome from alignment map (
samtools view -b map.bam chr1 > map_chr1.bam
Now I would like to perform SNP calling using
freebayes. Is it correct to use
chr1.fasta as reference file (not full genome)? Like this:
freebayes --genotype-qualities -f chr1.fasta map_chr1.bam > map_chr1_vars.vcf
It confuses me that other chromosomes are preserved in the
.bam header (even after
samtools view chr1). Will it interfere with the work of freebayes that he will expect a full reference based on the
.bam header, and will receive only part of it (although he needs only it)?
Similar question for
samtools mpileup (if I decide to use it as alternative):
samtools mpileup -f chr1.fasta -o map_chr1_vars.bcf map_chr1.bam
Of course, after indexing
samtools faidx) and getting
Thank you in advance!