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