4.1.1.2. datanator.core package¶
4.1.1.2.1. Submodules¶
4.1.1.2.2. datanator.core.data_model module¶
- Author
Jonathan Karr <jonrkarr@gmail.com>
- Author
Yosef Roth <yosefdroth@gmail.com>
- Date
2017-04-10
- Copyright
2017, Karr Lab
- License
MIT
-
class
datanator.core.data_model.
Compartment
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.EntityInteractionOrProperty
Representes a compartment in a biological system
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.Compartment'>, <class 'datanator.core.data_model.EntityInteractionOrProperty'>)[source]¶
-
local_attributes
= {'cross_references': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'reaction_participants': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
class
-
class
datanator.core.data_model.
ComputationalMethod
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.Method
Represents a computational method used to generate an observation
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'arguments': <obj_tables.core.LongStringAttribute object>, 'description': <obj_tables.core.LongStringAttribute object>, 'hardware': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'performer': <obj_tables.core.StringAttribute object>, 'software': <obj_tables.core.StringAttribute object>, 'version': <obj_tables.core.StringAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.ComputationalMethod'>, <class 'datanator.core.data_model.Method'>)[source]¶
-
local_attributes
= {'arguments': <obj_tables.core.LocalAttribute object>, 'description': <obj_tables.core.LocalAttribute object>, 'hardware': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observations': <obj_tables.core.LocalAttribute object>, 'performer': <obj_tables.core.LocalAttribute object>, 'software': <obj_tables.core.LocalAttribute object>, 'version': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
arguments
= <obj_tables.core.LongStringAttribute object>[source]
-
version
= <obj_tables.core.StringAttribute object>[source]
-
class
-
class
datanator.core.data_model.
Consensus
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents a consensus of one or more observed values of an attribute of a component of a model
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'date': <obj_tables.core.DateTimeAttribute object>, 'error': <obj_tables.core.FloatAttribute object>, 'evidence': <obj_tables.core.ManyToManyAttribute object>, 'method': <obj_tables.core.EnumAttribute object>, 'observable': <obj_tables.core.ManyToOneAttribute object>, 'units': <obj_tables.core.StringAttribute object>, 'user': <obj_tables.core.StringAttribute object>, 'value': <obj_tables.core.FloatAttribute object>}[source]¶
-
local_attributes
= {'date': <obj_tables.core.LocalAttribute object>, 'error': <obj_tables.core.LocalAttribute object>, 'evidence': <obj_tables.core.LocalAttribute object>, 'method': <obj_tables.core.LocalAttribute object>, 'observable': <obj_tables.core.LocalAttribute object>, 'units': <obj_tables.core.LocalAttribute object>, 'user': <obj_tables.core.LocalAttribute object>, 'value': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
date
= <obj_tables.core.DateTimeAttribute object>[source]
-
error
= <obj_tables.core.FloatAttribute object>[source]
-
evidence
= <obj_tables.core.ManyToManyAttribute object>[source]
-
method
= <obj_tables.core.EnumAttribute object>[source]
-
observable
= <obj_tables.core.ManyToOneAttribute object>[source]
-
units
= <obj_tables.core.StringAttribute object>[source]
-
user
= <obj_tables.core.StringAttribute object>[source]
-
value
= <obj_tables.core.FloatAttribute object>[source]
-
class
-
class
datanator.core.data_model.
ConsensusMethod
[source]¶ Bases:
enum.Enum
Represents the method by which a consensus was chosen
-
class
datanator.core.data_model.
DnaSpecie
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.PolymerSpecie
Represents a DNA polymer
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'binding_matrix': <obj_tables.bio.seq.FreqPosMatrixAttribute object>, 'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'sequence': <obj_tables.core.LongStringAttribute object>, 'structure': <obj_tables.core.LongStringAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.DnaSpecie'>, <class 'datanator.core.data_model.PolymerSpecie'>, <class 'datanator.core.data_model.Specie'>, <class 'datanator.core.data_model.EntityInteractionOrProperty'>)[source]¶
-
local_attributes
= {'binding_matrix': <obj_tables.core.LocalAttribute object>, 'cross_references': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observed_specie': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'reaction_participants': <obj_tables.core.LocalAttribute object>, 'sequence': <obj_tables.core.LocalAttribute object>, 'specie_interaction': <obj_tables.core.LocalAttribute object>, 'structure': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
binding_matrix
= <obj_tables.bio.seq.FreqPosMatrixAttribute object>[source]
-
class
-
class
datanator.core.data_model.
EntityInteractionOrProperty
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents an observable of a biological system
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>}[source]¶
-
local_attributes
= {'cross_references': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
cross_references
= <obj_tables.core.ManyToManyAttribute object>[source]
-
id
= <obj_tables.core.StringAttribute object>[source]
-
name
= <obj_tables.core.StringAttribute object>[source]
-
class
-
class
datanator.core.data_model.
Environment
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents the environment (temperature, pH, media chemical composition) of an observation
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'growth_status': <obj_tables.core.LongStringAttribute object>, 'growth_system': <obj_tables.core.LongStringAttribute object>, 'media': <obj_tables.core.LongStringAttribute object>, 'ph': <obj_tables.core.FloatAttribute object>, 'temperature': <obj_tables.core.FloatAttribute object>}[source]¶
-
local_attributes
= {'growth_status': <obj_tables.core.LocalAttribute object>, 'growth_system': <obj_tables.core.LocalAttribute object>, 'media': <obj_tables.core.LocalAttribute object>, 'observations': <obj_tables.core.LocalAttribute object>, 'ph': <obj_tables.core.LocalAttribute object>, 'temperature': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
media
= <obj_tables.core.LongStringAttribute object>[source]
-
ph
= <obj_tables.core.FloatAttribute object>[source]
-
temperature
= <obj_tables.core.FloatAttribute object>[source]
-
class
-
class
datanator.core.data_model.
Evidence
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents the observed values and their relevance which support a consensus
-
relevance
[source]¶ numeric score which indicates the relevance of the observed value to the consensus
- Type
float
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'relevance': <obj_tables.core.FloatAttribute object>, 'value': <obj_tables.core.ManyToOneAttribute object>}[source]¶
-
local_attributes
= {'consensus': <obj_tables.core.LocalAttribute object>, 'relevance': <obj_tables.core.LocalAttribute object>, 'value': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
relevance
= <obj_tables.core.FloatAttribute object>[source]
-
value
= <obj_tables.core.ManyToOneAttribute object>[source]
-
-
class
datanator.core.data_model.
ExperimentalMethod
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.Method
Represents a experimental method used to generate an observation
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'description': <obj_tables.core.LongStringAttribute object>, 'hardware': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'performer': <obj_tables.core.StringAttribute object>, 'software': <obj_tables.core.StringAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.ExperimentalMethod'>, <class 'datanator.core.data_model.Method'>)[source]¶
-
local_attributes
= {'description': <obj_tables.core.LocalAttribute object>, 'hardware': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observations': <obj_tables.core.LocalAttribute object>, 'performer': <obj_tables.core.LocalAttribute object>, 'software': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
class
-
class
datanator.core.data_model.
Genetics
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents a taxon
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'taxon': <obj_tables.core.StringAttribute object>, 'variation': <obj_tables.core.StringAttribute object>}[source]¶
-
local_attributes
= {'observations': <obj_tables.core.LocalAttribute object>, 'taxon': <obj_tables.core.LocalAttribute object>, 'variation': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
is_variant
()[source]¶ Determine if the taxon is the wildtype stain
- Returns
True if the taxon has at least one genetic perturbation
- Return type
bool
-
is_wildtype
()[source]¶ Determine if the taxon is the wildtype taxon
- Returns
bool: True if the taxon doesn’t have any genetic perturbation(s)
- Return type
obj
-
taxon
= <obj_tables.core.StringAttribute object>[source]
-
variation
= <obj_tables.core.StringAttribute object>[source]
-
class
-
class
datanator.core.data_model.
Interaction
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.EntityInteractionOrProperty
Represents an interaction
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'confidence': <obj_tables.core.StringAttribute object>, 'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'position': <obj_tables.core.IntegerAttribute object>, 'score': <obj_tables.core.FloatAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.Interaction'>, <class 'datanator.core.data_model.EntityInteractionOrProperty'>)[source]¶
-
local_attributes
= {'confidence': <obj_tables.core.LocalAttribute object>, 'cross_references': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observed_interaction': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'position': <obj_tables.core.LocalAttribute object>, 'score': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
position
= <obj_tables.core.IntegerAttribute object>[source]
-
score
= <obj_tables.core.FloatAttribute object>[source]
-
class
-
class
datanator.core.data_model.
Method
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents a method used to generate an observation
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'description': <obj_tables.core.LongStringAttribute object>, 'hardware': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'performer': <obj_tables.core.StringAttribute object>, 'software': <obj_tables.core.StringAttribute object>}[source]¶
-
local_attributes
= {'description': <obj_tables.core.LocalAttribute object>, 'hardware': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observations': <obj_tables.core.LocalAttribute object>, 'performer': <obj_tables.core.LocalAttribute object>, 'software': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
description
= <obj_tables.core.LongStringAttribute object>[source]
-
name
= <obj_tables.core.StringAttribute object>[source]
-
class
-
class
datanator.core.data_model.
Observable
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents an observable of a biological system
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'compartment': <obj_tables.core.ManyToOneAttribute object>, 'interaction': <obj_tables.core.ManyToOneAttribute object>, 'property': <obj_tables.core.StringAttribute object>, 'specie': <obj_tables.core.ManyToOneAttribute object>}[source]¶
-
local_attributes
= {'compartment': <obj_tables.core.LocalAttribute object>, 'consensus': <obj_tables.core.LocalAttribute object>, 'interaction': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'property': <obj_tables.core.LocalAttribute object>, 'specie': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
compartment
= <obj_tables.core.ManyToOneAttribute object>[source]
-
interaction
= <obj_tables.core.ManyToOneAttribute object>[source]
-
property
= <obj_tables.core.StringAttribute object>[source]
-
specie
= <obj_tables.core.ManyToOneAttribute object>[source]
-
class
-
class
datanator.core.data_model.
ObservedInteraction
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.ObservedResult
Represents an observed interaction of a biological system
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'interaction': <obj_tables.core.ManyToOneAttribute object>, 'metadata': <obj_tables.core.ManyToOneAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.ObservedInteraction'>, <class 'datanator.core.data_model.ObservedResult'>)[source]¶
-
local_attributes
= {'interaction': <obj_tables.core.LocalAttribute object>, 'metadata': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
interaction
= <obj_tables.core.ManyToOneAttribute object>[source]
-
class
-
class
datanator.core.data_model.
ObservedResult
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents a base dataset for a queried response
-
class
datanator.core.data_model.
ObservedResultMetadata
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents an observation (one or more observed values) about a biological system
-
genetics
[source]¶ the taxon, and any genetic variation from the wildtype taxon, that the component was observed in
- Type
-
values
[source]¶ observed values
- Type
list
ofObservedValue
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'environment': <obj_tables.core.ManyToOneAttribute object>, 'genetics': <obj_tables.core.ManyToOneAttribute object>, 'method': <obj_tables.core.ManyToOneAttribute object>, 'synonym': <obj_tables.core.ManyToManyAttribute object>}[source]¶
-
local_attributes
= {'cross_references': <obj_tables.core.LocalAttribute object>, 'environment': <obj_tables.core.LocalAttribute object>, 'genetics': <obj_tables.core.LocalAttribute object>, 'method': <obj_tables.core.LocalAttribute object>, 'observed_result': <obj_tables.core.LocalAttribute object>, 'synonym': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
environment
= <obj_tables.core.ManyToOneAttribute object>[source]
-
genetics
= <obj_tables.core.ManyToOneAttribute object>[source]
-
-
class
datanator.core.data_model.
ObservedSpecie
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.ObservedResult
Represents an observed interaction of a biological system
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'metadata': <obj_tables.core.ManyToOneAttribute object>, 'specie': <obj_tables.core.ManyToOneAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.ObservedSpecie'>, <class 'datanator.core.data_model.ObservedResult'>)[source]¶
-
local_attributes
= {'metadata': <obj_tables.core.LocalAttribute object>, 'specie': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
specie
= <obj_tables.core.ManyToOneAttribute object>[source]
-
class
-
class
datanator.core.data_model.
ObservedValue
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.ObservedResult
Represents an observed value of a biological system
-
observable
[source]¶ the observed interaction or specie for which the value corresponds
- Type
Observaton
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'error': <obj_tables.core.FloatAttribute object>, 'metadata': <obj_tables.core.ManyToOneAttribute object>, 'observable': <obj_tables.core.ManyToOneAttribute object>, 'units': <obj_tables.core.StringAttribute object>, 'value': <obj_tables.core.FloatAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.ObservedValue'>, <class 'datanator.core.data_model.ObservedResult'>)[source]¶
-
local_attributes
= {'error': <obj_tables.core.LocalAttribute object>, 'evidence': <obj_tables.core.LocalAttribute object>, 'metadata': <obj_tables.core.LocalAttribute object>, 'observable': <obj_tables.core.LocalAttribute object>, 'units': <obj_tables.core.LocalAttribute object>, 'value': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
error
= <obj_tables.core.FloatAttribute object>[source]
-
observable
= <obj_tables.core.ManyToOneAttribute object>[source]
-
units
= <obj_tables.core.StringAttribute object>[source]
-
value
= <obj_tables.core.FloatAttribute object>[source]
-
-
class
datanator.core.data_model.
PolymerSpecie
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.Specie
Represents a polymer
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'sequence': <obj_tables.core.LongStringAttribute object>, 'structure': <obj_tables.core.LongStringAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.PolymerSpecie'>, <class 'datanator.core.data_model.Specie'>, <class 'datanator.core.data_model.EntityInteractionOrProperty'>)[source]¶
-
local_attributes
= {'cross_references': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observed_specie': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'reaction_participants': <obj_tables.core.LocalAttribute object>, 'sequence': <obj_tables.core.LocalAttribute object>, 'specie_interaction': <obj_tables.core.LocalAttribute object>, 'structure': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
sequence
= <obj_tables.core.LongStringAttribute object>[source]
-
class
-
class
datanator.core.data_model.
ProteinComplexSpecie
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.ProteinSpecie
Represents a protein interaction
Attributes:
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'class_name': <obj_tables.core.StringAttribute object>, 'complex_cmt': <obj_tables.core.StringAttribute object>, 'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'disease_cmt': <obj_tables.core.StringAttribute object>, 'entrez_id': <obj_tables.core.IntegerAttribute object>, 'family_name': <obj_tables.core.StringAttribute object>, 'funcat_dsc': <obj_tables.core.StringAttribute object>, 'funcat_id': <obj_tables.core.StringAttribute object>, 'gene_name': <obj_tables.core.StringAttribute object>, 'go_dsc': <obj_tables.core.StringAttribute object>, 'go_id': <obj_tables.core.StringAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'length': <obj_tables.core.IntegerAttribute object>, 'mass': <obj_tables.core.IntegerAttribute object>, 'molecular_weight': <obj_tables.core.FloatAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'sequence': <obj_tables.core.LongStringAttribute object>, 'structure': <obj_tables.core.LongStringAttribute object>, 'su_cmt': <obj_tables.core.StringAttribute object>, 'uniprot_id': <obj_tables.core.StringAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.ProteinComplexSpecie'>, <class 'datanator.core.data_model.ProteinSpecie'>, <class 'datanator.core.data_model.PolymerSpecie'>, <class 'datanator.core.data_model.Specie'>, <class 'datanator.core.data_model.EntityInteractionOrProperty'>)[source]¶
-
local_attributes
= {'class_name': <obj_tables.core.LocalAttribute object>, 'complex_cmt': <obj_tables.core.LocalAttribute object>, 'cross_references': <obj_tables.core.LocalAttribute object>, 'disease_cmt': <obj_tables.core.LocalAttribute object>, 'entrez_id': <obj_tables.core.LocalAttribute object>, 'family_name': <obj_tables.core.LocalAttribute object>, 'funcat_dsc': <obj_tables.core.LocalAttribute object>, 'funcat_id': <obj_tables.core.LocalAttribute object>, 'gene_name': <obj_tables.core.LocalAttribute object>, 'go_dsc': <obj_tables.core.LocalAttribute object>, 'go_id': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'length': <obj_tables.core.LocalAttribute object>, 'mass': <obj_tables.core.LocalAttribute object>, 'molecular_weight': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observed_specie': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'reaction_participants': <obj_tables.core.LocalAttribute object>, 'sequence': <obj_tables.core.LocalAttribute object>, 'specie_interaction': <obj_tables.core.LocalAttribute object>, 'structure': <obj_tables.core.LocalAttribute object>, 'su_cmt': <obj_tables.core.LocalAttribute object>, 'uniprot_id': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
class
-
class
datanator.core.data_model.
ProteinSpecie
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.PolymerSpecie
Represents a protein polymer
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'entrez_id': <obj_tables.core.IntegerAttribute object>, 'gene_name': <obj_tables.core.StringAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'length': <obj_tables.core.IntegerAttribute object>, 'mass': <obj_tables.core.IntegerAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'sequence': <obj_tables.core.LongStringAttribute object>, 'structure': <obj_tables.core.LongStringAttribute object>, 'uniprot_id': <obj_tables.core.StringAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.ProteinSpecie'>, <class 'datanator.core.data_model.PolymerSpecie'>, <class 'datanator.core.data_model.Specie'>, <class 'datanator.core.data_model.EntityInteractionOrProperty'>)[source]¶
-
local_attributes
= {'cross_references': <obj_tables.core.LocalAttribute object>, 'entrez_id': <obj_tables.core.LocalAttribute object>, 'gene_name': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'length': <obj_tables.core.LocalAttribute object>, 'mass': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observed_specie': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'reaction_participants': <obj_tables.core.LocalAttribute object>, 'sequence': <obj_tables.core.LocalAttribute object>, 'specie_interaction': <obj_tables.core.LocalAttribute object>, 'structure': <obj_tables.core.LocalAttribute object>, 'uniprot_id': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
entrez_id
= <obj_tables.core.IntegerAttribute object>[source]
-
gene_name
= <obj_tables.core.StringAttribute object>[source]
-
length
= <obj_tables.core.IntegerAttribute object>[source]
-
mass
= <obj_tables.core.IntegerAttribute object>[source]
-
uniprot_id
= <obj_tables.core.StringAttribute object>[source]
-
class
-
class
datanator.core.data_model.
Reaction
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.Interaction
Represents a reaction
-
participants
[source]¶ list of participants
- Type
list
ofReactionParticipant
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'confidence': <obj_tables.core.StringAttribute object>, 'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'kinetic_law_id': <obj_tables.core.IntegerAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'participants': <obj_tables.core.ManyToManyAttribute object>, 'position': <obj_tables.core.IntegerAttribute object>, 'reversible': <obj_tables.core.BooleanAttribute object>, 'score': <obj_tables.core.FloatAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.Reaction'>, <class 'datanator.core.data_model.Interaction'>, <class 'datanator.core.data_model.EntityInteractionOrProperty'>)[source]¶
-
local_attributes
= {'confidence': <obj_tables.core.LocalAttribute object>, 'cross_references': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'kinetic_law_id': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observed_interaction': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'participants': <obj_tables.core.LocalAttribute object>, 'position': <obj_tables.core.LocalAttribute object>, 'reversible': <obj_tables.core.LocalAttribute object>, 'score': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
get_ec_number
()[source]¶ Get the most relevant EC number from the list of cross references
If the reaction has a single manually-assigned EC number, return that
If the reaction has multiple manually-assigned EC numbers, return an error
Otherwise, return the most relevant predicted EC number
- Returns
most relevant EC number
- Return type
str
-
get_ec_numbers
()[source]¶ Get the EC numbers from the list of cross references
- Returns
list of EC numbers
- Return type
list
ofstr
-
get_manual_ec_numbers
()[source]¶ Get the manually assigned EC numbers from the list of cross references
- Returns
list of EC manually assigned numbers
- Return type
list
ofstr
-
get_modifiers
()[source]¶ Get the modifiers
- Returns
list of modifiers
- Return type
list
ofReactionParticipant
-
get_ordered_participants
(collapse_repeated=True)[source]¶ Get an ordered list of the participants
- Parameters
collapse_repeated (
bool
) – ifTrue
, collapse any repeated participants- Returns
ordered list of reaction participants
- Return type
list
ofReactionParticipant
-
get_predicted_ec_numbers
()[source]¶ Get the predicted EC numbers from the list of cross references
- Returns
list of predicted EC numbers
- Return type
list
ofstr
-
get_products
()[source]¶ Get the products
- Returns
list of products
- Return type
list
ofReactionParticipant
-
get_reactant_product_pairs
()[source]¶ Get list of pairs of similar reactants and products
Note: This requires the modeler to have ordered the reactans and products by their similarity. The modeler is required to specify this pairing because it cannot easily be computed. In particular, we have tried to use Tanimoto similarity to predict reactant-product pairings, but this doesn’t adequately capture reaction centers.
- Returns
ReactionParticipant,
ReactionParticipant
: list of pairs of similar reactants and products- Return type
list
oftuple
of obj
-
get_reactants
()[source]¶ Get the reactants
- Returns
list of reactants
- Return type
list
ofReactionParticipant
-
participants
= <obj_tables.core.ManyToManyAttribute object>[source]
-
reversible
= <obj_tables.core.BooleanAttribute object>[source]
-
-
class
datanator.core.data_model.
ReactionParticipant
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents a participant in a reaction
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'coefficient': <obj_tables.core.FloatAttribute object>, 'compartment': <obj_tables.core.ManyToOneAttribute object>, 'order': <obj_tables.core.IntegerAttribute object>, 'specie': <obj_tables.core.ManyToOneAttribute object>}[source]¶
-
local_attributes
= {'coefficient': <obj_tables.core.LocalAttribute object>, 'compartment': <obj_tables.core.LocalAttribute object>, 'order': <obj_tables.core.LocalAttribute object>, 'reactions': <obj_tables.core.LocalAttribute object>, 'specie': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
coefficient
= <obj_tables.core.FloatAttribute object>[source]
-
compartment
= <obj_tables.core.ManyToOneAttribute object>[source]
-
order
= <obj_tables.core.IntegerAttribute object>[source]
-
specie
= <obj_tables.core.ManyToOneAttribute object>[source]
-
class
-
class
datanator.core.data_model.
Reference
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represent a reference for an observation
author
- Type
str
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'author': <obj_tables.core.StringAttribute object>, 'chapter': <obj_tables.core.StringAttribute object>, 'editor': <obj_tables.core.StringAttribute object>, 'number': <obj_tables.core.StringAttribute object>, 'pages': <obj_tables.core.StringAttribute object>, 'publication': <obj_tables.core.StringAttribute object>, 'title': <obj_tables.core.StringAttribute object>, 'url': <obj_tables.core.StringAttribute object>, 'volume': <obj_tables.core.StringAttribute object>, 'year': <obj_tables.core.IntegerAttribute object>}[source]¶
-
local_attributes
= {'author': <obj_tables.core.LocalAttribute object>, 'chapter': <obj_tables.core.LocalAttribute object>, 'editor': <obj_tables.core.LocalAttribute object>, 'number': <obj_tables.core.LocalAttribute object>, 'pages': <obj_tables.core.LocalAttribute object>, 'publication': <obj_tables.core.LocalAttribute object>, 'title': <obj_tables.core.LocalAttribute object>, 'url': <obj_tables.core.LocalAttribute object>, 'volume': <obj_tables.core.LocalAttribute object>, 'year': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
author
= <obj_tables.core.StringAttribute object>[source]
-
chapter
= <obj_tables.core.StringAttribute object>[source]
-
editor
= <obj_tables.core.StringAttribute object>[source]
-
number
= <obj_tables.core.StringAttribute object>[source]
-
pages
= <obj_tables.core.StringAttribute object>[source]
-
publication
= <obj_tables.core.StringAttribute object>[source]
-
title
= <obj_tables.core.StringAttribute object>[source]
-
url
= <obj_tables.core.StringAttribute object>[source]
-
volume
= <obj_tables.core.StringAttribute object>[source]
-
year
= <obj_tables.core.IntegerAttribute object>[source]
-
class
datanator.core.data_model.
Resource
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents an object in an external resource
-
relevance
[source]¶ numerical indicator relevance of the external resource to the observable
- Type
float
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'assignment_method': <obj_tables.core.EnumAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'namespace': <obj_tables.core.StringAttribute object>, 'relevance': <obj_tables.core.FloatAttribute object>}[source]¶
-
local_attributes
= {'assignment_method': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'namespace': <obj_tables.core.LocalAttribute object>, 'observables': <obj_tables.core.LocalAttribute object>, 'observations': <obj_tables.core.LocalAttribute object>, 'relevance': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
assignment_method
= <obj_tables.core.EnumAttribute object>[source]
-
id
= <obj_tables.core.StringAttribute object>[source]
-
namespace
= <obj_tables.core.StringAttribute object>[source]
-
relevance
= <obj_tables.core.FloatAttribute object>[source]
-
-
class
datanator.core.data_model.
ResourceAssignmentMethod
[source]¶ Bases:
enum.Enum
Represents the method used to assign a cross reference to an observable
-
class
datanator.core.data_model.
RnaSpecie
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.PolymerSpecie
Represents a RNA polymer
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'sequence': <obj_tables.core.LongStringAttribute object>, 'structure': <obj_tables.core.LongStringAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.RnaSpecie'>, <class 'datanator.core.data_model.PolymerSpecie'>, <class 'datanator.core.data_model.Specie'>, <class 'datanator.core.data_model.EntityInteractionOrProperty'>)[source]¶
-
local_attributes
= {'cross_references': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observed_specie': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'reaction_participants': <obj_tables.core.LocalAttribute object>, 'sequence': <obj_tables.core.LocalAttribute object>, 'specie_interaction': <obj_tables.core.LocalAttribute object>, 'structure': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
class
-
class
datanator.core.data_model.
Specie
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.EntityInteractionOrProperty
Represents a molecular species in a biological system
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'structure': <obj_tables.core.LongStringAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.Specie'>, <class 'datanator.core.data_model.EntityInteractionOrProperty'>)[source]¶
-
local_attributes
= {'cross_references': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observed_specie': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'reaction_participants': <obj_tables.core.LocalAttribute object>, 'specie_interaction': <obj_tables.core.LocalAttribute object>, 'structure': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
get_similarity
(other, fingerprint_type='fp2')[source]¶ Calculate the similarity with another species
- Parameters
other (
Specie
) – a second speciesfingerprint_type (
str
, optional) – fingerprint type to use to calculate similarity
- Returns
the similarity with the other molecule
- Return type
float
-
structure
= <obj_tables.core.LongStringAttribute object>[source]
-
to_inchi
(only_formula_and_connectivity=False)[source]¶ Get the structure in InChi format
- Parameters
only_formula_and_connectivity (
bool
) – ifTrue
, return only the formula and connectivity layers- Returns
- structure in InChi format or just the formula and connectivity layers
if
only_formula_and_connectivity
isTrue
- Return type
str
-
to_openbabel
()[source]¶ Get the structure as a Open Babel molecule
- Returns
structure as a Open Babel molecule
- Return type
openbabel.OBMol
-
class
-
class
datanator.core.data_model.
SpecieInteraction
(_comments=None, **kwargs)[source]¶ Bases:
datanator.core.data_model.Interaction
Represents a protein interaction
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
attributes
= {'confidence': <obj_tables.core.StringAttribute object>, 'cross_references': <obj_tables.core.ManyToManyAttribute object>, 'id': <obj_tables.core.StringAttribute object>, 'interaction_type': <obj_tables.core.StringAttribute object>, 'loc_a': <obj_tables.core.StringAttribute object>, 'loc_b': <obj_tables.core.StringAttribute object>, 'name': <obj_tables.core.StringAttribute object>, 'position': <obj_tables.core.IntegerAttribute object>, 'score': <obj_tables.core.FloatAttribute object>, 'specie_a': <obj_tables.core.OneToOneAttribute object>, 'specie_b': <obj_tables.core.OneToOneAttribute object>, 'stoichiometry_a': <obj_tables.core.IntegerAttribute object>, 'stoichiometry_b': <obj_tables.core.IntegerAttribute object>, 'type_a': <obj_tables.core.StringAttribute object>, 'type_b': <obj_tables.core.StringAttribute object>}[source]¶
-
inheritance
= (<class 'datanator.core.data_model.SpecieInteraction'>, <class 'datanator.core.data_model.Interaction'>, <class 'datanator.core.data_model.EntityInteractionOrProperty'>)[source]¶
-
local_attributes
= {'confidence': <obj_tables.core.LocalAttribute object>, 'cross_references': <obj_tables.core.LocalAttribute object>, 'id': <obj_tables.core.LocalAttribute object>, 'interaction_type': <obj_tables.core.LocalAttribute object>, 'loc_a': <obj_tables.core.LocalAttribute object>, 'loc_b': <obj_tables.core.LocalAttribute object>, 'name': <obj_tables.core.LocalAttribute object>, 'observed_interaction': <obj_tables.core.LocalAttribute object>, 'observed_values': <obj_tables.core.LocalAttribute object>, 'position': <obj_tables.core.LocalAttribute object>, 'score': <obj_tables.core.LocalAttribute object>, 'specie_a': <obj_tables.core.LocalAttribute object>, 'specie_b': <obj_tables.core.LocalAttribute object>, 'stoichiometry_a': <obj_tables.core.LocalAttribute object>, 'stoichiometry_b': <obj_tables.core.LocalAttribute object>, 'type_a': <obj_tables.core.LocalAttribute object>, 'type_b': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
loc_a
= <obj_tables.core.StringAttribute object>[source]
-
loc_b
= <obj_tables.core.StringAttribute object>[source]
-
specie_a
= <obj_tables.core.OneToOneAttribute object>[source]
-
specie_b
= <obj_tables.core.OneToOneAttribute object>[source]
-
stoichiometry_a
= <obj_tables.core.IntegerAttribute object>[source]
-
stoichiometry_b
= <obj_tables.core.IntegerAttribute object>[source]
-
class
-
class
datanator.core.data_model.
Synonym
(_comments=None, **kwargs)[source]¶ Bases:
obj_tables.core.Model
Represents a synonym of a given physical entity or property
-
class
Meta
[source]¶ Bases:
obj_tables.core.Meta
-
local_attributes
= {'name': <obj_tables.core.LocalAttribute object>, 'observations': <obj_tables.core.LocalAttribute object>}[source]¶
-
-
name
= <obj_tables.core.StringAttribute object>[source]
-
class
4.1.1.2.3. datanator.core.data_source module¶
- Author
Jonathan Karr <jonrkarr@gmail.com>
- Date
2017-05-08
- Copyright
2017, Karr Lab
- License
MIT
-
class
datanator.core.data_source.
CachedDataSource
(name=None, cache_dirname=None, clear_content=False, load_content=False, max_entries=inf, commit_intermediate_results=False, download_backups=True, verbose=False, quilt_owner=None, quilt_package=None)[source]¶ Bases:
datanator.core.data_source.DataSource
Represents an external data source that is cached locally in a sqlite database
-
commit_intermediate_results
[source]¶ if
True
, commit the changes throughout the loading process. This is particularly helpful for restarting this method when webservices go offline.- Type
bool
-
clear_content
()[source]¶ Clear the content of the sqlite database (i.e. drop and recreate all tables).
-
get_engine
()[source]¶ Get an engine for the sqlite database. If the database doesn’t exist, initialize its structure.
- Returns
database engine
- Return type
sqlalchemy.engine.Engine
-
get_or_create_object
(cls, **kwargs)[source]¶ Get the SQLAlchemy object of type
cls
with attribute/value pairs specified by **kwargs. If an object with these attribute/value pairs does not exist, create an object with these attribute/value pairs and add it to the SQLAlchemy session.- Parameters
cls (
class
) – child class ofbase_model
**kwargs (
dict
, optional) – attribute-value pairs of desired SQLAlchemy object of typecls
- Returns
SQLAlchemy object of type
cls
- Return type
-
get_paths_to_backup
(download=False)[source]¶ Get a list of the files to backup/unpack
- Parameters
download (
bool
, optional) – ifTrue
, prepare the files for uploading- Returns
list of paths to backup
- Return type
list
ofstr
-
get_session
()[source]¶ Get a session for the sqlite database
- Returns
database session
- Return type
sqlalchemy.orm.session.Session
-
quilt_package
= None[source] Create SQLAlchemy session and load content if necessary
-
-
class
datanator.core.data_source.
DataSource
(name=None, verbose=False)[source]¶ Bases:
object
Represents an external data source
-
exception
datanator.core.data_source.
DataSourceWarning
[source]¶ Bases:
UserWarning
Data source warning
-
class
datanator.core.data_source.
FtpDataSource
(name=None, cache_dirname=None, clear_content=False, load_content=False, max_entries=inf, commit_intermediate_results=False, download_backups=True, verbose=False, quilt_owner=None, quilt_package=None)[source]¶ Bases:
datanator.core.data_source.CachedDataSource
An external data source which can be obtained via a FTP interface
-
ENDPOINT_DOMAINS
= {}[source]
-
-
class
datanator.core.data_source.
HttpDataSource
(name=None, cache_dirname=None, clear_content=False, load_content=False, max_entries=inf, commit_intermediate_results=False, download_backups=True, verbose=False, clear_requests_cache=False, download_request_backup=False, quilt_owner=None, quilt_package=None)[source]¶ Bases:
datanator.core.data_source.CachedDataSource
An external data source which can be obtained via a HTTP interface
-
ENDPOINT_DOMAINS
= {}[source]
-
MAX_HTTP_RETRIES
= 5[source]
-
download_request_backup
= None[source]¶ Call superclass constructor which will optionally load content
-
-
class
datanator.core.data_source.
PostgresDataSource
(name=None, clear_content=False, load_content=False, max_entries=inf, restore_backup_data=False, restore_backup_schema=False, restore_backup_exit_on_error=True, quilt_owner=None, quilt_package=None, cache_dirname=None, verbose=False)[source]¶ Bases:
datanator.core.data_source.DataSource
Represents a Postgres database
-
get_engine
()[source]¶ Get an engine for the Postgres database. If the database doesn’t exist, initialize its structure.
- Returns
database engine
- Return type
sqlalchemy.engine.Engine
-
get_or_create_object
(cls, **kwargs)[source]¶ Get the SQLAlchemy object of type
cls
with attribute/value pairs specified by **kwargs. If an object with these attribute/value pairs does not exist, create an object with these attribute/value pairs and add it to the SQLAlchemy session.- Parameters
cls (
class
) – child class ofbase_model
**kwargs (
dict
, optional) – attribute-value pairs of desired SQLAlchemy object of typecls
- Returns
SQLAlchemy object of type
cls
- Return type
-
get_session
()[source]¶ Get a session for the database
- Returns
database session
- Return type
sqlalchemy.orm.session.Session
-
restore_backup
(restore_data=True, restore_schema=False, exit_on_error=True)[source]¶ Download and restore the database from Quilt
- Parameters
restore_data (
bool
, optional) – IfTrue
, restore datarestore_schema (
bool
, optional) – IfTrue
, clear and restore schemaexit_on_error (
bool
, optional) – IfTrue
, exit on errors
-
restore_database
(restore_data=True, restore_schema=False, exit_on_error=True)[source]¶ Restore a dump file of the Postgres database
- Parameters
restore_data (
bool
, optional) – IfTrue
, restore datarestore_schema (
bool
, optional) – IfTrue
, clear and restore schemaexit_on_error (
bool
, optional) – IfTrue
, exit on errors
-
-
class
datanator.core.data_source.
WebserviceDataSource
[source]¶ Bases:
datanator.core.data_source.DataSource
A data source that is a webservice
-
ENDPOINT_DOMAINS
= {}[source]
-
MAX_HTTP_RETRIES
= 5[source]
-