Hi,
1)I downloaded asi_ref_ASM45574v1_chrMT.fa file from NCBI. 2)I created reads using wgsim using the following command: wgsim -N1000 -S1 asi_ref_ASM45574v1_chrMT.fa sim_reads.fq /dev/null
3)Then I created index file of the .fa file mentioned above by using the following command samtools faidx asi_ref_ASM45574v1_chrMT.fa
I got a asi_ref_ASM45574v1_chrMT.fa.fai
4)After this I tried to convert the .fai file to sam for further analysis but received an error. Here is the command bowtie2 -x asi_ref_ASM45574v1_chrMT.fa.fai -U sim_reads.fq -S sim_reads_aligned.sam
and here is the error: Could not locate a Bowtie index corresponding to basename "asi_ref_ASM45574v1_chrMT.fa.fai" Error: Encountered internal Bowtie 2 exception (#1) Command: /usr/bin/bowtie2-align-s --wrapper basic-0 -x asi_ref_ASM45574v1_chrMT.fa.fai -S sim_reads_aligned.sam -U sim_reads.fq (ERR): bowtie2-align exited with value 1
I am not understanding why the error.Where am I wrong?
You need to index the fasta file using bowtie2-build:
Then align using:
Thanks.It works.But may I know why didn't samtols faidx not work?