Class BioSequenceFactory


  • public abstract class BioSequenceFactory
    extends java.lang.Object
    A factory for creating BioSequence objects.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static BioSequence make​(org.intermine.model.bio.BioEntity bioEnt, BioSequenceFactory.SequenceType type)
      Create a new BioSequence from a BioEntity, given its SequenceType
      static BioSequence make​(org.intermine.model.bio.Protein protein)
      Create a new BioSequence from a Protein
      static BioSequence make​(org.intermine.model.bio.SequenceFeature feature)
      Create a new BioSequence from a SequenceFeature
      static BioSequence makeWithTranslation​(org.intermine.model.bio.SequenceFeature feature)
      Create a new BioSequence from a SequenceFeature
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • make

        public static BioSequence make​(org.intermine.model.bio.SequenceFeature feature)
                                throws org.biojava.nbio.core.exceptions.CompoundNotFoundException
        Create a new BioSequence from a SequenceFeature
        Parameters:
        feature - the SequenceFeature
        Returns:
        a new BioSequence object or null if the SequenceFeature doesn't have a Sequence
        Throws:
        org.biojava.nbio.core.exceptions.CompoundNotFoundException - if any of the residues of the SequenceFeature can't be turned into DNA symbols.
      • makeWithTranslation

        public static BioSequence makeWithTranslation​(org.intermine.model.bio.SequenceFeature feature)
                                               throws org.biojava.nbio.core.exceptions.CompoundNotFoundException
        Create a new BioSequence from a SequenceFeature
        Parameters:
        feature - the SequenceFeature
        Returns:
        a new BioSequence object or null if the SequenceFeature doesn't have a Sequence. The sequence is the translated AA sequence of the dna one provided.
        Throws:
        org.biojava.nbio.core.exceptions.CompoundNotFoundException - if any of the residues of the SequenceFeature can't be turned into DNA symbols.
      • make

        public static BioSequence make​(org.intermine.model.bio.Protein protein)
                                throws org.biojava.nbio.core.exceptions.CompoundNotFoundException
        Create a new BioSequence from a Protein
        Parameters:
        protein - the Protein
        Returns:
        a new BioSequence object or null if the Protein doesn't have a Sequence
        Throws:
        org.biojava.nbio.core.exceptions.CompoundNotFoundException - if any of the residues of the Protein can't be turned into amino acid symbols.
      • make

        public static BioSequence make​(org.intermine.model.bio.BioEntity bioEnt,
                                       BioSequenceFactory.SequenceType type)
                                throws org.biojava.nbio.core.exceptions.CompoundNotFoundException
        Create a new BioSequence from a BioEntity, given its SequenceType
        Parameters:
        bioEnt - the bio entity
        type - the SequenceType
        Returns:
        a new BioSequence object or null if the BioEntity doesn't have a Sequence
        Throws:
        org.biojava.nbio.core.exceptions.CompoundNotFoundException - if any of the residues of the BioEntity can't be turned into symbols of the given SequenceType.