BioPAX object model

This module implements the BioPAX Level 3 object model as a set of classes with inheritance. At the top of the class hierarchy is the generic BioPaxObject.

class pybiopax.biopax.model.BioPaxModel(objects, xml_base='http://www.biopax.org/release/biopax-level3.owl#')[source]

Bases: object

BioPAX Model.

Parameters
  • objects (dict or list) – A dict of BioPaxObject instances keyed by their URI string or a list of BioPaxObject instances, which will get converted into a dict keyed their URI strings

  • xml_base (str) – The XML base namespace for the content being represented.

objects

A dict of BioPaxObject instances keyed by their URI string that are part of the model.

Type

dict

xml_base

The XML base namespace for the content being represented. If not provided, the default BioPAX Level 3 base namespace is used.

Type

Optional[str]

classmethod from_xml(tree)[source]

Return a BioPAX Model from an OWL/XML element tree.

Parameters

tree – An element tree from which the model is extracted

Return type

BioPaxModel

Returns

A BioPAX Model deserialized from the OWL XML tree.

to_xml()[source]

Return an OWL string from the content of the model.

Return type

str

pybiopax.biopax.model.PYBIOPAX_TQDM_CONFIG = {'unit_scale': True}

Default configuration for tqdm progress bars in pybiopax. To modify the tqdm configuration, modify this module-level variable. For example, to disable the progress bars, set the disable key to True.

Base classes

class pybiopax.biopax.base.BioPaxObject(uid, comment=None, **kwargs)[source]

Bases: object

Generic BioPAX Object. It is the parent class of all more specific BioPAX classes.

class pybiopax.biopax.base.Controller(**kwargs)[source]

Bases: object

BioPAX Controller.

class pybiopax.biopax.base.Entity(availability=None, data_source=None, **kwargs)[source]

Bases: BioPaxObject, Observable, Named

BioPAX Entity.

availability
Type

str

data_source
Type

List[Provenance]

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.base.Gene(organism, **kwargs)[source]

Bases: Entity

BioPAX Gene

organism
Type

BioSource

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.base.Named(display_name=None, standard_name=None, name=None, **kwargs)[source]

Bases: XReferrable

A mixin class to add names to a BioPaxObject.

display_name
Type

str

standard_name
Type

str

name
Type

str

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.base.Observable(evidence=None, **kwargs)[source]

Bases: object

A mixin class to add evidence to a BioPaxObject.

evidence
Type

List[Evidence]

class pybiopax.biopax.base.Pathway(pathway_component=None, pathway_order=None, organism=None, **kwargs)[source]

Bases: Entity, Controller

BioPAX Pathway.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.base.Unresolved(obj_id)[source]

Bases: object

A placeholder class used while deserializing BioPAX models.

class pybiopax.biopax.base.XReferrable(xref=None, **kwargs)[source]

Bases: object

A mixin class to add xrefs to a BioPaxObject.

xref
Type

List[Xref]

Interactions

class pybiopax.biopax.interaction.BiochemicalReaction(delta_s=None, delta_h=None, delta_g=None, k_e_q=None, e_c_number=None, **kwargs)[source]

Bases: Conversion

BioPAX BiochemicalReaction.

delta_s
Type

List[float]

delta_h
Type

List[float]

delta_g
Type

List[DeltaG]

k_e_q
Type

List[KPrime]

e_c_number
Type

List[str]

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.Catalysis(catalysis_direction=None, cofactor=None, **kwargs)[source]

Bases: Control

BioPAX Catalysis.

catalysis_direction
Type

str

cofactor
Type

List[PhysicalEntity]

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.ComplexAssembly(left=None, right=None, conversion_direction=None, participant_stoichiometry=None, spontaneous=None, **kwargs)[source]

Bases: Conversion

BioPAX ComplexAssembly.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.Control(control_type=None, controller=None, controlled=None, **kwargs)[source]

Bases: Interaction

BioPAX Control.

control_type
Type

str

controller
Type

List[Process]

controlled
Type

Process

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.Conversion(left=None, right=None, conversion_direction=None, participant_stoichiometry=None, spontaneous=None, **kwargs)[source]

Bases: Interaction

BioPAX Conversion.

left
Type

List[PhysicalEntity]

right
Type

List[PhysicalEntity]

conversion_direction
Type

str

participant_stoichiometry
Type

List[Stoichiometry]

