Thus, I can perform the next step, i.e BAM sorting, eventhough I use AddOrReplaceReadGroups (picard) instead of reheader (samtools)?
What is the difference between output generated by AddOrReplaceReadGroups (picard) and reheader (samtools)? Can AddOrReplaceReadGroups (picard) be used instead of reheader (samtools) or vice versa for adding read groups in inputfile?
1 answer
samtools reheader can't add read groups to reads, only to the header, whereas picard can do both. If you just want to change read group information without adding read groups then samtools reheader will be MUCH faster. If your file is missing read groups and needs then then you can't use samtools reheader to add them (since reads won't be assigned to a group, regardless of what's in the header).
A BAM is a BAM is a BAM. Very few tools require read groups (mostly only Picard and GATK).
Log in to answer this question.