Confirm bwa-mem mapping

I am using https://usegalaxy.org/

I performed bwa-mem on a dataset, and then flagstat on the output dataset to check results. The flagstat output is also a dataset, in which I can review the results of each file individually. Is there an easy way to output flagstat to just one file, and look at the results of the entire dataset combined? Is there a better way to be able to visualize the mapping?

Alexa

1 Like

Hi @AlexaDean,
you could merge your BAM files by using the Merge BAM Files tool. It requires previously to sort the alignments by coordinates, which can be done with the SortSam tool.

Regards

Hi, thanks for your reply!

I used SortSam fine, but received an error with merging (attached here), I assume because this is RNAseq data and there are duplicates?

I really just want to visualize/check that my bwa-mem mapping step on this RNAseq data is okay before moving forward to counting, if you have any other advice I would appreciate it!


Alexa

Hi @AlexaDean,
you can use samtools stats for generating the statistics, and then aggregate the reports in an unique file by using Multiqc.

Regards

1 Like

Thank you that worked perfectly!

I appreciate it!