|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.io.massspectrometry.MgfReader
public class MgfReader
This class will read an mgf file.
Constructor Summary | |
---|---|
MgfReader()
General constructor for an mgf reader. |
Method Summary | |
---|---|
static MgfIndex |
getIndexMap(File mgfFile)
Returns the index of all spectra in the given mgf file |
static MgfIndex |
getIndexMap(File mgfFile,
JProgressBar progressBar)
Returns the index of all spectra in the given mgf file |
static Precursor |
getPrecursor(RandomAccessFile randomAccessFile,
long index,
String fileName)
Returns the next precursor starting from the given index |
ArrayList<MSnSpectrum> |
getSpectra(File aFile)
Reads an mgf file and retrieves a list of spectra. |
static MSnSpectrum |
getSpectrum(RandomAccessFile randomAccessFile,
long index,
String fileName)
Returns the next spectrum starting from the given index |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MgfReader()
Method Detail |
---|
public ArrayList<MSnSpectrum> getSpectra(File aFile) throws Exception
aFile
- the mgf file
Exception
- Exeption thrown if a problem is encountered reading the filepublic static MgfIndex getIndexMap(File mgfFile) throws FileNotFoundException, IOException
mgfFile
- the given mgf file
FileNotFoundException
- Exception thrown whenever the file is not found
IOException
- Exception thrown whenever an error occurs while reading the filepublic static MgfIndex getIndexMap(File mgfFile, JProgressBar progressBar) throws FileNotFoundException, IOException
mgfFile
- the given mgf fileprogressBar
- a progress bar showing the progress
FileNotFoundException
- Exception thrown whenever the file is not found
IOException
- Exception thrown whenever an error occurs while reading the filepublic static MSnSpectrum getSpectrum(RandomAccessFile randomAccessFile, long index, String fileName) throws IOException, Exception
randomAccessFile
- The random access file of the inspected mgf fileindex
- The index where to start looking for the spectrumfileName
- The name of the mgf file (@TODO get this from the random access file?)
IOException
- Exception thrown whenever an error is encountered while reading the spectrum
Exception
- Exception thrown whenever the file is not of a compatible formatpublic static Precursor getPrecursor(RandomAccessFile randomAccessFile, long index, String fileName) throws IOException, Exception
randomAccessFile
- The random access file of the inspected mgf fileindex
- The index where to start looking for the spectrumfileName
- The name of the mgf file (@TODO get this from the random access file?)
IOException
- Exception thrown whenever an error is encountered while reading the spectrum
Exception
- Exception thrown whenever the file is not of a compatible format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |