Question: Creating a BWA index with an index_prefix
0
gravatar for genomics Newbie
2.7 years ago by
genomics Newbie30 wrote:

Because of a software requirement the version BWA v0.7.8 is required.

Using https://hcc-docs.unl.edu/display/HCCDOC/Running+BWA+Commands and the following

bwa index [-a bwtsw|is] input_reference.fasta index_prefix

where input_reference.fasta is an input file of the reference genome in fasta format, and index_prefix is the prefix of the generated index files.

I ran the command 'bwa index -a bwtsw /hg19_reference/hg19_exome.fa hg19'

Expected Outcome: BWA index files would have a hg19 prepended (i.e. hg19.amb, etc) and not be created in the same file folder as my reference genome.

Question 1: What is the command that I can use to prepend (I thought this was the index_prefix) hg19 to the index files? Is there a -p before the index_prefix?

Question 2: Where should the index files really be created? In the BWA directory or the genome reference file folder?

Question 3: Which are the index files? hg19_exome.fa.sa, hg19_exome.fa.pac, hg19_exome.fa.fai, hg19_exome.fa.bwt, hg19_exome.fa.ann, hg19_exome.fa.amb, hg19_exome.fa

index bwa • 9.1k views
ADD COMMENTlink modified 2.7 years ago by genomax92k • written 2.7 years ago by genomics Newbie30
2
gravatar for genomax
2.7 years ago by
genomax92k
United States
genomax92k wrote:

1: If you want to get the hg19 prefix for your index files then run (adjust file paths as needed) bwa index -a bwtsw hg19_reference/hg19_exome.fa -p hg19
2 : They should be created in the directory where you are running this command from
3 : All those files make up the index set

ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by genomax92k

Thank you. My command only generated the following indexes...hg19.sa, hg19.amb, hg19.ann hg19.bwt and hg19.pac. I did not see any hg19.fa index. Any ideas why the command did not generate the hg19.fa?

ADD REPLYlink written 2.7 years ago by genomics Newbie30

hg19.fa would have been the original fasta format file which in your case is hg19_exome.fa. You could create a soft link like so ln -s hg19_exome.fa hg19.fa.

Since you specifically wanted the prefix hg19 for your index we added the -p hg19 to the command above. Otherwise you could just run bwa index -a bwtsw hg19_reference/hg19_exome.fa and get the index files that have the prefix of the fasta file name like you posted in original question.

ADD REPLYlink written 2.7 years ago by genomax92k

Thank you for your reply! For this question I didn't see an accept button.

ADD REPLYlink written 2.7 years ago by genomics Newbie30

I have moved my original comment to an answer. If you found it useful you can accept it.

ADD REPLYlink written 2.7 years ago by genomax92k
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: 1860 users visited in the last hour