biopython / biopython/biopython
Bio.Sequencing.Applications.BwaMemCommandline options are broken
- Dominant language
- Python
- Stars
- 5.2k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 11
Description
### Setup
Using:
```
3.8.1 (default, Jan 8 2020, 16:15:59)
[Clang 4.0.1 (tags/RELEASE_401/final)]
CPython
macOS-10.15.3-x86_64-i386-64bit
1.76
```
If you run:
```
from Bio.Sequencing.Applications import BwaMemCommandline
threads = 4
ref = 'some.fasta'
r1 = 'reads.fastq'
samfile = 'some.sam'
align_cmd = BwaMemCommandline(t= threads, reference=ref,
read_file1=r1, )
print(align_cmd)
align_cmd(stdout=samfile)
```
### Expected behaviour
it should run bwa mem using 4 threads,
by executinng:
```bwa mem -t 4 some.fasta reads.fastq ```
and catch the standard out to the given filepath.
### Actual behaviour
```Bio.Application.ApplicationError: Non-zero return code 1 from 'bwa mem some.fasta reads.fastq -t 4 -p', message 'Usage: bwa mem [options] [in2.fq]'```
I think it has to do with the placement of the options.
the print statement gives us:
```bwa mem some.fasta reads.fastq -t 4```
But bwa mem requires the option flags before the reference and read files.
Other flag options (e.g. -p or -V) also break the ability to run bwa mem in this way.
### Steps to reproduce
run code given above
Contributor guide
Assessment
This issue has not been assessed yet.