Class L3ToSBGNPDConverter

java.lang.Object
org.biopax.paxtools.io.sbgn.L3ToSBGNPDConverter

public class L3ToSBGNPDConverter extends Object
This class converts BioPAX L3 model into SBGN PD (SBGN-ML XML). It optionally applies a special COSE layout. Currently, this converter ignores several BioPAX types/properties:
  • Parent-child relationship between entity references
  • Binding features and covalent binding features of physical entities
  • Pathway, PathwayStep, Evidence, etc.
Also note that:
  • Compartment is just a controlled vocabulary in BioPAX, so nesting and neighborhood relations between compartments are not handled here.
  • Control structures in BioPAX and in SBGN PD are a little different. We use logical glyphs and arcs to approximate controls in BioPAX. However, in fact, BioPAX does not imply a logical operator between controllers.
Author:
Ozgun Babur
  • Field Details

    • ubiqueDet

      protected UbiqueDetector ubiqueDet
    • featStrGen

      protected FeatureDecorator featStrGen
    • doLayout

      protected boolean doLayout
    • maxNodes

      protected int maxNodes
    • sbgn2BPMap

      protected Map<String,Set<String>> sbgn2BPMap
    • flattenComplexContent

      protected boolean flattenComplexContent
    • useTwoGlyphsForReversibleConversion

      protected boolean useTwoGlyphsForReversibleConversion
  • Constructor Details

    • L3ToSBGNPDConverter

      public L3ToSBGNPDConverter()
      Constructor.
    • L3ToSBGNPDConverter

      public L3ToSBGNPDConverter(UbiqueDetector ubiqueDet, FeatureDecorator featStrGen, boolean doLayout)
      Constructor with parameters.
      Parameters:
      ubiqueDet - Ubique detector class
      featStrGen - feature string generator class
      doLayout - whether we want to perform layout after SBGN creation.
  • Method Details

    • setDoLayout

      public void setDoLayout(boolean doLayout)
    • isUseTwoGlyphsForReversibleConversion

      public boolean isUseTwoGlyphsForReversibleConversion()
      Getter class for the parameter useTwoGlyphsForReversibleConversion.
      Returns:
      whether use two glyphs for the reversible conversion
    • setUseTwoGlyphsForReversibleConversion

      public void setUseTwoGlyphsForReversibleConversion(boolean useTwoGlyphsForReversibleConversion)
      Sets the option to use two glyphs for the reversible conversion.
      Parameters:
      useTwoGlyphsForReversibleConversion - give true if use two glyphs
    • isFlattenComplexContent

      public boolean isFlattenComplexContent()
    • setFlattenComplexContent

      public void setFlattenComplexContent(boolean flattenComplexContent)
    • writeSBGN

      public void writeSBGN(Model model, String file)
      Converts the given model to SBGN, and writes in the specified file.
      Parameters:
      model - model to convert
      file - file to write
    • writeSBGN

      public void writeSBGN(Model model, OutputStream stream)
      Converts the given model to SBGN, and writes in the specified output stream.
      Parameters:
      model - model to convert
      stream - output stream to write
    • createSBGN

      public org.sbgn.bindings.Sbgn createSBGN(Model model)
      Creates an SBGN object from the given BioPAX L3 model. Currently, it converts physical entities (interaction participants) and Conversion, Control, including their sub-classes, TemplateReaction, MolecularInteraction, GeneticInteraction, and base Interaction.class types. I does not convert other BioPAX entities and utility classes, such as: Pathway, Evidence, PathwayStep.
      Parameters:
      model - model to convert to SBGN
      Returns:
      SBGN representation of the BioPAX model
    • getSbgn2BPMap

      public Map<String,Set<String>> getSbgn2BPMap()
      Gets the mapping from SBGN IDs to BioPAX IDs. This mapping is currently many-to-one, but can potentially become many-to-many in the future.
      Returns:
      sbgn-to-biopax mapping