pegasusio.infer_file_type

pegasusio.infer_file_type(input_file)[source]

Infer file format from input_file name This function infer file type by inspecting the file name. :type input_file: Union[str, List[str]] :param input_file: Input file name. :type input_file: str or List[str]

Return type:

Tuple[str, str, str]

Returns:

  • str – File type, choosing from ‘zarr’, ‘h5ad’, ‘loom’, ‘10x’, ‘mtx’, ‘csv’, ‘tsv’, ‘fcs’ or ‘nanostring’.

  • str – The path covering all input files. Most time this is the same as input_file. But for HCA mtx and csv, this should be parent directory.

  • str – Type of the path, either ‘file’ or ‘directory’.

  • Note (The last two `str`s are mainly used for transfer to cloud)