BamUtil: mergeBam

From Genome Analysis Wiki
Revision as of 17:40, 1 November 2010 by Mktrost (talk | contribs) (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…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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

 RGAMerge [-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