test_pairwise2
### Test the function generation code
globalxx
globalxx(sequenceA, sequenceB) -> alignments

alignments is a list of tuples (seqA, seqB, score, begin, end).
seqA and seqB are strings showing the alignment between the
sequences.  score is the score of the alignment.  begin and end
are indexes into seqA and seqB that indicate the where the
alignment occurs.

localcd(sequenceA, sequenceB, match_fn, openA, extendA, openB, extendB) -> alignments

match_fn is a callback function that takes two characters and
returns the score between them.

openA and extendA are the gap penalties for sequenceA, and openB
and extendB for sequeneB.  The penalties should be negative.

alignments is a list of tuples (seqA, seqB, score, begin, end).
seqA and seqB are strings showing the alignment between the
sequences.  score is the score of the alignment.  begin and end
are indexes into seqA and seqB that indicate the where the
alignment occurs.

correctly failed
#### Let's start with a simple global alignment.
globalxx
GAACT
|||||
G-A-T
  Score=3
GAACT
|||||
GA--T
  Score=3
#### Try a local alignment.
localxs
-AxBx
 |||
zA-Bz
  Score=1.9
-AxBx
 ||||
zA-Bz
  Score=1.9
#### Test match score, open penalty.
globalms
AA
||
-A
  Score=1.9
AA
||
A-
  Score=1.9
globalms
GAA
|||
G-A
  Score=2.9
GAA
|||
GA-
  Score=2.9
globalxs
GAACT
|||||
GA--T
  Score=2.9
globalms
GCT-
||||
GATA
  Score=-0.1
#### Test the extend penalty.
globalxs
GACT
||||
G--T
  Score=1.3
globalxs
GACT
||||
-G-T
  Score=0.6
GACT
||||
G-T-
  Score=0.6
#### Test penalize_extend_when_opening
globalxs
GACT
||||
G--T
  Score=-1.2
#### Test penalize_end_gaps
globalxs
GACT
||||
--GT
  Score=1
GACT
||||
G--T
  Score=1
GACT
||||
GT--
  Score=1
#### Test separate gap penalties
localxd
G-AT
||||
GTCT
  Score=1.7
GA-T
||||
GTCT
  Score=1.7
localxd
GAT--
|||
G-TCT
  Score=1.8
#### Test separate gap penalties, with extension.  Test align list
localxd
['G', '-', 'A', 'A', 'T']
|||||
['G', 'T', 'C', 'C', 'T']
  Score=1.9
['G', 'A', '-', 'A', 'T']
|||||
['G', 'T', 'C', 'C', 'T']
  Score=1.9
['G', 'A', 'A', '-', 'T']
|||||
['G', 'T', 'C', 'C', 'T']
  Score=1.9
#### Test match dictionary
localds
ATAT
||||
AT-T
  Score=3
ATAT
|||
ATT-
  Score=3
localds
ATAT
|||
ATT-
  Score=3
localds
ATT-
|||
ATAT
  Score=3
#### This used to cause errors, reported by Daishi
localxs
abcde
  |
--c--
  Score=1
localxs
abcce
   |
---c-
  Score=1
abcce
  |
--c--
  Score=1
globalxs
abcde
|||||
--c--
  Score=0.2
