java.lang.Object
com.compomics.util.experiment.io.identification.idfilereaders.PepxmlIdfileReader
All Implemented Interfaces:
IdfileReader, AutoCloseable

public class PepxmlIdfileReader
extends Object
implements IdfileReader
Simple IdfileReader for Pepxml files.
Author:
Marc Vaudel, Harald Barsnes
  • Constructor Details

    • PepxmlIdfileReader

      public PepxmlIdfileReader()
      Blank constructor for instantiation purposes.
    • PepxmlIdfileReader

      public PepxmlIdfileReader​(File idFile)
      Constructor.
      Parameters:
      idFile - the file to parse
  • Method Details

    • getSoftwareVersions

      public HashMap<String,​ArrayList<String>> getSoftwareVersions()
      Description copied from interface: IdfileReader
      Returns the names and versions of the software used to generate the identification file in a map, e.g., Mascot > (2.2 and 2.3) and X!Tandem > Sledgehammer (2013.09.01.1). Null if not known.
      Specified by:
      getSoftwareVersions in interface IdfileReader
      Returns:
      the version of the software used to generate the identification file, null if not known
    • getExtension

      public String getExtension()
      Description copied from interface: IdfileReader
      Returns the extension of the file for which this IdfileReader can be used.
      Specified by:
      getExtension in interface IdfileReader
      Returns:
      String with the extension (taken to make up the end of the filename) of the file that this IdfileReader can read.
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface IdfileReader
      Throws:
      IOException
    • getAllSpectrumMatches

      public ArrayList<SpectrumMatch> getAllSpectrumMatches​(SpectrumProvider spectrumProvider, WaitingHandler waitingHandler, SearchParameters searchParameters) throws IOException, SQLException, ClassNotFoundException, InterruptedException, JAXBException, org.xmlpull.v1.XmlPullParserException
      Description copied from interface: IdfileReader
      Retrieves all the spectrum matches from an identification file as a list of spectrum matches, one spectrum match per spectrum. It is very important to close the file reader after creation. Using this method secondary maps are not filled.
      Specified by:
      getAllSpectrumMatches in interface IdfileReader
      Parameters:
      spectrumProvider - A spectrum provider with the spectra of the file loaded.
      waitingHandler - The waiting handler displaying the progress (can be null). The secondary progress methods will be called.
      searchParameters - The search parameters.
      Returns:
      a list of spectrum matches
      Throws:
      IOException - if an IOException occurs
      SQLException - if an SQLException occurs
      ClassNotFoundException - if an\ ClassNotFoundException occurs
      InterruptedException - if an InterruptedException occurs
      JAXBException - if a JAXBException occurs
      org.xmlpull.v1.XmlPullParserException - if an XmlPullParserException occurs
    • getAllSpectrumMatches

      public ArrayList<SpectrumMatch> getAllSpectrumMatches​(SpectrumProvider spectrumProvider, WaitingHandler waitingHandler, SearchParameters searchParameters, SequenceMatchingParameters sequenceMatchingPreferences, boolean expandAaCombinations) throws IOException, SQLException, ClassNotFoundException, InterruptedException, JAXBException, org.xmlpull.v1.XmlPullParserException
      Description copied from interface: IdfileReader
      Retrieves all the spectrum matches from an identification file as a list of spectrum matches, one spectrum match per spectrum.It is very important to close the file reader after creation. Secondary peptide and tag maps are filled according to the file content and the sequence matching preferences. If the sequence matching preferences are null, the maps are not filled.
      Specified by:
      getAllSpectrumMatches in interface IdfileReader
      Parameters:
      spectrumProvider - A spectrum provider with the spectra of the file loaded.
      waitingHandler - The waiting handler displaying the progress (can be null). The secondary progress methods will be called.
      searchParameters - The search parameters.
      sequenceMatchingPreferences - The sequence matching preferences to use for the creation of the secondary maps.
      expandAaCombinations - If true, a peptide assumption (not implemented for tag assumptions) will be created for all possible amino acid combination for peptide sequences containing an ambiguity like an X.
      Returns:
      the spectrum matches
      Throws:
      IOException - if an IOException occurs
      SQLException - if an SQLException occurs
      ClassNotFoundException - if an\ ClassNotFoundException occurs
      InterruptedException - if an InterruptedException occurs
      JAXBException - if a JAXBException occurs
      org.xmlpull.v1.XmlPullParserException - if an XmlPullParserException occurs
    • hasDeNovoTags

      public boolean hasDeNovoTags()
      Description copied from interface: IdfileReader
      Returns a boolean indicating whether the file contains de novo results as tags.
      Specified by:
      hasDeNovoTags in interface IdfileReader
      Returns:
      a boolean indicating whether the file contains de novo results as tags