r670: added PE support to mappy

and minor code cleanup
This commit is contained in:
Heng Li
2018-01-31 11:33:08 -05:00
parent 12a5a5fa3c
commit 46d6349af4
9 changed files with 71 additions and 23 deletions

View File

@@ -81,10 +81,13 @@ This constructor accepts the following arguments:
.. code:: python
mappy.Aligner.map(seq)
mappy.Aligner.map(seq, seq2=None)
This method aligns :code:`seq` against the index. It is a generator, *yielding*
a series of :code:`mappy.Alignment` objects.
a series of :code:`mappy.Alignment` objects. If :code:`seq2` is present, mappy
performs paired-end alignment, assuming the two ends are in the FR orientation.
Alignments of the two ends can be distinguished by the :code:`read_num` field
(see below).
Class mappy.Alignment
~~~~~~~~~~~~~~~~~~~~~
@@ -118,6 +121,9 @@ properties:
* **is_primary**: if the alignment is primary (typically the best and the first
to generate)
* **read_num**: read number that the alignment corresponds to; 1 for the first
read and 2 for the second read
* **cigar_str**: CIGAR string
* **cigar**: CIGAR returned as an array of shape :code:`(n_cigar,2)`. The two