bx.seq.twobit module

Access to files containing sequence data in ‘twobit’ format.

class bx.seq.twobit.TwoBitFile(file: BinaryIO, do_mask: bool = True)

Bases: Mapping

load_sequence(name: str) None
read(pattern: str, untuple: bool = True)
read_block_coords() Tuple[list, list]
read_p_string() str

Read a length-prefixed string

class bx.seq.twobit.TwoBitSequence(tbf, header_offset=None)

Bases: object

get(start, end)
masked_block_sizes: List
masked_block_starts: List
n_block_sizes: List
n_block_starts: List