# Class CollectRrbsMetrics

java.lang.Object
picard.cmdline.CommandLineProgram
picard.analysis.CollectRrbsMetrics

@DocumentedFeature public class CollectRrbsMetrics extends CommandLineProgram
Calculates and reports QC metrics for RRBS data based on the methylation status at individual C/G bases as well as CpG sites across all reads in the input BAM/SAM file.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`CollectRrbsMetrics.CollectRrbsMetricsReferenceArgumentCollection`

## Field Summary

Fields
Modifier and Type
Field
Description
`boolean`
`ASSUME_SORTED`
`int`
`C_QUALITY_THRESHOLD`
`static final String`
`DETAIL_FILE_EXTENSION`
`boolean`
`DO_NOT_CREATE_PLOTS`
`File`
`INPUT`
`double`
`MAX_MISMATCH_RATE`
`Set<MetricAccumulationLevel>`
`METRIC_ACCUMULATION_LEVEL`
`String`
`METRICS_FILE_PREFIX`
`int`
`MINIMUM_READ_LENGTH`
`int`
`NEXT_BASE_QUALITY_THRESHOLD`
`static final String`
`PDF_FILE_EXTENSION`
`Set<String>`
`SEQUENCE_NAMES`
`static final String`
`SUMMARY_FILE_EXTENSION`

### Fields inherited from class 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
Constructor
Description
`CollectRrbsMetrics()`

## Method Summary

Modifier and Type
Method
Description
`protected String[]`
`customCommandLineValidation()`
Put any custom command-line validation in an override of this method.
`protected int`
`doWork()`
Do the work after command line has been parsed.
`protected ReferenceArgumentCollection`
`makeReferenceArgumentCollection()`

### Methods inherited from class CommandLineProgram

`checkRInstallation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### INPUT

@Argument(doc="The SAM/BAM/CRAM file containing aligned reads. Must be coordinate sorted", shortName="I") public File INPUT

### METRICS_FILE_PREFIX

@Argument(doc="Base name for output files", shortName="M") public String METRICS_FILE_PREFIX

### MINIMUM_READ_LENGTH

@Argument(doc="Minimum read length") public int MINIMUM_READ_LENGTH

### C_QUALITY_THRESHOLD

@Argument(doc="Threshold for base quality of a C base before it is considered") public int C_QUALITY_THRESHOLD

### NEXT_BASE_QUALITY_THRESHOLD

@Argument(doc="Threshold for quality of a base next to a C before the C base is considered") public int NEXT_BASE_QUALITY_THRESHOLD

### MAX_MISMATCH_RATE

@Argument(doc="Maximum percentage of mismatches in a read for it to be considered, with a range of 0-1") public double MAX_MISMATCH_RATE

### SEQUENCE_NAMES

@Argument(doc="Set of sequence names to consider, if not specified all sequences will be used", optional=true) public Set<String> SEQUENCE_NAMES

### ASSUME_SORTED

@Argument(shortName="AS", doc="If true, assume that the input file is coordinate sorted even if the header says otherwise.") public boolean ASSUME_SORTED

### METRIC_ACCUMULATION_LEVEL

@Argument(shortName="LEVEL", doc="The level(s) at which to accumulate metrics. ") public Set<MetricAccumulationLevel> METRIC_ACCUMULATION_LEVEL

### DO_NOT_CREATE_PLOTS

@Argument(doc="If set, this tool will not generate a PDF file with plots of the metrics.", optional=true) public boolean DO_NOT_CREATE_PLOTS

### DETAIL_FILE_EXTENSION

public static final String DETAIL_FILE_EXTENSION

See Also:
  - Constant Field Values

### SUMMARY_FILE_EXTENSION

public static final String SUMMARY_FILE_EXTENSION

See Also:
  - Constant Field Values

### PDF_FILE_EXTENSION

public static final String PDF_FILE_EXTENSION

See Also:
  - Constant Field Values

## Constructor Details

### CollectRrbsMetrics

public CollectRrbsMetrics()

## Method Details

### makeReferenceArgumentCollection

protected ReferenceArgumentCollection makeReferenceArgumentCollection()

Overrides:
  `makeReferenceArgumentCollection` in class `CommandLineProgram`

### 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 class `CommandLineProgram`
Returns:
  program exit status.

### customCommandLineValidation

protected String[] 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 class `CommandLineProgram`
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.