From 0aba0e80e6a9b6c6fe90280f6c84b53c25999276 Mon Sep 17 00:00:00 2001
From: Martino Bertoni <martino.bertoni@unibas.ch>
Date: Fri, 8 Nov 2013 16:57:46 +0100
Subject: [PATCH] and here come the SemiGlobalAlign documentation

---
 modules/seq/alg/doc/seqalg.rst | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/modules/seq/alg/doc/seqalg.rst b/modules/seq/alg/doc/seqalg.rst
index b846283f3..bd951af7a 100644
--- a/modules/seq/alg/doc/seqalg.rst
+++ b/modules/seq/alg/doc/seqalg.rst
@@ -133,3 +133,32 @@
 
   :returns: list of column entropies
 
+.. function:: SemiGlobalAlign(seq1, seq2, subst_weight, gap_open=-5, gap_ext=-2)
+
+  Performs a semi-global alignment of *seq1* and *seq2* and returns the best-
+  scoring alignment. The algorithm is Needleman/Wunsch same as GlobalAlign, but
+  without any gap penalty for starting or ending gaps. This is prefereble 
+  whenever one of the sequences is significantly shorted than the other.
+  This make it also suitable for fragment assembly.
+  
+  **Example:**
+  
+  .. code-block:: python
+  
+    seq_a=seq.CreateSequence('A', 'abcdefghijklmnok')
+    seq_b=seq.CreateSequence('B', 'cdehijk')
+    alns=seq.alg.GlobalAlign(seq_a, seq_b, seq.alg.BLOSUM62)
+    print alns[0].ToString(80)
+    # >>> A abcdefghijklmnok
+    # >>> B --cde--hijk-----
+
+  :param seq1: A valid sequence
+  :type seq1: :class:`~ost.seq.ConstSequenceHandle`
+  :param seq2: A valid sequence  
+  :type seq2: :class:`~ost.seq.ConstSequenceHandle`
+  
+  :param subst_weigth: The substitution weights matrix
+  :type subst_weight: :class:`SubstWeightMatrix`
+  :param gap_open: The gap opening penalty. Must be a negative number
+  :param gap_ext: The gap extension penalty. Must be a negative number
+  :returns: best-scoring alignment of *seq1* and *seq2*.
\ No newline at end of file
-- 
GitLab