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?
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?
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).
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Thus, I can perform the next step, i.e BAM sorting, eventhough I use AddOrReplaceReadGroups (picard) instead of reheader (samtools)?
A BAM is a BAM is a BAM. Very few tools require read groups (mostly only Picard and GATK).