Package org.helm.notation2.tools
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 StringDEFAULT_BASE_PAIR_CHARstatic StringDEFAULT_PADDING_CHAR -
Method Summary
Modifier and Type Method Description static voidcombineHELM2notation(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 HELM2NotationList<org.helm.notation2.parser.notation.HELM2Notation>decompose(org.helm.notation2.parser.notation.HELM2Notation helm2notation)decompose the HELM2 into smaller HELM2 objectsstatic 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 ConnectionNotationstatic 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 ConnectionNotationstatic 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 objectsstatic 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 objectsstatic 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 typestatic 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 objectsstatic 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 objectsstatic intgetTotalMonomerCount(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to get the total number of MonomerNotationUnits in a HELMNotation objectstatic booleanhasNucleotideModification(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)method to check if any of the rna polymers have a modified nucleotidestatic org.helm.notation2.parser.notation.HELM2NotationreadNotation(String notation)static StringtoJSON(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to generate a JSON-Object from the given HELM2Notation
-
Field Details
-
DEFAULT_PADDING_CHAR
- See Also:
- Constant Field Values
-
DEFAULT_BASE_PAIR_CHAR
- See Also:
- Constant Field Values
-
-
Method Details
-
toJSON
public static final String toJSON(org.helm.notation2.parser.notation.HELM2Notation helm2notation) throws com.fasterxml.jackson.core.JsonProcessingExceptionmethod 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.NotationExceptionmethod to add a new HELMNotation to another HELM2Notation, the new HELM2Notation will be merged to the first HELM2Notation- Parameters:
helm2notation- HELM2NotationnewHELM2Notation- 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.NotationExceptionmethod to check if any of the rna polymers have a modified nucleotide- Parameters:
polymers- list ofPolymerNotation- 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, ChemistryExceptiongenerate 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 validRNAUtilsException- if the polymer is not a RNA/DNAHELM2HandledException- if it contains HELM2 specific features, so that it can not be casted to HELM1 FormatNotationException- if notation is not validChemistryException- 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- HELM2NotationpaddingChar- padding characterbasePairChar- base pair character- Returns:
- string array of formated nucleotide sequence
- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if notation is not validRNAUtilsException- if the polymer is not a RNA/DNAHELM2HandledException- if it contains HELM2 specific features, so that it can not be casted to HELM1 FormatNotationException- if notation is not validChemistryException- 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:
ParserExceptionorg.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 typepolymers- List of PolymerNotation- Returns:
- List of PolymerNotation with the specific type
-