lh3 / bwa

Burrow-Wheeler Aligner for short-read alignment (see minimap2 for long-read alignment)
GNU General Public License v3.0
1.55k stars 556 forks source link

argument order #195

Closed outpaddling closed 6 years ago

outpaddling commented 6 years ago

Do you support placing file arguments before flags? ddocent generates bwa commands like the following: bwa mem reference.fasta PopB_19.R1.fq.gz PopB_19.R2.fq.gz -L 20,5 -I 200,40,300,100 -t 8 -a -M -T 10 -A 1 -B 4 -O 6 -R '@RG\tID:PopB_19\tSM:PopB_19\tPL:Illumina' GNU getopt() tolerates this and skips forward to the -L, but BSD getopt() returns -1 for the first argument encountered (reference.fasta). I can either patch bwa to work with BSD getopt() or patch ddocent to put the file arguments after the flags. Which would you suggest?

jmarshall commented 6 years ago

Patch dDocent. There is no reason for a big script like that to depend on this non-portable GNU getopt() behaviour.

outpaddling commented 6 years ago

Already did so in the port framework. I'll see if they will accept the patch upstream.