parent
8b05880f73
commit
aaf3233818
|
|
@ -114,6 +114,12 @@ This method retrieves a (sub)sequence from the index and returns it as a Python
|
||||||
string. :code:`None` is returned if :code:`name` is not present in the index or
|
string. :code:`None` is returned if :code:`name` is not present in the index or
|
||||||
the start/end coordinates are invalid.
|
the start/end coordinates are invalid.
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
|
mappy.Aligner.seq_names
|
||||||
|
|
||||||
|
This property gives the array of sequence names in the index.
|
||||||
|
|
||||||
Class mappy.Alignment
|
Class mappy.Alignment
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,16 @@ cdef class Aligner:
|
||||||
@property
|
@property
|
||||||
def n_seq(self): return self._idx.n_seq
|
def n_seq(self): return self._idx.n_seq
|
||||||
|
|
||||||
|
@property
|
||||||
|
def seq_names(self):
|
||||||
|
cdef char *p
|
||||||
|
sn = []
|
||||||
|
for i in range(self._idx.n_seq):
|
||||||
|
p = self._idx.seq[i].name
|
||||||
|
s = p if isinstance(p, str) else p.decode()
|
||||||
|
sn.append(s)
|
||||||
|
return sn
|
||||||
|
|
||||||
def fastx_read(fn, read_comment=False):
|
def fastx_read(fn, read_comment=False):
|
||||||
cdef cmappy.kseq_t *ks
|
cdef cmappy.kseq_t *ks
|
||||||
ks = cmappy.mm_fastx_open(str.encode(fn))
|
ks = cmappy.mm_fastx_open(str.encode(fn))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue