Difference between revisions of "BamUtil: mergeBam"
From Genome Analysis Wiki
Jump to navigationJump to searchLine 1: | Line 1: | ||
− | |||
== RGMergeBAM : Merge multiple BAM files appending ReadGroup IDs== | == RGMergeBAM : Merge multiple BAM files appending ReadGroup IDs== | ||
Revision as of 18:05, 1 November 2010
RGMergeBAM : Merge multiple BAM files appending ReadGroup IDs
rgMergeBam merges multiple sorted BAM files into one BAM file like 'samtools merge' command, but merges BAM headers.
- Checks that the HD and SQ tags are identical across the BAM files
- Adds @RG headers from a tabular input file containing the fields' info
- Adds RG:Z:[RGID] tag for each record based on the source BAM file
- Ensures that the headers are identical across the input files and that input/output BAM records are sorted
Usage
rgMergeBam [-v] [-l listFile] [-o outFile] [-L logFile] [inputBAMfile1] [inputBAMfile2] ... Required arguments: -l listFile : File containing RG tags including [BAM] [ID] [SM] [LB] -o outFile : output BAM file name Optional arguments: -L logFile : log file name. default is listFile.log -v : turn on verbose mode