Package org.helm.notation2.tools
Class NucleotideParser
java.lang.Object
org.helm.notation2.tools.NucleotideParser
public class NucleotideParser extends Object
NucleotideParser
- Author:
- hecht
-
Field Summary
Fields Modifier and Type Field Description static charBRANCH_END_SYMBOLstatic charBRANCH_START_SYMBOLstatic Map<String,String>complementMapstatic StringDEFAULT_NOTATION_SOURCEDeprecated.static intMINUMUM_MATCH_FRAGMENT_LENGTHstatic charMODIFICATION_END_SYMBOLstatic charMODIFICATION_START_SYMBOLstatic StringRNA_DESIGN_DICER_27_Lstatic StringRNA_DESIGN_DICER_27_Rstatic StringRNA_DESIGN_NONEstatic StringRNA_DESIGN_TUSCHL_19_PLUS_2static List<String>SUPPORTED_DESIGN_LIST -
Constructor Summary
Constructors Constructor Description NucleotideParser() -
Method Summary
Modifier and Type Method Description static NucleotideconvertToNucleotide(String id, boolean last)method to convert an string to an nucleotidestatic intgetMatchingBracketPosition(char[] characters, int position, char openingBracket, char closingBracket)static intgetMonomerCountForRNA(String notation)static List<String>getMonomerIDListFromNucleotide(String element)static NucleotidegetNucleotide(String nucleotideXML)static NucleotidegetNucleotide(org.jdom2.Element nucleotideElement)static Map<String,Map<String,String>>getNucleotideTemplates(org.jdom2.Element templatesElement)static StringgetNucleotideTemplatesXML(Map<String,Map<String,String>> templates)static booleanvalidateSimpleNotationForRNA(String polymerNotation)validate RNA simple notation
-
Field Details
-
MODIFICATION_START_SYMBOL
public static final char MODIFICATION_START_SYMBOL- See Also:
- Constant Field Values
-
MODIFICATION_END_SYMBOL
public static final char MODIFICATION_END_SYMBOL- See Also:
- Constant Field Values
-
BRANCH_START_SYMBOL
public static final char BRANCH_START_SYMBOL- See Also:
- Constant Field Values
-
BRANCH_END_SYMBOL
public static final char BRANCH_END_SYMBOL- See Also:
- Constant Field Values
-
DEFAULT_NOTATION_SOURCE
Deprecated.- See Also:
- Constant Field Values
-
MINUMUM_MATCH_FRAGMENT_LENGTH
public static final int MINUMUM_MATCH_FRAGMENT_LENGTH- See Also:
- Constant Field Values
-
complementMap
-
RNA_DESIGN_NONE
- See Also:
- Constant Field Values
-
RNA_DESIGN_TUSCHL_19_PLUS_2
- See Also:
- Constant Field Values
-
RNA_DESIGN_DICER_27_R
- See Also:
- Constant Field Values
-
RNA_DESIGN_DICER_27_L
- See Also:
- Constant Field Values
-
SUPPORTED_DESIGN_LIST
-
-
Constructor Details
-
NucleotideParser
public NucleotideParser()
-
-
Method Details
-
getNucleotideTemplates
-
getNucleotide
-
getNucleotide
public static Nucleotide getNucleotide(String nucleotideXML) throws org.jdom2.JDOMException, IOException- Throws:
org.jdom2.JDOMExceptionIOException
-
getNucleotideTemplatesXML
-
getMonomerIDListFromNucleotide
public static List<String> getMonomerIDListFromNucleotide(String element) throws org.helm.notation2.parser.exceptionparser.NotationException- Throws:
org.helm.notation2.parser.exceptionparser.NotationException
-
convertToNucleotide
public static Nucleotide convertToNucleotide(String id, boolean last) throws MonomerException, NotationException, ChemistryException, NucleotideLoadingException, org.helm.notation2.parser.exceptionparser.NotationExceptionmethod to convert an string to an nucleotide- Parameters:
id- given input stringlast- if the nucleotide is the last element of an rna- Returns:
- nucleotide
- Throws:
ChemistryException- if the chemistry engine could not be initializedNotationException- if notation is not validMonomerException- if the monomer is not validNucleotideLoadingException- if nucleotides can not be loadedorg.helm.notation2.parser.exceptionparser.NotationException- if the notation is not valid
-
getMonomerCountForRNA
public static int getMonomerCountForRNA(String notation) throws org.helm.notation2.parser.exceptionparser.NotationException- Parameters:
notation- given notation- Returns:
- count of rna monomers
- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if notation is not valid
-
validateSimpleNotationForRNA
public static boolean validateSimpleNotationForRNA(String polymerNotation) throws org.helm.notation2.parser.exceptionparser.NotationExceptionvalidate RNA simple notation- Parameters:
polymerNotation- notation to be checked- Returns:
- true if the polymyer notation is valid, otherwise throws an exception
- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if notation is not valid
-
getMatchingBracketPosition
public static int getMatchingBracketPosition(char[] characters, int position, char openingBracket, char closingBracket)
-