public class PepXmlWriter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PepXmlWriter.ConsistencyCheck |
| Modifier | Constructor and Description |
|---|---|
protected |
PepXmlWriter(PepXmlWriterBuilder.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(MsnSpectrum spectrum,
List<PeptideMatch> peptideMatchList)
Collect the list of peptide identifications for the given spectrum
|
void |
add(MsnSpectrum spectrum,
PeptideMatch... peptideMatch)
Collect the list of peptide identifications for the given spectrum
|
protected String |
buildSpectrumQuerySpectrumAttribute(MsnSpectrum spectrum)
Format MsnSpectrum id for element spectrum attribute of spectrum_query element.
|
static PepXmlWriter |
newStrictWriter(EngineType engineType,
Comparator<PeptideMatch> peptideMatchComparator)
Create an instance of PepXmlWriter that strictly checks for inconsistencies
|
static PepXmlWriter |
newStrictWriter(EngineType engineType,
String scoreName)
Create an instance of PepXmlWriter that strictly checks for inconsistencies
|
static PepXmlWriter |
newTolerantWriter(EngineType engineType,
Comparator<PeptideMatch> peptideMatchComparator)
Create an instance of PepXmlWriter that does not check for inconsistencies
|
static PepXmlWriter |
newTolerantWriter(EngineType engineType,
String scoreName)
Create an instance of PepXmlWriter that does not check for inconsistencies
|
void |
removeConsistencyChecks(Set<PepXmlWriter.ConsistencyCheck> ccs) |
static String |
toDefaultSpectrumQuerySpectrumAttribute(MsnSpectrum spectrum)
Create the following spectrum format 'basename.scanNumberStart.scanNumberEnd.charge' or
'basename.scanNumberIndex.scanNumberIndex.charge' if no scan numbers
|
protected MsmsPipelineAnalysis.MsmsRunSummary.SpectrumQuery |
toSpectrumQuery(MsnSpectrum spectrum)
Convert MsnSpectrum to PepXml element SpectrumQuery
|
void |
write(File pepXmlFile)
Write the PepXml after peptide identifications been collected (see add(spectrum, peptideMatches))
|
void |
write(OutputStream os,
URI pepXmlURI)
Write the PepXml after peptide identifications been collected (see add(spectrum, peptideMatches))
|
protected PepXmlWriter(PepXmlWriterBuilder.Builder builder)
public static PepXmlWriter newStrictWriter(EngineType engineType, Comparator<PeptideMatch> peptideMatchComparator)
engineType - the engine type was used for MS identificationpeptideMatchComparator - the peptide match comparatorpublic static PepXmlWriter newStrictWriter(EngineType engineType, String scoreName)
engineType - the engine type was used for MS identificationscoreName - the score name used to compare peptide matchespublic static PepXmlWriter newTolerantWriter(EngineType engineType, Comparator<PeptideMatch> peptideMatchComparator)
engineType - the engine type was used for MS identificationpeptideMatchComparator - the peptide match comparatorpublic static PepXmlWriter newTolerantWriter(EngineType engineType, String scoreName)
engineType - the engine type was used for MS identificationscoreName - the score name used to compare peptide matchespublic void removeConsistencyChecks(Set<PepXmlWriter.ConsistencyCheck> ccs)
protected MsmsPipelineAnalysis.MsmsRunSummary.SpectrumQuery toSpectrumQuery(MsnSpectrum spectrum)
spectrum - the MsnSpectrum to convertIllegalStateException - if spectrum does not contain scan number and
this writer expect have one (see removeConsistencyChecks() to disable the check)protected String buildSpectrumQuerySpectrumAttribute(MsnSpectrum spectrum)
public static String toDefaultSpectrumQuerySpectrumAttribute(MsnSpectrum spectrum)
spectrum - the spectrum to create the id frompublic void add(MsnSpectrum spectrum, List<PeptideMatch> peptideMatchList)
spectrum - the spectrumpeptideMatchList - the list of peptide identificationspublic void add(MsnSpectrum spectrum, PeptideMatch... peptideMatch)
spectrum - the spectrumpeptideMatch - the peptide identification(s)public void write(OutputStream os, URI pepXmlURI) throws IOException
os - the output stream to flush PepXml intopepXmlURI - the PepXml URIIOExceptionpublic void write(File pepXmlFile) throws IOException
pepXmlFile - the output file to flush PepXml intoIOExceptionCopyright © 2016. All Rights Reserved.