SamToFastq - bam order
AnsweredSamToFastq tool:
Can we use as input coordinate and also name sorted bam?
Thanks.
-
Thank you for your post, Jakub Savara! I want to let you know we have received your question. We'll get back to you if we have any updates or follow up questions.
Please see our Support Policy for more details about how we prioritize responding to questions.
-
Thank you very much!
I just wanted to be sure, since e.g. bedtools requires name sorted bam. However, I tried SamToFastq (GATK) for both coordinate and name sorted bam (paired) and the read count in fastq is exactly the same. Also after alignment the result is identical (using samtools flagstats).
-
Hi Jakub Savara,
We took at the code and verified that it is fine to run SamToFastq on a coordinate or name sorted bam. There might be a slight performance benefit to run the tool with a name sorted bam but nothing major.
However, the order of the pairs in the fastq will be different when run on a coordinate sorted bam than when run on a queryname sorted bam. This might not matter depending on your downstream pipeline.
Let me know if you have any further questions.
Best,
Genevieve
-
Hi Jakub,
We haven't heard from you in a while so we're going to close out this ticket in our system. If you still require assistance, simply respond to this thread and we'll be happy to pick up where we left off!
Kind regards,
Genevieve
-
Hi Genevieve,
thank you very much for your answer and explanation. I would appreciate if this could be mentioned in the tool description, as it has been discussed on various forums and most other tools just require name sorted bam.
Best regards,
Jakub
-
Good idea, thank you for mentioning that it could be more clear. The tool docs are maintained by the developer team so I have created a ticket so that they can update the description: https://github.com/broadinstitute/picard/issues/1834
Please sign in to leave a comment.
6 comments