You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

117 rivejä
3.6 KiB

  1. import sys
  2. from typing import List, Union, NoReturn, Iterable, Any, Tuple, Optional, TypeVar
  3. if sys.version_info < (3, 8):
  4. from typing_extensions import Protocol
  5. else:
  6. from typing import Protocol
  7. class _HasFileNo(Protocol):
  8. def fileno(self) -> int: ...
  9. def get_verbosity() -> int: ...
  10. def set_verbosity(level: int): ...
  11. THFile = TypeVar("THFile", bound="HFile")
  12. class HFile:
  13. def __init__(self, name: Union[int, str], mode: str = ...) -> None: ...
  14. def __enter__(self: THFile) -> THFile: ...
  15. def __exit__(self, type, value, tb): ...
  16. def __iter__(self) -> Any: ...
  17. def __next__(self) -> str: ...
  18. @property
  19. def closed(self) -> bool: ...
  20. @property
  21. def mode(self) -> str: ...
  22. @property
  23. def name(self) -> Union[int, str]: ...
  24. def close(self) -> None: ...
  25. def fileno(self) -> int: ...
  26. def flush(self) -> None: ...
  27. def isatty(self) -> bool: ...
  28. def readable(self) -> bool: ...
  29. def read(self, size: int = ...) -> bytes: ...
  30. def readall(self) -> bytes: ...
  31. def readinto(self, buf: Any) -> bytes: ...
  32. def readline(self, size: int = ...) -> bytes: ...
  33. def readlines(self) -> List[bytes]: ...
  34. def seek(self, offset: int, whence: int = ...) -> int: ...
  35. def seekable(self) -> bool: ...
  36. def tell(self) -> int: ...
  37. def truncate(self, *args) -> NoReturn: ...
  38. def writable(self) -> bool: ...
  39. def write(self, b: bytes) -> int: ...
  40. def writelines(self, lines: Iterable[bytes]) -> None: ...
  41. THTSFile = TypeVar("THTSFile", bound="HTSFile")
  42. class HTSFile:
  43. def __enter__(self: THTSFile) -> THTSFile: ...
  44. def __exit__(self, type, value, traceback) -> Any: ...
  45. @property
  46. def filename(self) -> Any: ...
  47. @property
  48. def mode(self) -> str: ...
  49. @property
  50. def threads(self) -> int: ...
  51. @property
  52. def index_filename(self) -> Optional[str]: ...
  53. @property
  54. def is_stream(self) -> bool: ...
  55. @property
  56. def is_remote(self) -> bool: ...
  57. @property
  58. def duplicate_filehandle(self) -> bool: ...
  59. def close(self) -> None: ...
  60. def flush(self) -> None: ...
  61. def check_truncation(self, ignore_truncation: bool = ...) -> None: ...
  62. @property
  63. def category(self) -> str: ...
  64. @property
  65. def format(self) -> str: ...
  66. @property
  67. def version(self) -> Tuple[int, int]: ...
  68. @property
  69. def compression(self) -> str: ...
  70. @property
  71. def description(self) -> str: ...
  72. @property
  73. def is_open(self) -> bool: ...
  74. @property
  75. def is_closed(self) -> bool: ...
  76. @property
  77. def closed(self) -> bool: ...
  78. @property
  79. def is_write(self) -> bool: ...
  80. @property
  81. def is_read(self) -> bool: ...
  82. @property
  83. def is_sam(self) -> bool: ...
  84. @property
  85. def is_bam(self) -> bool: ...
  86. @property
  87. def is_cram(self) -> bool: ...
  88. @property
  89. def is_vcf(self) -> bool: ...
  90. @property
  91. def is_bcf(self) -> bool: ...
  92. def reset(self) -> None: ...
  93. def seek(self, offset: int, whence: int = ...) -> int: ...
  94. def tell(self) -> int: ...
  95. def add_hts_options(self, format_options: Optional[List[str]] = ...) -> None: ...
  96. def parse_region(
  97. self,
  98. contig: Optional[str] = ...,
  99. start: Optional[int] = ...,
  100. stop: Optional[int] = ...,
  101. region: Optional[str] = ...,
  102. tid: Optional[int] = ...,
  103. reference: Optional[str] = ...,
  104. end: Optional[int] = ...,
  105. ) -> Tuple[int, int, int, int]: ...
  106. def is_valid_tid(self, tid: int) -> bool: ...
  107. def is_valid_reference_name(self, contig: str) -> bool: ...
  108. def get_tid(self, contig: str) -> int: ...
  109. def get_reference_name(self, tid: int) -> Optional[str]: ...