# Class CollectGcBiasMetrics

java.lang.Object
picard.cmdline.CommandLineProgram
picard.analysis.SinglePassSamProgram
picard.analysis.CollectGcBiasMetrics

@DocumentedFeature public class CollectGcBiasMetrics extends SinglePassSamProgram
Tool to collect information about GC bias in the reads in a given BAM file. Computes the number of windows (of size specified by SCAN_WINDOW_SIZE) in the genome at each GC% and counts the number of read starts in each GC bin. What is output and plotted is the "normalized coverage" in each bin - i.e. the number of reads per window normalized to the average number of reads per window across the whole genome.

## Field Summary

Fields
Modifier and Type
Field
Description
`boolean`
`ALSO_IGNORE_DUPLICATES`
`File`
`CHART_OUTPUT`
`boolean`
`IS_BISULFITE_SEQUENCED`
`Set<MetricAccumulationLevel>`
`METRIC_ACCUMULATION_LEVEL`
`double`
`MINIMUM_GENOME_FRACTION`
`int`
`SCAN_WINDOW_SIZE`
`File`
`SUMMARY_OUTPUT`

### Fields inherited from class SinglePassSamProgram

`ASSUME_SORTED, INPUT, output, OUTPUT, STOP_AFTER`

### 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
`CollectGcBiasMetrics()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`acceptRead(htsjdk.samtools.SAMRecord rec, htsjdk.samtools.reference.ReferenceSequence ref)`
/////////////////////////////////////////////////////////////////////////
`protected String[]`
`customCommandLineValidation()`
Put any custom command-line validation in an override of this method.
`protected void`
`finish()`
//////////////////////////////////////////////////////////////////////////
`protected void`
`setup(htsjdk.samtools.SAMFileHeader header, File samFile)`
//////////////////////////////////////////////////////////////////////////

### Methods inherited from class SinglePassSamProgram

`doWork, getOutputArgumentCollection, makeItSo, setReferenceSequence, usesNoRefReads`

### Methods inherited from class CommandLineProgram

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

### Methods inherited from class Object

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

## Field Details

### CHART_OUTPUT

@Argument(shortName="CHART", doc="The PDF file to render the chart to.", optional=true) public File CHART_OUTPUT

### SUMMARY_OUTPUT

@Argument(shortName="S", doc="The text file to write summary metrics to.") public File SUMMARY_OUTPUT

### SCAN_WINDOW_SIZE

@Argument(shortName="WINDOW_SIZE", doc="The size of the scanning windows on the reference genome that are used to bin reads.") public int SCAN_WINDOW_SIZE

### MINIMUM_GENOME_FRACTION

@Argument(shortName="MGF", doc="For summary metrics, exclude GC windows that include less than this fraction of the genome.") public double MINIMUM_GENOME_FRACTION

### IS_BISULFITE_SEQUENCED

@Argument(shortName="BS", doc="Whether the SAM or BAM file consists of bisulfite sequenced reads.") public boolean IS_BISULFITE_SEQUENCED

### METRIC_ACCUMULATION_LEVEL

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

### ALSO_IGNORE_DUPLICATES

@Argument(shortName="ALSO_IGNORE_DUPLICATES", doc="Use to get additional results without duplicates. This option allows to gain two plots per level at the same time: one is the usual one and the other excludes duplicates.") public boolean ALSO_IGNORE_DUPLICATES

## Constructor Details

### CollectGcBiasMetrics

public CollectGcBiasMetrics()

## Method Details

### 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.

### setup

protected void setup(htsjdk.samtools.SAMFileHeader header, File samFile)
//////////////////////////////////////////////////////////////////////////

Specified by:
  `setup` in class `SinglePassSamProgram`

### acceptRead

protected void acceptRead(htsjdk.samtools.SAMRecord rec, htsjdk.samtools.reference.ReferenceSequence ref)
/////////////////////////////////////////////////////////////////////////

Specified by:
  `acceptRead` in class `SinglePassSamProgram`

### finish

protected void finish()
//////////////////////////////////////////////////////////////////////////

Specified by:
  `finish` in class `SinglePassSamProgram`