Class PepNovoIdfileReader
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.io.identification.idfilereaders.PepNovoIdfileReader
- All Implemented Interfaces:
IdfileReader,Serializable,AutoCloseable
This class can be used to parse PepNovo identification files.
- Author:
- Marc Vaudel
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal doubleThe mass to add to the C-terminal gap so that is corresponds to a peptide fragment.static final StringThe standard format.final doubleThe mass to add to the N-terminal gap so that is corresponds to a peptide fragment.Fields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for the purpose of instantiation.PepNovoIdfileReader(File identificationFile) Constructor, initiate the parser. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getAllSpectrumMatches(SpectrumProvider spectrumProvider, WaitingHandler waitingHandler, SearchParameters searchParameters) Retrieves all the spectrum matches from an identification file as a list of spectrum matches, one spectrum match per spectrum.getAllSpectrumMatches(SpectrumProvider spectrumProvider, WaitingHandler waitingHandler, SearchParameters searchParameters, SequenceMatchingParameters sequenceMatchingPreferences, boolean expandAaCombinations) 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.Returns the extension of the file for which this IdfileReader can be used.static StringgetMgfFileName(String fileName) Returns the spectrum file name.This method assumes that the PepNovo output file is the mgf file name + ".out"static StringgetPTM(PepnovoParameters pepnovoParameters, String pepNovoModification) Get a PTM.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).booleanReturns a boolean indicating whether the file contains de novo results as tags.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
DEFAULT_HEADER
The standard format.- See Also:
-
cTermCorrection
public final double cTermCorrectionThe mass to add to the C-terminal gap so that is corresponds to a peptide fragment. -
nTermCorrection
public final double nTermCorrectionThe mass to add to the N-terminal gap so that is corresponds to a peptide fragment.- See Also:
-
-
Constructor Details
-
PepNovoIdfileReader
public PepNovoIdfileReader()Default constructor for the purpose of instantiation. -
PepNovoIdfileReader
Constructor, initiate the parser. Displays the progress using the waiting handler. The close() method shall be used when the file reader is no longer used.- Parameters:
identificationFile- the identification file to parse
-
-
Method Details
-
getAllSpectrumMatches
public ArrayList<SpectrumMatch> getAllSpectrumMatches(SpectrumProvider spectrumProvider, WaitingHandler waitingHandler, SearchParameters searchParameters) throws IOException, SQLException, ClassNotFoundException, InterruptedException, JAXBException Description copied from interface:IdfileReaderRetrieves 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:
getAllSpectrumMatchesin interfaceIdfileReader- 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 occursSQLException- if an SQLException occursClassNotFoundException- if an\ ClassNotFoundException occursInterruptedException- if an InterruptedException occursJAXBException- if a JAXBException occurs
-
getAllSpectrumMatches
public ArrayList<SpectrumMatch> getAllSpectrumMatches(SpectrumProvider spectrumProvider, WaitingHandler waitingHandler, SearchParameters searchParameters, SequenceMatchingParameters sequenceMatchingPreferences, boolean expandAaCombinations) throws IOException, SQLException, ClassNotFoundException, InterruptedException, JAXBException Description copied from interface:IdfileReaderRetrieves 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:
getAllSpectrumMatchesin interfaceIdfileReader- 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 occursSQLException- if an SQLException occursClassNotFoundException- if an\ ClassNotFoundException occursInterruptedException- if an InterruptedException occursJAXBException- if a JAXBException occurs
-
getMgfFileName
Returns the spectrum file name.This method assumes that the PepNovo output file is the mgf file name + ".out"- Parameters:
fileName- the name of the results file- Returns:
- the spectrum file name
-
getExtension
Description copied from interface:IdfileReaderReturns the extension of the file for which this IdfileReader can be used.- Specified by:
getExtensionin interfaceIdfileReader- Returns:
- String with the extension (taken to make up the end of the filename) of the file that this IdfileReader can read.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceIdfileReader- Throws:
IOException
-
getPTM
Get a PTM.- Parameters:
pepnovoParameters- the PepNovo parameterspepNovoModification- the PepNovo modification- Returns:
- the PTM as a string
-
getSoftwareVersions
Description copied from interface:IdfileReaderReturns 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:
getSoftwareVersionsin interfaceIdfileReader- Returns:
- the version of the software used to generate the identification file, null if not known
-
hasDeNovoTags
public boolean hasDeNovoTags()Description copied from interface:IdfileReaderReturns a boolean indicating whether the file contains de novo results as tags.- Specified by:
hasDeNovoTagsin interfaceIdfileReader- Returns:
- a boolean indicating whether the file contains de novo results as tags
-