modos.io#
Attributes#
Functions#
|
Extract metadata from the CRAM file header and |
|
|
|
Get a loader based on the file extension using regex. |
|
Load a model of target_class from a file. |
|
Load model specification from file into a list of dictionaries. Model types must be specified as @type |
|
Load one or more model from file. Model types must be specified as @type |
|
Extract metadata from files associated to a model instance |
Module Contents#
- modos.io.extract_cram_metadata(cram)[source]#
Extract metadata from the CRAM file header and convert specific attributes according to the modo schema.
- Parameters:
cram (pysam.AlignmentFile)
- Return type:
List
- modos.io.dict_to_instance(element)[source]#
- Parameters:
element (Mapping[str, Any])
- Return type:
Any
- modos.io.get_loader(path)[source]#
Get a loader based on the file extension using regex.
- Parameters:
path (pathlib.Path)
- modos.io.parse_instance(path, target_class)[source]#
Load a model of target_class from a file.
- Parameters:
path (pathlib.Path)
- modos.io.parse_attributes(path)[source]#
Load model specification from file into a list of dictionaries. Model types must be specified as @type
- Parameters:
path (pathlib.Path)
- Return type:
List[dict]
- modos.io.parse_multiple_instances(path)[source]#
Load one or more model from file. Model types must be specified as @type
- Parameters:
path (pathlib.Path)
- Return type:
List
- modos.io.extract_metadata(instance, base_path)[source]#
Extract metadata from files associated to a model instance
- Parameters:
base_path (pathlib.Path)
- Return type:
List