public class MsSpectrumUtil extends Object
MsSpectrumUtil class.
Constructor and Description |
---|
MsSpectrumUtil() |
Modifier and Type | Method and Description |
---|---|
static List<MsSpectrum> |
filterMsSpectra(List<MsSpectrum> spectra,
int listLimit)
Method preprocesses list of spectra, limits its amount
Filtering of Spectrum objects is done by retrieving top N Spectrum objects with largest
intensity values
|
static MsSpectrum |
filterMsSpectrum(MsSpectrum ms,
Integer pairsLimit)
Filters with only N most intense elements.
|
static Integer |
getBasePeakIndex(double[] mzValues,
float[] intensityValues,
Integer size,
com.google.common.collect.Range<Double> mzRange)
Returns the index of the highest intensity value.
|
static Integer |
getBasePeakIndex(float[] intensityValues,
Integer size)
Returns the index of the highest intensity value.
|
static Float |
getMaxIntensity(double[] mzValues,
float[] intensityValues,
Integer size,
com.google.common.collect.Range<Double> mzRange)
Returns the highest intensity value.
|
static Float |
getMaxIntensity(float[] intensityValues,
Integer size)
Returns the highest intensity value.
|
static com.google.common.collect.Range<Double> |
getMzRange(double[] mzValues,
Integer size)
Returns the m/z range of given data points.
|
static Float |
getTIC(double[] mzValues,
float[] intensityValues,
Integer size,
com.google.common.collect.Range<Double> mzRange)
Calculates the total ion current (=sum of all intensity values)
|
static Float |
getTIC(float[] intensityValues,
Integer size)
Calculates the total ion current (=sum of all intensity values)
|
static String |
msSpectrumToString(double[] mzValues,
float[] intensityValues,
Integer size)
msSpectrumToString.
|
static String |
msSpectrumToString(MsSpectrum spectrum)
msSpectrumToString.
|
static void |
normalizeIntensity(float[] intensityValues,
Integer size,
Float scale)
normalizeIntensity.
|
@Nullable public static com.google.common.collect.Range<Double> getMzRange(@Nonnull double[] mzValues, @Nonnull Integer size)
mzValues
- an array of double.size
- a Integer
object.Range
object.@Nonnull public static Float getTIC(@Nonnull float[] intensityValues, @Nonnull Integer size)
@Nonnull public static Float getTIC(@Nonnull double[] mzValues, @Nonnull float[] intensityValues, @Nonnull Integer size, @Nonnull com.google.common.collect.Range<Double> mzRange)
@Nonnull public static Float getMaxIntensity(@Nonnull float[] intensityValues, @Nonnull Integer size)
@Nonnull public static Float getMaxIntensity(@Nonnull double[] mzValues, @Nonnull float[] intensityValues, @Nonnull Integer size, @Nonnull com.google.common.collect.Range<Double> mzRange)
@Nullable public static Integer getBasePeakIndex(@Nonnull float[] intensityValues, @Nonnull Integer size)
@Nullable public static Integer getBasePeakIndex(@Nonnull double[] mzValues, @Nonnull float[] intensityValues, @Nonnull Integer size, @Nonnull com.google.common.collect.Range<Double> mzRange)
public static void normalizeIntensity(@Nonnull float[] intensityValues, @Nonnull Integer size, @Nonnull Float scale)
normalizeIntensity.
@Nonnull public static String msSpectrumToString(MsSpectrum spectrum)
msSpectrumToString.
spectrum
- a MsSpectrum
object.String
object.@Nonnull public static String msSpectrumToString(@Nonnull double[] mzValues, @Nonnull float[] intensityValues, @Nonnull Integer size)
msSpectrumToString.
@Nonnull public static MsSpectrum filterMsSpectrum(@Nonnull MsSpectrum ms, @Nonnull Integer pairsLimit)
spectrum
- - ms spectrumpairsLimit
- - maximum amount of items in a new Spectrumpublic static List<MsSpectrum> filterMsSpectra(List<MsSpectrum> spectra, int listLimit)
spectra
- - list of spectrum to be preprocessedlistLimit
- - maximum amount of items to be in a new listCopyright © 2019. All rights reserved.