Question: Error with BWA in local Galaxy
gravatar for yesabelst
7 days ago by
yesabelst0 wrote:

Hello, I´m new using Galaxy and would really appreciate some help. I´m trying to run BWA in my local Galaxy and as a result, it's producing an empty file. I get this error:

[bwa_index] Pack FASTA... 0.00 sec

[bwa_index] Construct BWT for the packed sequence...

[bwa_index] 0.00 seconds elapse.

[bwa_index] Update BWT... 0.00 sec

[bwa_index] Pack forward-only FASTA... 0.00 sec

[bwa_index] Construct SA from BWT and Occ... 0.00 sec

[main] Version: 0.7.12-r1039

[main] CMD: bwa index localref.fa

[main] Real time: 0.491 sec; CPU: 0.008 sec

[bwa_aln] 17bp reads: max_diff = 2

[bwa_aln] 38bp reads: max_diff = 3

[bwa_aln] 64bp reads: max_diff = 4

[bwa_aln] 93bp reads: max_diff = 5

[bwa_aln] 124bp reads: max_diff = 6

[bwa_aln] 157bp reads: max_diff = 7

[bwa_aln] 190bp reads: max_diff = 8

[bwa_aln] 225bp reads: max_diff = 9

[bwa_aln_core] calculate SA coordinate... 0.05 sec

[bwa_aln_core] write to the disk... 0.00 sec

[bwa_aln_core] 10000 sequences have been processed.

[main] Version: 0.7.12-r1039

[main] CMD: bwa aln -t 1 localref.fa /etc/galaxy/galaxy/database/files/000/dataset_43.dat

[main] Real time: 0.120 sec; CPU: 0.060 sec

[bwa_aln_core] convert to sequence coordinate... 0.03 sec

[bwa_aln_core] refine gapped alignments... 0.00 sec

[bwa_aln_core] print alignments... sort: invalid option -- 'O'

open: No such file or directory

[bam_sort_core] fail to open file bam

[vfprintf(stdout)] Broken pipe

I´m not sure with what the message "sort: invalid option -- 'O'" is related to. When running the same analysis on the public server, it succesfully produces a BAM file.

Can anyone help me figure out what the problem is?

alignment galaxy • 23 views
ADD COMMENTlink modified 7 days ago by Jennifer Hillman Jackson22k • written 7 days ago by yesabelst0
gravatar for Jennifer Hillman Jackson
7 days ago by
United States
Jennifer Hillman Jackson22k wrote:


It appears that the mapping failed. This may have been due to resources (memory?).

Make sure that your version of Galaxy is current (17_05) and that you are using the most current version of Map with BWA ( Samtools and Picard should also be installed (current versions).

To control memory usage, avoid using a custom reference genome in your local. Instead, index the target genomes locally using Data Managers. Index in this order: Samtools, Picard, then BWA. Index for other tools as wanted after that.

For resources, know that whatever resources are needed to execute a mapping job line command will be the same resources needed to execute the job within Galaxy. A minimum of 16 GB is recommended to run a Galaxy server, however many jobs (in particular mapping jobs) will require more resource. Some jobs run at Galaxy Main ( are allocated as much as 64 GB. Those running cloud Galaxies with larger jobs will for certain tools double that amount. How much resource does a job take? It depends on the tool (the manual will state resource recommendations) and the size/content of the inputs (including custom genomes, when used).

These changes should resolve the problem, but let us know.

Thanks! Jen, Galaxy team

ADD COMMENTlink written 7 days ago by Jennifer Hillman Jackson22k
Please log in to add an answer.


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