Alignment report
2
0
Entering edit mode
2.9 years ago

Hi Guys,

I did alignment of R1 and R2 fastq files with reference genome using bwa mem and got bam file. Now, I want to check whether the alignment is done correctly and alignment percentage,coverage etc. I run following command:

bwa mem hg19.fasta R1.fastq R2.fastq  | samtools sort  -o aln.bam

samtools stats aln.bam

samtools flagstat aln.bam

Please let me know which parameters are more important to assess the quality of alignment before proceeding ahead. Also, is there any other tool or parameter I need to compute to assess quality of alignment?

I will really appreciate your suggestions.

alignment bam • 2.4k views
ADD COMMENT
0
Entering edit mode

What type of experiment is this?

ADD REPLY
0
Entering edit mode

Hi,

I used samtools Flagstat aln bam and got a log file having details about mapped reads etc.

samtools flagstat aln.bam > log.txt

Please have a look at the attached image. Can I proceed ahead? Is the quality of bam file good? Please suggest.

ADD REPLY
0
Entering edit mode

Hi,

I used samtools Flagstat to check bam quality and got a log file having details about mapped reads etc.

samtools flagstat aln.bam > log.txt

Please have a look below.

########log.txt##################

109906415 + 0 in total (QC-passed reads + QC-failed reads)

0 + 0 secondary

16281019 + 0 supplementary

0 + 0 duplicates

108450167 + 0 mapped (98.68% : N/A)

93625396 + 0 paired in sequencing

46812698 + 0 read1

46812698 + 0 read2

87717898 + 0 properly paired (93.69% : N/A)

91358910 + 0 with itself and mate mapped

810238 + 0 singletons (0.87% : N/A)

2578846 + 0 with mate mapped to a different chr

2204251 + 0 with mate mapped to a different chr (mapQ>=5

)

Can I proceed ahead? Is the quality of bam file good? Please suggest.

ADD REPLY
0
Entering edit mode

That looks fine to proceed.

ADD REPLY
0
Entering edit mode

Thanks Genomax.

I have to check 50 other BAMs like this. Which parameters should I majorly focus?

Thanks

ADD REPLY
0
Entering edit mode
2.9 years ago

samtools flagstat gives you a shorter and more free form, text-oriented report

samtools stats is a newer command that produces more information (including that of samtools flagstat) but in the end, a lot of plots are about the reads (like a FASTQC report rather than the alignments)

There are other tools you can employ:

But to be honest, the best way to evaluate a BAM file is to visualize it in IGV, look at the mapping, their uniformity, the alignment orientations, hover over alignments and read off their characteristics.

http://www.htslib.org/doc/samtools-stats.html

ADD COMMENT
0
Entering edit mode
2.9 years ago
GenoMax 147k

You can also use qualimap (LINK) to generate detailed stats about your BAM files.

ADD COMMENT

Login before adding your answer.

Traffic: 1586 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