spontaneous
Type

bool

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.Degradation(left=None, right=None, conversion_direction=None, participant_stoichiometry=None, spontaneous=None, **kwargs)[source]

Bases: Conversion

BioPAX Degradation.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.GeneticInteraction(participant=None, interaction_type=None, **kwargs)[source]

Bases: Interaction

BioPAX GeneticInteraction.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.Interaction(participant=None, interaction_type=None, **kwargs)[source]

Bases: Process

BioPAX Interaction.

participant
Type

List[Entity]

interaction_type
Type

List[str]

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.Modulation(control_type=None, controller=None, controlled=None, **kwargs)[source]

Bases: Control

BioPAX Modulation.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.MolecularInteraction(participant=None, interaction_type=None, **kwargs)[source]

Bases: Interaction

BioPAX MolecularInteraction.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.Process(**kwargs)[source]

Bases: Entity

BioPAX Process.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.TemplateReaction(template=None, product=None, template_direction=None, **kwargs)[source]

Bases: Interaction

BioPAX TemplateReaction.

template
Type

NucleicAcid

product
Type

List[PhysicalEntity]

template_direction
Type

str

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.TemplateReactionRegulation(control_type=None, controller=None, controlled=None, **kwargs)[source]

Bases: Control

BioPAX TemplateReactionRegulation.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.Transport(left=None, right=None, conversion_direction=None, participant_stoichiometry=None, spontaneous=None, **kwargs)[source]

Bases: Conversion

BioPAX Transport.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.interaction.TransportWithBiochemicalReaction(delta_s=None, delta_h=None, delta_g=None, k_e_q=None, e_c_number=None, **kwargs)[source]

Bases: BiochemicalReaction

BioPAX TransportWithBiochemicalReaction.

property name

All names associated with the object including the standard and display name, if available.

Physical entities

class pybiopax.biopax.physical_entity.Complex(component=None, component_stoichiometry=None, **kwargs)[source]

Bases: PhysicalEntity

BioPAX Complex.

component
Type

List[PhysicalEntity]

component_stoichiometry
Type

List[Stoichiometry]

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.physical_entity.Dna(entity_reference=None, **kwargs)[source]

Bases: SimplePhysicalEntity

BioPAX Dna.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.physical_entity.DnaRegion(entity_reference=None, **kwargs)[source]

Bases: SimplePhysicalEntity

BioPAX DnaRegion

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.physical_entity.PhysicalEntity(feature=None, not_feature=None, member_physical_entity=None, cellular_location=None, **kwargs)[source]

Bases: Entity, Controller

BioPAX PhysicalEntity.

feature
Type

List[EntityFeature]

not_feature
Type

List[EntityFeature]

member_physical_entity
Type

List[PhysicalEntity]

cellular_location
Type

CellularLocationVocabulary

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.physical_entity.Protein(entity_reference=None, **kwargs)[source]

Bases: SimplePhysicalEntity

BioPAX Protein.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.physical_entity.Rna(entity_reference=None, **kwargs)[source]

Bases: SimplePhysicalEntity

BioPAX Rna.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.physical_entity.RnaRegion(entity_reference=None, **kwargs)[source]

Bases: SimplePhysicalEntity

BioPAX RnaRegion

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.physical_entity.SimplePhysicalEntity(entity_reference=None, **kwargs)[source]

Bases: PhysicalEntity

BioPAX SimplePhysicalEntity.

entity_reference
Type

EntityReference

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.physical_entity.SmallMolecule(entity_reference=None, **kwargs)[source]

Bases: SimplePhysicalEntity

BioPAX SmallMolecule.

property name

All names associated with the object including the standard and display name, if available.

Utility classes

class pybiopax.biopax.util.BindingFeature(binds_to=None, intra_molecular=None, **kwargs)[source]

Bases: EntityFeature

BioPAX BindingFeature.

binds_to
Type

BindingFeature

intra_molecular
Type

bool

class pybiopax.biopax.util.BioSource(cell_type=None, tissue=None, taxon_xref=None, **kwargs)[source]

Bases: UtilityClass, Named

BioPAX BioSource.

cell_type
Type

CellVocabulary

tissue
Type

TissueVocabulary

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.BiochemicalPathwayStep(step_conversion=None, step_direction=None, **kwargs)[source]

Bases: PathwayStep

BioPAX BiochemicalPathwayStep.

