org.fhcrc.cpl.viewer.ms2.commandline
Class CalculateFDRCLM
java.lang.Object
org.fhcrc.cpl.toolbox.commandline.BaseCommandLineModuleImpl
org.fhcrc.cpl.viewer.commandline.modules.BaseViewerCommandLineModuleImpl
org.fhcrc.cpl.viewer.ms2.commandline.CalculateFDRCLM
- All Implemented Interfaces:
- CommandLineModule
public class CalculateFDRCLM
- extends BaseViewerCommandLineModuleImpl
- implements CommandLineModule
Commandline module for FDR calculation and filtering
This allows the user to take a feature file (which can be a pepXML file) and do an FDR calculation based on
reverse database hits (rev_ prefix), using some single peptide quality score (PeptideProphet probability, or
any arbitrary search_score). The results are then filtered according to some maximum FDR threshold and output
to a new file, with all filtered results having a PeptideProphet probability of some specified value.
| 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 |
_log
protected static org.apache.log4j.Logger _log
MIN_FEATURES_FOR_FDR_CALC
public static final int MIN_FEATURES_FOR_FDR_CALC
- See Also:
- Constant Field Values
featureFiles
protected java.io.File[] featureFiles
searchScoreName
protected java.lang.String searchScoreName
outFile
protected java.io.File outFile
outDir
protected java.io.File outDir
higherIsBetter
protected boolean higherIsBetter
showCharts
protected boolean showCharts
maxFDRToKeep
protected float maxFDRToKeep
passingFeaturePeptideProphetValue
protected float passingFeaturePeptideProphetValue
setPeptideProphet1MinusFDR
protected boolean setPeptideProphet1MinusFDR
targetDecoyDBSizeRatio
protected float targetDecoyDBSizeRatio
scoreType
protected int scoreType
outFormat
protected int outFormat
byCharge
protected boolean byCharge
calcAllRunsFDRTogether
protected boolean calcAllRunsFDRTogether
DEFAULT_REV_PROTEIN_PREFIX
public static final java.lang.String DEFAULT_REV_PROTEIN_PREFIX
- See Also:
- Constant Field Values
reverseProteinPrefix
protected java.lang.String reverseProteinPrefix
saveChartsDir
protected java.io.File saveChartsDir
DEFAULT_SEARCH_SCORE_NAME
public static final java.lang.String DEFAULT_SEARCH_SCORE_NAME
- See Also:
- Constant Field Values
scoreTypeStrings
protected static final java.lang.String[] scoreTypeStrings
scoreTypeExplanations
protected static final java.lang.String[] scoreTypeExplanations
MODE_PPROPHET
protected static final int MODE_PPROPHET
- See Also:
- Constant Field Values
MODE_SEARCH_SCORE
protected static final int MODE_SEARCH_SCORE
- See Also:
- Constant Field Values
outFormatStrings
protected static final java.lang.String[] outFormatStrings
outFormatExplanations
protected static final java.lang.String[] outFormatExplanations
OUT_FORMAT_PEPXML
protected static final int OUT_FORMAT_PEPXML
- See Also:
- Constant Field Values
OUT_FORMAT_MSINSPECT
protected static final int OUT_FORMAT_MSINSPECT
- See Also:
- Constant Field Values
OUT_FORMAT_APML
protected static final int OUT_FORMAT_APML
- See Also:
- Constant Field Values
OUT_FORMAT_INPUT
protected static final int OUT_FORMAT_INPUT
- See Also:
- Constant Field Values
CalculateFDRCLM
public CalculateFDRCLM()
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
isInputPepXML
protected boolean isInputPepXML(java.io.File featureFile)
throws java.io.IOException
- Throws:
java.io.IOException
loadFeatureSetsFromFile
protected java.util.List<FeatureSet> loadFeatureSetsFromFile(java.io.File featureFile)
throws java.lang.Exception
- Throws:
java.lang.Exception
calcOutputFormat
protected int calcOutputFormat(java.io.File featureFile)
throws java.io.IOException
- Throws:
java.io.IOException
splitFeaturesByCharge
protected java.util.Map<java.lang.Integer,java.util.List<Feature>> splitFeaturesByCharge(Feature[] features)
execute
public void execute()
throws CommandLineModuleExecutionException
- do the actual work
- Specified by:
execute in interface CommandLineModule
- Throws:
CommandLineModuleExecutionException
writeFile
protected void writeFile(java.util.List<FeatureSet> featureSets,
java.io.File outputFile,
int thisFileOutFormat)
throws CommandLineModuleExecutionException
- Throws:
CommandLineModuleExecutionException
calcFDROnFeatures
protected Feature[] calcFDROnFeatures(Feature[] features,
java.lang.String chartNameSuffix)
throws CommandLineModuleExecutionException
- Parameters:
features -
- Returns:
- forward features passing FDR cutoff
- Throws:
CommandLineModuleExecutionException
writeFeatureSet
public void writeFeatureSet(FeatureSet featureSet,
java.io.File outputFile,
int outputFormat)
throws CommandLineModuleExecutionException
- Throws:
CommandLineModuleExecutionException
getSearchScoreValue
protected double getSearchScoreValue(Feature feature)
Fred Hutchinson Cancer Research Center