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:
java.io.Serializable, java.lang.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, Harald Barsnes
See Also:
Serialized Form

Constructor Summary
MgfIndex(java.util.ArrayList<java.lang.String> spectrumTitles, java.util.HashMap<java.lang.String,java.lang.Long> indexMap, java.lang.String fileName, double minRT, double maxRT, double maxMz)
          Constructor.
 
Method Summary
 java.lang.String getFileName()
          Returns the name of the indexed file.
 java.lang.Long getIndex(java.lang.String spectrumTitle)
          Returns the index corresponding to the desired spectrum.
 java.lang.Double getMaxMz()
          Returns the maximum m/z in this file.
 java.lang.Double getMaxRT()
          Returns the maximal RT in this file.
 java.lang.Double getMinRT()
          Returns the minimum RT in this file.
 int getNSpectra()
          Returns the number of imported spectra.
 java.util.ArrayList<java.lang.String> getSpectrumTitles()
          Returns an ordered list of all spectrum titles
 void setMaxMz(java.lang.Double maxMz)
          Sets the maximum m/z in this file.
 void setMaxRT(java.lang.Double maxRT)
          Sets the maximal RT in this file.
 void setMinRT(java.lang.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(java.util.ArrayList<java.lang.String> spectrumTitles,
                java.util.HashMap<java.lang.String,java.lang.Long> indexMap,
                java.lang.String fileName,
                double minRT,
                double maxRT,
                double maxMz)
Constructor.

Parameters:
spectrumTitles - an ordered list of all spectrum titles
indexMap - map of all indexes: spectrum title -> index in the file
fileName - the mgf file name
maxRT - the maximum retention time
minRT - the minimum retention tome
maxMz -
Method Detail

getIndex

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

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

getSpectrumTitles

public java.util.ArrayList<java.lang.String> getSpectrumTitles()
Returns an ordered list of all spectrum titles

Returns:
an ordered list of all spectrum titles

getFileName

public java.lang.String getFileName()
Returns the name of the indexed file.

Returns:
the name of the indexed file

getMaxRT

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

Returns:
the maximal RT in this file

setMaxRT

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

Parameters:
maxRT - the maximal RT in this file

getMaxMz

public java.lang.Double getMaxMz()
Returns the maximum m/z in this file.

Returns:
the maximum m/z in this file

setMaxMz

public void setMaxMz(java.lang.Double maxMz)
Sets the maximum m/z in this file.

Parameters:
maxMz - the maximum m/z in this file

getMinRT

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

Returns:
the minimum RT in this file

setMinRT

public void setMinRT(java.lang.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.