If I execute "AddOrReplaceReadGroups" on a sorted and duplicate-marked .bam file, do I have to re-sort and re-mark duplicates?
I'm brand new in Bioinformatics, and building my first variant calling pipeline for human genomes. Now, I got stuck using BaseRecalibrator as it needs read groups in my .bam file, so I took my sorted_dedup_output.bam and ran Picard AddOrReplaceReadGroups.
Is it necessary for me to reapply a sorting and duplicate marking step? Thanks in advance! Very helpful community!
• 1,602 views
•
link
0 answers
No answers yet.
Log in to answer this question.
1) read groups should have been specified from the start (eg. with bwa mem -R )
2) if you do'nt specify SORT_ORDER, the order is the same https://github.com/broadinstitute/picard/blob/master/src/main/java/picard/sam/AddOrReplaceReadGroups.java#L175 , so you don't need to re-sort.
1) I realised I was supposed to add RGs during alingment command only after I was long done with that step. But I imgined the tool "addorreplacereagroups" could be useful after, if not, what's the use of it right? 2) how about Mark-Dup?