public class MzDbReader extends AbstractMzDbReader
_paramNameGetter, acquisitionMode, bbSizes, computationThreadPool, dbLocation, diaIsolationWindows, entityCache, instrumentConfigs, isNoLossMode, mzDbHeader, runs, rxCompScheduler, samples, softwareList, sourceFiles
Constructor and Description |
---|
MzDbReader(File dbLocation,
boolean cacheEntities)
Instantiates a new mzDB reader (secondary constructor).
|
MzDbReader(File dbLocation,
MzDbEntityCache entityCache,
boolean logConnections)
Instantiates a new mzDB reader (primary constructor).
|
MzDbReader(String dbPath,
boolean cacheEntities)
Instantiates a new mzDB reader (secondary constructor).
|
Modifier and Type | Method and Description |
---|---|
void |
close()
close the connection to avoid memory leaks.
|
AcquisitionMode |
getAcquisitionMode()
Lazy loading of the acquisition mode, parameter
|
byte[] |
getBoundingBoxData(int bbId)
Gets the bounding box data.
|
int |
getBoundingBoxesCount()
Gets the bounding box count.
|
int |
getBoundingBoxesCount(int runSliceId)
Gets the bounding box count.
|
long |
getBoundingBoxFirstSpectrumId(long spectrumId)
Gets the bounding box first spectrum index.
|
Iterator<BoundingBox> |
getBoundingBoxIterator(int msLevel) |
float |
getBoundingBoxMinMz(int bbId)
Gets the bounding box min mz.
|
float |
getBoundingBoxMinTime(int bbId)
Gets the bounding box min time.
|
int |
getBoundingBoxMsLevel(int bbId)
Gets the bounding box ms level.
|
com.almworks.sqlite4java.SQLiteConnection |
getConnection()
Gets the connection.
|
int |
getCyclesCount()
Gets the cycle count.
|
DataEncoding |
getDataEncoding(int id)
Gets the data encoding.
|
Map<Long,DataEncoding> |
getDataEncodingBySpectrumId()
Gets the data encoding by spectrum id.
|
DataEncodingReader |
getDataEncodingReader() |
int |
getDataEncodingsCount()
Gets the data encoding count.
|
IsolationWindow[] |
getDIAIsolationWindows()
Get the DIA IsolationWindows
|
List<InstrumentConfiguration> |
getInstrumentConfigurations() |
float |
getLastTime()
Gets the last time.
|
Iterator<RunSlice> |
getLcMsnRunSliceIterator(double minParentMz,
double maxParentMz)
Gets a DIA data RunSlice iterator
|
Iterator<RunSlice> |
getLcMsnRunSliceIterator(double minParentMz,
double maxParentMz,
double minRunSliceMz,
double maxRunSliceMz)
Gets a DIA data RunSlice iterator for a given m/z range
|
Iterator<RunSlice> |
getLcMsRunSliceIterator()
Gets a RunSlice iterator.
|
Iterator<RunSlice> |
getLcMsRunSliceIterator(double minRunSliceMz,
double maxRunSliceMz)
Gets a RunSlice iterator for a given m/z range
|
int |
getMaxMsLevel()
Gets the max ms level.
|
String |
getModelVersion() |
Map<Long,SpectrumHeader> |
getMs1SpectrumHeaderById()
Gets the MS1 spectrum header by id.
|
SpectrumHeader[] |
getMs1SpectrumHeaders()
Gets the MS1 spectrum headers.
|
Map<Long,SpectrumHeader> |
getMs2SpectrumHeaderById()
Gets the MS2 spectrum header by id.
|
SpectrumHeader[] |
getMs2SpectrumHeaders()
Gets the MS2 spectrum headers.
|
Peak[] |
getMsnPeaksInMzRtRanges(double parentMz,
double minFragMz,
double maxFragMz,
float minRt,
float maxRt) |
SpectrumSlice[] |
getMsnSpectrumSlices(double parentMz,
double minFragMz,
double maxFragMz,
float minRt,
float maxRt) |
Peak[] |
getMsnXIC(double parentMz,
double fragmentMz,
double fragmentMzTolInDa,
float minRt,
float maxRt,
XicMethod method) |
Peak[] |
getMsPeaksInMzRtRanges(double minMz,
double maxMz,
float minRt,
float maxRt) |
SpectrumSlice[] |
getMsSpectrumSlices(double minMz,
double maxMz,
float minRt,
float maxRt)
Gets the spectrum slices.
|
Peak[] |
getMsXic(double mz,
double mzTolInDa,
float minRt,
float maxRt,
int msLevel,
XicMethod method) |
Peak[] |
getMsXicInMzRange(double minMz,
double maxMz,
XicMethod method)
Gets the xic.
|
Peak[] |
getMsXicInMzRtRanges(double minMz,
double maxMz,
float minRt,
float maxRt,
XicMethod method) |
int[] |
getMzRange(int msLevel)
Gets the mz range.
|
String |
getPwizMzDbVersion() |
List<Run> |
getRuns() |
RunSliceData |
getRunSliceData(int runSliceId)
Gets the run slice data.
|
HashMap<Integer,RunSliceHeader> |
getRunSliceHeaderById(int msLevel)
Gets the run slice header by id.
|
RunSliceHeaderReader |
getRunSliceHeaderReader() |
RunSliceHeader[] |
getRunSliceHeaders(int msLevel)
Gets the run slices.
|
int |
getRunSlicesCount()
Gets the run slice count.
|
List<Sample> |
getSamples() |
List<Software> |
getSoftwareList() |
List<SourceFile> |
getSourceFiles() |
int |
getSpectraCount()
Gets the spectrum count.
|
int |
getSpectraCount(int msLevel)
Gets the spectrum count.
|
Spectrum |
getSpectrum(long spectrumId)
Gets the spectrum.
|
SpectrumData |
getSpectrumData(long spectrumId)
Gets the spectrum data.
|
DataEncoding |
getSpectrumDataEncoding(long spectrumId)
Gets the spectrum data encoding.
|
SpectrumHeader |
getSpectrumHeader(long id)
Gets the spectrum header.
|
Map<Long,SpectrumHeader> |
getSpectrumHeaderById()
Gets each spectrum header mapped by its id.
|
SpectrumHeader |
getSpectrumHeaderForTime(float time,
int msLevel)
Gets the spectrum header for time.
|
SpectrumHeaderReader |
getSpectrumHeaderReader() |
SpectrumHeader[] |
getSpectrumHeaders()
Gets all spectrum headers.
|
Iterator<Spectrum> |
getSpectrumIterator() |
Iterator<Spectrum> |
getSpectrumIterator(int msLevel)
Gets the ms spectrum iterator.
|
Peak[] |
getSpectrumPeaks(int spectrumId)
Gets the spectrum peaks.
|
int |
getTableRecordsCount(String tableName)
Gets the table records count.
|
_setBBSizes, enableParamTreeLoading, enablePrecursorListLoading, enableScanListLoading, getAcquisitionMode, getBBSizes, getDbLocation, getDIAIsolationWindows, getEntityCache, getFirstSourceFileName, getMsnPeaksInMzRtRanges, getMsnSpectrumSlices, getMsnXic, getMsPeaksInMzRtRanges, getMsSpectrumSlices, getMsXic, getMsXicInMzRange, getMsXicInMzRtRanges, getMzDbHeader, getRunSliceData, getSpectrum, getSpectrumData, getSpectrumPeaks, isNoLossMode, isParamTreeLoadingEnabled, isPrecursorListLoadingEnabled, isScanListLoadingEnabled
public MzDbReader(File dbLocation, MzDbEntityCache entityCache, boolean logConnections) throws ClassNotFoundException, FileNotFoundException, com.almworks.sqlite4java.SQLiteException
dbLocation
- the db locationcacheEntities
- the cache entitieslogConnections
- the log connectionsClassNotFoundException
- the class not found exceptionFileNotFoundException
- the file not found exceptioncom.almworks.sqlite4java.SQLiteException
- the SQLite exceptionpublic MzDbReader(File dbLocation, boolean cacheEntities) throws ClassNotFoundException, FileNotFoundException, com.almworks.sqlite4java.SQLiteException
dbLocation
- the db locationcacheEntities
- the cache entitiesClassNotFoundException
- the class not found exceptionFileNotFoundException
- the file not found exceptioncom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic MzDbReader(String dbPath, boolean cacheEntities) throws ClassNotFoundException, FileNotFoundException, com.almworks.sqlite4java.SQLiteException
dbPath
- the db pathcacheEntities
- the cache entitiesClassNotFoundException
- the class not found exceptionFileNotFoundException
- the file not found exceptioncom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic com.almworks.sqlite4java.SQLiteConnection getConnection()
public void close()
close
in class AbstractMzDbReader
public DataEncodingReader getDataEncodingReader()
getDataEncodingReader
in class AbstractMzDbReader
public SpectrumHeaderReader getSpectrumHeaderReader()
getSpectrumHeaderReader
in class AbstractMzDbReader
public RunSliceHeaderReader getRunSliceHeaderReader()
getRunSliceHeaderReader
in class AbstractMzDbReader
public String getModelVersion() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
public String getPwizMzDbVersion() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
public float getLastTime() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic int getMaxMsLevel() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic int[] getMzRange(int msLevel) throws com.almworks.sqlite4java.SQLiteException
msLevel
- the ms levelcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic int getBoundingBoxesCount() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic int getBoundingBoxesCount(int runSliceId) throws com.almworks.sqlite4java.SQLiteException
runSliceId
- the run slice idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic int getCyclesCount() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
public int getDataEncodingsCount() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic int getSpectraCount() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic int getSpectraCount(int msLevel) throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic int getRunSlicesCount() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic int getTableRecordsCount(String tableName) throws com.almworks.sqlite4java.SQLiteException
tableName
- the table namecom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic DataEncoding getDataEncoding(int id) throws com.almworks.sqlite4java.SQLiteException
id
- the idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic Map<Long,DataEncoding> getDataEncodingBySpectrumId() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic DataEncoding getSpectrumDataEncoding(long spectrumId) throws com.almworks.sqlite4java.SQLiteException
spectrumId
- the spectrum idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic RunSliceHeader[] getRunSliceHeaders(int msLevel) throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the SQLite exceptionpublic HashMap<Integer,RunSliceHeader> getRunSliceHeaderById(int msLevel) throws com.almworks.sqlite4java.SQLiteException
msLevel
- the ms levelcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic RunSliceData getRunSliceData(int runSliceId) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
runSliceId
- the run slice idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionStreamCorruptedException
public byte[] getBoundingBoxData(int bbId) throws com.almworks.sqlite4java.SQLiteException
bbId
- the bb idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic long getBoundingBoxFirstSpectrumId(long spectrumId) throws com.almworks.sqlite4java.SQLiteException
spectrumId
- the spectrum idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic float getBoundingBoxMinMz(int bbId) throws com.almworks.sqlite4java.SQLiteException
bbId
- the bb idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic float getBoundingBoxMinTime(int bbId) throws com.almworks.sqlite4java.SQLiteException
bbId
- the bb idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic int getBoundingBoxMsLevel(int bbId) throws com.almworks.sqlite4java.SQLiteException
bbId
- the bb idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic SpectrumHeader[] getMs1SpectrumHeaders() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the SQLiteExceptionpublic Map<Long,SpectrumHeader> getMs1SpectrumHeaderById() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the SQLiteExceptionpublic SpectrumHeader[] getMs2SpectrumHeaders() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the SQLiteExceptionpublic Map<Long,SpectrumHeader> getMs2SpectrumHeaderById() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the SQLiteExceptionpublic SpectrumHeader[] getSpectrumHeaders() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the SQLiteExceptionpublic Map<Long,SpectrumHeader> getSpectrumHeaderById() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
- the SQLiteExceptionpublic SpectrumHeader getSpectrumHeader(long id) throws com.almworks.sqlite4java.SQLiteException
id
- the idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionpublic SpectrumHeader getSpectrumHeaderForTime(float time, int msLevel) throws Exception
time
- the timemsLevel
- the ms levelException
public SpectrumData getSpectrumData(long spectrumId) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
spectrumId
- the spectrum idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionStreamCorruptedException
public Spectrum getSpectrum(long spectrumId) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
spectrumId
- the spectrum idcom.almworks.sqlite4java.SQLiteException
- the SQlite exceptionStreamCorruptedException
public Peak[] getSpectrumPeaks(int spectrumId) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
spectrumId
- the spectrum idcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionStreamCorruptedException
public SpectrumSlice[] getMsSpectrumSlices(double minMz, double maxMz, float minRt, float maxRt) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
minmz
- the minMzmaxmz
- the maxMzminrt
- the minRtmaxrt
- the maxRtmsLevel
- the ms levelcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionStreamCorruptedException
public SpectrumSlice[] getMsnSpectrumSlices(double parentMz, double minFragMz, double maxFragMz, float minRt, float maxRt) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public Iterator<BoundingBox> getBoundingBoxIterator(int msLevel) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public Iterator<Spectrum> getSpectrumIterator() throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public Iterator<Spectrum> getSpectrumIterator(int msLevel) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
msLevel
- the ms levelcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionStreamCorruptedException
public Iterator<RunSlice> getLcMsRunSliceIterator() throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public Iterator<RunSlice> getLcMsRunSliceIterator(double minRunSliceMz, double maxRunSliceMz) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
minRunSliceMz
- minRunSliceMz
- com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public Iterator<RunSlice> getLcMsnRunSliceIterator(double minParentMz, double maxParentMz) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
minParentMz
- maxParentMz
- com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public Iterator<RunSlice> getLcMsnRunSliceIterator(double minParentMz, double maxParentMz, double minRunSliceMz, double maxRunSliceMz) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
msLevel
- minParentMz
- maxParentMz
- com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public AcquisitionMode getAcquisitionMode() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
public IsolationWindow[] getDIAIsolationWindows() throws com.almworks.sqlite4java.SQLiteException
com.almworks.sqlite4java.SQLiteException
public List<InstrumentConfiguration> getInstrumentConfigurations() throws com.almworks.sqlite4java.SQLiteException
getInstrumentConfigurations
in class AbstractMzDbReader
com.almworks.sqlite4java.SQLiteException
public List<Run> getRuns() throws com.almworks.sqlite4java.SQLiteException
getRuns
in class AbstractMzDbReader
com.almworks.sqlite4java.SQLiteException
public List<Sample> getSamples() throws com.almworks.sqlite4java.SQLiteException
getSamples
in class AbstractMzDbReader
com.almworks.sqlite4java.SQLiteException
public List<Software> getSoftwareList() throws com.almworks.sqlite4java.SQLiteException
getSoftwareList
in class AbstractMzDbReader
com.almworks.sqlite4java.SQLiteException
public List<SourceFile> getSourceFiles() throws com.almworks.sqlite4java.SQLiteException
getSourceFiles
in class AbstractMzDbReader
com.almworks.sqlite4java.SQLiteException
public Peak[] getMsXicInMzRange(double minMz, double maxMz, XicMethod method) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
minMz
- the min mzmaxMz
- the max mzmsLevel
- the ms levelcom.almworks.sqlite4java.SQLiteException
- the sQ lite exceptionStreamCorruptedException
public Peak[] getMsXicInMzRtRanges(double minMz, double maxMz, float minRt, float maxRt, XicMethod method) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public Peak[] getMsXic(double mz, double mzTolInDa, float minRt, float maxRt, int msLevel, XicMethod method) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public Peak[] getMsnXIC(double parentMz, double fragmentMz, double fragmentMzTolInDa, float minRt, float maxRt, XicMethod method) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public Peak[] getMsPeaksInMzRtRanges(double minMz, double maxMz, float minRt, float maxRt) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
public Peak[] getMsnPeaksInMzRtRanges(double parentMz, double minFragMz, double maxFragMz, float minRt, float maxRt) throws com.almworks.sqlite4java.SQLiteException, StreamCorruptedException
com.almworks.sqlite4java.SQLiteException
StreamCorruptedException
Copyright © 2019. All rights reserved.