This is a test version of Biostars. For the public version, visit https://www.biostars.org.
samtools faidx redirection

Dear Community, I am using 'samtools faidx' to index a fasta file. samtools faidx output/genome/ref/seq/celegans.fa However, this command creates a 'celegans.fai' file in the same folder as the fasta file. Is there a way to specify in which folder to store the index file? Samtools help can be found here: http://www.htslib.org/doc/samtools.html Thanks.

samtools index indexing samtools faidx redirection

1 answer

ln -s /path/to.fasta x.fa && samtools faidx x.fa && rm x.fa

or

samtools faidx /path/to.fasta x.fa && mv /path/to.fasta.fai x.fa.fai

There is a small typo. faix should be faidx.

OK thank you very much.

it worked ? flags this question as answered please.

Have a feeling people don't understand use "checkmark" to flag as answered. Perhaps there should be a word description there as well.

Log in to answer this question.