Question: BWA index - is it neccesary?
0
gravatar for Hansen_869
10 months ago by
Hansen_86920
Hansen_86920 wrote:

I am uncertain about, if I need to index my fasta file before running BWA mem. When is indexing necessary? And if it is neccesary, then what would be input for BWA mem be (fasta, index, R1.gz, R2.gz?).

index bwa • 740 views
ADD COMMENTlink modified 10 months ago by ATpoint38k • written 10 months ago by Hansen_86920
3
gravatar for genomax
10 months ago by
genomax89k
United States
genomax89k wrote:

All NGS aligners need the reference sequences to be indexed. You would use the index basename with your fastq reads at the time of alignment.

bwa index ref.fa

bwa mem ref.fa reads.fq > aln-se.sam

Note: BBMap aligner can index the fasta reference on the fly but it still needs to do the indexing before alignment happens.

ADD COMMENTlink modified 10 months ago • written 10 months ago by genomax89k

So I shouldn't feed my original fasta-file to BWA mem ? When I index my fasta file, the resulting fasta file is empty. I suppose something is wrong?

ADD REPLYlink modified 10 months ago • written 10 months ago by Hansen_86920

No to first question.

When you index a fasta file (with one or many sequences in it) there should be several additional files produced, which contain the actual index information. They will have names like

genome.fa  genome.fa.amb  genome.fa.ann  genome.fa.bwt  genome.fa.pac  genome.fa.sa

Yes something is wrong if you are getting empty files.

ADD REPLYlink modified 10 months ago • written 10 months ago by genomax89k
0
gravatar for ATpoint
10 months ago by
ATpoint38k
Germany
ATpoint38k wrote:

Yes, it is absolutely necessary: what is the purpose of indexing a genome

ADD COMMENTlink modified 10 months ago • written 10 months ago by ATpoint38k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 696 users visited in the last hour