com.compomics.util.experiment.io.massspectrometry
Class MgfReader

java.lang.Object
  extended by com.compomics.util.experiment.io.massspectrometry.MgfReader

public class MgfReader
extends Object

This class will read an mgf file.

Author:
Marc Vaudel, Harald Barsnes

Constructor Summary
MgfReader()
          General constructor for an mgf reader.
 
Method Summary
 ArrayList<MSnSpectrum> getSpectra(File aFile)
          Reads an mgf file and retrieves a list of spectra.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MgfReader

public MgfReader()
General constructor for an mgf reader.

Method Detail

getSpectra

public ArrayList<MSnSpectrum> getSpectra(File aFile)
                                  throws Exception
Reads an mgf file and retrieves a list of spectra.

Parameters:
aFile - the mgf file
Returns:
list of MSnSpectra imported from the file
Throws:
Exception - Exeption thrown if a problem is encountered reading the file


Copyright © 2011. All Rights Reserved.