% 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

Tagged:

Answers

  • 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 ✭✭✭✭✭

    @Nick,

    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.