public class FastaIndex extends ExperimentObject
Constructor and Description |
---|
FastaIndex(HashMap<String,Long> indexes,
HashSet<String> decoyAccessions,
String fileName,
String name,
boolean concatenatedTargetDecoy,
boolean isDefaultReversed,
int nTarget,
long lastModified,
Header.DatabaseType databaseType,
String decoyTag,
String version)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Header.DatabaseType |
getDatabaseType()
Indicates the database type.
|
HashSet<String> |
getDecoyAccesions()
Returns the list of decoy accessions.
|
String |
getDecoyTag()
Returns the decoy tag.
|
static String |
getDefaultVersion(long lastModified)
Returns the default version based on the time the file was last modified.
|
String |
getFileName()
Returns the file name of the inspected FASTA file.
|
Long |
getIndex(String accession)
Returns the index of the accession of interest.
|
HashMap<String,Long> |
getIndexes()
Returns a map of all indexes of the FASTA file (accession -> index).
|
Long |
getLastModified()
Returns when the file was last modified.
|
String |
getName()
Returns the name of the database.
|
int |
getNSequences()
Returns the number of sequences in the database.
|
int |
getNTarget()
Returns the number of target sequences in the database.
|
String |
getVersion()
Returns the database version.
|
boolean |
isConcatenatedTargetDecoy()
Indicates whether the database is a concatenated target/decoy database.
|
boolean |
isDecoy(String accession)
Returns true if the given accession number is a decoy.
|
boolean |
isDefaultReversed()
Indicates whether the decoy sequences are reversed versions of the target
and the decoy accessions built based on the sequence factory methods.
|
void |
setConcatenatedTargetDecoy(boolean concatenatedTargetDecoy)
Sets whether the database is a concatenated target/decoy database.
|
void |
setDatabaseType(Header.DatabaseType databaseType)
Sets the database type.
|
void |
setDecoyTag(String decoyTag)
Sets the decoy tag.
|
void |
setName(String name)
Sets a new name for the database.
|
void |
setVersion(String version)
Sets the database version.
|
addUrParam, getParameterKey, getUrParam
public FastaIndex(HashMap<String,Long> indexes, HashSet<String> decoyAccessions, String fileName, String name, boolean concatenatedTargetDecoy, boolean isDefaultReversed, int nTarget, long lastModified, Header.DatabaseType databaseType, String decoyTag, String version)
indexes
- The indexes of the inspected FASTA filedecoyAccessions
- the decoy accession numbersfileName
- The FASTA file namename
- the name of the databaseconcatenatedTargetDecoy
- If the FASTA file is a concatenated
target/decoy databaseisDefaultReversed
- is this a default reversed databasenTarget
- Number of target sequences found in the databaselastModified
- a long indicating the last time the indexed file was
modifieddatabaseType
- the database typedecoyTag
- the decoy tagversion
- the database versionpublic HashMap<String,Long> getIndexes()
public boolean isDecoy(String accession)
accession
- the accession number to checkpublic HashSet<String> getDecoyAccesions()
public Long getIndex(String accession)
accession
- the accession of interestpublic String getFileName()
public boolean isDefaultReversed()
public int getNTarget()
public int getNSequences()
public Long getLastModified()
public Header.DatabaseType getDatabaseType()
public void setDatabaseType(Header.DatabaseType databaseType)
databaseType
- the database typepublic String getVersion()
public void setVersion(String version)
version
- the database versionpublic boolean isConcatenatedTargetDecoy()
public void setConcatenatedTargetDecoy(boolean concatenatedTargetDecoy)
concatenatedTargetDecoy
- whether the database is a concatenated
target/decoy databasepublic String getDecoyTag()
public void setDecoyTag(String decoyTag)
decoyTag
- the decoy tagpublic String getName()
public void setName(String name)
name
- a new name for the databasepublic static String getDefaultVersion(long lastModified)
lastModified
- long indicating when the database was last modifiedCopyright © 2014. All Rights Reserved.