Models¶
Class models for storing and representing ISA data, with particular focus on ISA-Tab compatibility. The modeling follows the structure of the specifications with different classes for each file type (investigation, study, assay), investigation sections, the different study and assay column types etc. In particular, study and assay data (i.e. corresponding materials and processes) are represented by use of directed acyclic graphs.
Note that all models are immutable after construction. Here is a common pattern for getting a copy with modifying select members.
>>> import attr
>>> from altamisa.isatab import Comment
>>> c1 = Comment(name="Name", value="the value")
>>> c1
Comment(name='Name', value='value')
>>> c2 = Comment(**{**attr.asdict(c1), "name": "Another Name"})
>>> c2
Comment(name='Another Name', value='value')
Contents
- Models
- altamisa.isatab.AnnotatedStr
- altamisa.isatab.OntologyTermRef
- altamisa.isatab.Comment
- altamisa.isatab.OntologyRef
- altamisa.isatab.BasicInfo
- altamisa.isatab.PublicationInfo
- altamisa.isatab.ContactInfo
- altamisa.isatab.DesignDescriptorsInfo
- altamisa.isatab.FactorInfo
- altamisa.isatab.AssayInfo
- altamisa.isatab.ProtocolComponentInfo
- altamisa.isatab.ProtocolInfo
- altamisa.isatab.StudyInfo
- altamisa.isatab.InvestigationInfo
- altamisa.isatab.Characteristics
- altamisa.isatab.FactorValue
- altamisa.isatab.ParameterValue
- altamisa.isatab.Material
- altamisa.isatab.Process
- altamisa.isatab.Arc
- altamisa.isatab.Study
- altamisa.isatab.Assay
altamisa.isatab.OntologyTermRef¶
-
class
altamisa.isatab.
OntologyTermRef
(name: str = None, accession: str = None, ontology_name: str = None)[source]¶ Reference to a term into an ontology.
Can be either initialized with
- all three of a name, an accession, and an ontology_name
- only a name
- nothing (empty)
-
name
= None¶ Human-readable name of the term
-
accession
= None¶ The accession of the referenced term
-
ontology_name
= None¶ Name of the ontology (links to
OntologyRef.name
)
altamisa.isatab.OntologyRef¶
-
class
altamisa.isatab.
OntologyRef
(name: str, file: str, version: str, description: str, comments: Tuple[altamisa.isatab.models.Comment], headers: List[str])[source]¶ Description of an ontology term source, as used for investigation file.
-
name
= None¶ The name of the ontology (e.g.,
CEBI
)
-
file
= None¶ Path to file or URI to ontology
-
version
= None¶ Version of the ontology
-
description
= None¶ Description of the ontology
-
comments
= None¶ Comments
-
headers
= None¶ Headers from/for ISA-tab parsing/writing
-
altamisa.isatab.BasicInfo¶
-
class
altamisa.isatab.
BasicInfo
(path: pathlib.Path, identifier: str, title: str, description: str, submission_date: datetime.date, public_release_date: datetime.date, comments: Tuple[altamisa.isatab.models.Comment], headers: List[str])[source]¶ Basic metadata for an investigation or study (
INVESTIGATION
orSTUDY
).-
path
= None¶ Path to the investigation or study file
-
identifier
= None¶ Investigation/Study identifier
-
title
= None¶ Investigation/Study title
-
description
= None¶ Investigation/Study description
-
submission_date
= None¶ Investigation/Study submission date
-
public_release_date
= None¶ Investigation/Study public release date
-
comments
= None¶ Comments
-
headers
= None¶ Headers from/for ISA-tab parsing/writing
-
altamisa.isatab.PublicationInfo¶
-
class
altamisa.isatab.
PublicationInfo
(pubmed_id: str, doi: str, authors: str, title: str, status: Union[altamisa.isatab.models.OntologyTermRef, str], comments: Tuple[altamisa.isatab.models.Comment], headers: List[str])[source]¶ Information regarding an investigation publication (
INVESTIGATION PUBLICATIONS
).-
pubmed_id
= None¶ Publication PubMed ID
-
doi
= None¶ Publication DOI
Publication author list string
-
title
= None¶ Publication title
-
status
= None¶ Publication status
-
comments
= None¶ Comments
-
headers
= None¶ Headers from/for ISA-tab parsing/writing
-
altamisa.isatab.ContactInfo¶
-
class
altamisa.isatab.
ContactInfo
(last_name: str, first_name: str, mid_initial: str, email: str, phone: str, fax: str, address: str, affiliation: str, role: Union[altamisa.isatab.models.OntologyTermRef, str], comments: Tuple[altamisa.isatab.models.Comment], headers: List[str])[source]¶ Investigation contact information
-
last_name
= None¶ Last name of contact
-
first_name
= None¶ First name of contact
-
mid_initial
= None¶ Middle initial of contact
-
email
= None¶ Email of contact
-
phone
= None¶ Phone of contact
-
fax
= None¶ Fax no. of contact
-
address
= None¶ Address of contact
-
affiliation
= None¶ Affiliation of contact
-
role
= None¶ Role of contact
-
comments
= None¶ Comments
-
headers
= None¶ Headers from/for ISA-tab parsing/writing
-
altamisa.isatab.DesignDescriptorsInfo¶
-
class
altamisa.isatab.
DesignDescriptorsInfo
(type: Union[altamisa.isatab.models.OntologyTermRef, str], comments: Tuple[altamisa.isatab.models.Comment], headers: List[str])[source]¶ Study design descriptors information
-
type
= None¶ Design descriptors type
-
comments
= None¶ Comments
-
headers
= None¶ Headers from/for ISA-tab parsing/writing
-
altamisa.isatab.FactorInfo¶
-
class
altamisa.isatab.
FactorInfo
(name: str, type: Union[altamisa.isatab.models.OntologyTermRef, str], comments: Tuple[altamisa.isatab.models.Comment], headers: List[str])[source]¶ Study factor information
-
name
= None¶ Factor name
-
type
= None¶ Factor type
-
comments
= None¶ Comments
-
headers
= None¶ Headers from/for ISA-tab parsing/writing
-
altamisa.isatab.AssayInfo¶
-
class
altamisa.isatab.
AssayInfo
(measurement_type: Union[altamisa.isatab.models.OntologyTermRef, str], technology_type: Union[altamisa.isatab.models.OntologyTermRef, str], platform: str, path: pathlib.Path, comments: Tuple[altamisa.isatab.models.Comment], headers: List[str])[source]¶ Study assay information
-
measurement_type
= None¶ Assay measurement type
-
technology_type
= None¶ Assay technology type
-
platform
= None¶ Assay platform
-
path
= None¶ Path to assay file
-
comments
= None¶ Comments
-
headers
= None¶ Headers from/for ISA-tab parsing/writing
-
altamisa.isatab.ProtocolInfo¶
-
class
altamisa.isatab.
ProtocolInfo
(name: str, type: Union[altamisa.isatab.models.OntologyTermRef, str], description: str, uri: str, version: str, parameters: Dict[str, Union[altamisa.isatab.models.OntologyTermRef, str]], components: Dict[str, altamisa.isatab.models.ProtocolComponentInfo], comments: Tuple[altamisa.isatab.models.Comment], headers: List[str])[source]¶ Protocol information
-
name
= None¶ Protocol name
-
type
= None¶ Protocol type
-
description
= None¶ Protocol
-
uri
= None¶ Protocol URI
-
version
= None¶ Protocol version
-
parameters
= None¶ Protocol parameters
-
components
= None¶ Protocol components
-
comments
= None¶ Comments
-
headers
= None¶ Headers from/for ISA-tab parsing/writing
-
altamisa.isatab.StudyInfo¶
-
class
altamisa.isatab.
StudyInfo
(info: altamisa.isatab.models.BasicInfo, designs: Tuple[altamisa.isatab.models.DesignDescriptorsInfo], publications: Tuple[altamisa.isatab.models.PublicationInfo], factors: Dict[str, altamisa.isatab.models.FactorInfo], assays: Tuple[altamisa.isatab.models.AssayInfo], protocols: Dict[str, altamisa.isatab.models.ProtocolInfo], contacts: Tuple[altamisa.isatab.models.ContactInfo])[source]¶ The full metadata regarding one study
-
info
= None¶ Basic study information
-
designs
= None¶ Study designs by name
-
publications
= None¶ Publication list for study
-
factors
= None¶ Study factors by name
-
assays
= None¶ Study assays
-
protocols
= None¶ Study protocols by name
-
contacts
= None¶ Study contact list
-
altamisa.isatab.InvestigationInfo¶
-
class
altamisa.isatab.
InvestigationInfo
(ontology_source_refs: Dict[str, altamisa.isatab.models.OntologyRef], info: altamisa.isatab.models.BasicInfo, publications: Tuple[altamisa.isatab.models.PublicationInfo], contacts: Tuple[altamisa.isatab.models.ContactInfo], studies: Tuple[altamisa.isatab.models.StudyInfo])[source]¶ Representation of an ISA investigation
-
ontology_source_refs
= None¶ Ontologies defined for investigation
-
info
= None¶ Basic information on investigation
-
publications
= None¶ List of investigation publications
-
contacts
= None¶ Contact list for investigation
-
studies
= None¶ List of studies in this investigation
-
altamisa.isatab.Characteristics¶
-
class
altamisa.isatab.
Characteristics
(name: str, value: List[Union[altamisa.isatab.models.OntologyTermRef, str]], unit: Union[altamisa.isatab.models.OntologyTermRef, str])[source]¶ Representation of a
Characteristics[*]
cell.-
name
= None¶ Characteristics name
-
value
= None¶ Characteristics value
-
unit
= None¶ Characteristics unit
-
altamisa.isatab.ParameterValue¶
-
class
altamisa.isatab.
ParameterValue
(name: str, value: List[Union[altamisa.isatab.models.OntologyTermRef, str]], unit: Union[altamisa.isatab.models.OntologyTermRef, str])[source]¶ Representation of a
Parameter Value[*]
cell.-
name
= None¶ Parameter name
-
value
= None¶ Parameter value
-
unit
= None¶ Parameter value unit
-
altamisa.isatab.Material¶
-
class
altamisa.isatab.
Material
(type: str, unique_name: str, name: str, extract_label: Union[altamisa.isatab.models.OntologyTermRef, str], characteristics: Tuple[altamisa.isatab.models.Characteristics], comments: Tuple[altamisa.isatab.models.Comment], factor_values: Tuple[altamisa.isatab.models.FactorValue], material_type: Union[altamisa.isatab.models.OntologyTermRef, str], headers: List[str])[source]¶ Representation of a Material or Data node.
-
type
= None¶ The type of node (i.e. column name)
-
unique_name
= None¶ The unique name of the material node. This is usually created with respect to study/assay and column. The unique name is necessary to distinguish materials of different type with potential overlaps in names. Otherwise graph representation might be incorrect (ambiguous arcs, loops) and the original relation of material and process not conclusively reproducible.
-
name
= None¶ Original name of a material or data file
-
extract_label
= None¶ The label of a Labeled Extract
-
characteristics
= None¶ Material characteristics
-
comments
= None¶ Material comments
-
factor_values
= None¶ Material factor values
-
material_type
= None¶ Material type
-
headers
= None¶ Columns headers from/for ISA-tab parsing/writing
-
altamisa.isatab.Process¶
-
class
altamisa.isatab.
Process
(protocol_ref: str, unique_name: str, name: str, name_type: str, date: datetime.date, performer: str, parameter_values: Tuple[altamisa.isatab.models.ParameterValue], comments: Tuple[altamisa.isatab.models.Comment], array_design_ref: str, first_dimension: Union[altamisa.isatab.models.OntologyTermRef, str], second_dimension: Union[altamisa.isatab.models.OntologyTermRef, str], headers: List[str])[source]¶ Representation of a Process or Assay node.
-
protocol_ref
= None¶ Referenced to protocol name from investigation
-
unique_name
= None¶ The unique name of the process node. This is usually created with respect to study/assay and column. The unique name is necessary to distinguish processes of different protocols with potential overlaps in names. Otherwise graph representation might be incorrect (ambiguous arcs, loops) and the original relation of material and process not conclusively reproducible. When “Protocol REF” is given without a further qualifying name, this is generated from the protocol reference with an auto-incrementing number.
-
name
= None¶ Original name of a process (e.g. from Assay Name etc.)
-
name_type
= None¶ Type of original name (e.g. Assay Name)
-
date
= None¶ Process date
-
performer
= None¶ Performer of process
-
parameter_values
= None¶ Tuple of parameters values
-
comments
= None¶ Tuple of process comments
-
array_design_ref
= None¶ Array design reference (special case annotation)
Technology types: “DNA microarray”, “protein microarray”
Protocol types: “nucleic acid hybridization”, “hybridization”
-
first_dimension
= None¶ First dimension (special case annotation, INSTEAD of Gel Electrophoresis Assay Name)
Technology types: “gel electrophoresis”
Protocol types: “electrophoresis”
-
second_dimension
= None¶ Second dimension (special case annotation, INSTEAD of Gel Electrophoresis Assay Name)
Technology types: “gel electrophoresis”
Protocol types: “electrophoresis”
-
headers
= None¶ Columns headers from/for ISA-tab parsing/writing
-
altamisa.isatab.Study¶
-
class
altamisa.isatab.
Study
(file: pathlib.Path, header: Tuple, materials: Dict[str, altamisa.isatab.models.Material], processes: Dict[str, altamisa.isatab.models.Process], arcs: Tuple[altamisa.isatab.models.Arc])[source]¶ Representation of an ISA study.
-
file
= None¶ Path to ISA study file
-
header
= None¶ The study’s header
-
materials
= None¶ A mapping from material name to
Material
object (Data
is a kind of material)
-
processes
= None¶ A mapping from process name to
Process
object
-
arcs
= None¶ The processing arcs
-
altamisa.isatab.Assay¶
-
class
altamisa.isatab.
Assay
(file: pathlib.Path, header: Tuple, materials: Dict[str, altamisa.isatab.models.Material], processes: Dict[str, altamisa.isatab.models.Process], arcs: Tuple[altamisa.isatab.models.Arc])[source]¶ Representation of an ISA assay.
-
file
= None¶ Path to ISA assay file
-
header
= None¶ The assay’s header
-
materials
= None¶ A mapping from material name to
Material
object (Data
is a kind of material)
-
processes
= None¶ A mapping from process name to
Process
object
-
arcs
= None¶ The processing arcs
-