public class MgfIndex extends ExperimentObject implements Serializable
Constructor and Description |
---|
MgfIndex(ArrayList<String> spectrumTitles,
HashMap<String,Integer> duplicatedSpectrumTitles,
HashMap<String,Long> indexMap,
HashMap<String,Integer> spectrumNumberIndexMap,
HashMap<Integer,Double> precursorMzMap,
String fileName,
double minRT,
double maxRT,
double maxMz,
double maxIntensity,
int maxCharge,
int maxPeakCount,
boolean peakPicked,
boolean precursorChargesMissing,
long lastModified,
int spectrumCount)
Constructor.
|
MgfIndex(ArrayList<String> spectrumTitles,
HashMap<String,Long> indexMap,
HashMap<String,Integer> spectrumNumberIndexMap,
HashMap<Integer,Double> precursorMzMap,
String fileName,
double minRT,
double maxRT,
double maxMz,
double maxIntensity,
int maxCharge,
int maxPeakCount,
boolean peakPicked,
boolean precursorChargesMissing,
long lastModified)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsSpectrum(String spectrumTitle)
Returns a boolean indicating whether the spectrum title is implemented in
this index.
|
HashMap<String,Integer> |
getDuplicatedSpectrumTitles()
Returns a map of the duplicated spectrum titles, can be null.
|
String |
getFileName()
Returns the name of the indexed file.
|
Long |
getIndex(String spectrumTitle)
Returns the index corresponding to the desired spectrum.
|
Long |
getLastModified()
Returns when the file was last modified.
|
Integer |
getMaxCharge()
Returns the maximal charge found in the mgf file.
|
Double |
getMaxIntensity()
Returns the maximum precursor intensity in this file.
|
Double |
getMaxMz()
Returns the maximum m/z in this file.
|
Integer |
getMaxPeakCount()
Returns the maximum peak count in this file.
|
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.
|
Double |
getPrecursorMz(int spectrumIndex)
Returns the precursor mz for the spectrum at the given index.
|
Integer |
getSpectrumIndex(String spectrumTitle)
Returns the spectrum index corresponding to the desired spectrum, i.e.,
returns 0 for the first spectrum in the file, 1 for the second, etc.
|
String |
getSpectrumTitle(int number)
Returns the spectrum title corresponding to the given spectrum number.
|
ArrayList<String> |
getSpectrumTitles()
Returns an ordered list of all spectrum titles.
|
Boolean |
isPeakPicked()
Returns true if the indexed file seems to contain only peak picked
spectra.
|
Boolean |
isPrecursorChargesMissing()
Returns true if the at least one spectrum is missing the precursor
charge.
|
void |
setMaxCharge(Integer maxCharge)
Sets the maximum charge in this file.
|
void |
setMaxIntensity(Double maxIntensity)
Sets the maximum precursor intensity in this file.
|
void |
setMaxMz(Double maxMz)
Sets the maximum m/z in this file.
|
void |
setMaxPeakCount(Integer maxPeakCount)
Sets the maximum peak count in this file.
|
void |
setMaxRT(Double maxRT)
Sets the maximal RT in this file.
|
void |
setMinRT(Double minRT)
Sets the minimum RT in this file.
|
void |
setPeakPicked(Boolean peakPicked)
Set if the indexed file seems to contain only peak picked spectra or not.
|
void |
setPrecursorChargesMissing(Boolean precursorChargesMissing)
Set if at least one spectrum is missing the precursor charge.
|
addUrParam, asLong, clearParametersMap, getUrParam, getUrParams, removeUrParam, setUrParams
getFirstLevel, getId, setFirstLevel, setId
jdoZooEvict, jdoZooGetBackup, jdoZooGetClassDef, jdoZooGetContext, jdoZooGetNode, jdoZooGetOid, jdoZooGetTimestamp, jdoZooHasState, jdoZooInit, jdoZooIsDeleted, jdoZooIsDetached, jdoZooIsDirty, jdoZooIsNew, jdoZooIsPersistent, jdoZooIsStateHollow, jdoZooIsTransactional, jdoZooMarkClean, jdoZooMarkDeleted, jdoZooMarkDetached, jdoZooMarkDirty, jdoZooMarkHollow, jdoZooMarkTransient, jdoZooSetOid, jdoZooSetTimestamp, toString, zooActivateRead, zooActivateWrite, zooActivateWrite
public MgfIndex(ArrayList<String> spectrumTitles, HashMap<String,Long> indexMap, HashMap<String,Integer> spectrumNumberIndexMap, HashMap<Integer,Double> precursorMzMap, String fileName, double minRT, double maxRT, double maxMz, double maxIntensity, int maxCharge, int maxPeakCount, boolean peakPicked, boolean precursorChargesMissing, long lastModified)
spectrumTitles
- an ordered list of all spectrum titlesindexMap
- map of all indexes: spectrum title > index in the filespectrumNumberIndexMap
- map of all spectrum index: spectrum title
> spectrum index in the fileprecursorMzMap
- map of the precursor mz values: spectrum index >
precursor mzfileName
- the mgf file namemaxRT
- the maximum retention timeminRT
- the minimum retention tomemaxMz
- the maximum m/z valuemaxIntensity
- the maximum precursor intensitymaxCharge
- the maximum peak precursor chargemaxPeakCount
- the maximum peak countpeakPicked
- indicates if the spectra seem to be peak picked or notprecursorChargesMissing
- indicates if at least one spectrum is
missing the precursor charge taglastModified
- a long indicating the last time the indexed file was
modifiedpublic MgfIndex(ArrayList<String> spectrumTitles, HashMap<String,Integer> duplicatedSpectrumTitles, HashMap<String,Long> indexMap, HashMap<String,Integer> spectrumNumberIndexMap, HashMap<Integer,Double> precursorMzMap, String fileName, double minRT, double maxRT, double maxMz, double maxIntensity, int maxCharge, int maxPeakCount, boolean peakPicked, boolean precursorChargesMissing, long lastModified, int spectrumCount)
spectrumTitles
- an ordered list of all spectrum titlesduplicatedSpectrumTitles
- a map of duplicated spectrum titles, and
how often each title is duplicatedindexMap
- map of all indexes: spectrum title > index in the filespectrumNumberIndexMap
- map of all spectrum index: spectrum title
> spectrum index in the fileprecursorMzMap
- map of the precursor mz values: spectrum index >
precursor mzfileName
- the mgf file namemaxRT
- the maximum retention timeminRT
- the minimum retention tomemaxMz
- the maximum m/z valuemaxIntensity
- the maximum precursor intensitymaxCharge
- the maximum peak precursor chargemaxPeakCount
- the maximum peak countpeakPicked
- indicates if the spectra seem to be peak picked or notprecursorChargesMissing
- indicates if at least one spectrum is
missing the precursor charge taglastModified
- a long indicating the last time the indexed file was
modifiedspectrumCount
- the number of spectra in the file counted by the
number of begin ion tagspublic Long getIndex(String spectrumTitle)
spectrumTitle
- the desired spectrumpublic Integer getSpectrumIndex(String spectrumTitle)
spectrumTitle
- the desired spectrumpublic Double getPrecursorMz(int spectrumIndex)
spectrumIndex
- the index of the spectrum, 0 for the first spectrum
in the file, 1 for the second, etcpublic String getSpectrumTitle(int number)
number
- the number of the spectrumpublic boolean containsSpectrum(String spectrumTitle)
spectrumTitle
- the spectrum titlepublic ArrayList<String> getSpectrumTitles()
public HashMap<String,Integer> getDuplicatedSpectrumTitles()
public String getFileName()
public Double getMaxRT()
public void setMaxRT(Double maxRT)
maxRT
- the maximal RT in this filepublic Double getMaxMz()
public void setMaxCharge(Integer maxCharge)
maxCharge
- the maximum charge in this filepublic Integer getMaxCharge()
public void setMaxMz(Double maxMz)
maxMz
- the maximum m/z in this filepublic Double getMaxIntensity()
public void setMaxIntensity(Double maxIntensity)
maxIntensity
- the maximum precursor intensity in this filepublic Double getMinRT()
public void setMinRT(Double minRT)
minRT
- the minimum RT in this filepublic Integer getMaxPeakCount()
public void setMaxPeakCount(Integer maxPeakCount)
maxPeakCount
- the maximum peak count in this filepublic int getNSpectra()
public Long getLastModified()
public Boolean isPeakPicked()
public void setPeakPicked(Boolean peakPicked)
peakPicked
- the peakPicked to setpublic Boolean isPrecursorChargesMissing()
public void setPrecursorChargesMissing(Boolean precursorChargesMissing)
precursorChargesMissing
- the precursorChargesMissing to setCopyright © 2018. All rights reserved.