This is a test version of Biostars. For the public version, visit https://www.biostars.org.
User-defined coverage in CollectHsMetrics [Picard]

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

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

Thanks Pierre.

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?

1 answer

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

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

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

Log in to answer this question.