Parsers

Classes to read data from ISA-Tab investigation, study and assay files and create the corresponding AltamISA models. Note that parsers can issue warnings, see Validators on how to capture them properly.

altamisa.isatab.InvestigationReader

class altamisa.isatab.InvestigationReader(input_file: TextIO, filename=None)[source]

Main class to read an investigation file into an InvestigationInfo object.

Parameters:input_file (TextIO) – ISA-Tab investigation file
classmethod from_stream(input_file: TextIO, filename=None)[source]

Construct from file-like object

read() → altamisa.isatab.models.InvestigationInfo[source]

Read the investigation file

Return type:models.InvestigationInfo
Returns:Investigation model including all information from the investigation file

altamisa.isatab.AssayReader

class altamisa.isatab.AssayReader(study_id: str, assay_id: str, input_file: TextIO, filename=None)[source]

Read an ISA-TAB assay file (a_*.txt) into a Assay object.

This is the main facade class for reading assay objects. Prefer it over using the more low-level code.

Parameters:
  • study_id (str) – Unique identifier for the study, needed to disambiguate nodes between files.
  • assay_id (str) – Unique identifier for the assay, needed to disambiguate nodes between files.
  • input_file (TextIO) – ISA-Tab assay file
classmethod from_stream(study_id: str, assay_id: str, input_file: TextIO, filename=None)[source]

Construct from file-like object

read()[source]

Parse the assay file

Return type:models.Assay
Returns:Assay model including graph of material and process nodes

altamisa.isatab.AssayRowReader

class altamisa.isatab.AssayRowReader(study_id: str, assay_id: str, input_file: TextIO, filename: str)[source]

Read an ISA-TAB assay file (a_*.txt) into a tabular/object representation.

This is a more low-level part of the interface. Please prefer using :py:AssayReader: over using this class.

Parameters:
  • study_id (str) – Unique identifier for the study, needed to disambiguate nodes between files.
  • assay_id (str) – Unique identifier for the assay, needed to disambiguate nodes between files.
  • input_file (TextIO) – ISA-Tab assay file
classmethod from_stream(study_id: str, assay_id: str, input_file: TextIO, filename: str = None)[source]

Construct from file-like object

read()[source]

Read assays rows

Returns:Nodes per row of the assay file

altamisa.isatab.StudyReader

class altamisa.isatab.StudyReader(study_id: str, input_file: TextIO, filename=None)[source]

Read an ISA-TAB study file (s_*.txt) into a Study object.

This is the main facade class for reading study objects. Prefer it over using the more low-level code.

Parameters:
  • study_id (str) – Unique identifier for the study, needed to disambiguate nodes between files.
  • input_file (TextIO) – ISA-Tab study file
classmethod from_stream(study_id: str, input_file: TextIO, filename=None)[source]

Construct from file-like object

read()[source]

Parse the study file

Return type:models.Study
Returns:Study model including graph of material and process nodes

altamisa.isatab.StudyRowReader

class altamisa.isatab.StudyRowReader(study_id: str, input_file: TextIO, filename: str)[source]

Read an ISA-TAB study file (s_*.txt) into a tabular/object representation.

This is a more low-level part of the interface. Please prefer using :py:StudyReader: over using this class.

Parameters:
  • study_id (str) – Unique identifier for the study, needed to disambiguate nodes between files.
  • input_file (TextIO) – ISA-Tab study file
classmethod from_stream(study_id: str, input_file: TextIO, filename: str = None)[source]

Construct from file-like object

read()[source]

Read the study rows

Returns:Nodes per row of the study file