Collect metrics about coverage and performance of whole genome sequencing (WGS) experiments.
This tool collects metrics about the fractions of reads that pass base- and mapping-quality filters as well as coverage (read-depth) levels for WGS analyses. Both minimum base- and mapping-quality values as well as the maximum read depths (coverage cap) are user defined.
Note: Metrics labeled as percentages are actually expressed as fractions!
Usage Example:
java -jar picard.jar CollectWgsMetrics \Please see CollectWgsMetrics for detailed explanations of the output metrics.
I=input.bam \
O=collect_wgs_metrics.txt \
R=reference_sequence.fasta
Category Diagnostics and Quality Control
Overview
Computes a number of metrics that are useful for evaluating coverage and performance of whole genome sequencing experiments. Two algorithms are available for this metrics: default and fast. The fast algorithm is enabled by USE_FAST_ALGORITHM option. The fast algorithm works better for regions of BAM file with coverage at least 10 reads per locus, for lower coverage the algorithms perform the same.CollectWgsMetrics (Picard) specific arguments
This table summarizes the command-line arguments that are specific to this tool. For more details on each argument, see the list further down below the table or click on an argument name to jump directly to that entry in the list.
Argument name(s) | Default value | Summary | |
---|---|---|---|
Required Arguments | |||
--INPUT -I |
null | Input SAM or BAM file. | |
--OUTPUT -O |
null | Output metrics file. | |
--REFERENCE_SEQUENCE -R |
null | Reference sequence file. | |
Optional Tool Arguments | |||
--ALLELE_FRACTION |
[0.001, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.3, 0.5] | Allele fraction for which to calculate theoretical sensitivity. | |
--arguments_file |
[] | read one or more arguments files and add them to the command line | |
--COUNT_UNPAIRED |
false | If true, count unpaired reads, and paired reads with one end unmapped | |
--COVERAGE_CAP -CAP |
250 | Treat positions with coverage exceeding this value as if they had coverage at this value (but calculate the difference for PCT_EXC_CAPPED). | |
--help -h |
false | display the help message | |
--INCLUDE_BQ_HISTOGRAM |
false | Determines whether to include the base quality histogram in the metrics file. | |
--INTERVALS |
null | An interval list file that contains the positions to restrict the assessment. Please note that all bases of reads that overlap these intervals will be considered, even if some of those bases extend beyond the boundaries of the interval. The ideal use case for this argument is to use it to restrict the calculation to a subset of (whole) contigs. | |
--LOCUS_ACCUMULATION_CAP |
100000 | At positions with coverage exceeding this value, completely ignore reads that accumulate beyond this value (so that they will not be considered for PCT_EXC_CAPPED). Used to keep memory consumption in check, but could create bias if set too low | |
--MINIMUM_BASE_QUALITY -Q |
20 | Minimum base quality for a base to contribute coverage. N bases will be treated as having a base quality of negative infinity and will therefore be excluded from coverage regardless of the value of this parameter. | |
--MINIMUM_MAPPING_QUALITY -MQ |
20 | Minimum mapping quality for a read to contribute coverage. | |
--READ_LENGTH |
150 | Average read length in the file. Default is 150. | |
--SAMPLE_SIZE |
10000 | Sample Size used for Theoretical Het Sensitivity sampling. Default is 10000. | |
--STOP_AFTER |
-1 | For debugging purposes, stop after processing this many genomic bases. | |
--THEORETICAL_SENSITIVITY_OUTPUT |
null | Output for Theoretical Sensitivity metrics. | |
--USE_FAST_ALGORITHM |
false | If true, fast algorithm is used. | |
--version |
false | display the version number for this tool | |
Optional Common Arguments | |||
--COMPRESSION_LEVEL |
5 | Compression level for all compressed files created (e.g. BAM and VCF). | |
--CREATE_INDEX |
false | Whether to create a BAM index when writing a coordinate-sorted BAM file. | |
--CREATE_MD5_FILE |
false | Whether to create an MD5 digest for any BAM or FASTQ files created. | |
--GA4GH_CLIENT_SECRETS |
client_secrets.json | Google Genomics API client_secrets.json file path. | |
--MAX_RECORDS_IN_RAM |
500000 | When writing files that need to be sorted, this will specify the number of records stored in RAM before spilling to disk. Increasing this number reduces the number of file handles needed to sort the file, and increases the amount of RAM needed. | |
--QUIET |
false | Whether to suppress job-summary info on System.err. | |
--TMP_DIR |
[] | One or more directories with space available to be used by this program for temporary storage of working files | |
--USE_JDK_DEFLATER -use_jdk_deflater |
false | Use the JDK Deflater instead of the Intel Deflater for writing compressed output | |
--USE_JDK_INFLATER -use_jdk_inflater |
false | Use the JDK Inflater instead of the Intel Inflater for reading compressed input | |
--VALIDATION_STRINGENCY |
STRICT | Validation stringency for all SAM files read by this program. Setting stringency to SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. | |
--VERBOSITY |
INFO | Control verbosity of logging. | |
Advanced Arguments | |||
--showHidden |
false | display hidden arguments |
Argument details
Arguments in this list are specific to this tool. Keep in mind that other arguments are available that are shared with other tools (e.g. command-line GATK arguments); see Inherited arguments above.
--ALLELE_FRACTION / NA
Allele fraction for which to calculate theoretical sensitivity.
List[Double] [0.001, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.3, 0.5]
--arguments_file / NA
read one or more arguments files and add them to the command line
List[File] []
--COMPRESSION_LEVEL / NA
Compression level for all compressed files created (e.g. BAM and VCF).
int 5 [ [ -∞ ∞ ] ]
--COUNT_UNPAIRED / NA
If true, count unpaired reads, and paired reads with one end unmapped
boolean false
--COVERAGE_CAP / -CAP
Treat positions with coverage exceeding this value as if they had coverage at this value (but calculate the difference for PCT_EXC_CAPPED).
int 250 [ [ -∞ ∞ ] ]
--CREATE_INDEX / NA
Whether to create a BAM index when writing a coordinate-sorted BAM file.
Boolean false
--CREATE_MD5_FILE / NA
Whether to create an MD5 digest for any BAM or FASTQ files created.
boolean false
--GA4GH_CLIENT_SECRETS / NA
Google Genomics API client_secrets.json file path.
String client_secrets.json
--help / -h
display the help message
boolean false
--INCLUDE_BQ_HISTOGRAM / NA
Determines whether to include the base quality histogram in the metrics file.
boolean false
--INPUT / -I
Input SAM or BAM file.
R File null
--INTERVALS / NA
An interval list file that contains the positions to restrict the assessment. Please note that all bases of reads that overlap these intervals will be considered, even if some of those bases extend beyond the boundaries of the interval. The ideal use case for this argument is to use it to restrict the calculation to a subset of (whole) contigs.
File null
--LOCUS_ACCUMULATION_CAP / NA
At positions with coverage exceeding this value, completely ignore reads that accumulate beyond this value (so that they will not be considered for PCT_EXC_CAPPED). Used to keep memory consumption in check, but could create bias if set too low
int 100000 [ [ -∞ ∞ ] ]
--MAX_RECORDS_IN_RAM / NA
When writing files that need to be sorted, this will specify the number of records stored in RAM before spilling to disk. Increasing this number reduces the number of file handles needed to sort the file, and increases the amount of RAM needed.
Integer 500000 [ [ -∞ ∞ ] ]
--MINIMUM_BASE_QUALITY / -Q
Minimum base quality for a base to contribute coverage. N bases will be treated as having a base quality of negative infinity and will therefore be excluded from coverage regardless of the value of this parameter.
int 20 [ [ -∞ ∞ ] ]
--MINIMUM_MAPPING_QUALITY / -MQ
Minimum mapping quality for a read to contribute coverage.
int 20 [ [ -∞ ∞ ] ]
--OUTPUT / -O
Output metrics file.
R File null
--QUIET / NA
Whether to suppress job-summary info on System.err.
Boolean false
--READ_LENGTH / NA
Average read length in the file. Default is 150.
int 150 [ [ -∞ ∞ ] ]
--REFERENCE_SEQUENCE / -R
Reference sequence file.
R File null
--SAMPLE_SIZE / NA
Sample Size used for Theoretical Het Sensitivity sampling. Default is 10000.
int 10000 [ [ -∞ ∞ ] ]
--showHidden / -showHidden
display hidden arguments
boolean false
--STOP_AFTER / NA
For debugging purposes, stop after processing this many genomic bases.
long -1 [ [ -∞ ∞ ] ]
--THEORETICAL_SENSITIVITY_OUTPUT / NA
Output for Theoretical Sensitivity metrics.
File null
--TMP_DIR / NA
One or more directories with space available to be used by this program for temporary storage of working files
List[File] []
--USE_FAST_ALGORITHM / NA
If true, fast algorithm is used.
boolean false
--USE_JDK_DEFLATER / -use_jdk_deflater
Use the JDK Deflater instead of the Intel Deflater for writing compressed output
Boolean false
--USE_JDK_INFLATER / -use_jdk_inflater
Use the JDK Inflater instead of the Intel Inflater for reading compressed input
Boolean false
--VALIDATION_STRINGENCY / NA
Validation stringency for all SAM files read by this program. Setting stringency to SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded.
The --VALIDATION_STRINGENCY argument is an enumerated type (ValidationStringency), which can have one of the following values:
- STRICT
- LENIENT
- SILENT
ValidationStringency STRICT
--VERBOSITY / NA
Control verbosity of logging.
The --VERBOSITY argument is an enumerated type (LogLevel), which can have one of the following values:
- ERROR
- WARNING
- INFO
- DEBUG
LogLevel INFO
--version / NA
display the version number for this tool
boolean false
GATK version 4.0.12.0 built at 23-45-2019 03:45:45.
0 comments
Please sign in to leave a comment.