public class PrecursorMap extends Object
Modifier and Type | Class and Description |
---|---|
class |
PrecursorMap.PrecursorWithTitle
Convenience class storing the precursor and corresponding spectrum title.
|
Constructor and Description |
---|
PrecursorMap()
Empty default constructor
|
PrecursorMap(HashMap<String,Precursor> precursors,
double precursorTolerance,
boolean ppm)
Builds a precursor map.
|
Modifier and Type | Method and Description |
---|---|
ArrayList<Integer> |
getBins()
Returns the bins in the map.
|
Double |
getMass(int bin)
Returns the mass associated with the given bin, the middle of the bin.
|
ArrayList<PrecursorMap.PrecursorWithTitle> |
getMatchingSpectra(double referenceMz)
Returns a list containing the precursors matching the given m/z.
|
Double |
getMaxMz()
Returns the maximal m/z encountered among the precursors.
|
Double |
getMinMz()
Returns the minimal m/z encountered among the precursors.
|
HashMap<Double,ArrayList<PrecursorMap.PrecursorWithTitle>> |
getPrecursorsInBin(int bin)
Returns the precursors at the given bin indexed by mass.
|
public PrecursorMap()
public PrecursorMap(HashMap<String,Precursor> precursors, double precursorTolerance, boolean ppm)
precursors
- map of the precursors indexed by spectrum titleprecursorTolerance
- the precursor mass tolerance to useppm
- boolean indicating whether the tolerance is in ppmpublic ArrayList<PrecursorMap.PrecursorWithTitle> getMatchingSpectra(double referenceMz)
referenceMz
- a mz to querypublic ArrayList<Integer> getBins()
public HashMap<Double,ArrayList<PrecursorMap.PrecursorWithTitle>> getPrecursorsInBin(int bin)
bin
- the bin numberpublic Double getMass(int bin)
bin
- the bin numberpublic Double getMinMz()
public Double getMaxMz()
Copyright © 2021. All rights reserved.