step_conversion
Type

Conversion

step_direction
Type

str

class pybiopax.biopax.util.CellVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX CellVocabulary.

class pybiopax.biopax.util.CellularLocationVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX CellularLocationVocabulary.

class pybiopax.biopax.util.ChemicalConstant(ionic_strength=None, ph=None, p_mg=None, tempterature=None, **kwargs)[source]

Bases: UtilityClass

BioPAX ChemicalConstant.

ionic_strength
Type

float

ph
Type

float

p_mg
Type

float

temperature
Type

float

class pybiopax.biopax.util.ChemicalStructure(structure_format=None, structure_data=None, **kwargs)[source]

Bases: UtilityClass

BioPAX ChemicalStructure.

structure_format
Type

str

structure_data
Type

str

class pybiopax.biopax.util.ControlledVocabulary(term=None, **kwargs)[source]

Bases: UtilityClass, XReferrable

BioPAX ControlledVocabulary.

term
Type

List[str]

class pybiopax.biopax.util.DeltaG(delta_g_prime0=None, **kwargs)[source]

Bases: ChemicalConstant

BioPAX DeltaG.

delta_g_prime
Type

float

class pybiopax.biopax.util.DnaReference(sub_region=None, **kwargs)[source]

Bases: NucleicAcidReference

BioPAX DnaReference.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.DnaRegionReference(absolute_region=None, region_type=None, **kwargs)[source]

Bases: NucleicAcidRegionReference

BioPAX DnaRegionReference.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.EntityFeature(owner_entity_reference=None, feature_location=None, member_feature=None, feature_location_type=None, **kwargs)[source]

Bases: UtilityClass, Observable

BioPAX UtilityClass.

owner_entity_reference
Type

EntityReference

feature_location
Type

SequenceLocation

member_feature
Type

List[EntityFeature]

feature_location_type
Type

SequenceRegionVocabulary

class pybiopax.biopax.util.EntityReference(entity_feature=None, entity_reference_type=None, member_entity_reference=None, owner_entity_reference=None, **kwargs)[source]

Bases: UtilityClass, Named, Observable

BioPAX EntityReference.

entity_feature
Type

List[EntityFeature]

entity_reference_type
Type

List[EntityReferenceTypeVocabulary]

member_entity_reference
Type

List[EntityReference]

owner_entity_reference
Type

List[EntityReference]

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.EntityReferenceTypeVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX EntityReferenceTypeVocabulary.

class pybiopax.biopax.util.Evidence(confidence=None, evidence_code=None, experimental_form=None, **kwargs)[source]

Bases: UtilityClass, XReferrable

BioPAX Evidence.

confidence
Type

List[Score]

evidence_code
Type

List[EvidenceCodeVocabulary]

experimental_form
Type

List[ExperimentalForm]

class pybiopax.biopax.util.EvidenceCodeVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX EvidenceCodeVocabulary.

class pybiopax.biopax.util.ExperimentalForm(experimental_form_entity=None, experimental_form_description=None, experimental_feature=None, **kwargs)[source]

Bases: UtilityClass

BioPAX ExperimentalForm.

experimental_form_entity
Type

Entity

experimental_form_description
Type

List[ExperimentalFormVocabulary]

experimental_feature
Type

List[EntityFeature]

class pybiopax.biopax.util.ExperimentalFormVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX ExperimentalFormVocabulary.

class pybiopax.biopax.util.FragmentFeature(owner_entity_reference=None, feature_location=None, member_feature=None, feature_location_type=None, **kwargs)[source]

Bases: EntityFeature

BioPAX FragmentFeature.

class pybiopax.biopax.util.InteractionVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX InteractionVocabulary.

class pybiopax.biopax.util.KPrime(k_prime, **kwargs)[source]

Bases: ChemicalConstant

BioPAX KPrime.

k_prime
Type

float

class pybiopax.biopax.util.ModificationFeature(modification_type=None, **kwargs)[source]

Bases: EntityFeature

BioPAX ModificationFeature.

modification_type
Type

SequenceModificationVocabulary

class pybiopax.biopax.util.NucleicAcidReference(sub_region=None, **kwargs)[source]

Bases: SequenceEntityReference

BioPAX NucleicAcidReference

sub_region
Type

List[NucleicAcidRegionReference]

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.NucleicAcidRegionReference(absolute_region=None, region_type=None, **kwargs)[source]

Bases: NucleicAcidReference

BioPAX NucleicAcidRegionReference

absolute_region
Type

SequenceLocation

region_type
Type

List[SequenceRegionVocabulary]

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.PathwayStep(step_process=None, next_step=None, **kwargs)[source]

Bases: UtilityClass, Observable

BioPAX PathwayStep.

step_process
Type

List[Process]

next_step
Type

List[Process]

class pybiopax.biopax.util.PhenotypeVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX PhenotypeVocabulary.

class pybiopax.biopax.util.ProteinReference(organism=None, sequence=None, **kwargs)[source]

Bases: SequenceEntityReference

BioPAX ProteinReference.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.Provenance(**kwargs)[source]

Bases: UtilityClass, Named

BioPAX Provenance.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.PublicationXref(title=None, url=None, source=None, author=None, year=None, **kwargs)[source]

Bases: Xref

BioPAX PublicationXref.

title
Type

str

url
Type

List[str]

source
Type

List[str]

author
Type

List[str]

year
Type

int

class pybiopax.biopax.util.RelationshipTypeVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX RelationshipTypeVocabulary.

class pybiopax.biopax.util.RelationshipXref(relationship_type=None, **kwargs)[source]

Bases: Xref

BioPAX RelationshipXref.

relationship_type
Type

RelationshipTypeVocabulary

class pybiopax.biopax.util.RnaReference(sub_region=None, **kwargs)[source]

Bases: NucleicAcidReference

BioPAX RnaReference.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.RnaRegionReference(absolute_region=None, region_type=None, **kwargs)[source]

Bases: NucleicAcidRegionReference

BioPAX RnaRegionReference.

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.Score(score_source=None, value=None, **kwargs)[source]

Bases: UtilityClass, XReferrable

BioPAX Score.

score_source
Type

Provenance

value
Type

str

class pybiopax.biopax.util.SequenceEntityReference(organism=None, sequence=None, **kwargs)[source]

Bases: EntityReference

BioPAX SequenceEntityReference.

organism
Type

BioSource

sequence
Type

str

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.SequenceInterval(sequence_interval_begin=None, sequence_interval_end=None, **kwargs)[source]

Bases: SequenceLocation

BioPAX SequenceInterval.

sequence_interval_begin
Type

SequenceSite

sequence_interval_end
Type

SequenceSite

class pybiopax.biopax.util.SequenceLocation(region_type=None, **kwargs)[source]

Bases: UtilityClass

BioPAX SequenceLocation.

region_type
Type

List[SequenceRegionVocabulary]

class pybiopax.biopax.util.SequenceModificationVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX SequenceModificationVocabulary.

class pybiopax.biopax.util.SequenceRegionVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX SequenceRegionVocabulary.

class pybiopax.biopax.util.SequenceSite(position_status=None, sequence_position=None, **kwargs)[source]

Bases: SequenceLocation

BioPAX SequenceSite.

position_status
Type

str

sequence_position
Type

int

class pybiopax.biopax.util.SmallMoleculeReference(structure=None, chemical_formula=None, molecular_weight=None, **kwargs)[source]

Bases: EntityReference

BioPAX SmallMoleculeReference.

structure
Type

ChemicalStructure

chemical_formula
Type

str

molecular_weight
Type

float

property name

All names associated with the object including the standard and display name, if available.

class pybiopax.biopax.util.Stoichiometry(stoichiometric_coefficient=None, physical_entity=None, **kwargs)[source]

Bases: UtilityClass

BioPAX Stoichiometry.

stoichiometric_coefficient
Type

float

physical_entity
Type

PhysicalEntity

class pybiopax.biopax.util.TissueVocabulary(term=None, **kwargs)[source]

Bases: ControlledVocabulary

BioPAX TissueVocabulary.

class pybiopax.biopax.util.UnificationXref(db=None, id=None, db_version=None, id_version=None, **kwargs)[source]

Bases: Xref

BioPAX UnificationXref.

class pybiopax.biopax.util.UtilityClass(uid, comment=None, **kwargs)[source]

Bases: BioPaxObject

BioPAX UtilityClass.

class pybiopax.biopax.util.Xref(db=None, id=None, db_version=None, id_version=None, **kwargs)[source]

Bases: UtilityClass

BioPAX Xref.

db
Type

str

id
Type

str

db_version
Type

str

id_version
Type

str