Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pileup / extract information from BAM/SAM files liu_xt005 Bioinformatics 4 01-19-2015 10:14 AM
BWA sam and Samtools sam->bam conversion problem maasha Bioinformatics 6 06-05-2013 08:39 AM
Issue with Sam-Bam conversion samtools - how to remove last line of Sam file? TabeaK Bioinformatics 3 11-19-2012 11:05 AM
samtools mpileup to get vcf files including GL information xiangfeiloulan Bioinformatics 0 07-01-2012 07:57 PM
hits information in sam file totalnew Bioinformatics 0 08-06-2009 02:15 PM

Thread Tools
Old 10-08-2015, 06:21 AM   #1
Junior Member
Location: Aarhus

Join Date: Sep 2015
Posts: 5
Default Samtools: Information about percentages in SAM files


I have used BWA mem to map paired-end reads to different references.
I am looking for mapped and unmapped reads percentages (e.g. mapped reads 96 %) and I don't know if samtools has such an option.

I actually know that this command line here

samtools view -c -f 4 -S filename.sam

outputs the unmapped reads and with a capital (-F) the number of mapped reads. Do I have to calculate the percentages by my own or is there a fancy option in samtools ?

Flo89 is offline   Reply With Quote
Old 10-08-2015, 06:25 AM   #2
Senior Member
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,079

Look into "idxstats" option for samtools for getting the information you want. If you need visual graphs and such you can look at Qualimap.

Also this (cut -f2 for mapped reads and cut -f3 for unmapped): and the explanation here:

Smatools "flagstat" will provide aggregate information:

Last edited by GenoMax; 10-08-2015 at 06:32 AM.
GenoMax is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 12:08 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO