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

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.AmtDatabaseMatcherCLM
All Implemented Interfaces:
CommandLineModule

public class AmtDatabaseMatcherCLM
extends BaseViewerCommandLineModuleImpl
implements CommandLineModule

Command linemodule for matching AMT databases to MS1 data from various sources


Field Summary
protected static org.apache.log4j.Logger _log
           
protected  java.util.Set<java.lang.String> allMatchedPeptides
           
protected  AmtDatabaseMatcher amtDatabaseMatcher
           
protected  Fractionation2DUtilities.FractionatedAMTDatabaseStructure amtDatabaseStructure
           
protected  AmtDatabase amtDB
           
protected  Feature[] amtDBBaseFeatures
           
protected  java.io.File amtDBFile
           
protected  boolean calcFDR
           
protected  boolean calibrateMassesUsingMatches
           
static double DEFAULT_MIN_EMBEDDED_MS2_PEPTIDE_PROPHET
           
static MS2Modification[] defaultMS2ModificationsForMatching
           
protected  int deltaMassType
           
protected  FeatureSet embeddedMs2FeatureSet
           
protected  java.io.File inDir
           
protected  float looseDeltaElution
           
protected  float looseDeltaMass
           
protected  int maxEntriesInMassMatchedDatabase
           
protected  int maxRunsInMassMatchedDatabase
           
protected  int maxRunsToKeep
           
protected  double minMS2PeptideProphet
           
protected  int minRunPeptideMatchPercent
           
protected  int minRunsToKeep
           
protected  int mode
           
protected static int MODE_MATCH_AGAINST_MS1
           
protected static int MODE_MATCH_AGAINST_MS1_DIR
           
protected static java.lang.String[] modeExplanations
           
protected static java.lang.String[] modeStrings
           
protected  FeatureSet ms1FeatureSet
           
protected  java.io.File ms2Dir
           
protected  MS2Modification[] ms2ModificationsForMatching
           
protected  java.io.File mzXmlDir
           
protected  boolean nonlinearAlignment
           
protected  int nonlinearMappingPolynomialDegree
           
protected  java.io.File outDir
           
protected  java.io.File outFile
           
protected  boolean populateMs2Times
           
protected  boolean removeFractions
           
protected  boolean restrictDatabaseRuns
           
protected  MSRun run
           
protected  java.io.File saveChartsDir
           
protected  boolean showCharts
           
protected  java.util.Set<java.lang.String> thisRunMatchedPeptides
           
protected  boolean useAmtDBMods
           
 
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
AmtDatabaseMatcherCLM()
           
 
Method Summary
protected  void annotateFractionConcordanceForMatches(AmtDatabase amtDatabase, Feature[] ms2Features, FeatureSetMatcher.FeatureMatchingResult matchingResult)
           
 void assignArgumentValues()
          the first step in invoking your module.
 void execute()
          Called by msInspect after assignArgumentValues.
protected  FeatureSet findCorrespondingFeatureSet(java.io.File ms1File, java.io.File directory)
           
protected  java.io.File findCorrespondingMzXmlFile(java.io.File ms2File)
           
 AmtDatabaseMatcher getAmtDatabaseMatcher()
           
 FeatureSet getMs1FeatureSet()
           
protected  void init()
           
 void setMs1FeatureSet(FeatureSet ms1FeatureSet)
           
 
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

outFile

protected java.io.File outFile

outDir

protected java.io.File outDir

inDir

protected java.io.File inDir

ms2Dir

protected java.io.File ms2Dir

mzXmlDir

protected java.io.File mzXmlDir

amtDBFile

protected java.io.File amtDBFile

amtDB

protected AmtDatabase amtDB

amtDatabaseMatcher

protected AmtDatabaseMatcher amtDatabaseMatcher

ms1FeatureSet

protected FeatureSet ms1FeatureSet

embeddedMs2FeatureSet

protected FeatureSet embeddedMs2FeatureSet

amtDBBaseFeatures

protected Feature[] amtDBBaseFeatures

looseDeltaMass

protected float looseDeltaMass

deltaMassType

protected int deltaMassType

looseDeltaElution

protected float looseDeltaElution

useAmtDBMods

protected boolean useAmtDBMods

ms2ModificationsForMatching

protected MS2Modification[] ms2ModificationsForMatching

calibrateMassesUsingMatches

protected boolean calibrateMassesUsingMatches

calcFDR

protected boolean calcFDR

defaultMS2ModificationsForMatching

public static final MS2Modification[] defaultMS2ModificationsForMatching

DEFAULT_MIN_EMBEDDED_MS2_PEPTIDE_PROPHET

public static final double DEFAULT_MIN_EMBEDDED_MS2_PEPTIDE_PROPHET
See Also:
Constant Field Values

minMS2PeptideProphet

protected double minMS2PeptideProphet

run

protected MSRun run

removeFractions

protected boolean removeFractions

minRunPeptideMatchPercent

protected int minRunPeptideMatchPercent

maxEntriesInMassMatchedDatabase

protected int maxEntriesInMassMatchedDatabase

maxRunsInMassMatchedDatabase

protected int maxRunsInMassMatchedDatabase

restrictDatabaseRuns

protected boolean restrictDatabaseRuns

amtDatabaseStructure

protected Fractionation2DUtilities.FractionatedAMTDatabaseStructure amtDatabaseStructure

mode

protected int mode

modeStrings

protected static final java.lang.String[] modeStrings

modeExplanations

protected static final java.lang.String[] modeExplanations

MODE_MATCH_AGAINST_MS1

protected static final int MODE_MATCH_AGAINST_MS1
See Also:
Constant Field Values

MODE_MATCH_AGAINST_MS1_DIR

protected static final int MODE_MATCH_AGAINST_MS1_DIR
See Also:
Constant Field Values

nonlinearMappingPolynomialDegree

protected int nonlinearMappingPolynomialDegree

showCharts

protected boolean showCharts

saveChartsDir

protected java.io.File saveChartsDir

nonlinearAlignment

protected boolean nonlinearAlignment

minRunsToKeep

protected int minRunsToKeep

maxRunsToKeep

protected int maxRunsToKeep

thisRunMatchedPeptides

protected java.util.Set<java.lang.String> thisRunMatchedPeptides

allMatchedPeptides

protected java.util.Set<java.lang.String> allMatchedPeptides

populateMs2Times

protected boolean populateMs2Times
Constructor Detail

AmtDatabaseMatcherCLM

public AmtDatabaseMatcherCLM()
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

findCorrespondingFeatureSet

protected FeatureSet findCorrespondingFeatureSet(java.io.File ms1File,
                                                 java.io.File directory)
                                          throws java.io.IOException
Throws:
java.io.IOException

findCorrespondingMzXmlFile

protected java.io.File findCorrespondingMzXmlFile(java.io.File ms2File)
                                           throws java.io.IOException
Throws:
java.io.IOException

annotateFractionConcordanceForMatches

protected void annotateFractionConcordanceForMatches(AmtDatabase amtDatabase,
                                                     Feature[] ms2Features,
                                                     FeatureSetMatcher.FeatureMatchingResult matchingResult)

getMs1FeatureSet

public FeatureSet getMs1FeatureSet()

setMs1FeatureSet

public void setMs1FeatureSet(FeatureSet ms1FeatureSet)

getAmtDatabaseMatcher

public AmtDatabaseMatcher getAmtDatabaseMatcher()


Fred Hutchinson Cancer Research Center