npread

pylluminator.read_idat.npread(file_like, dtype: str, n: int) ndarray
Parses a binary file multiple times, allowing for control if the file ends prematurely. This replaces

read_results() and runs faster, and it provides support for reading gzipped idat files without decompressing.

Parameters:
  • file_like (file-like) – The binary file to read the select number of bytes.

  • dtype (str) – used within idat files, 2-bit, or 4-bit numbers stored in binary at specific addresses

  • n (int) – number of snps read

Raises:

EOFError: If the end of the file is reached before the number of elements have been processed.

Returns:

A list of the parsed values.

Return type:

numpy.ndarray