org.fhcrc.cpl.toolbox.proteomics.feature
Class FeaturePepXmlWriter

java.lang.Object
  extended by org.fhcrc.cpl.toolbox.proteomics.filehandler.BasePepXmlWriter
      extended by org.fhcrc.cpl.toolbox.proteomics.feature.FeaturePepXmlWriter

public class FeaturePepXmlWriter
extends BasePepXmlWriter

A restrictive wrapper for writing PepXml files, using a Feature array to populate the spectrum_queries


Field Summary
protected  Feature[] _features
           
protected  AnalyzeICAT.IsotopicLabel _isotopicLabel
           
protected  boolean featureSetHasRatioDeclaration
           
protected  int firstSpectrumQueryIndex
           
 int RATIO_MODE_Q3
           
 int RATIO_MODE_XPRESS
           
protected  int ratioMode
           
protected  boolean writeIntensitiesAsXpressResults
           
 
Fields inherited from class org.fhcrc.cpl.toolbox.proteomics.filehandler.BasePepXmlWriter
_baseName, _documentPostscript, _documentPrefix, _firstRunSummary, _modifications, _optionsForPrinting, _precursorMassType, _searchEngine, _searchSummary, _spectrumBaseString, _xmlBeansAnalysis, _xmlBeansPepXmlDoc, _xmlBeansRunSummaryArray, PRECURSOR_MASS_TYPE_MONOISOTOPIC, SEARCH_ENGINE_XTANDEM_COMET
 
Constructor Summary
FeaturePepXmlWriter(Feature[] features, MS2Modification[] modifications)
          Create doc structure, populate features and modifications
FeaturePepXmlWriter(FeatureSet featureSet)
           
 
Method Summary
 int getFirstSpectrumQueryIndex()
          Write out the full document, with all modifications and features, to a file It's too bad I have to override the superclass version here.
 int getRatioMode()
           
protected  void preWrite()
          Make absolutely sure that we write a quantitative summary declaration at the top of the file, if either: -the incoming FeatureFile told us it had ratios, or -any feature in the file has ratios
 void setFeatures(Feature[] features)
          setter for features
 void setFirstSpectrumQueryIndex(int firstSpectrumQueryIndex)
           
 void setRatioMode(int ratioMode)
           
 void setWriteIntensitiesAsXpressResults(boolean writeIntensitiesAsXpressResults)
           
 boolean willWriteIntensitiesAsXpressResults()
           
protected  void writeFeature(int featureIndex, java.io.PrintWriter pw)
          Add a SearchResult representing the passed-in feature to the first run of the file.
protected  void writeSpectrumQueries(java.io.PrintWriter pw)
          Write out all features immediately
 
Methods inherited from class org.fhcrc.cpl.toolbox.proteomics.filehandler.BasePepXmlWriter
addModificationsToSearchHit, addModificationsToXML, addPeptideProphet, addSearchScore, addSpectrumQuery, get_precursorMassType, get_searchEngine, getSearchSummary, getSpectrumBaseString, set_precursorMassType, set_searchEngine, setBaseName, setModifications, setSearchConstraints, setSearchDatabase, setSpectrumBaseString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_features

protected Feature[] _features

writeIntensitiesAsXpressResults

protected boolean writeIntensitiesAsXpressResults

firstSpectrumQueryIndex

protected int firstSpectrumQueryIndex

RATIO_MODE_XPRESS

public final int RATIO_MODE_XPRESS
See Also:
Constant Field Values

RATIO_MODE_Q3

public final int RATIO_MODE_Q3
See Also:
Constant Field Values

ratioMode

protected int ratioMode

featureSetHasRatioDeclaration

protected boolean featureSetHasRatioDeclaration

_isotopicLabel

protected AnalyzeICAT.IsotopicLabel _isotopicLabel
Constructor Detail

FeaturePepXmlWriter

public FeaturePepXmlWriter(Feature[] features,
                           MS2Modification[] modifications)
Create doc structure, populate features and modifications

Parameters:
features -
modifications -

FeaturePepXmlWriter

public FeaturePepXmlWriter(FeatureSet featureSet)
Method Detail

setFeatures

public void setFeatures(Feature[] features)
setter for features

Parameters:
features -

willWriteIntensitiesAsXpressResults

public boolean willWriteIntensitiesAsXpressResults()

setWriteIntensitiesAsXpressResults

public void setWriteIntensitiesAsXpressResults(boolean writeIntensitiesAsXpressResults)

writeSpectrumQueries

protected void writeSpectrumQueries(java.io.PrintWriter pw)
Write out all features immediately

Specified by:
writeSpectrumQueries in class BasePepXmlWriter
Parameters:
pw -

writeFeature

protected void writeFeature(int featureIndex,
                            java.io.PrintWriter pw)
Add a SearchResult representing the passed-in feature to the first run of the file. Write out the XML for that search result


preWrite

protected void preWrite()
Make absolutely sure that we write a quantitative summary declaration at the top of the file, if either: -the incoming FeatureFile told us it had ratios, or -any feature in the file has ratios

Overrides:
preWrite in class BasePepXmlWriter

getFirstSpectrumQueryIndex

public int getFirstSpectrumQueryIndex()
Write out the full document, with all modifications and features, to a file It's too bad I have to override the superclass version here. The only reason that's necessary is to strip out the "pep:" stuff, because programs like RefreshParser only _pretend_ to parse XML. In practice they're looking for actual strings like "/msms_run_summary"

Throws:
java.io.IOException

setFirstSpectrumQueryIndex

public void setFirstSpectrumQueryIndex(int firstSpectrumQueryIndex)

getRatioMode

public int getRatioMode()

setRatioMode

public void setRatioMode(int ratioMode)


Fred Hutchinson Cancer Research Center