Class PsiToBiopax3Converter

java.lang.Object
org.biopax.paxtools.converter.psi.PsiToBiopax3Converter

public class PsiToBiopax3Converter extends Object
The PSIMI 2.5 to BioPAX Level3 converter.
Author:
Igor Rodchenkov (rodche)
  • Constructor Details

    • PsiToBiopax3Converter

      public PsiToBiopax3Converter()
      Constructor. Will use the default empty string xml:base.
    • PsiToBiopax3Converter

      public PsiToBiopax3Converter(String xmlBase)
      Constructor.
      Parameters:
      xmlBase - xml:base to be used when generating non-canonical BioPAX objects' URIs
  • Method Details

    • convert

      public void convert(InputStream inputStream, OutputStream outputStream, boolean forceInteractionToComplex) throws IOException, psidev.psi.mi.xml.PsimiXmlReaderException
      Converts the PSI-MI inputStream into BioPAX outputStream. Streams will be closed by the converter. Warning: for very large models (about 1-2Gb if serialized), and when ByteArrayOutputStream is used, OutOfMemoryError might be thrown (increasing the "heap" RAM won't help; but using FileOutputStream will).
      Parameters:
      inputStream - PSI-MI
      outputStream - BioPAX
      forceInteractionToComplex - - always generate Complex instead of MolecularInteraction
      Throws:
      IOException - when an I/O error occur
      psidev.psi.mi.xml.PsimiXmlReaderException - when an error in the PSI-MI parser happens
    • convertTab

      public void convertTab(InputStream inputStream, OutputStream outputStream, boolean forceInteractionToComplex) throws IOException, psidev.psi.mi.tab.PsimiTabException
      Converts the PSI-MITAB inputStream into BioPAX outputStream. Streams will be closed by the converter.
      Parameters:
      inputStream - psi-mitab
      outputStream - biopax
      forceInteractionToComplex - - always generate Complex instead of MolecularInteraction
      Throws:
      IOException - when an I/O error occur
      psidev.psi.mi.tab.PsimiTabException - when there's a problem within the PSI-MITAB parser
    • convert

      public void convert(psidev.psi.mi.xml.model.EntrySet entrySet, OutputStream outputStream, boolean forceInteractionToComplex)
      Converts the PSI interactions from the EntrySet and places into BioPAX output stream. Stream will be closed by the converter.
      Parameters:
      entrySet - PSI-MI entry set
      outputStream - output stream for writing the BioPAX RDF/XML result
      forceInteractionToComplex - true/false - whether to always generate Complex instead of MolecularInteraction
    • getXmlBase

      public String getXmlBase()
      Returns:
      the xml:base, a namespace for the converter-generated BioPAX objects' URIs.