|
||||||||||
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,
String location,
String sequence)
getter for a ptm according to its measured characteristics /! |
PTM |
getPTM(int index)
get a PTM according to its index |
PTM |
getPTM(String name)
Returns the PTM indexed by its name |
Integer |
getPTMIndex(String modificationName)
Returns the index of the desired modification |
Iterator<PTM> |
getPtmIterator()
returns an iterator on the imported PTM |
HashMap<Integer,PTM> |
getPtmMap()
getter for the index to PTM map |
void |
importModifications(File modificationsFile)
Import modifications from a modification file |
void |
replacePTM(String oldName,
PTM newPTM)
replaces an old ptm by a new |
void |
writeOmssaModificationsFiles(File aFolder,
File utilitiesModFile,
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 void replacePTM(String oldName, PTM newPTM)
oldName
- the name of the old ptmnewPTM
- the new ptmpublic PTM getPTM(String name)
name
- the name of the desired PTM
public Integer getPTMIndex(String modificationName)
modificationName
- the desired modification name to lower case
public HashMap<Integer,PTM> getPtmMap()
public PTM getPTM(double mass, String location, String sequence)
mass
- the measured mass induced by the modificationlocation
- the modification locationsequence
- the peptide sequence
public Iterator<PTM> getPtmIterator()
public void importModifications(File modificationsFile) throws org.xmlpull.v1.XmlPullParserException, IOException
modificationsFile
- A file containing modifications
org.xmlpull.v1.XmlPullParserException
- exception thrown whenever an error is encountered while parsing
IOException
- exception thrown whenever an error is encountered reading the filepublic void writeOmssaModificationsFiles(File aFolder, File utilitiesModFile, File utilitiesUserModFile) throws IOException
aFolder
- the folder to write the modification files toutilitiesModFile
- the utilities corresponding mod fileutilitiesUserModFile
- the utilities corresponding usermod file
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 |