Class HELM2NotationUtils

java.lang.Object
org.helm.notation2.tools.HELM2NotationUtils

public class HELM2NotationUtils
extends Object
HELM2NotationUtils
Author:
hecht
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static String DEFAULT_BASE_PAIR_CHAR  
    static String DEFAULT_PADDING_CHAR  
  • Method Summary

    Modifier and Type Method Description
    static void combineHELM2notation​(org.helm.notation2.parser.notation.HELM2Notation helm2notation, org.helm.notation2.parser.notation.HELM2Notation newHELM2Notation)
    method to add a new HELMNotation to another HELM2Notation, the new HELM2Notation will be merged to the first HELM2Notation
    List<org.helm.notation2.parser.notation.HELM2Notation> decompose​(org.helm.notation2.parser.notation.HELM2Notation helm2notation)
    decompose the HELM2 into smaller HELM2 objects
    static List<org.helm.notation2.parser.notation.connection.ConnectionNotation> getAllBasePairConnections​(List<org.helm.notation2.parser.notation.connection.ConnectionNotation> connections)
    method to get all base pair connections of a given list of ConnectionNotation
    static List<org.helm.notation2.parser.notation.connection.ConnectionNotation> getAllEdgeConnections​(List<org.helm.notation2.parser.notation.connection.ConnectionNotation> connections)
    method to get all edge connections of a given List of ConnectionNotation
    static List<org.helm.notation2.parser.notation.polymer.PolymerNotation> getBLOBPolymers​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
    method to get all blob polymers given a list of PolymerNotation objects
    static List<org.helm.notation2.parser.notation.polymer.PolymerNotation> getCHEMPolymers​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
    method to get all chem polymers given a list of PolymerNotation objects
    static String[] getFormatedSirnaSequences​(org.helm.notation2.parser.notation.HELM2Notation helm2notation)
    generate formated siRNA sequence with default padding char " " and base-pair char "|"
    static String[] getFormatedSirnaSequences​(org.helm.notation2.parser.notation.HELM2Notation helm2notation, String paddingChar, String basePairChar)  
    static List<org.helm.notation2.parser.notation.polymer.PolymerNotation> getListOfPolymersSpecificType​(String str, List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
    method to get all polymers for one specific polymer type
    static List<org.helm.notation2.parser.notation.polymer.PolymerNotation> getPeptidePolymers​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
    method to get all peptide polymers given a list of PolymerNotation objects
    static List<org.helm.notation2.parser.notation.polymer.PolymerNotation> getRNAPolymers​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
    method to get all rna polymers given a List of PolymerNotation objects
    static int getTotalMonomerCount​(org.helm.notation2.parser.notation.HELM2Notation helm2notation)
    method to get the total number of MonomerNotationUnits in a HELMNotation object
    static boolean hasNucleotideModification​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
    method to check if any of the rna polymers have a modified nucleotide
    static org.helm.notation2.parser.notation.HELM2Notation readNotation​(String notation)  
    static String toJSON​(org.helm.notation2.parser.notation.HELM2Notation helm2notation)
    method to generate a JSON-Object from the given HELM2Notation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • toJSON

      public static final String toJSON​(org.helm.notation2.parser.notation.HELM2Notation helm2notation) throws com.fasterxml.jackson.core.JsonProcessingException
      method to generate a JSON-Object from the given HELM2Notation
      Parameters:
      helm2notation - HELM2Notation object
      Returns:
      NotationContainer in JSON-Format
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - json could not produced
    • getAllEdgeConnections

      public static final List<org.helm.notation2.parser.notation.connection.ConnectionNotation> getAllEdgeConnections​(List<org.helm.notation2.parser.notation.connection.ConnectionNotation> connections)
      method to get all edge connections of a given List of ConnectionNotation
      Parameters:
      connections - List of ConnectionNotation objects
      Returns:
      all edge connections
    • getAllBasePairConnections

      public static final List<org.helm.notation2.parser.notation.connection.ConnectionNotation> getAllBasePairConnections​(List<org.helm.notation2.parser.notation.connection.ConnectionNotation> connections)
      method to get all base pair connections of a given list of ConnectionNotation
      Parameters:
      connections - List of ConnectionNotation objects
      Returns:
      all base pair connections
    • getRNAPolymers

      public static final List<org.helm.notation2.parser.notation.polymer.PolymerNotation> getRNAPolymers​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
      method to get all rna polymers given a List of PolymerNotation objects
      Parameters:
      polymers - List of PolymerNotation
      Returns:
      list of rna polymers
    • getPeptidePolymers

      public static final List<org.helm.notation2.parser.notation.polymer.PolymerNotation> getPeptidePolymers​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
      method to get all peptide polymers given a list of PolymerNotation objects
      Parameters:
      polymers - List of PolymerNotation objects
      Returns:
      list of peptide polymers
    • getCHEMPolymers

      public static final List<org.helm.notation2.parser.notation.polymer.PolymerNotation> getCHEMPolymers​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
      method to get all chem polymers given a list of PolymerNotation objects
      Parameters:
      polymers - List of PolymerNotation objects
      Returns:
      list of chem polymers
    • getBLOBPolymers

      public static final List<org.helm.notation2.parser.notation.polymer.PolymerNotation> getBLOBPolymers​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
      method to get all blob polymers given a list of PolymerNotation objects
      Parameters:
      polymers - List of PolymerNotation objects
      Returns:
      list of blob polymers
    • combineHELM2notation

      public static final void combineHELM2notation​(org.helm.notation2.parser.notation.HELM2Notation helm2notation, org.helm.notation2.parser.notation.HELM2Notation newHELM2Notation) throws org.helm.notation2.parser.exceptionparser.NotationException
      method to add a new HELMNotation to another HELM2Notation, the new HELM2Notation will be merged to the first HELM2Notation
      Parameters:
      helm2notation - HELM2Notation
      newHELM2Notation - new HELMNotation
      Throws:
      org.helm.notation2.parser.exceptionparser.NotationException - if the HELMNotation is not valid
    • getTotalMonomerCount

      public static final int getTotalMonomerCount​(org.helm.notation2.parser.notation.HELM2Notation helm2notation)
      method to get the total number of MonomerNotationUnits in a HELMNotation object
      Parameters:
      helm2notation - given HELM2Notation
      Returns:
      number of MonomerNotationUnits
    • hasNucleotideModification

      public static boolean hasNucleotideModification​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers) throws org.helm.notation2.parser.exceptionparser.NotationException
      method to check if any of the rna polymers have a modified nucleotide
      Parameters:
      polymers - list of PolymerNotation
      Returns:
      true if at least one rna polymer has a modified nucleotide
      Throws:
      org.helm.notation2.parser.exceptionparser.NotationException - if notation is not valid
    • getFormatedSirnaSequences

      public static String[] getFormatedSirnaSequences​(org.helm.notation2.parser.notation.HELM2Notation helm2notation) throws org.helm.notation2.parser.exceptionparser.NotationException, RNAUtilsException, HELM2HandledException, NotationException, ChemistryException
      generate formated siRNA sequence with default padding char " " and base-pair char "|"
      Parameters:
      helm2notation - HELM2Notation
      Returns:
      string array of formated nucloeotide sequence
      Throws:
      org.helm.notation2.parser.exceptionparser.NotationException - if notation is not valid
      RNAUtilsException - if the polymer is not a RNA/DNA
      HELM2HandledException - if it contains HELM2 specific features, so that it can not be casted to HELM1 Format
      NotationException - if notation is not valid
      ChemistryException - if the Chemistry Engine can not be initialized
    • getFormatedSirnaSequences

      public static String[] getFormatedSirnaSequences​(org.helm.notation2.parser.notation.HELM2Notation helm2notation, String paddingChar, String basePairChar) throws org.helm.notation2.parser.exceptionparser.NotationException, RNAUtilsException, HELM2HandledException, NotationException, ChemistryException
      Parameters:
      helm2notation - HELM2Notation
      paddingChar - padding character
      basePairChar - base pair character
      Returns:
      string array of formated nucleotide sequence
      Throws:
      org.helm.notation2.parser.exceptionparser.NotationException - if notation is not valid
      RNAUtilsException - if the polymer is not a RNA/DNA
      HELM2HandledException - if it contains HELM2 specific features, so that it can not be casted to HELM1 Format
      NotationException - if notation is not valid
      ChemistryException - if the Chemistry Engine can not be initialized
    • decompose

      public List<org.helm.notation2.parser.notation.HELM2Notation> decompose​(org.helm.notation2.parser.notation.HELM2Notation helm2notation)
      decompose the HELM2 into smaller HELM2 objects
      Parameters:
      helm2notation - HELM2 object
      Returns:
      list of ContainerHELM2 objects
    • readNotation

      public static org.helm.notation2.parser.notation.HELM2Notation readNotation​(String notation) throws ParserException, org.jdom2.JDOMException
      Throws:
      ParserException
      org.jdom2.JDOMException
    • getListOfPolymersSpecificType

      public static List<org.helm.notation2.parser.notation.polymer.PolymerNotation> getListOfPolymersSpecificType​(String str, List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)
      method to get all polymers for one specific polymer type
      Parameters:
      str - specific polymer type
      polymers - List of PolymerNotation
      Returns:
      List of PolymerNotation with the specific type