public class FastaSummary extends Object
Modifier and Type | Field and Description |
---|---|
HashMap<ProteinDatabase,Integer> |
databaseType
The database type occurrence in the FASTA file.
|
File |
fastaFile
The file this summary represents.
|
long |
lastModified
The last time the file was modified.
|
int |
nSequences
The number of sequences.
|
int |
nTarget
The number of target sequences.
|
TreeMap<String,Integer> |
speciesOccurrence
The species occurrence in the FASTA file.
|
Constructor and Description |
---|
FastaSummary()
Empty default constructor.
|
FastaSummary(String name,
String description,
String version,
File fastaFile,
TreeMap<String,Integer> speciesOccurrence,
HashMap<ProteinDatabase,Integer> databaseType,
int nSequences,
int nTarget,
long lastModified)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsDecoys()
Returns true if the FASTA file contains decoys.
|
String |
getDescription()
Returns the description for this database.
|
String |
getName()
Returns the name of the database.
|
static FastaSummary |
getSummary(String fastaFile,
FastaParameters fastaParameters,
boolean alwaysCreateNew,
WaitingHandler waitingHandler)
Gathers summary data on the FASTA file content.
|
static FastaSummary |
getSummary(String fastaFile,
FastaParameters fastaParameters,
WaitingHandler waitingHandler)
Gathers summary data on the FASTA file content.
|
String |
getTypeAsString()
Returns a string with the different database types found.
|
String |
getVersion()
Returns the database version.
|
static void |
saveSummary(String fastaFile,
FastaSummary fastaSummary)
Saves the summary in the user folder.
|
void |
setDescription(String description)
Sets the description for this database.
|
void |
setName(String name)
Sets a new name for the database.
|
void |
setVersion(String version)
Sets the database version.
|
public final File fastaFile
public final TreeMap<String,Integer> speciesOccurrence
public final HashMap<ProteinDatabase,Integer> databaseType
public final int nSequences
public final int nTarget
public final long lastModified
public FastaSummary()
public FastaSummary(String name, String description, String version, File fastaFile, TreeMap<String,Integer> speciesOccurrence, HashMap<ProteinDatabase,Integer> databaseType, int nSequences, int nTarget, long lastModified)
name
- the database namedescription
- the database descriptionversion
- the database versionfastaFile
- the FASTA filespeciesOccurrence
- the occurrence of every speciesdatabaseType
- the occurrence of every database typenSequences
- the number of sequencesnTarget
- the number of target sequenceslastModified
- the last time the file was modifiedpublic static FastaSummary getSummary(String fastaFile, FastaParameters fastaParameters, WaitingHandler waitingHandler) throws IOException
fastaFile
- path to a FASTA filefastaParameters
- the parameters to use to parse the filewaitingHandler
- a handler to allow canceling the import and
displaying progressIOException
- exception thrown if an error occurred while iterating
the filepublic static FastaSummary getSummary(String fastaFile, FastaParameters fastaParameters, boolean alwaysCreateNew, WaitingHandler waitingHandler) throws IOException
fastaFile
- path to a FASTA filefastaParameters
- the parameters to use to parse the filealwaysCreateNew
- if true, a new summary file will be created even
if one already existswaitingHandler
- a handler to allow canceling the import and
displaying progressIOException
- exception thrown if an error occurred while iterating
the filepublic static void saveSummary(String fastaFile, FastaSummary fastaSummary) throws IOException
fastaFile
- the FASTA filefastaSummary
- the summaryIOException
- exception thrown if an error occurred while writing
the filepublic String getTypeAsString()
public String getName()
public void setName(String name)
name
- a new name for the databasepublic String getVersion()
public void setVersion(String version)
version
- the database versionpublic String getDescription()
public void setDescription(String description)
description
- the description for this databasepublic boolean containsDecoys()
Copyright © 2021. All rights reserved.