agglovar.align.op ================= .. py:module:: agglovar.align.op .. autoapi-nested-parse:: Constants and functions for working with alignment operations. Definitions in this subpackage are borrowed from `PAV 3+ `__. Attributes ---------- .. autoapisummary:: agglovar.align.op.ADV_QRY_ARR agglovar.align.op.ADV_REF_ARR agglovar.align.op.ALIGN_SET agglovar.align.op.CIGAR_OP_SET agglovar.align.op.CLIP_SET agglovar.align.op.CONSUMES_QRY_ARR agglovar.align.op.CONSUMES_REF_ARR agglovar.align.op.D agglovar.align.op.EQ agglovar.align.op.EQX_SET agglovar.align.op.H agglovar.align.op.I agglovar.align.op.INT_STR_SET agglovar.align.op.M agglovar.align.op.N agglovar.align.op.OP_CHAR agglovar.align.op.OP_CHAR_FUNC agglovar.align.op.OP_CODE agglovar.align.op.P agglovar.align.op.S agglovar.align.op.VAR_ARR agglovar.align.op.X Functions --------- .. autoapisummary:: agglovar.align.op.cigar_to_arr Module Contents --------------- .. py:function:: cigar_to_arr(cigar_str: str) -> numpy.ndarray Get a numpy array with two dimensions (dtype int). The first column is the operation codes, the second column is the operation lengths. :param cigar_str: CIGAR string. :returns: Array of operation codes and lengths (dtype int). :raises ValueError: If the CIGAR string is not properly formatted. .. py:data:: ADV_QRY_ARR :type: numpy.typing.NDArray[numpy.integer] Array of operation codes that advance the query position. .. py:data:: ADV_REF_ARR :type: numpy.typing.NDArray[numpy.integer] Array of operation codes that advance the reference position. .. py:data:: ALIGN_SET :type: frozenset[int] Set of alignment operation codes (match, sequence match, mismatch). .. py:data:: CIGAR_OP_SET :type: frozenset[str] Set of valid operation characters. .. py:data:: CLIP_SET :type: frozenset[int] Set of clipping operation codes (soft and hard clipping). .. py:data:: CONSUMES_QRY_ARR :type: numpy.typing.NDArray[numpy.integer] Array of operation codes that consume query bases. .. py:data:: CONSUMES_REF_ARR :type: numpy.typing.NDArray[numpy.integer] Array of operation codes that consume reference bases. .. py:data:: D :type: int :value: 2 Deletion operation code. .. py:data:: EQ :type: int :value: 7 Sequence match operation code. .. py:data:: EQX_SET :type: frozenset[int] Set of exact match/mismatch operation codes. .. py:data:: H :type: int :value: 5 Hard clipping operation code. .. py:data:: I :type: int :value: 1 Insertion operation code. .. py:data:: INT_STR_SET :type: frozenset[str] Set of valid integer character strings representing operation codes. .. py:data:: M :type: int :value: 0 Match or mismatch operation code. .. py:data:: N :type: int :value: 3 Skipped region operation code. .. py:data:: OP_CHAR :type: Mapping[int, str] Mapping from operation codes to their character representations. .. py:data:: OP_CHAR_FUNC Vectorized function to convert operation codes to characters. .. py:data:: OP_CODE :type: Mapping[str, int] Mapping from CIGAR characters to operation codes. .. py:data:: P :type: int :value: 6 Padding operation code. .. py:data:: S :type: int :value: 4 Soft clipping operation code. .. py:data:: VAR_ARR :type: numpy.typing.NDArray[numpy.integer] Array of operation codes that introduce variation. .. py:data:: X :type: int :value: 8 Sequence mismatch operation code.