Interface SpectrumProvider
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
CmsFileReader
,MsFileHandler
public interface SpectrumProvider extends AutoCloseable
Interface for objects providing spectra.
- Author:
- Marc Vaudel, Harald Barsnes
-
Method Summary
Modifier and Type Method Description void
close()
HashMap<String,String>
getCmsFilePaths()
Returns the absolute path to the cms file indexed by ms file name without file extension.HashMap<String,String>
getFilePaths()
Returns the absolute path to the original mass spec file containing the spectra in a map indexed by file name without file extension.double
getMaxPrecInt()
Returns the maximum precursor intensity among all files.double
getMaxPrecInt(String fileNameWithoutExtension)
Returns the maximum precursor intensity in a given file.double
getMaxPrecMz()
Returns the maximum precursor m/z among all files.double
getMaxPrecMz(String fileNameWithoutExtension)
Returns the maximum precursor m/z in a given file.double
getMaxPrecRT()
Returns the maximum precursor RT among all files.double
getMaxPrecRT(String fileNameWithoutExtension)
Returns the maximum precursor RT in a given file.double
getMinPrecMz()
Returns the minimum precursor m/z among all files.double
getMinPrecMz(String fileNameWithoutExtension)
Returns the minimum precursor m/z in a given file.String[]
getOrderedFileNamesWithoutExtensions()
Returns the spectrum file names without file extensions.double[][]
getPeaks(String fileNameWithoutExtension, String spectrumTitle)
Returns the spectrum peaks.Precursor
getPrecursor(String fileNameWithoutExtension, String spectrumTitle)
Returns the precursor.double
getPrecursorMz(String fileNameWithoutExtension, String spectrumTitle)
Returns the measured precursor m/z.double
getPrecursorRt(String fileNameWithoutExtension, String spectrumTitle)
Returns the precursor RT window.Spectrum
getSpectrum(String fileNameWithoutExtension, String spectrumTitle)
Returns the spectrum with the given title in the given file.String[]
getSpectrumTitles(String fileNameWithoutExtension)
Returns the spectrum titles for the given mass spectrometry file name.
-
Method Details
-
getSpectrum
Returns the spectrum with the given title in the given file.- Parameters:
fileNameWithoutExtension
- The name of the spectrum file without file extension.spectrumTitle
- The title of the spectrum.- Returns:
- The spectrum with the given title in the given file.
-
getPrecursor
Returns the precursor. Null if none.- Parameters:
fileNameWithoutExtension
- The name of the spectrum file without file extension.spectrumTitle
- The title of the spectrum.- Returns:
- The precursor.
-
getPrecursorMz
Returns the measured precursor m/z. NaN if none.- Parameters:
fileNameWithoutExtension
- The name of the spectrum file without file extension.spectrumTitle
- The title of the spectrum.- Returns:
- The measured precursor m/z.
-
getPrecursorRt
Returns the precursor RT window. NaN if none.- Parameters:
fileNameWithoutExtension
- The name of the spectrum file without file extension.spectrumTitle
- The title of the spectrum.- Returns:
- The precursor RT.
-
getPeaks
Returns the spectrum peaks.- Parameters:
fileNameWithoutExtension
- The name of the spectrum file without file extension.spectrumTitle
- The title of the spectrum.- Returns:
- The peaks.
-
getMinPrecMz
Returns the minimum precursor m/z in a given file.- Parameters:
fileNameWithoutExtension
- The name of the spectrum file without file extension.- Returns:
- The minimum precursor m/z in a given file.
-
getMaxPrecMz
Returns the maximum precursor m/z in a given file.- Parameters:
fileNameWithoutExtension
- The name of the spectrum file without file extension.- Returns:
- The maximum precursor m/z in a given file.
-
getMaxPrecInt
Returns the maximum precursor intensity in a given file.- Parameters:
fileNameWithoutExtension
- The name of the spectrum file without file extension.- Returns:
- The maximum precursor intensity in a given file.
-
getMaxPrecRT
Returns the maximum precursor RT in a given file.- Parameters:
fileNameWithoutExtension
- The name of the spectrum file without file extension.- Returns:
- The maximum precursor RT in a given file.
-
getMinPrecMz
double getMinPrecMz()Returns the minimum precursor m/z among all files.- Returns:
- The minimum precursor m/z among all files.
-
getMaxPrecMz
double getMaxPrecMz()Returns the maximum precursor m/z among all files.- Returns:
- The maximum precursor m/z among all files.
-
getMaxPrecInt
double getMaxPrecInt()Returns the maximum precursor intensity among all files.- Returns:
- The maximum precursor intensity among all files.
-
getMaxPrecRT
double getMaxPrecRT()Returns the maximum precursor RT among all files.- Returns:
- The maximum precursor RT among all files.
-
getOrderedFileNamesWithoutExtensions
String[] getOrderedFileNamesWithoutExtensions()Returns the spectrum file names without file extensions.- Returns:
- The spectrum file names without file extensions.
-
getSpectrumTitles
Returns the spectrum titles for the given mass spectrometry file name.- Parameters:
fileNameWithoutExtension
- The mass spectrometry file name without file extension.- Returns:
- The spectrum titles as array.
-
getFilePaths
Returns the absolute path to the original mass spec file containing the spectra in a map indexed by file name without file extension.- Returns:
- The absolute path to the original mass spec file containing the spectra in a map indexed by file name.
-
getCmsFilePaths
Returns the absolute path to the cms file indexed by ms file name without file extension. Null if none.- Returns:
- The absolute path to the cms file indexed by ms file name.
-
close
void close()- Specified by:
close
in interfaceAutoCloseable
-