Package org.helm.notation2.tools
Class ChangeObjects
java.lang.Object
org.helm.notation2.tools.ChangeObjects
public final class ChangeObjects extends Object
ChangeObjects, class to provide simple methods to change the HELM2Notation
objects
- Author:
- hecht
-
Constructor Summary
Constructors Constructor Description ChangeObjects() -
Method Summary
Modifier and Type Method Description static voidaddAnnotation(org.helm.notation2.parser.notation.annotation.AnnotationNotation notation, int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to add an annotation at a specific position of the HELM2Notationstatic voidaddAnnotationToConnection(int position, String annotation, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to add an annotation to a connection of the HELM2Notationstatic voidaddAnnotationToMonomerNotation(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, int position, String annotation)method to add an annotation to a MonomerNotationstatic org.helm.notation2.parser.notation.polymer.PolymerNotationaddAnnotationToPolymer(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, String annotation)method to add an annotation to a PolymerNotationstatic voidaddConnection(org.helm.notation2.parser.notation.connection.ConnectionNotation notation, int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to add a new connection at the position of the HELM2Notationstatic voidaddCountToMonomerNotation(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, int position, String count)method to set the count of a MonomerNotationstatic voidaddGroup(org.helm.notation2.parser.notation.grouping.GroupingNotation notation, int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to add a group to the grouping section of the HELM2Notationstatic org.helm.notation2.parser.notation.polymer.PolymerNotationaddMonomerNotation(int position, org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, org.helm.notation2.parser.notation.polymer.MonomerNotation monomerNotation)method to add a new MonomerNotation to a PolymerNotationstatic voidaddPolymerNotation(int position, org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to add a PolymerNotation at a specific position of the HELM2Notationstatic voidchangeAnnotation(org.helm.notation2.parser.notation.annotation.AnnotationNotation notation, int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to change an annotation at the position of the HELM2Notationstatic voidchangeConnection(int position, org.helm.notation2.parser.notation.connection.ConnectionNotation notation, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to change a connection at the position of the HELM2Notationstatic voidchangeGroup(org.helm.notation2.parser.notation.grouping.GroupingNotation notation, int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to change a group of the HELM2Notationstatic voidchangeMonomerNotation(int position, org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, org.helm.notation2.parser.notation.polymer.MonomerNotation not)method to change the MonomerNotation on the specific positionstatic voidchangePolymerNotation(int position, org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to change the PolymerNotation at a specific position of the HELM2Notationstatic voiddeleteAllAnnotations(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete all annotations of the HELM2Notationstatic voiddeleteAllConnections(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete all connections of the HELM2Notationstatic voiddeleteAllGroups(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete all groups of the HELM2Notationstatic voiddeleteAnnotation(int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete the annotation at the specific position of the HELM2Notationstatic voiddeleteAnnotationFromMonomerNotation(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, int position)method to delete the annotation of a MonomerNotationstatic voiddeleteConnection(int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete the connection at the specific position of the HELM2Notationstatic voiddeleteGroup(int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete a group at a specific position of the HELM2Notationstatic voiddeleteMonomerNotation(int position, org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to delete a MonomerNotation at a specific position of the PolymerNotationstatic voiddeletePolymerNotation(int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete the PolymerNotation at a specific position of the HELM2Notationstatic voidhybridize(org.helm.notation2.parser.notation.HELM2Notation helm2notation)this method will automatically add base pair info into notation only if it contains two RNA polymer notations and there is no base pairing infostatic org.helm.notation2.parser.notation.polymer.MonomerNotationUnitproduceMonomerNotationUnitWithOtherID(org.helm.notation2.parser.notation.polymer.MonomerNotation monomerNotation, String newID)method to replace the MonomerNotationUnit having the MonomerID with the new MonomerIDstatic org.helm.notation2.parser.notation.polymer.PolymerNotationremoveAnnotationOfPolmyer(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to remove a current annotation of a PolymerNotationstatic voidreplaceMonomer(org.helm.notation2.parser.notation.HELM2Notation helm2notation, String polymerType, String existingMonomerID, String newMonomerID)method to replace the MonomerID with the new MonomerID for a given polymer typestatic org.helm.notation2.parser.notation.polymer.MonomerNotationreplaceMonomerNotation(org.helm.notation2.parser.notation.polymer.MonomerNotation monomerNotation, String existingMonomerID, String newMonomerID)method to replace the MonomerNotation having the MonomerID with the new MonomerIDstatic org.helm.notation2.parser.notation.polymer.MonomerNotationGroupreplaceMonomerNotationGroup(org.helm.notation2.parser.notation.polymer.MonomerNotationGroup monomerNotation, String existingMonomerID, String newMonomerID)method to replace the MonomerNotationGroup having the MonomerID with the new MonomerIDstatic org.helm.notation2.parser.notation.polymer.MonomerNotationListreplaceMonomerNotationList(org.helm.notation2.parser.notation.polymer.MonomerNotationList object, String existingMonomerID, String newMonomerID)method to replace the MonomerNotationList having the MonomerID with the new MonomerIDstatic voidreplaceSMILESWithTemporaryIds(org.helm.notation2.parser.notation.HELM2Notation helm2notation)This function replaces smiles in complex notation with temporary idsstatic voidsetCountToDefault(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, int position)method to set the count of a MonomerNotation to default (=1)
-
Constructor Details
-
ChangeObjects
public ChangeObjects()
-
-
Method Details
-
addAnnotation
public static final void addAnnotation(org.helm.notation2.parser.notation.annotation.AnnotationNotation notation, int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to add an annotation at a specific position of the HELM2Notation- Parameters:
notation- new annotationposition- position of the new annotationhelm2notation- input HELM2Notation
-
changeAnnotation
public static final void changeAnnotation(org.helm.notation2.parser.notation.annotation.AnnotationNotation notation, int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to change an annotation at the position of the HELM2Notation- Parameters:
notation- new changed annotationposition- position of the changed annotationhelm2notation- input HELM2Notation
-
deleteAnnotation
public static final void deleteAnnotation(int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete the annotation at the specific position of the HELM2Notation- Parameters:
position- position of the to be deleted annotationhelm2notation- input HELM2Notation
-
deleteAllAnnotations
public static final void deleteAllAnnotations(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete all annotations of the HELM2Notation- Parameters:
helm2notation- input HELM2Notation
-
addConnection
public static final void addConnection(org.helm.notation2.parser.notation.connection.ConnectionNotation notation, int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to add a new connection at the position of the HELM2Notation- Parameters:
notation- new ConnectionNotationposition- position of the new ConnectionNotationhelm2notation- input HELM2Notation
-
changeConnection
public static final void changeConnection(int position, org.helm.notation2.parser.notation.connection.ConnectionNotation notation, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to change a connection at the position of the HELM2Notation- Parameters:
position- position of the changed Connectionnotation- to be changed ConnectionNotationhelm2notation- input HELM2Notation
-
deleteConnection
public static final void deleteConnection(int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete the connection at the specific position of the HELM2Notation- Parameters:
position- of the to deleted connectionhelm2notation- input HELM2Notation
-
addAnnotationToConnection
public static final void addAnnotationToConnection(int position, String annotation, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to add an annotation to a connection of the HELM2Notation- Parameters:
position- position of the connectionannotation- new annotationhelm2notation- input HELM2Notation
-
deleteAllConnections
public static final void deleteAllConnections(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete all connections of the HELM2Notation- Parameters:
helm2notation- input HELM2Notation
-
addGroup
public static final void addGroup(org.helm.notation2.parser.notation.grouping.GroupingNotation notation, int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to add a group to the grouping section of the HELM2Notation- Parameters:
notation- new groupposition- position of the new grouphelm2notation- input HELM2Notation
-
changeGroup
public static final void changeGroup(org.helm.notation2.parser.notation.grouping.GroupingNotation notation, int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to change a group of the HELM2Notation- Parameters:
notation- new groupposition- position of the to be changed grouphelm2notation- input HELM2Notation
-
deleteGroup
public static final void deleteGroup(int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete a group at a specific position of the HELM2Notation- Parameters:
position- position of the to be deleted grouphelm2notation- input HELM2Notation
-
deleteAllGroups
public static final void deleteAllGroups(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete all groups of the HELM2Notation- Parameters:
helm2notation- input HELM2Notation
-
addAnnotationToPolymer
public static final org.helm.notation2.parser.notation.polymer.PolymerNotation addAnnotationToPolymer(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, String annotation)method to add an annotation to a PolymerNotation- Parameters:
polymer- PolymerNotationannotation- new annotation- Returns:
- PolymerNotation with the annotation
-
removeAnnotationOfPolmyer
public static final org.helm.notation2.parser.notation.polymer.PolymerNotation removeAnnotationOfPolmyer(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer)method to remove a current annotation of a PolymerNotation- Parameters:
polymer- PolymerNotation- Returns:
- PolymerNotation with no annotation
-
addMonomerNotation
public static final org.helm.notation2.parser.notation.polymer.PolymerNotation addMonomerNotation(int position, org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, org.helm.notation2.parser.notation.polymer.MonomerNotation monomerNotation)method to add a new MonomerNotation to a PolymerNotation- Parameters:
position- position of the new MonomerNotationpolymer- PolymerNotationmonomerNotation- new MonomerNotation- Returns:
- PolymerNotation with the new MonomerNotation
-
changeMonomerNotation
public static final void changeMonomerNotation(int position, org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, org.helm.notation2.parser.notation.polymer.MonomerNotation not)method to change the MonomerNotation on the specific position- Parameters:
position- position of the changed MonomerNotationpolymer- PolymerNotationnot- changed MonomerNotation
-
deleteMonomerNotation
public static final void deleteMonomerNotation(int position, org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws org.helm.notation2.parser.exceptionparser.NotationExceptionmethod to delete a MonomerNotation at a specific position of the PolymerNotation- Parameters:
position- position of the to be deleted MonomerNotationpolymer- PolymerNotation- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if the generated PolymerNotation has no elements after deleting the MonomerNotation
-
addAnnotationToMonomerNotation
public static final void addAnnotationToMonomerNotation(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, int position, String annotation)method to add an annotation to a MonomerNotation- Parameters:
polymer- PolymerNotationposition- position of the monomerNotationannotation- new annotation
-
addCountToMonomerNotation
public static final void addCountToMonomerNotation(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, int position, String count)method to set the count of a MonomerNotation- Parameters:
polymer- PolymerNotationposition- position of the MonomerNotationcount- new count of the MonomerNotation
-
deleteAnnotationFromMonomerNotation
public static final void deleteAnnotationFromMonomerNotation(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, int position)method to delete the annotation of a MonomerNotation- Parameters:
polymer- PolymerNotationposition- position of the MonomerNotation
-
setCountToDefault
public static final void setCountToDefault(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, int position)method to set the count of a MonomerNotation to default (=1)- Parameters:
polymer- PolymerNotationposition- position of the MonomerNotation
-
changePolymerNotation
public static final void changePolymerNotation(int position, org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to change the PolymerNotation at a specific position of the HELM2Notation- Parameters:
position- position of the PolymerNotationpolymer- new PolymerNotationhelm2notation- input HELM2Notation
-
deletePolymerNotation
public static final void deletePolymerNotation(int position, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to delete the PolymerNotation at a specific position of the HELM2Notation- Parameters:
position- position of the PolymerNotationhelm2notation- input HELM2Notation
-
addPolymerNotation
public static final void addPolymerNotation(int position, org.helm.notation2.parser.notation.polymer.PolymerNotation polymer, org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to add a PolymerNotation at a specific position of the HELM2Notation- Parameters:
position- position of the PolymerNotationpolymer- new PolymerNotationhelm2notation- input HELM2Notation
-
replaceMonomer
public static final void replaceMonomer(org.helm.notation2.parser.notation.HELM2Notation helm2notation, String polymerType, String existingMonomerID, String newMonomerID) throws org.helm.notation2.parser.exceptionparser.NotationException, MonomerException, ChemistryException, org.helm.chemtoolkit.CTKException, IOException, org.jdom2.JDOMExceptionmethod to replace the MonomerID with the new MonomerID for a given polymer type- Parameters:
helm2notation- HELM2NotationpolymerType- String of the polymer typeexistingMonomerID- old MonomerIDnewMonomerID- new MonomerID- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if notation was not validMonomerException- if monomer is not validChemistryException- if chemistry engine could not be initializedorg.helm.chemtoolkit.CTKException- general ChemToolKit exception passed to HELMToolKitIOException- IO errororg.jdom2.JDOMException- jdome error
-
replaceMonomerNotation
public static final org.helm.notation2.parser.notation.polymer.MonomerNotation replaceMonomerNotation(org.helm.notation2.parser.notation.polymer.MonomerNotation monomerNotation, String existingMonomerID, String newMonomerID) throws org.helm.notation2.parser.exceptionparser.NotationException, ChemistryException, org.helm.chemtoolkit.CTKException, MonomerLoadingExceptionmethod to replace the MonomerNotation having the MonomerID with the new MonomerID- Parameters:
monomerNotation- given monomer notationexistingMonomerID- existing monomer idnewMonomerID- new monomer id- Returns:
- MonomerNotation, if it had the old MonomerID, null otherwise
- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if new monomer id is not validChemistryException- if chemistry engine can not be initializedorg.helm.chemtoolkit.CTKException- if it contains an invalid smilesMonomerLoadingException- if monomers can not be loaded
-
replaceMonomerNotationGroup
public static final org.helm.notation2.parser.notation.polymer.MonomerNotationGroup replaceMonomerNotationGroup(org.helm.notation2.parser.notation.polymer.MonomerNotationGroup monomerNotation, String existingMonomerID, String newMonomerID) throws org.helm.notation2.parser.exceptionparser.NotationExceptionmethod to replace the MonomerNotationGroup having the MonomerID with the new MonomerID- Parameters:
monomerNotation- the to replace monomernotationgroupexistingMonomerID- the to replace existing monomer id of the monomernotationgroupnewMonomerID- the new monomerid- Returns:
- MonomerNotationGroup, if it had the old MonomerID, null otherwise
- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if the new monomer id is not valid
-
produceMonomerNotationUnitWithOtherID
public static final org.helm.notation2.parser.notation.polymer.MonomerNotationUnit produceMonomerNotationUnitWithOtherID(org.helm.notation2.parser.notation.polymer.MonomerNotation monomerNotation, String newID) throws org.helm.notation2.parser.exceptionparser.NotationExceptionmethod to replace the MonomerNotationUnit having the MonomerID with the new MonomerID- Parameters:
monomerNotation- given monomer notationnewID- new monomer id- Returns:
- MonomerNotationUnit
- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if new id is not valid
-
replaceMonomerNotationList
public static final org.helm.notation2.parser.notation.polymer.MonomerNotationList replaceMonomerNotationList(org.helm.notation2.parser.notation.polymer.MonomerNotationList object, String existingMonomerID, String newMonomerID) throws org.helm.notation2.parser.exceptionparser.NotationException, ChemistryException, org.helm.chemtoolkit.CTKException, MonomerLoadingExceptionmethod to replace the MonomerNotationList having the MonomerID with the new MonomerID- Parameters:
object- MonomerNotationList to changeexistingMonomerID- monomer to changenewMonomerID- new monomer- Returns:
- MonomerNotationList, if it had the old MonomerID, null otherwise
- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if notation is not validChemistryException- if chemistry could not be initializedorg.helm.chemtoolkit.CTKException- general ChemToolKit exception passed to HELMToolKitMonomerLoadingException- could not load monomers from source
-
replaceSMILESWithTemporaryIds
public static final void replaceSMILESWithTemporaryIds(org.helm.notation2.parser.notation.HELM2Notation helm2notation) throws org.helm.notation2.parser.exceptionparser.NotationException, HELM2HandledException, ChemistryException, org.helm.chemtoolkit.CTKException, MonomerLoadingException, org.jdom2.JDOMExceptionThis function replaces smiles in complex notation with temporary ids- Parameters:
helm2notation- given helm2 notation- Throws:
org.helm.notation2.parser.exceptionparser.NotationException- if notation is not validChemistryException- if chemistry engine can not be initializedHELM2HandledException- if it contains HELM2 specific features, so that it can not be casted to HELM1 Formatorg.helm.chemtoolkit.CTKException- general ChemToolKit exception passed to HELMToolKitMonomerLoadingException- if monomers can not be loadedorg.jdom2.JDOMException- if smiles can not be replace with the temporary ids
-
hybridize
public static void hybridize(org.helm.notation2.parser.notation.HELM2Notation helm2notation) throws org.helm.notation2.parser.exceptionparser.NotationException, RNAUtilsException, HELM2HandledException, NotationException, ChemistryExceptionthis method will automatically add base pair info into notation only if it contains two RNA polymer notations and there is no base pairing info- Parameters:
helm2notation- HELM2Notation object- 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 chemistry engine can not be initialized
-