jpayne@69: import sys jpayne@69: from typing import Optional, List, Any jpayne@69: jpayne@69: if sys.version_info < (3, 8): jpayne@69: from typing_extensions import Literal jpayne@69: else: jpayne@69: from typing import Literal jpayne@69: jpayne@69: from pysam.libchtslib import HTSFile jpayne@69: jpayne@69: _ParseResult = Any jpayne@69: jpayne@69: class Parser: jpayne@69: def __init__(self, encoding: str = ...) -> None: ... jpayne@69: def get_encoding(self) -> str: ... jpayne@69: def set_encoding(self, encoding: str) -> None: ... jpayne@69: def __call__(self, buffer: str, length: int) -> _ParseResult: ... jpayne@69: jpayne@69: class asTuple(Parser): ... jpayne@69: class asGFF3(Parser): ... jpayne@69: class asGTF(Parser): ... jpayne@69: class asBed(Parser): ... jpayne@69: class asVCF(Parser): ... jpayne@69: jpayne@69: class TabixFile(HTSFile): jpayne@69: filename_index: bytes = ... jpayne@69: @property jpayne@69: def header(self) -> List[str]: ... jpayne@69: @property jpayne@69: def contigs(self) -> List[str]: ... jpayne@69: def __init__( jpayne@69: self, jpayne@69: filename: str, jpayne@69: mode: str = ..., jpayne@69: parser: Parser = ..., jpayne@69: index: Optional[str] = ..., jpayne@69: encoding: str = ..., jpayne@69: threads: int = ..., jpayne@69: *args, jpayne@69: **kwargs jpayne@69: ) -> None: ... jpayne@69: def fetch( jpayne@69: self, jpayne@69: reference: Optional[str] = ..., jpayne@69: start: Optional[int] = ..., jpayne@69: end: Optional[int] = ..., jpayne@69: region: Optional[str] = ..., jpayne@69: parser: Optional[Parser] = ..., jpayne@69: multiple_iterators: bool = ..., jpayne@69: ) -> Any: ... jpayne@69: def close(self) -> None: ... jpayne@69: jpayne@69: class TabixIterator: jpayne@69: def __init__(self, encoding: str = ...) -> None: ... jpayne@69: def __iter__(self) -> TabixIterator: ... jpayne@69: def __next__(self) -> str: ... jpayne@69: jpayne@69: class EmptyIterator: jpayne@69: def __iter__(self) -> Any: ... jpayne@69: def __next__(self) -> Any: ... jpayne@69: jpayne@69: class TabixIteratorParsed(TabixIterator): jpayne@69: def __init__(self, parser: Parser) -> None: ... jpayne@69: def __next__(self) -> Any: ... jpayne@69: jpayne@69: class GZIterator: jpayne@69: def __init__( jpayne@69: self, filename: str, bufer_size: int = ..., encoding: str = ... jpayne@69: ) -> None: ... jpayne@69: def __iter__(self) -> GZIterator: ... jpayne@69: def __next__(self) -> str: ... jpayne@69: jpayne@69: class GZIteratorHead(GZIterator): ... jpayne@69: jpayne@69: class GZIteratorParsed(GZIterator): jpayne@69: def __init__(self, parser: Parser) -> None: ... jpayne@69: def __next__(self) -> _ParseResult: ... jpayne@69: jpayne@69: def tabix_compress(filename_in: str, filename_out: str, force: bool = ...) -> None: ... jpayne@69: def tabix_index( jpayne@69: filename: str, jpayne@69: force: bool = ..., jpayne@69: seq_col: Optional[int] = ..., jpayne@69: start_col: Optional[int] = ..., jpayne@69: end_col: Optional[int] = ..., jpayne@69: preset: Optional[Literal["gff", "bed", "sam", "vcf", "psltbl", "pileup"]] = ..., jpayne@69: meta_char: str = ..., jpayne@69: line_skip: int = ..., jpayne@69: zerobased: bool = ..., jpayne@69: min_shift: int = ..., jpayne@69: index: Optional[str] = ..., jpayne@69: keep_original: bool = ..., jpayne@69: csi: bool = ..., jpayne@69: ) -> str: ... jpayne@69: jpayne@69: class tabix_file_iterator: jpayne@69: def __init__(self, infile: str, parser: Parser, buffer_size: int = ...) -> None: ... jpayne@69: def __iter__(self) -> tabix_file_iterator: ... jpayne@69: def __next__(self) -> _ParseResult: ... jpayne@69: jpayne@69: class tabix_generic_iterator: jpayne@69: def __init__(self, infile: str, parser: Parser) -> None: ... jpayne@69: def __iter__(self) -> tabix_generic_iterator: ... jpayne@69: def __next__(self) -> _ParseResult: ... jpayne@69: jpayne@69: def tabix_iterator(infile: str, parser: Optional[Parser]) -> _ParseResult: ... jpayne@69: jpayne@69: # backwards compatibility jpayne@69: class Tabixfile(TabixFile): ...