public class MgfIndex extends ExperimentObject
Constructor and Description |
---|
MgfIndex(ArrayList<String> spectrumTitles,
HashMap<String,Integer> duplicatedSpectrumTitles,
HashMap<String,Long> indexMap,
HashMap<String,Integer> spectrumNumberIndexMap,
String fileName,
double minRT,
double maxRT,
double maxMz,
double maxIntensity,
int maxCharge,
int maxPeakCount,
boolean peakPicked,
long lastModified,
int spectrumCount)
Constructor.
|
MgfIndex(ArrayList<String> spectrumTitles,
HashMap<String,Long> indexMap,
HashMap<String,Integer> spectrumNumberIndexMap,
String fileName,
double minRT,
double maxRT,
double maxMz,
double maxIntensity,
int maxCharge,
int maxPeakCount,
boolean peakPicked,
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.
|
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 of the indexed file seems to contain only peak picked
spectra.
|
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.
|
addUrParam, getParameterKey, getUrParam
public MgfIndex(ArrayList<String> spectrumTitles, HashMap<String,Long> indexMap, HashMap<String,Integer> spectrumNumberIndexMap, String fileName, double minRT, double maxRT, double maxMz, double maxIntensity, int maxCharge, int maxPeakCount, boolean peakPicked, 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 filefileName
- 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 notlastModified
- 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, String fileName, double minRT, double maxRT, double maxMz, double maxIntensity, int maxCharge, int maxPeakCount, boolean peakPicked, 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 filefileName
- 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 notlastModified
- 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 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 setCopyright © 2014. All rights reserved.