Hi all,
I have a question about the usage of samtools mpileup, -f
. From the samtools documentation (http://samtools.sourceforge.net/samtools.shtml), the option of samtools mpileup, -f
, indicates the input is a faidx-indexed reference file in the FASTA format. But I found that many people didn't use the faidx-indexed reference file, e.g., here (http://samtools.sourceforge.net/mpileup.shtml) the author just used a FASTA file, ref.fa, but not a faidx-indexed reference file such as ref.fa.fai:
samtools mpileup -uf ref.fa aln1.bam aln2.bam | bcftools view -bvcg - > var.raw.bcf
However, the author said at the beginning: "Suppose we have reference sequences in ref.fa, indexed by samtools faidx".
My question is what file we should use? ref.fasta.fai or ref.fasta?
Could you please help me with this question? Thank you very much in advance.
Sincerely
Thank you for your help. But I am still not clear what file I should list in the command line. Do you mean even if I list a FASTA format file in a command line just like this:
The SAMtools works actually on the faidx-indexed file? Thanks.
Yes. The assumption is file is accompanied by file.fai.