com.compomics.util.experiment.io.massspectrometry
Class MgfIndex

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.io.massspectrometry.MgfIndex
All Implemented Interfaces:
Serializable, Cloneable

public class MgfIndex
extends ExperimentObject

This class contains the indexes of an mgf file after indexing mapped with the title of the spectrum

Author:
Marc Vaudel
See Also:
Serialized Form

Constructor Summary
MgfIndex(HashMap<String,Long> indexMap, String fileName, double minRT, double maxRT)
          Constructor
 
Method Summary
 String getFileName()
          Returns the name of the indexed file
 Long getIndex(String spectrumTitle)
          Returns the index corresponding to the desired spectrum
 HashMap<String,Long> getIndexes()
          Returns the index map
 Double getMaxRT()
          Returns the maximal RT in this file
 Double getMinRT()
          Returns the minimum RT in this file
 int getNSpectra()
          Returns the number of imported spectra
 void setMaxRT(Double maxRT)
          Sets the maximal RT in this file
 void setMinRT(Double minRT)
          Sets the minimum RT in this file
 
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

MgfIndex

public MgfIndex(HashMap<String,Long> indexMap,
                String fileName,
                double minRT,
                double maxRT)
Constructor

Parameters:
indexMap - map of all indexes: spectrum title -> index in the file
fileName -
maxRT -
minRT -
Method Detail

getIndex

public Long getIndex(String spectrumTitle)
Returns the index corresponding to the desired spectrum

Parameters:
spectrumTitle - the desired spectrum
Returns:
the corresponding index

getIndexes

public HashMap<String,Long> getIndexes()
Returns the index map

Returns:
the index mapF

getFileName

public String getFileName()
Returns the name of the indexed file

Returns:
the name of the indexed file

getMaxRT

public Double getMaxRT()
Returns the maximal RT in this file

Returns:
the maximal RT in this file

setMaxRT

public void setMaxRT(Double maxRT)
Sets the maximal RT in this file

Parameters:
maxRT - the maximal RT in this file

getMinRT

public Double getMinRT()
Returns the minimum RT in this file

Returns:
the minimum RT in this file

setMinRT

public void setMinRT(Double minRT)
Sets the minimum RT in this file

Parameters:
minRT - the minimum RT in this file

getNSpectra

public int getNSpectra()
Returns the number of imported spectra

Returns:
the number of imported spectra


Copyright © 2012. All Rights Reserved.