|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.identification.SequenceDataBase
public class SequenceDataBase
This class models a protein database used for peptide/protein identification (like uniprot)
Field Summary | |
---|---|
static String[] |
decoyFlags
Recognized flags for a decoy protein |
Constructor Summary | |
---|---|
SequenceDataBase()
Constructor for a sequence database. |
|
SequenceDataBase(String name,
String version)
Constructor for a sequence database. |
Method Summary | |
---|---|
void |
addProtein(Protein protein)
Adds a protein to the map. |
void |
appendDecoySequences()
Appends reversed sequences to the database. |
void |
appendDecoySequences(ProgressDialogX progressDialog)
Appends reversed sequences to the database. |
void |
exportAsFasta(File fastaFile)
Exports the sequence database as a fasta file. |
void |
exportAsFasta(File fastaFile,
ProgressDialogX progressDialog)
Exports the sequence database as a fasta file. |
String |
getName()
Returns the database name. |
int |
getNumberOfTargetSequences()
Returns the number of target hits loaded. |
Protein |
getProtein(String proteinKey)
Returns a protein indexed by its key. |
Header |
getProteinHeader(String proteinKey)
Returns the protein header of the desired protein. |
Set<String> |
getProteinList()
Returns the list of all protein imported. |
String |
getVersion()
Returns the database version. |
void |
importDataBase(File fastaFile)
Imports a sequence database from a fasta file. |
boolean |
includesDecoy()
Returns true if the database contains decoy sequences. |
static boolean |
isDecoy(String proteinAccession)
Returns whether a protein is decoy or not based on the protein accession. |
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject |
---|
addUrParam, getUrParam |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] decoyFlags
Constructor Detail |
---|
public SequenceDataBase()
public SequenceDataBase(String name, String version)
name
- Name of the databaseversion
- Version of the databaseMethod Detail |
---|
public Protein getProtein(String proteinKey)
proteinKey
- protein key
public Header getProteinHeader(String proteinKey)
proteinKey
- protein key
public void addProtein(Protein protein)
protein
- the new proteinpublic int getNumberOfTargetSequences()
public Set<String> getProteinList()
public void importDataBase(File fastaFile) throws FileNotFoundException, IOException
fastaFile
- The fasta file to import
FileNotFoundException
- Exception thrown when the fasta file is not found
IOException
- Exception thrown whenever an error is encountered while parsing the file
IllegalArgumentException
- Exception thrown whenever the fasta header is not of correct formatpublic void appendDecoySequences()
IllegalArgumentException
- Exception thrown if the database already contains decoy sequencespublic void appendDecoySequences(ProgressDialogX progressDialog)
progressDialog
- The progress dialog, can be null
IllegalArgumentException
- Exception thrown if the database already contains decoy sequencespublic void exportAsFasta(File fastaFile) throws IOException
fastaFile
- The fasta file where sequences should be output
IOException
- Exception thrown whenever a problem occurred while writing the file.public void exportAsFasta(File fastaFile, ProgressDialogX progressDialog) throws IOException
fastaFile
- The fasta file where sequences should be outputprogressDialog
- The progress dialog, can be null
IOException
- Exception thrown whenever a problem occurred while writing the file.public String getName()
public String getVersion()
public static boolean isDecoy(String proteinAccession)
proteinAccession
- The accession of the protein
public boolean includesDecoy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |