public class EnzymeFactory extends Object
Modifier and Type | Method and Description |
---|---|
void |
addEnzyme(Enzyme enzyme)
Adds an enzyme in the factory.
|
boolean |
enzymeLoaded(String enzyme)
Indicates whether an enzyme is loaded in the factory.
|
Enzyme |
getEnzyme(String enzymeName)
Returns the enzyme corresponding to the given name.
|
static CvTerm |
getEnzymeCvTerm(Enzyme enzyme)
Tries to convert the given enzyme to a CvTerm for use in mzIdentML etc.
|
ArrayList<Enzyme> |
getEnzymes()
Get the imported enzymes.
|
static EnzymeFactory |
getInstance()
Static method to get an instance of the factory.
|
static Enzyme |
getUtilitiesEnzyme(String prideEnzymeName)
Tries to map the enzyme name given in the PRIDE file a utilities/OMSSA
enzyme.
|
void |
importEnzymes(File enzymeFile)
Import enzymes.
|
void |
writeMsAmandaEnzymeFile(File file)
Creates the MS Amanda enzyme settings file corresponding to the enzymes
loaded in the factory to the given file.
|
public static EnzymeFactory getInstance()
public ArrayList<Enzyme> getEnzymes()
public Enzyme getEnzyme(String enzymeName)
enzymeName
- the name of the desired enzymepublic void addEnzyme(Enzyme enzyme)
enzyme
- the new enzyme to addpublic boolean enzymeLoaded(String enzyme)
enzyme
- the name of the enzymepublic void importEnzymes(File enzymeFile) throws org.xmlpull.v1.XmlPullParserException, IOException
enzymeFile
- XML file containing the enzymesorg.xmlpull.v1.XmlPullParserException
- when the parser failedIOException
- when reading the corresponding file failedpublic static Enzyme getUtilitiesEnzyme(String prideEnzymeName)
prideEnzymeName
- the PRIDE enzyme namepublic void writeMsAmandaEnzymeFile(File file) throws IOException
file
- the fileIOException
- exception thrown whenever an error occurred while
writing the fileCopyright © 2016. All rights reserved.