Package org.helm.notation2.tools
Class RNAUtils
java.lang.Object
org.helm.notation2.tools.RNAUtils
public class RNAUtils extends Object
RNAUtils, class to provide methods for rna polymer
- Author:
- hecht
-
Field Summary
Fields Modifier and Type Field Description static intMINUMUM_MATCH_FRAGMENT_LENGTH -
Method Summary
Modifier and Type Method Description static voidaddLastP(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to add a phosphate to the last polymer's nucleotidestatic booleanareAntiparallel(org.helm.notation2.parser.notation.polymer.PolymerNotation polymerOne, org.helm.notation2.parser.notation.polymer.PolymerNotation polymerTwo)method to check if two given polymers are complement to each otherstatic org.helm.notation2.parser.notation.polymer.PolymerNotationgetAntiparallel(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to get the antiparallel polymer for a rna/dna polymerstatic org.helm.notation2.parser.notation.polymer.PolymerNotationgetComplement(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to get the normal complement polymer for a given rna/dna polymerstatic org.helm.notation2.parser.notation.polymer.PolymerNotationgetInverse(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to get the polymer with the inverse sequence of the current polymerstatic StringgetMaxMatchFragment(String seq1, String seq2)method to get the largest matched fragment between two sequences, replace T with U before Matchstatic StringgetMaxMatchFragment(String seq1, String seq2, int minLength)This method returns the largest matched fragment between two sequences, replace T with U before matchstatic StringgetModifiedNucleotideSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to get the modifiedNucleotideSequence of the given PolymerNotationstatic StringgetNaturalAnalogSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to generate the natural analogue sequence of a rna/dna of a given polymerstatic List<Nucleotide>getNucleotideList(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to get all nucleotides for one polymerstatic StringgetNucleotideSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to get the nucleotide sequence for the polymerstatic org.helm.notation2.parser.notation.polymer.PolymerNotationgetReverseComplement(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to get the polymer with the reverse complement sequence of the current polymerstatic StringgetReverseSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to generate the reverse rna/dna sequence of a given polymerstatic StringgetSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation one)method to get the rna sequence of the given PolymerNotationstatic StringgetTrimmedNucleotideSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to get the trimmed nucleotide sequencestatic booleanhasNucleotideModification(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to check if the given PolymerNotation has a nucleotide Modificationstatic List<org.helm.notation2.parser.notation.connection.ConnectionNotation>hybridize(org.helm.notation2.parser.notation.polymer.PolymerNotation one, org.helm.notation2.parser.notation.polymer.PolymerNotation two)method to hybridize two given PolymerNotations togetherstatic List<org.helm.notation2.parser.notation.connection.ConnectionNotation>hybridizeAntiparallel(org.helm.notation2.parser.notation.polymer.PolymerNotation one, org.helm.notation2.parser.notation.polymer.PolymerNotation two)method to hybridize two PolymerNotations together if they are antiparallelstatic voidremoveLastP(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to remove the phosphate of the last nucleotide
-
Field Details
-
MINUMUM_MATCH_FRAGMENT_LENGTH
public static final int MINUMUM_MATCH_FRAGMENT_LENGTH- See Also:
- Constant Field Values
-
-
Method Details
-
getReverseSequence
public static String getReverseSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws RNAUtilsException, HELM2HandledException, NotationException, ChemistryExceptionmethod to generate the reverse rna/dna sequence of a given polymer- Parameters:
polymer- PolymerNotation- Returns:
- sequence reverse rna/dna sequence
- Throws:
RNAUtilsException- if the polymer is not a RNA/DNAHELM2HandledException- if the polymer contains HELM2 featuresNotationException- if notation is not validChemistryException- if the Chemistry Engine can not be initialized
-
getNaturalAnalogSequence
public static String getNaturalAnalogSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws HELM2HandledException, RNAUtilsException, ChemistryExceptionmethod to generate the natural analogue sequence of a rna/dna of a given polymer- Parameters:
polymer- PolymerNotation- Returns:
- sequence natural analogue sequence
- Throws:
HELM2HandledException- if the polymer contains HELM2 featuresRNAUtilsException- if the polymer is not RNA or DNAChemistryException- if the Chemistry Engine can not be initialized
-
areAntiparallel
public static boolean areAntiparallel(org.helm.notation2.parser.notation.polymer.PolymerNotation polymerOne, org.helm.notation2.parser.notation.polymer.PolymerNotation polymerTwo) throws RNAUtilsException, HELM2HandledException, ChemistryException, NucleotideLoadingExceptionmethod to check if two given polymers are complement to each other- Parameters:
polymerOne- PolymerNotation of the first polymerpolymerTwo- PolymerNotation of the second polymer- Returns:
- true, if they are opposite to each other, false otherwise
- Throws:
RNAUtilsException- if the polymers are not rna/dna or the antiparallel strand can not be built from polymerOneHELM2HandledException- if the polymers contain HELM2 featuresChemistryException- if the Chemistry Engine can not be initializedNucleotideLoadingException- if nucleotides can not be loaded
-
getMaxMatchFragment
public static String getMaxMatchFragment(String seq1, String seq2) throws org.helm.notation2.parser.exceptionparser.NotationExceptionmethod to get the largest matched fragment between two sequences, replace T with U before Match- Parameters:
seq1- single letter, all upper case nucleotide sequenceseq2- single letter, all upper case nucleotide sequence- Returns:
- maximal match fragment of seq1 and seq2
- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if the notation is not valid
-
getMaxMatchFragment
public static String getMaxMatchFragment(String seq1, String seq2, int minLength) throws org.helm.notation2.parser.exceptionparser.NotationExceptionThis method returns the largest matched fragment between two sequences, replace T with U before match- Parameters:
seq1- single letter, all upper case nucleotide sequenceseq2- single letter, all upper case nucleotide sequenceminLength- - minimum fragment length- Returns:
- largest match fragment
- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if the notation is not valid
-
removeLastP
public static void removeLastP(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws RNAUtilsException, org.helm.notation2.parser.exceptionparser.NotationException, HELM2HandledExceptionmethod to remove the phosphate of the last nucleotide- Parameters:
polymer- PolymerNotation- Throws:
RNAUtilsException- if the PolmyerNotation is not a rna or dnaorg.helm.notation2.parser.exceptionparser.NotationException- if the changed notation object can not be generatedHELM2HandledException- if HELM2 features are involved
-
addLastP
public static void addLastP(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws RNAUtilsException, org.helm.notation2.parser.exceptionparser.NotationException, HELM2HandledExceptionmethod to add a phosphate to the last polymer's nucleotide- Parameters:
polymer- PolymerNotation- Throws:
RNAUtilsException- if the polymer is no rna or dnaorg.helm.notation2.parser.exceptionparser.NotationException- if the changed notation object can not be generatedHELM2HandledException- if HELM2 features are involved
-
getAntiparallel
public static org.helm.notation2.parser.notation.polymer.PolymerNotation getAntiparallel(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws RNAUtilsException, ChemistryException, NucleotideLoadingExceptionmethod to get the antiparallel polymer for a rna/dna polymer- Parameters:
polymer- PolymerNotation- Returns:
- antiparallel polymer
- Throws:
RNAUtilsException- if the polymer is not rna or dna or the reverse polymer can not be builtChemistryException- if the Chemistry Engine can not be initializedNucleotideLoadingException- if nucleotides can not be loaded
-
getInverse
public static org.helm.notation2.parser.notation.polymer.PolymerNotation getInverse(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws RNAUtilsException, NotationException, ChemistryException, NucleotideLoadingExceptionmethod to get the polymer with the inverse sequence of the current polymer- Parameters:
polymer- PolymerNotation- Returns:
- inverse sequence
- Throws:
RNAUtilsException- if the polymer is not rna or dna or the inverse strand can not be builtNotationException- if notation is not validChemistryException- if the Chemistry Engine can not be initializedNucleotideLoadingException- if nucleotides can not be loaded
-
getReverseComplement
public static org.helm.notation2.parser.notation.polymer.PolymerNotation getReverseComplement(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws RNAUtilsException, NotationException, ChemistryException, NucleotideLoadingExceptionmethod to get the polymer with the reverse complement sequence of the current polymer- Parameters:
polymer- PolymerNotation- Returns:
- PolymerNotation with the reverse complement
- Throws:
RNAUtilsException- if the polymer is not rna or dna or the inverse strand can not be builtNotationException- if notation is not validChemistryException- if the Chemistry Engine can not be initializedNucleotideLoadingException- can not be loaded
-
getComplement
public static org.helm.notation2.parser.notation.polymer.PolymerNotation getComplement(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws RNAUtilsException, ChemistryException, NucleotideLoadingExceptionmethod to get the normal complement polymer for a given rna/dna polymer- Parameters:
polymer- given polymernotation- Returns:
- complement polymernotation of the given polymernotation
- Throws:
RNAUtilsException- if the polymer is not rna or dna or the complement polymer can not be builtChemistryException- if the Chemistry Engine can not be initializedNucleotideLoadingException- if nucleotides can not be loaded
-
hasNucleotideModification
public static boolean hasNucleotideModification(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws org.helm.notation2.parser.exceptionparser.NotationExceptionmethod to check if the given PolymerNotation has a nucleotide Modification- Parameters:
polymer- PolymerNotation- Returns:
- true if the polymer contains at least one modifcation, false otherwise
- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if notation is not valid
-
hybridizeAntiparallel
public static List<org.helm.notation2.parser.notation.connection.ConnectionNotation> hybridizeAntiparallel(org.helm.notation2.parser.notation.polymer.PolymerNotation one, org.helm.notation2.parser.notation.polymer.PolymerNotation two) throws RNAUtilsException, org.helm.notation2.parser.exceptionparser.NotationException, HELM2HandledException, ChemistryException, NucleotideLoadingExceptionmethod to hybridize two PolymerNotations together if they are antiparallel- Parameters:
one- PolymerNotation firsttwo- PolymerNotation second- Returns:
- List of ConnectionNotations
- Throws:
RNAUtilsException- if the polymer is not a RNA/DNAorg.helm.notation2.parser.exceptionparser.NotationException- if notation is not validHELM2HandledException- if it contains helm2 specific features can not be downcasted to HELM1 formatChemistryException- if the Chemistry Engine can not be initializedNucleotideLoadingException- if nucleotides can not be loaded
-
getSequence
public static String getSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation one) throws RNAUtilsException, HELM2HandledException, ChemistryExceptionmethod to get the rna sequence of the given PolymerNotation- Parameters:
one- PolymerNotation- Returns:
- sequence
- Throws:
RNAUtilsException- if the polymer is not a RNA/DNAHELM2HandledException- if it contains helm2 specific features can not be casted to HELM1 FormatChemistryException- if chemistry engine can not be initialized
-
getModifiedNucleotideSequence
public static String getModifiedNucleotideSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws RNAUtilsException, HELM2HandledException, ChemistryExceptionmethod to get the modifiedNucleotideSequence of the given PolymerNotation- Parameters:
polymer- PolymerNotation- Returns:
- modified nucleotide sequence
- Throws:
RNAUtilsException- if the polymer is not a RNA/DNAHELM2HandledException- if it contains HELM2 specific features, it can not be casted to HELM1FormatChemistryException- if the chemistry engine can not be initialized
-
hybridize
public static List<org.helm.notation2.parser.notation.connection.ConnectionNotation> hybridize(org.helm.notation2.parser.notation.polymer.PolymerNotation one, org.helm.notation2.parser.notation.polymer.PolymerNotation two) throws RNAUtilsException, org.helm.notation2.parser.exceptionparser.NotationException, HELM2HandledException, NotationException, ChemistryExceptionmethod to hybridize two given PolymerNotations together- Parameters:
one- PolymerNotaitontwo- PolymerNotation- Returns:
- List of ConnectionNotations
- Throws:
RNAUtilsException- if the polymer is not a RNA/DNAorg.helm.notation2.parser.exceptionparser.NotationException- if notation is not validHELM2HandledException- if it contains specific HELM2 features, so that it can not casted to HELM1FormatNotationException- if notation is not validChemistryException- if chemistry engine can not be initialized
-
getNucleotideSequence
public static String getNucleotideSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws org.helm.notation2.parser.exceptionparser.NotationException, RNAUtilsException, HELM2HandledException, NucleotideLoadingException, ChemistryExceptionmethod to get the nucleotide sequence for the polymer- Parameters:
polymer- PolymerNotation- Returns:
- 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 FormatNucleotideLoadingException- if nucleotides can not be loadedChemistryException- if chemistry engine can not be initialized
-
getNucleotideList
public static List<Nucleotide> getNucleotideList(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws RNAUtilsException, HELM2HandledException, ChemistryExceptionmethod to get all nucleotides for one polymer- Parameters:
polymer- PolymerNotation- Returns:
- List of nucleotides of the polmyer
- Throws:
RNAUtilsException- if the polymer is not rna or dna or the nucleotide can not be readHELM2HandledException- if the polymer contains HELM2 featuresChemistryException- if chemistry engine can not be initialized
-
getTrimmedNucleotideSequence
public static String getTrimmedNucleotideSequence(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws RNAUtilsException, HELM2HandledException, ChemistryExceptionmethod to get the trimmed nucleotide sequence- Parameters:
polymer- given rna/dna polymer- Returns:
- trimmed nucleotide sequence
- Throws:
RNAUtilsException- if the polymer is not a RNA/DNAHELM2HandledException- if it contains HELM2 specific features, so that it can not be casted to HELM1 FormatChemistryException- if chemistry engine can not be initialized
-