Package picard.analysis
Class CompareMetrics
java.lang.Object
picard.cmdline.CommandLineProgram
picard.analysis.CompareMetrics
Compare two metrics files.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
Fields inherited from class picard.cmdline.CommandLineProgram
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, MAX_ALLOWABLE_ONE_LINE_SUMMARY_LENGTH, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, SYNTAX_TRANSITION_URL, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildMetricsMap
(List<? extends htsjdk.samtools.metrics.MetricBase> metrics) protected int
compareMetricsForEntry
(htsjdk.samtools.metrics.MetricBase metric1, htsjdk.samtools.metrics.MetricBase metric2, Field[] fields, Set<String> metricsToIgnore, String key) protected picard.analysis.CompareMetrics.SimpleResult
compareMetricValues
(Object value1, Object value2, String metricName) protected String[]
Put any custom command-line validation in an override of this method.protected int
doWork()
Do the work after command line has been parsed.Methods inherited from class picard.cmdline.CommandLineProgram
checkRInstallation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser
-
Field Details
-
INPUT
-
OUTPUT
@Argument(shortName="O", doc="Output file to write comparison results to.", optional=true) public File OUTPUT -
OUTPUT_TABLE
@Argument(doc="Output file to write table of differences to.", optional=true) public File OUTPUT_TABLE -
METRICS_TO_IGNORE
@Argument(shortName="MI", doc="Metrics to ignore. Any metrics specified here will be excluded from comparison by the tool. Note that while the values of these metrics are not compared, if they are missing from either file that will be considered a difference. Use METRICS_NOT_REQUIRED to specify metrics which can be missing from either file without being considered a difference.", optional=true) public List<String> METRICS_TO_IGNORE -
METRICS_NOT_REQUIRED
@Argument(shortName="MNR", doc="Metrics which are not required. Any metrics specified here may be missing from either of the files in the comparison, and this will not affect the result of the comparison. If metrics specified here are included in both files, their results will not be compared (they will be treated as METRICS_TO_IGNORE.", optional=true) public List<String> METRICS_NOT_REQUIRED -
METRIC_ALLOWABLE_RELATIVE_CHANGE
@Argument(shortName="MARC", doc="Metric Allowable Relative Change. A colon separate pair of metric name and an absolute relative change. For any metric specified here, when the values are compared between the two files, the program will allow that much relative change between the two values.", optional=true) public List<String> METRIC_ALLOWABLE_RELATIVE_CHANGE -
IGNORE_HISTOGRAM_DIFFERENCES
@Argument(shortName="IHD", doc="Ignore any differences between the two metric file\'s histograms (useful if using the \'METRIC_ALLOWABLE_RELATIVE_CHANGE\')", optional=true) public boolean IGNORE_HISTOGRAM_DIFFERENCES -
KEY
-
MetricToAllowableRelativeChange
-
-
Constructor Details
-
CompareMetrics
public CompareMetrics()
-
-
Method Details
-
doWork
protected int doWork()Description copied from class:CommandLineProgram
Do the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.- Specified by:
doWork
in classCommandLineProgram
- Returns:
- program exit status.
-
customCommandLineValidation
Description copied from class:CommandLineProgram
Put any custom command-line validation in an override of this method. clp is initialized at this point and can be used to print usage and access argv. Any options set by command-line parser can be validated.- Overrides:
customCommandLineValidation
in classCommandLineProgram
- Returns:
- null if command line is valid. If command line is invalid, returns an array of error message to be written to the appropriate place.
-
buildMetricsMap
protected Map<List<Object>,htsjdk.samtools.metrics.MetricBase> buildMetricsMap(List<? extends htsjdk.samtools.metrics.MetricBase> metrics) throws NoSuchFieldException, IllegalAccessException -
compareMetricsForEntry
protected int compareMetricsForEntry(htsjdk.samtools.metrics.MetricBase metric1, htsjdk.samtools.metrics.MetricBase metric2, Field[] fields, Set<String> metricsToIgnore, String key) throws IllegalAccessException - Throws:
IllegalAccessException
-
compareMetricValues
-