Question: BWA index - is it neccesary?
0
gravatar for Hansen_869
27 days ago by
Hansen_86910
Hansen_86910 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 • 133 views
ADD COMMENTlink modified 20 days ago by ATpoint26k • written 27 days ago by Hansen_86910
3
gravatar for genomax
27 days ago by
genomax75k
United States
genomax75k 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 27 days ago • written 27 days ago by genomax75k

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 27 days ago • written 27 days ago by Hansen_86910

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 27 days ago • written 27 days ago by genomax75k
0
gravatar for ATpoint
20 days ago by
ATpoint26k
Germany
ATpoint26k wrote:

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

ADD COMMENTlink modified 20 days ago • written 20 days ago by ATpoint26k
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: 1611 users visited in the last hour