Bowtie for Debian
=================

1. Architecture dependency of bowtie
------------------------------------

Upstream has included an old copy of a gcc owned header file (cpuid.h).
This should be generally considered a bad idea and it breaks compilation
on other architectures than amd64 (most probably since a copy of the
architecture specific header file was taken).  While we try to contact
upstream about this the current package is using the original header
file from gcc.  If you might observe any issues that might be caused
by this change please report this using the command

    reportbug bowtie


2. Test suite for bowtie created and potential issue with sorting
-----------------------------------------------------------------

Regarding the difference in sorting order in example 5 of the manual
there was some discussion on the Debian Med mailing list
(https://lists.debian.org/debian-med/2014/09/msg00031.html) which is
summarised here:


Date: Wed, 3 Sep 2014 12:27:35 +0200
From: Andreas Tille <andreas@an3as.eu>

  $ bowtie -a --best -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT
 
  is supposed to have the output
 
-       gi|110640213|ref|NC_008253.1|   2852852 8:T>A
+       gi|110640213|ref|NC_008253.1|   1093035 2:T>G,15:A>T
-       gi|110640213|ref|NC_008253.1|   905664  6:A>G,7:G>T
-       gi|110640213|ref|NC_008253.1|   148810  10:A>G,13:C>G
-       gi|110640213|ref|NC_008253.1|   4930433 4:G>T,6:C>G
 
  according to the manual but produces with the current arch-amd64
  specific build in unstable as well as with the new build
 
-       gi|110640213|ref|NC_008253.1|   2852852 8:T>A
-       gi|110640213|ref|NC_008253.1|   148810  10:A>G,13:C>G
+       gi|110640213|ref|NC_008253.1|   1093035 2:T>G,15:A>T
-       gi|110640213|ref|NC_008253.1|   905664  6:A>G,7:G>T
-       gi|110640213|ref|NC_008253.1|   4930433 4:G>T,6:C>G
 

Date: Thu, 04 Sep 2014 17:12:50 -0500
From: Scott Christley <schristley@mac.com>:

  Example 5: -a --best

  "Specifying -a results in the same alignments being printed as if
   just -a had been specified, but they are guaranteed to be reported
   in best-to-worst order"

  This would imply that the test failed, as the order of the output
  matters.  BUT, and this is where it is unclear, what would be order
  for "ties"?  The "best-to-worst" order is based upon the number of
  mismatches and line 2-5 all have 2 mismatches (line 1 has 1 mismatch,
  the 8:T>A, and thus is the best), i.e. they are all a tie.

  From looking at the bowtie output you provided, the content is the same.
  The sequence id names, position and mismatches are identical in both
  outputs, the only difference is the order.  That may not even be
  bowtie's fault, it may be using some system or other library which
  does sorting slightly differently, and most specifically handling ties
  differently.

  My opinion, especially if you tried the other examples in the manual,
  and those are okay, then you are okay with this fix, because it is seems
  to be an arch-specific difference in sorting, whereby sorting is only
  triggered with the --best option.


As a consequence of this discussion it was decided to take the current
result of the example 5 as the "expected result" of the test suite.  Any
input about this is welcome to enhance the reliability of bowtie inside
Debian.



3. Further hint from manual which might increase performance
------------------------------------------------------------

    If your computer has multiple processors/cores, use `-p`

    The `-p` option causes Bowtie to launch a specified number of
    parallel search threads.  Each thread runs on a different
    processor/core and all threads find alignments in parallel,
    increasing alignment throughput by approximately a multiple of the
    number of threads (though in practice, speedup is somewhat worse
    than linear).

There might be a chance to write a shell wrapper detecting whether your
computer has more processors and automatically inject the -p option in
this case.  If you like this please file a bug report with severity
wishlist to let us know.

 -- Andreas Tille <tille@debian.org>  Wed, 03 Sep 2014 09:50:22 +0200
