com.compomics.util.experiment.identification
Class FastaIndex

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.identification.FastaIndex
All Implemented Interfaces:
Serializable, Cloneable

public class FastaIndex
extends ExperimentObject

This class contains the index of a FASTA file.

Author:
Marc Vaudel
See Also:
Serialized Form

Constructor Summary
FastaIndex(HashMap<String,Long> indexes, String fileName, boolean isDecoy, boolean isReversed, int nTarget, long lastModified)
          Constructor.
 
Method Summary
 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.
 int getNTarget()
          Returns the number of target sequences in the database.
 boolean isDecoy()
          Returns a boolean indicating whether the database contains decoy sequences.
 boolean isDefaultReversed()
          Indicates whether the decoy sequences are reversed versions of the target and the decoy accessions built based on the sequence factory methods.
 
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, getParameterKey, getUrParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastaIndex

public FastaIndex(HashMap<String,Long> indexes,
                  String fileName,
                  boolean isDecoy,
                  boolean isReversed,
                  int nTarget,
                  long lastModified)
Constructor.

Parameters:
indexes - The indexes of the inspected FASTA file
fileName - The FASTA file name
isDecoy - If the FASTA file contains decoys or nor
isReversed - is this a reversed index
nTarget - Number of target sequences found in the database
lastModified - a long indicating the last time the indexed file was modified
Method Detail

getIndexes

public HashMap<String,Long> getIndexes()
Returns a map of all indexes of the FASTA file (accession -> index).

Returns:
a map of all indexes of the FASTA file (accession -> index)

getIndex

public Long getIndex(String accession)
Returns the index of the accession of interest.

Parameters:
accession - the accession of interest
Returns:
the index of the accession of interest

getFileName

public String getFileName()
Returns the file name of the inspected FASTA file.

Returns:
the file name of the inspected FASTA file

isDecoy

public boolean isDecoy()
Returns a boolean indicating whether the database contains decoy sequences.

Returns:
a boolean indicating whether the database contains decoy sequences

isDefaultReversed

public boolean isDefaultReversed()
Indicates whether the decoy sequences are reversed versions of the target and the decoy accessions built based on the sequence factory methods. See getDefaultDecoyAccession(String targetAccession) in SequenceFactory.

Returns:
true if the decoy sequences are reversed versions of the target and the decoy accessions built based on the sequence factory methods

getNTarget

public int getNTarget()
Returns the number of target sequences in the database.

Returns:
the number of target sequences in the database

getLastModified

public Long getLastModified()
Returns when the file was last modified. Null if not set or for utilities versions older than 3.11.30.

Returns:
a long indicating when the file was last modified


Copyright © 2013. All Rights Reserved.