pegasus.write_output

pegasus.write_output(data, output_file, file_type=None, is_sparse=True, precision=2)[source]

Write data back to disk. This function is used to write data back to disk. :type data: Union[MultimodalData, UnimodalData] :param data: data to write back. :type data: MutimodalData :type output_file: str :param output_file: output file name. Note that for mtx files, output_file specifies a directory. For scp format, file_type must be specified. :type output_file: str :type file_type: Optional[str] :param file_type: File type can be ‘zarr’ (as folder), ‘zarr.zip’ (as a ZIP file), ‘h5ad’, ‘loom’, ‘mtx’ or ‘scp’. If file_type is None, it will be inferred based on output_file. :type file_type: str, optional (default: None) :type is_sparse: bool :param is_sparse: Only used for writing out SCP-compatible files, if write expression as a sparse matrix. :type is_sparse: bool, optional (default: True) :type precision: int :param precision: Precision after decimal point for values in mtx and scp expression matrix. :type precision: int, optional (default: 2)

Return type

None

Examples

>>> io.write_output(data, 'test.zarr')