missionbio.mosaic.io.load
missionbio.mosaic.io.load#
- missionbio.mosaic.io.load(filepath: Any, apply_filter: bool = True, whitelist: Optional[Sequence] = None, raw: bool = False, single: bool = False) Union[missionbio.mosaic.sample.Sample, missionbio.mosaic.samplegroup.SampleGroup] #
Loading the .h5 file with one or more assays.
This is the preferred way of loading .h5 files.
It directly returns a Sample object, which contains all the assays. Those assays that were not present are stored as None.
- Parameters
- filepath:
The path to the .h5 multi-omics file.
- apply_filter:
Whether to load only the filtered dna variants.
- whitelist:
The specific dna variants to load.
- raw:
Whether the raw counts are to be loaded.
- single:
Whether to load as a single sample despite being a multi sample h5 file (Not a recommended approach). Only use this for debugging issues.
- Returns
- missionbio.mosaic.sample.Sample / missionbio.mosaic.samplegroup.SampleGroup
- Raises
- Exception
When the h5 file format is not supported.