Difference between revisions of "BamUtil: mergeBam"

From Genome Analysis Wiki
Jump to navigationJump to search
(Created page with ' 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 BA…')
 
Line 1: Line 1:
 +
 +
== 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.
 
rgMergeBam merges multiple sorted BAM files into one BAM file like 'samtools merge' command, but merges BAM headers.
Line 9: Line 11:
 
=== Usage===
 
=== Usage===
 
<pre>
 
<pre>
  RGAMerge [-v] [-l listFile] [-o outFile] [-L logFile] [inputBAMfile1] [inputBAMfile2] ...
+
  rgMergeBam [-v] [-l listFile] [-o outFile] [-L logFile] [inputBAMfile1] [inputBAMfile2] ...
  
 
  Required arguments:
 
  Required arguments:

Revision as of 17:42, 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