phenopacket_mapper.pipeline.validate module

class phenopacket_mapper.pipeline.validate.Validator(*args, **kwargs)[source]

Bases: object

Internal class, implemented using the singleton pattern, that uses phenopacket-tools to validate phenopackets. This is complicated a bit by the fact that phenopacket-tools is implemented in java. The singleton pattern ensures that only one instance of the class is created for efficiency purposes.

validate(phenopackets: List[Phenopacket]) bool[source]

Validate phenopackets using phenopacket-tools.

Parameters:

phenopackets – List of phenopackets to validate

Returns:

True if the phenopackets are valid, False otherwise

phenopacket_mapper.pipeline.validate.validate(phenopackets: List[Phenopacket]) bool[source]

Validate phenopackets using phenopacket-tools. :param phenopackets: List of phenopackets to validate :return: True if the phenopackets are valid, False otherwise

phenopacket_mapper.pipeline.validate.read_validate(path: Path) bool[source]

Read phenopackets from a file and validate them. :param path: Path to the file containing phenopackets :return: True if the phenopackets are valid, False otherwise