|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.biology.PTMFactory
public class PTMFactory
This factory will load PTM from an XML file and provide them on demand as standard class. Created by IntelliJ IDEA. User: Marc Date: Jun 22, 2010 Time: 8:26:09 PM
Method Summary | |
---|---|
static PTMFactory |
getInstance()
Static method to get the instance of the factory |
PTM |
getPTM(double mass,
java.lang.String location,
java.lang.String sequence)
getter for a ptm according to its measured characteristics /! |
PTM |
getPTM(int index)
get a PTM according to its index |
PTM |
getPTM(java.lang.String name)
Returns the PTM indexed by its name |
java.lang.Integer |
getPTMIndex(java.lang.String modificationName)
Returns the index of the desired modification |
java.util.Iterator<PTM> |
getPtmIterator()
returns an iterator on the imported PTM |
java.util.HashMap<java.lang.Integer,PTM> |
getPtmMap()
getter for the index to PTM map |
void |
importModifications(java.io.File modificationsFile)
Import modifications from a modification file |
void |
writeOmssaModificationsFiles(java.io.File aFolder,
java.io.File utilitiesModFile,
java.io.File utilitiesUserModFile)
Write the OMSSA modification files to the given folder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PTMFactory getInstance()
public PTM getPTM(int index)
index
- the PTM index
public PTM getPTM(java.lang.String name)
name
- the name of the desired PTM
public java.lang.Integer getPTMIndex(java.lang.String modificationName)
modificationName
- the desired modification name to lower case
public java.util.HashMap<java.lang.Integer,PTM> getPtmMap()
public PTM getPTM(double mass, java.lang.String location, java.lang.String sequence)
mass
- the measured mass induced by the modificationlocation
- the modification locationsequence
- the peptide sequence
public java.util.Iterator<PTM> getPtmIterator()
public void importModifications(java.io.File modificationsFile) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException
modificationsFile
- A file containing modifications
org.xmlpull.v1.XmlPullParserException
- exception thrown whenever an error is encountered while parsing
java.io.IOException
- exception thrown whenever an error is encountered reading the filepublic void writeOmssaModificationsFiles(java.io.File aFolder, java.io.File utilitiesModFile, java.io.File utilitiesUserModFile) throws java.io.IOException
aFolder
- the folder to write the modification files toutilitiesModFile
- the utilities corresponding mod fileutilitiesUserModFile
- the utilities corresponding usermod file
java.io.IOException
- an IOException is thrown in case an issue is encountered while reading or writing a file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |