org.fhcrc.cpl.viewer.amt.commandline
Class ProteinRollupCommandLineModule

java.lang.Object
  extended by org.fhcrc.cpl.toolbox.commandline.BaseCommandLineModuleImpl
      extended by org.fhcrc.cpl.viewer.commandline.modules.BaseViewerCommandLineModuleImpl
          extended by org.fhcrc.cpl.viewer.amt.commandline.ProteinRollupCommandLineModule
All Implemented Interfaces:
CommandLineModule

public class ProteinRollupCommandLineModule
extends BaseViewerCommandLineModuleImpl
implements CommandLineModule

Command linemodule to help roll up peptide information to the protein level. Includes some naive mechanisms for generating lists of possible proteins given a list of peptides and a Fasta file. More usefully, includes some mechanisms for generating pepXml files that can be used by ProteinProphet, given some peptide IDs and a Fasta file


Field Summary
protected static org.apache.log4j.Logger _log
           
protected  AmtDatabase amtDB
           
protected  boolean expanded
           
protected  java.io.File fastaFile
           
protected  java.io.File geneLookupFile
           
protected  java.io.File inDir
           
protected  java.io.File inTabFile
           
protected  int minPeptides
           
protected  double minProtXmlProbability
           
protected  int minUniquePeptides
           
protected  int mode
           
protected static int MODE_COLLAPSE_PEPTIDES
           
protected static int MODE_CREATE_PEPXML_FOR_TABFILE
           
protected static int MODE_DIGEST_PROTXML
           
protected static int MODE_ROLLUP_GENES
           
protected static int MODE_ROLLUP_PEPTIDES_TO_GENES
           
protected static int MODE_TABFILE
           
protected static java.lang.String[] modeExplanations
           
protected static java.lang.String[] modeStrings
           
protected  FeatureSet[] ms1FeatureSets
           
protected  java.io.File outDir
           
protected  java.io.File outFile
           
protected  FeatureSet pepXmlFeatureSet
           
protected  Protein[] proteinsInFasta
           
protected  java.io.File[] protXmlFiles
           
 
Fields inherited from class org.fhcrc.cpl.toolbox.commandline.BaseCommandLineModuleImpl
mArgumentDefs, mArgumentValues, mArgumentValueStrings, mCommandName, mHelpMessage, mShortDescription, mUsageMessage
 
Fields inherited from interface org.fhcrc.cpl.toolbox.commandline.CommandLineModule
MODULE_HELP_AUTOMATIC, MODULE_USAGE_AUTOMATIC, UNNAMED_ARG_SERIES_SEPARATOR
 
Constructor Summary
ProteinRollupCommandLineModule()
           
 
Method Summary
protected  java.lang.String assembleStringFromCollection(java.util.Collection<java.lang.String> stringCollection)
           
 void assignArgumentValues()
          the first step in invoking your module.
protected  void createPepXmlForTabFile()
           
 void execute()
          Called by msInspect after assignArgumentValues.
protected  void init()
           
protected  void peptideGeneRollup()
           
protected  void peptideGeneRollupExpanded()
           
protected  void rollupTabFile()
          roll up tab file to protein level naively (and natively)
 
Methods inherited from class org.fhcrc.cpl.viewer.commandline.modules.BaseViewerCommandLineModuleImpl
createUnnamedFeatureFileArgumentDefinition, createUnnamedSeriesFeatureFileArgumentDefinition, getFastaFileArgumentValue, getFeatureSetArgumentValue, getModificationListArgumentValue
 
Methods inherited from class org.fhcrc.cpl.toolbox.commandline.BaseCommandLineModuleImpl
addArgumentDefinition, addArgumentDefinitions, addArgumentDefinitions, assertArgumentAbsent, assertArgumentAbsent, assertArgumentPresent, assertArgumentPresent, createArgsTableHTML, createUnnamedFileArgumentDefinition, createUnnamedSeriesFileArgumentDefinition, digestArguments, getAdvancedArgumentDefinitions, getArgumentDefinition, getArgumentDefinitions, getArgumentDefinitionsSortedForDisplay, getArgumentValue, getArgumentValues, getArgumentValueStrings, getBasicArgumentDefinitions, getBooleanArgumentValue, getCommandName, getDeltaMassArgumentValue, getDoubleArgumentValue, getDoubleArrayArgumentValue, getFileArgumentValue, getFileArrayArgumentValue, getFloatArgumentValue, getFullHelp, getHelpMessage, getHtmlHelpFragment, getIntegerArgumentValue, getPrintWriter, getShortDescription, getStringArgumentValue, getUnnamedArgumentValue, getUnnamedFileArgumentValue, getUnnamedSeriesArgumentValues, getUnnamedSeriesFileArgumentValues, getUsage, hasAdvancedArguments, hasArgumentValue, hasUnnamedArgumentValue, hasUnnamedSeriesArgumentValue, invoke, makeHtmlSafe, sortArgDefsForDisplay, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.fhcrc.cpl.toolbox.commandline.CommandLineModule
digestArguments, getAdvancedArgumentDefinitions, getArgumentDefinition, getArgumentDefinitions, getArgumentDefinitionsSortedForDisplay, getArgumentValueStrings, getBasicArgumentDefinitions, getCommandName, getFullHelp, getHelpMessage, getHtmlHelpFragment, getShortDescription, getUsage, invoke
 

Field Detail

_log

protected static org.apache.log4j.Logger _log

mode

protected int mode

modeStrings

protected static final java.lang.String[] modeStrings

modeExplanations

protected static final java.lang.String[] modeExplanations

MODE_DIGEST_PROTXML

protected static final int MODE_DIGEST_PROTXML
See Also:
Constant Field Values

MODE_TABFILE

protected static final int MODE_TABFILE
See Also:
Constant Field Values

MODE_CREATE_PEPXML_FOR_TABFILE

protected static final int MODE_CREATE_PEPXML_FOR_TABFILE
See Also:
Constant Field Values

MODE_COLLAPSE_PEPTIDES

protected static final int MODE_COLLAPSE_PEPTIDES
See Also:
Constant Field Values

MODE_ROLLUP_GENES

protected static final int MODE_ROLLUP_GENES
See Also:
Constant Field Values

MODE_ROLLUP_PEPTIDES_TO_GENES

protected static final int MODE_ROLLUP_PEPTIDES_TO_GENES
See Also:
Constant Field Values

ms1FeatureSets

protected FeatureSet[] ms1FeatureSets

proteinsInFasta

protected Protein[] proteinsInFasta

fastaFile

protected java.io.File fastaFile

protXmlFiles

protected java.io.File[] protXmlFiles

pepXmlFeatureSet

protected FeatureSet pepXmlFeatureSet

minUniquePeptides

protected int minUniquePeptides

minProtXmlProbability

protected double minProtXmlProbability

outFile

protected java.io.File outFile

outDir

protected java.io.File outDir

inDir

protected java.io.File inDir

inTabFile

protected java.io.File inTabFile

geneLookupFile

protected java.io.File geneLookupFile

expanded

protected boolean expanded

minPeptides

protected int minPeptides

amtDB

protected AmtDatabase amtDB
Constructor Detail

ProteinRollupCommandLineModule

public ProteinRollupCommandLineModule()
Method Detail

init

protected void init()

assignArgumentValues

public void assignArgumentValues()
                          throws ArgumentValidationException
Description copied from interface: CommandLineModule
the first step in invoking your module. The values assigned to the various arguments by the user are passed to your module for storage and additional validation. Any communication with the user about their argument values should be done by this method.

Specified by:
assignArgumentValues in interface CommandLineModule
Throws:
ArgumentValidationException

execute

public void execute()
             throws CommandLineModuleExecutionException
Description copied from interface: CommandLineModule
Called by msInspect after assignArgumentValues. Executes your functionality. Any communication with the user about execution status should be done by this method.

Specified by:
execute in interface CommandLineModule
Throws:
CommandLineModuleExecutionException

peptideGeneRollupExpanded

protected void peptideGeneRollupExpanded()
                                  throws CommandLineModuleExecutionException
Throws:
CommandLineModuleExecutionException

assembleStringFromCollection

protected java.lang.String assembleStringFromCollection(java.util.Collection<java.lang.String> stringCollection)

peptideGeneRollup

protected void peptideGeneRollup()
                          throws CommandLineModuleExecutionException
Throws:
CommandLineModuleExecutionException

createPepXmlForTabFile

protected void createPepXmlForTabFile()
                               throws CommandLineModuleExecutionException
Throws:
CommandLineModuleExecutionException

rollupTabFile

protected void rollupTabFile()
                      throws CommandLineModuleExecutionException
roll up tab file to protein level naively (and natively)

Throws:
CommandLineModuleExecutionException


Fred Hutchinson Cancer Research Center