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 mainDatabaseType,
HashMap<Header.DatabaseType,Integer> databaseTypes,
String decoyTag,
String version,
HashMap<String,Integer> speciesOccurrence)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getAccessionParsingRule()
Returns the accession parsing rule to use for this file.
|
HashMap<Header.DatabaseType,Integer> |
getDatabaseTypes()
Returns the map of the database types and how often they occur.
|
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 |
getDescription()
Returns the description for this database.
|
String |
getFileName()
Returns the file name of the indexed 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.
|
Header.DatabaseType |
getMainDatabaseType()
Returns the main database type.
|
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.
|
HashMap<String,Integer> |
getSpecies()
Returns the species targeted by this 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 |
setAccessionParsingRule(String accessionParsingRule)
Sets the accession parsing rule to use for this file.
|
void |
setConcatenatedTargetDecoy(boolean concatenatedTargetDecoy)
Sets whether the database is a concatenated target/decoy database.
|
void |
setDatabaseTypes(HashMap<Header.DatabaseType,Integer> databaseTypes)
Set the database types map.
|
void |
setDecoyTag(String decoyTag)
Sets the decoy tag.
|
void |
setDescription(String description)
Sets the description for this database.
|
void |
setMainDatabaseType(Header.DatabaseType mainDatabaseType)
Sets the main database type.
|
void |
setName(String name)
Sets a new name for the database.
|
void |
setSpecies(HashMap<String,Integer> species)
Sets the species targeted by this 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 mainDatabaseType, HashMap<Header.DatabaseType,Integer> databaseTypes, String decoyTag, String version, HashMap<String,Integer> speciesOccurrence)
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
modifiedmainDatabaseType
- the main database typedatabaseTypes
- map of all the database types and how often they
occurdecoyTag
- the decoy tagversion
- the database versionspeciesOccurrence
- the species occurrence in the databasepublic 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 getMainDatabaseType()
public void setMainDatabaseType(Header.DatabaseType mainDatabaseType)
mainDatabaseType
- the main database typepublic HashMap<Header.DatabaseType,Integer> getDatabaseTypes()
public void setDatabaseTypes(HashMap<Header.DatabaseType,Integer> databaseTypes)
databaseTypes
- the database typespublic String getVersion()
public void setVersion(String version)
version
- the database versionpublic String getDescription()
public void setDescription(String description)
description
- the description for this databasepublic String getAccessionParsingRule()
public void setAccessionParsingRule(String accessionParsingRule)
accessionParsingRule
- the accession parsing rule to use for this filepublic 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 modifiedpublic HashMap<String,Integer> getSpecies()
Copyright © 2016. All rights reserved.