If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra

Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.
We will be out of the office on November 11th and 13th 2019, due to the U.S. holiday(Veteran's day) and due to a team event(Nov 13th). We will return to monitoring the GATK forum on November 12th and 14th respectively. Thank you for your patience.

% of mapped reads

NickNick Member
edited February 28 in Ask the GATK team

What tool in Picard will tell me the number of reads that mapped to my reference sequences? I want to know the percentage of mapped reads, i.e. number of reads mapped/number of total reads



  • SChaluvadiSChaluvadi Member, Broadie, Moderator admin

    @Nick I believe that you are looking for Picard's CollectAlignmentSummaryMetrics. Here is a link to the document that describes more details about all the output information and an example on how to run this command. Please let us know if this is what you were looking for!

  • NickNick Member

    I'm getting this error when I use that tool:

    ERROR: Record 1, Read name M00366:9:000000000-A89UT:1:1103:22880:8023, Alignment start should != 0 because reference name != *.

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

    Hi @Nick. For contig-level counts, you can use samtools idxstats.

  • NickNick Member

    Hi @shlee, why not samtools flagstat command?

  • SChaluvadiSChaluvadi Member, Broadie, Moderator admin

    @Nick What was the tool that you used for your alignment? Can you also check that you are running the latest version of Picard? You can also try running with VALIDATION_STRINGENCY=LENIENT.

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭


    Yes you could use samtools flagstat for the number of mapped reads and total number of reads.

    Given you say

    mapped to my reference sequences?

    I interpreted the s as contigs. Idxstats gives mapped vs unmapped per contig as well as any remaining unmapped reads with the * line at the end.

Sign In or Register to comment.