com.compomics.util.experiment.io.identifications.idfilereaders
Class MascotIdfileReader

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.io.identifications.idfilereaders.MascotIdfileReader
All Implemented Interfaces:
IdfileReader, Serializable, Cloneable

public class MascotIdfileReader
extends ExperimentObject
implements IdfileReader

This reader will import identifications from a Mascot dat file.

Author:
Marc Vaudel
See Also:
Serialized Form

Constructor Summary
MascotIdfileReader(File aFile)
          Constructor for the MascotIdfilereader.
MascotIdfileReader(File aFile, boolean index)
          Constructor for the MascotIdilereader.
 
Method Summary
 void close()
          Closes the file reader.
 HashSet<SpectrumMatch> getAllSpectrumMatches(WaitingHandler waitingHandler)
          This methods retrieves all the identifications from an identification file as a list of spectrum matches It is very important to close the file reader after creation.
 String getFileName()
          Getter for the file name.
 String getMgfFileName()
          Get the spectrum file name.
 
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, getParameterKey, getUrParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MascotIdfileReader

public MascotIdfileReader(File aFile)
Constructor for the MascotIdfilereader. Using the memory option for the parser.

Parameters:
aFile - a file to read

MascotIdfileReader

public MascotIdfileReader(File aFile,
                          boolean index)
Constructor for the MascotIdilereader.

Parameters:
aFile - a file to read
index - indicating whether the parsing shall be indexed or in memory
Method Detail

getMgfFileName

public String getMgfFileName()
Get the spectrum file name.

Returns:
the spectrum file name

getFileName

public String getFileName()
Getter for the file name.

Returns:
the file name

getAllSpectrumMatches

public HashSet<SpectrumMatch> getAllSpectrumMatches(WaitingHandler waitingHandler)
                                             throws IOException,
                                                    IllegalArgumentException,
                                                    Exception
Description copied from interface: IdfileReader
This methods retrieves all the identifications from an identification file as a list of spectrum matches It is very important to close the file reader after creation.

Specified by:
getAllSpectrumMatches in interface IdfileReader
Parameters:
waitingHandler - a waiting handler displaying the progress (can be null). The secondary progress methods will be called.
Returns:
a list of spectrum matches
Throws:
IOException - exception thrown whenever an error occurred while reading the file
IllegalArgumentException - exception thrown whenever an error occurred while parsing the file
Exception - exception thrown whenever an error occurred while working with the file

close

public void close()
           throws IOException
Description copied from interface: IdfileReader
Closes the file reader.

Specified by:
close in interface IdfileReader
Throws:
IOException


Copyright © 2012. All Rights Reserved.