public class SpectrumIndex extends DbObject implements UrParameter
Modifier and Type | Field and Description |
---|---|
double |
intensityLimit
The intensity limit used for the index.
|
Constructor and Description |
---|
SpectrumIndex()
Constructor for an empty index.
|
SpectrumIndex(HashMap<Double,Peak> peaks,
double intenstiyLimit,
double tolerance,
boolean ppm)
Builds a new index.
|
Modifier and Type | Method and Description |
---|---|
int |
getBin(double mz)
Returns the bin corresponding to the given m/z.
|
Integer |
getBinMax()
Returns the highest bin.
|
Integer |
getBinMin()
Returns the lowest bin.
|
ArrayList<Integer> |
getBins()
Returns the bins in the map as a list.
|
Double |
getMass(int bin)
Returns the mass associated with the given bin, the middle of the bin.
|
ArrayList<Peak> |
getMatchingPeaks(double mz)
Returns the peaks matching the given m/z.
|
long |
getParameterKey()
This method returns the key of the parameter.
|
HashMap<Double,Peak> |
getPeaksInBin(Integer bin)
Returns the peaks at the given bin indexed by m/z.
|
HashMap<Integer,HashMap<Double,Peak>> |
getPeaksMap() |
boolean |
getPpm() |
double |
getPrecursorToleance() |
Set<Integer> |
getRawBins()
Returns the bins in the map as collection of keys from the map.
|
double |
getScalingFactor() |
Double |
getTotalIntensity()
Returns the total intensity of the peaks above the intensity threshold.
|
void |
setBinMax(Integer binMax) |
void |
setBinMin(Integer binMin) |
void |
setPeaksMap(HashMap<Integer,HashMap<Double,Peak>> peaksMap) |
void |
setPpm(boolean ppm) |
void |
setPrecursorTolerance(double precursorTolerance) |
void |
setScalingFactor(double scalingFactor) |
void |
setTotalIntensity(Double totalIntensity) |
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 final double intensityLimit
public SpectrumIndex()
public SpectrumIndex(HashMap<Double,Peak> peaks, double intenstiyLimit, double tolerance, boolean ppm)
peaks
- map of the peaks indexed by m/zintenstiyLimit
- a lower limit for the intensity of the peaks to
indextolerance
- the tolerance to useppm
- boolean indicating whether the tolerance is in ppmpublic boolean getPpm()
public double getPrecursorToleance()
public double getScalingFactor()
public int getBin(double mz)
mz
- the m/zpublic ArrayList<Peak> getMatchingPeaks(double mz)
mz
- a m/z to querypublic ArrayList<Integer> getBins()
public Set<Integer> getRawBins()
public HashMap<Double,Peak> getPeaksInBin(Integer bin)
bin
- the bin numberpublic Double getMass(int bin)
bin
- the bin numberpublic Integer getBinMax()
public Integer getBinMin()
public Double getTotalIntensity()
public long getParameterKey()
UrParameter
getParameterKey
in interface UrParameter
public void setBinMax(Integer binMax)
public void setBinMin(Integer binMin)
public void setPpm(boolean ppm)
public void setPrecursorTolerance(double precursorTolerance)
public void setScalingFactor(double scalingFactor)
public void setTotalIntensity(Double totalIntensity)
Copyright © 2018. All rights reserved.