id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc 684,Run picard AddOrReplaceReadGroups after alignment,Nicklas Nordborg,Nicklas Nordborg,"Downstream analysis tools need this information. Typical command is: {{{ ./picard AddOrReplaceReadGroups INPUT=accepted_hits.bam OUTPUT=accepted_hits.bam.tmp RGLB=${library} RGPL=Illumina RGPU=NotApplicable RGSM=${sample} RGCN=SCAN-B CREATE_INDEX=true }}} where ${library} is the name of the 'Library' item in BASE and ${sample} is the name of the 'Specimen' item in BASE. To simplify code we don't follow items all the way up to specimen (which would break for external rna). We simply use the same rule as when generating the file structure for FASTQ files (eg sample name = everything before the first dot not followed by a number). With the CREATE_INDEX option we can also skip the call to `samtool index`. The INPUT/OUTPUT file names may also have to be swapped since we run this after !MarkDuplicates which has generated a temporary file already which should be used as input to the !AddOrReplaceReadGroups step. ",enhancement,closed,major,Reggie v2.17,net.sf.basedb.reggie,fixed,,