Package picard.sam.SamErrorMetric
Class CollectSamErrorMetrics
java.lang.Object
picard.cmdline.CommandLineProgram
picard.sam.SamErrorMetric.CollectSamErrorMetrics
Program to collect error metrics on bases stratified in various ways.
-
Field Summary
FieldsModifier and TypeFieldDescriptionpicard.sam.SamErrorMetric.ErrorTypebooleanintintlongintintintdoubleintpicard.sam.SamErrorMetric.ReadBaseStratification.StratifierFields 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 TypeMethodDescriptionstatic intCompareVariantContextToLocus(htsjdk.samtools.SAMSequenceDictionary dictionary, htsjdk.variant.variantcontext.VariantContext variantContext, htsjdk.samtools.util.Locus locus) Compares a VariantContext to a Locus providing information regarding possible overlap, or relative locationprotected String[]Put any custom command-line validation in an override of this method.protected intdoWork()Do the work after command line has been parsed.protected static BaseErrorAggregationparseDirective(String stratifierDirective) Parses a "Directive" of the form "ERROR,STRATIFIER,STRATIFIER...etc." into aBaseErrorAggregationconsisting of the appropriateBaseCalculatorand theCollectionStratifierconstructed from the various individual stratifiers.protected booleanprocessDeletionLocus(htsjdk.samtools.util.SamLocusIterator.RecordAndOffset deletionRao, htsjdk.samtools.util.SamLocusIterator.LocusInfo locusInfo) Checks if the same record has been seen at the previous locus already, thereby determining whether or not a deletion has already been processed.protected booleanMethods inherited from class picard.cmdline.CommandLineProgram
checkRInstallation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, setDefaultHeaders, useLegacyParser
-
Field Details
-
INPUT
-
OUTPUT
@Argument(shortName="O", doc="Base name for output files. Actual file names will be generated from the basename and suffixes from the ERROR and STRATIFIER by adding a \'.\' and then error_by_stratifier[_and_stratifier]* where \'error\' is ERROR\'s extension, and \'stratifier\' is STRATIFIER\'s suffix. For example, an ERROR_METRIC of ERROR:BASE_QUALITY:GC_CONTENT will produce an extension \'.error_by_base_quality_and_gc\'. The suffixes can be found in the documentation for ERROR_VALUE and SUFFIX_VALUE.") public File OUTPUT -
ERROR_METRICS
-
ERROR_VALUE
@Argument(doc="A fake argument used to show the options of ERROR (in ERROR_METRICS).", optional=true) public picard.sam.SamErrorMetric.ErrorType ERROR_VALUE -
STRATIFIER_VALUE
@Argument(doc="A fake argument used to show the options of STRATIFIER (in ERROR_METRICS).", optional=true) public picard.sam.SamErrorMetric.ReadBaseStratification.Stratifier STRATIFIER_VALUE -
VCF
@Argument(shortName="V", doc="VCF of known variation for sample. program will skip over polymorphic sites in this VCF and avoid collecting data on these loci.", optional=true) public String VCF -
INTERVALS
-
MIN_MAPPING_Q
@Argument(shortName="MQ", doc="Minimum mapping quality to include read.") public int MIN_MAPPING_Q -
MIN_BASE_Q
@Argument(shortName="BQ", doc="Minimum base quality to include base.") public int MIN_BASE_Q -
PRIOR_Q
@Argument(shortName="PE", doc="The prior error, in phred-scale (used for calculating empirical error rates).", optional=true) public int PRIOR_Q -
MAX_LOCI
@Argument(shortName="MAX", doc="Maximum number of loci to process (or unlimited if 0).", optional=true) public long MAX_LOCI -
LONG_HOMOPOLYMER
@Argument(shortName="LH", doc="Shortest homopolymer which is considered long. Used by the BINNED_HOMOPOLYMER stratifier.", optional=true) public int LONG_HOMOPOLYMER -
LOCATION_BIN_SIZE
@Argument(shortName="LBS", doc="Size of location bins. Used by the FLOWCELL_X and FLOWCELL_Y stratifiers", optional=true) public int LOCATION_BIN_SIZE -
PROBABILITY
@Argument(shortName="P", doc="The probability of selecting a locus for analysis (for downsampling).", optional=true) public double PROBABILITY -
PROGRESS_STEP_INTERVAL
@Argument(fullName="PROGRESS_STEP_INTERVAL", doc="The interval between which progress will be displayed.", optional=true) public int PROGRESS_STEP_INTERVAL -
INTERVAL_ITERATOR
@Argument(fullName="INTERVAL_ITERATOR", doc="Iterate through the file assuming it consists of a pre-created subset interval of the full genome. This enables fast processing of files with reads at disparate parts of the genome. Requires that the provided VCF file is indexed. ", optional=true) public boolean INTERVAL_ITERATOR -
FILE_EXTENSION
@Argument(shortName="EXT", doc="Append the given file extension to all metric file names (ex. OUTPUT.insert_size_metrics.EXT). No extension by default.", optional=true) public String FILE_EXTENSION
-
-
Constructor Details
-
CollectSamErrorMetrics
public CollectSamErrorMetrics()
-
-
Method Details
-
requiresReference
protected boolean requiresReference()- Overrides:
requiresReferencein classCommandLineProgram
-
customCommandLineValidation
Description copied from class:CommandLineProgramPut 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:
customCommandLineValidationin 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.
-
doWork
protected int doWork()Description copied from class:CommandLineProgramDo the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.- Specified by:
doWorkin classCommandLineProgram- Returns:
- program exit status.
-
processDeletionLocus
protected boolean processDeletionLocus(htsjdk.samtools.util.SamLocusIterator.RecordAndOffset deletionRao, htsjdk.samtools.util.SamLocusIterator.LocusInfo locusInfo) Checks if the same record has been seen at the previous locus already, thereby determining whether or not a deletion has already been processed. Note that calling this method will have the side effect of signaling that the record is processed at this location.- Parameters:
deletionRao- The RecordAndOffset to be checkedlocusInfo- The LocusInfo to determine the current locus- Returns:
- True, if the record has been seen at the previous locus. False, if it has not yet been seen.
-
CompareVariantContextToLocus
public static int CompareVariantContextToLocus(htsjdk.samtools.SAMSequenceDictionary dictionary, htsjdk.variant.variantcontext.VariantContext variantContext, htsjdk.samtools.util.Locus locus) Compares a VariantContext to a Locus providing information regarding possible overlap, or relative location- Parameters:
dictionary- TheSAMSequenceDictionaryto use for ordering the sequencesvariantContext- theVariantContextto comparelocus- theLocusto compare- Returns:
- negative if variantContext comes before locus (with no overlap) zero if variantContext and locus overlap positive if variantContext comes after locus (with no overlap) if variantContext and locus are in the same contig the return value will be the number of bases apart they are, otherwise it will be MIN_INT/MAX_INT
-
parseDirective
Parses a "Directive" of the form "ERROR,STRATIFIER,STRATIFIER...etc." into aBaseErrorAggregationconsisting of the appropriateBaseCalculatorand theCollectionStratifierconstructed from the various individual stratifiers. The conversion from string to object is performed by the enumsErrorsandStratifier.- Parameters:
stratifierDirective- The string directive describing the error type and collection of stratifiers to use- Returns:
- The appropriate
BaseErrorAggregation.
-