User-defined coverage in CollectHsMetrics [Picard]
1
0
Entering edit mode
6.8 years ago
anu014 ▴ 190

Hello Biostars!

Can anyone tell me how to get user-defined coverage from Picard? Right now, I am using CollectHsMetrics to get coverage like 1x, 2x, 10x - 50x, 100x. But what if I want to get coverage at 5x ?

Please help me. Thank you in advance :)

Link to the tool : http://broadinstitute.github.io/picard/command-line-overview.html#Overview

next-gen picard coverage broadinstitute • 2.8k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode

Yes, I saw it now.. I am doing it.

Thanks Pierre.

ADD REPLY
0
Entering edit mode

Hi, I'm bringing up an old post since I'm trying to obtain PCT target bases for 5x.

I'm not sure why we can't calculate it with the histogram values. What does the Histogram values represent?

The sum of all numbers in "high_quality_coverage_count" should be equal to "Total_reads" if we use Minimum_base_quality=0. Am I missing anything?

ADD REPLY
2
Entering edit mode
6.8 years ago

You can't, it's hard-coded: https://github.com/broadinstitute/picard/blob/master/src/main/java/picard/analysis/directed/TargetMetricsCollector.java#L692

        metrics.PCT_TARGET_BASES_1X   = (double) targetBases[1] / (double) targetBases[0];
        metrics.PCT_TARGET_BASES_2X   = (double) targetBases[2] / (double) targetBases[0];
        metrics.PCT_TARGET_BASES_10X  = (double) targetBases[3] / (double) targetBases[0];
        metrics.PCT_TARGET_BASES_20X  = (double) targetBases[4] / (double) targetBases[0];
        metrics.PCT_TARGET_BASES_30X  = (double) targetBases[5] / (double) targetBases[0];
        metrics.PCT_TARGET_BASES_40X  = (double) targetBases[6] / (double) targetBases[0];
        metrics.PCT_TARGET_BASES_50X  = (double) targetBases[7] / (double) targetBases[0];
        metrics.PCT_TARGET_BASES_100X = (double) targetBases[8] / (double) targetBases[0];

alternatives:

  • change the code
  • use GATK DepthOfCoverage
ADD COMMENT
0
Entering edit mode

Thank you for the reply.

I'll try DepthOfCoverage now. It seems better, I can use it even for WGS data too (without interval list).

ADD REPLY
1
Entering edit mode

If this answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted. Upvote|Bookmark|Accept

ADD REPLY

Login before adding your answer.

Traffic: 1817 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6