Repository URL to install this package:
|
Version:
1.87 ▾
|
ELF 4 , 4 ( 4 4 4 @( @( @ @( @h @h @ À @ ) © © d d @ L( Lh Lh È È Råtd@( @h @h @ À Påtd t t Qåtd T T T ¼ ¼ Android r27d 13750724 GNU r¨Y}nØBi6ùÔ'¢°(QÌ A N _ r } ª · Å Ö ã ý - : K \ o / s
c
@ 5çÍ8 __cxa_finalize __cxa_atexit __register_atfork PyInit__aligncore PyType_Ready PyModule_Create2 PyModule_AddObject PyMem_Free PyArg_ParseTupleAndKeywords PyArg_ParseTuple PyMem_Malloc PyMem_Realloc PyExc_ValueError PyErr_Format PyBytes_FromStringAndSize memcpy Py_BuildValue _Py_Dealloc _Py_NoneStruct PyMem_Calloc PyBuffer_Release PyType_IsSubtype PyObject_GetBuffer PyExc_RuntimeError PyErr_SetString libc.so LIBC libm.so libpython3.12.so libdl.so @h Dh Hh © © ة ô© ü© ª dª hª ª ª ª ª ª ª ´ª ¸ª * ܪ i i i ,i 0i 4i 8i <i @i Di Hi Li Pi
Ti Xi
\i `i di hi li pi ti xi |i argument does not implement the buffer protocol buffer has unexpected item byte size (%ld, expected %ld) buffer has incorrect rank %d (expected 2) feed eol fast C implementation of a parser for printed alignments; for internal use. _aligncore.PrintedAlignmentParser PrintedAlignmentParser S|n:feed expected an object of the PrintedAlignmentParser class buffer has incorrect number of rows %zd (expected %zd) O&:fill nn nN buffer has incorrect number of columns %zd (expected %zd) line has length %zd (expected %zd) |c _aligncore shape fill expected an array with %zd rows (found %zd rows) PrintedAlignmentParser(eol=b'
')
--
Create a fast parser for printed alignments.
The argument eol must be a bytes object of length 1, and specifies
the end-of-line character, defaulting to '\n'
As an example, to parse this printed alignment:
ACCGGGTTTT
AC-GAG--TT
AC--AG--TT
use
>>> parser = PrintedAlignmentParser()
>>> nbytes1, seq1 = parser.feed(b'ACCGGGTTTT')
>>> nbytes2, seq2 = parser.feed(b'AC-GAG--TT')
>>> nbytes3, seq3 = parser.feed(b'AC--AG--TT')
>>> nbytes1
10
>>> nbytes2
10
>>> nbytes3
10
>>> seq1
b'ACCGGGTTTT'
>>> seq2
b'ACGAGTT'
>>> seq3
b'ACAGTT'
>>> parser.shape
(3, 7)
>>> import numpy as np
>>> coordinates = np.zeros((3, 7), np.intp)
>>> parser.fill(coordinates)
>>> coordinates
array([[ 0, 2, 3, 4, 6, 8, 10],
[ 0, 2, 2, 3, 5, 5, 7],
[ 0, 2, 2, 2, 4, 4, 6]])
>>> from Bio.Align import Alignment
>>> from Bio.Seq import Seq
>>> sequences = (Seq(seq1), Seq(seq2), Seq(seq3))
>>> alignment = Alignment(sequences, coordinates)
>>> print(alignment)
0 ACCGGGTTTT 10
0 AC-GAG--TT 7
0 AC--AG--TT 6
feed(self, line, offset=0)
--
Feed one line of the printed alignment into the parser.
The line must be a bytes object. The parser will read from line
until it finds the end-of-line character (defined by self->eol)
or a null character.
The parser skips the first offset bytes.
Any dashes in line are interpreted as gaps.
This method finds the gap locations and stores them in self.
The return value is the tuple (nbytes, sequence), in which
- nbytes is the number of bytes read from line (not counting
the end-of-line character); this is equal to the number of
columns in the printed alignment.
- sequence is a bytes object with the contents of line after
removal of the dashes; sequence can be used to create the
ungapped sequence object stored in the sequences attribute
of the Alignment object. fill(self, arr)
--
Fill in the coordinates array based on the alignment lines fed
to the parser so far.
The argument arr must be a 2D numpy array of data type intp,
with the number of rows equal to the number of lines fed into
the parser so far, and the number of columns equal to the number
of columns needed to store the coordinates array.
The appropriate number of rows and columns can be obtained in
advance using the self.shape attribute.
This method stores the alignment coordinates in arr, and returns
None.
Return the required shape of the coordinates array.
Typically, this attribute is used before calling the fill method.
;p
Ð ´ à È ð Ü @ 8 p l ð À ` à X Ð
T 0 , zR | $ # ACEAWA D X $ l ACEASA 0 / ACEAIMDA HA 0 È - ACEAMDDD HA P ü ü s AAAEAIG HIKA H\GAA JCAA <