Class DirecTagIdfileReader
java.lang.Object
com.compomics.util.experiment.io.identification.idfilereaders.DirecTagIdfileReader
- All Implemented Interfaces:
IdfileReader
,AutoCloseable
public class DirecTagIdfileReader extends Object implements IdfileReader
An identification file reader for Direct tag results.
- Author:
- Marc Vaudel
-
Field Summary
Fields Modifier and Type Field Description double
cTermCorrection
The mass to add to the C-terminal gap so that is corresponds to a peptide fragment.double
nTermCorrection
The mass to add to the N-terminal gap so that is corresponds to a peptide fragment. -
Constructor Summary
Constructors Constructor Description DirecTagIdfileReader()
Default constructor for the purpose of instantiation.DirecTagIdfileReader(File tagFile)
Constructors, parses a file. -
Method Summary
Modifier and Type Method Description void
close()
ArrayList<SpectrumMatch>
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.ArrayList<SpectrumMatch>
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.String
getCopyRight()
Returns the copyright.String
getExtension()
Returns the extension of the file for which this IdfileReader can be used.File
getInputFile()
Returns the spectrum file name as found in the parameters section.String
getLicense()
Returns the license information of this file.Integer
getnProcessingNode()
Returns the number of processing nodes used.HashMap<String,ArrayList<String>>
getSoftwareVersions()
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).Double
getTaggingTimeSeconds()
Returns the tagging time in seconds as listed in the file.String
getTagParameter(String tagParameterName)
Returns the tagging parameter corresponding to a given parameter name.String
getTagsGenerator()
Returns the tags generator used to create the file.String
getTagsGeneratorVersion()
Returns the version of the tags generator used to create the file.Set<String>
getTagsParametersNames()
Returns the name of the different parameters names found.String
getTimeEnd()
Returns the ending time of the tagging as given in the file.String
getTimeStart()
Returns the starting time of the tagging as given in the file.boolean
hasDeNovoTags()
Returns a boolean indicating whether the file contains de novo results as tags.
-
Field Details
-
cTermCorrection
public final double cTermCorrectionThe mass to add to the C-terminal gap so that is corresponds to a peptide fragment.- See Also:
- Constant Field Values
-
nTermCorrection
public final double nTermCorrectionThe mass to add to the N-terminal gap so that is corresponds to a peptide fragment.- See Also:
- Constant Field Values
-
-
Constructor Details
-
DirecTagIdfileReader
public DirecTagIdfileReader()Default constructor for the purpose of instantiation. -
DirecTagIdfileReader
Constructors, parses a file.- Parameters:
tagFile
- the file to parse
-
-
Method Details
-
getTagsParametersNames
Returns the name of the different parameters names found.- Returns:
- the name of the different parameters names found
-
getTagParameter
Returns the tagging parameter corresponding to a given parameter name.- Parameters:
tagParameterName
- the name of the parameter of interest- Returns:
- the parameter of interest
-
getAllSpectrumMatches
public ArrayList<SpectrumMatch> getAllSpectrumMatches(SpectrumProvider spectrumProvider, WaitingHandler waitingHandler, SearchParameters searchParameters) throws IOException, SQLException, ClassNotFoundException, InterruptedException, JAXBExceptionDescription 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 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, IllegalArgumentException, SQLException, ClassNotFoundException, InterruptedException, JAXBExceptionDescription 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 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 occursIllegalArgumentException
-
getTagsGenerator
Returns the tags generator used to create the file.- Returns:
- the tags generator used to create the file
-
getTagsGeneratorVersion
Returns the version of the tags generator used to create the file.- Returns:
- the version of the tags generator used to create the file
-
getCopyRight
Returns the copyright.- Returns:
- the copyright
-
getLicense
Returns the license information of this file.- Returns:
- the license information of this file
-
getTimeStart
Returns the starting time of the tagging as given in the file.- Returns:
- the starting time of the tagging
-
getTimeEnd
Returns the ending time of the tagging as given in the file.- Returns:
- the ending time of the tagging
-
getTaggingTimeSeconds
Returns the tagging time in seconds as listed in the file.- Returns:
- the tagging time in seconds as listed in the file
-
getnProcessingNode
Returns the number of processing nodes used.- Returns:
- the number of processing nodes used
-
getInputFile
Returns the spectrum file name as found in the parameters section.- Returns:
- the spectrum file name
-
getExtension
Description copied from interface:IdfileReader
Returns the extension of the file for which this IdfileReader can be used.- Specified by:
getExtension
in 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIdfileReader
- Throws:
IOException
-
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 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:IdfileReader
Returns a boolean indicating whether the file contains de novo results as tags.- Specified by:
hasDeNovoTags
in interfaceIdfileReader
- Returns:
- a boolean indicating whether the file contains de novo results as tags
-