Validators

Classes to validate the integrity of the investigation model as well as study and assay graphs with respect to ISA-Tab format specifications.

AltamISA uses the Python warnings module for reporting validation warnings.

# Parse investigation and validate, capture warnings in `ws`.
with open("investigation.tsv", "rt") as inputf:
    with warnings.catch_warnings(record=True) as warnings:
        isa_inv = InvestigationReader.from_stream(input_file=inputf).read()
        InvestigationValidator(isa_inv).validate()

# Iterate over all captured warnings and handle them.
for warning in warnings:
    somehow_handle(warning)

Note

You can use the IsaWarning class hierarchy for getting severity information.

altamisa.isatab.InvestigationValidator

class altamisa.isatab.InvestigationValidator(investigation: InvestigationInfo)[source]

Validator for Investigation

Parameters:

investigation (models.InvestigationInfo) – The investigation model to validate

validate()[source]

Validate the investigation

altamisa.isatab.AssayValidator

class altamisa.isatab.AssayValidator(investigation: InvestigationInfo, study_info: StudyInfo, assay_info: AssayInfo, assay: Assay, parent_study: Study = None)[source]

Validator for Assay

Parameters:
validate()[source]

Validate the assay

altamisa.isatab.StudyValidator

class altamisa.isatab.StudyValidator(investigation: InvestigationInfo, study_info: StudyInfo, study: Study)[source]

Validator for Study

Parameters: