[Biopython-dev] BWA command line change?

Peter Cock p.j.a.cock at googlemail.com
Sun Apr 27 12:43:23 UTC 2014


Hi Saket,

Could you have a look at this BWA problem Andreas found
while testing the Debian package?

I have just reordered the error message in Bio.Application
to put the return code earlier in case the exception text is
truncated (as here):
https://github.com/biopython/biopython/commit/9860973c05aeb102f82e217ff3a88e241a3ba620

I've also switched to relative paths which will also shorten
the error message:
https://github.com/biopython/biopython/commit/a03d23760783c157ff7c30f483ace55beda31c09

I just tested with BWA 0.6.1 (in the Debian repository on
my old desktop), and test_BWA_tool.py was fine.

Thanks,

Peter


---------- Forwarded message ----------
From: Andreas Tille <andreas at an3as.eu>
Date: Tue, Mar 4, 2014 at 8:18 PM
Subject: Re: Adding python3-biopython
To: Peter Cock <p.j.a.cock at googlemail.com>
Cc: Debian Med Project List <debian-med at lists.debian.org>, Philipp
Benner <philipp at debian.org>


Hi Peter,

I can confirm that I'm working on the python3 packages.  I'm not
finished yet but I included more verbose testing into the packaging and
when I did so I realised some incompatibilities with bwa:


ERROR: test_sampe (test_BWA_tool.BwaTestCase)
Test for generating samfile by paired end sequencing
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_BWA_tool.py", line 113, in test_sampe
    self.do_aln(self.infile1, self.saifile1)
  File "test_BWA_tool.py", line 90, in do_aln
    stdout, stderr = cmdline(stdout=out_file)
  File "/tmp/buildd/python-biopython-1.63/Bio/Application/__init__.py",
line 511, in __call__
    stdout_str, stderr_str)
ApplicationError: Command 'bwa aln
/tmp/buildd/python-biopython-1.63/Tests/BWA/human_g1k_v37_truncated.fasta
/tmp/buildd/python-biopython-1.63/Tests/BWA/HNSCC1_1_truncated.fastq'
returne

======================================================================
ERROR: test_samse (test_BWA_tool.BwaTestCase)
Test for single end sequencing
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_BWA_tool.py", line 102, in test_samse
    stdout, stderr = cmdline(stdout=self.samfile1)
  File "/tmp/buildd/python-biopython-1.63/Bio/Application/__init__.py",
line 511, in __call__
    stdout_str, stderr_str)
ApplicationError: Command 'bwa samse
/tmp/buildd/python-biopython-1.63/Tests/BWA/human_g1k_v37_truncated.fasta
/tmp/buildd/python-biopython-1.63/Tests/BWA/1.sai
/tmp/buildd/python-biopyt



The used bwa says:

$ bwa

Program: bwa (alignment via Burrows-Wheeler transformation)
Version: 0.7.6a-r433
Contact: Heng Li <lh3 at sanger.ac.uk>

Usage:   bwa <command> [options]

Command: index         index sequences in the FASTA format
         mem           BWA-MEM algorithm
         fastmap       identify super-maximal exact matches

         fa2pac        convert FASTA to PAC format
         pac2bwt       generate BWT from PAC
         pac2bwtgen    alternative algorithm for generating BWT
         bwtupdate     update .bwt to the new format
         bwt2sa        generate SA from BWT and Occ

Note: To use BWA, you need to first index the genome with `bwa index'.
      There are three alignment algorithms in BWA: `mem', `bwasw', and
      `aln/samse/sampe'. If you are not sure which to use, try `bwa mem'
      first. Please `man ./bwa.1' for the manual.


I think you should adjust your test somehow to make sure that
also the latest bwa version will succeed.

Kind regards

        Andreas.


On Mon, Mar 03, 2014 at 02:08:52PM +0000, Peter Cock wrote:
> Hello Philipp & DebianMed,
>
> The last few releases of Biopython supported Python 3
> via 2to3, but as of Biopython 1.63 (released December
> 2013) we have a single codebase which works on both
> Python 2.6/2.7 and Python 3.3+.
...

--
http://fam-tille.de



More information about the Biopython-dev mailing list