BamUtil: splitBam

From Genome Analysis Wiki
Revision as of 18:39, 1 November 2010 by Mktrost (talk | contribs) (Created page with '== SplitBam == Split a BAM file into multiple BAM files based on ReadGroup according to the following details. # Creates multiple output files named [outprefix].[RGID].bam, for e…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

SplitBam

Split a BAM file into multiple BAM files based on ReadGroup according to the following details.

  1. Creates multiple output files named [outprefix].[RGID].bam, for each ReadGroup ID (RGID) existing in the bam file
  2. Headers are a copy of the original file, removing @RG and @PG headers where IDs match with the other ReadGroup IDs.
  3. Copy each of the original file's BAM record to one of the output file where the ReadGroup ID matches
 Usage : splitBAM [-v] [-i inputBAMFile] [-o outPrefix] [-L logFile]
 Required arguments:
    -i inputBAMFile : Original BAM file containing readGroup info
    -o outprefix  : prefix of output bam files of [outprefix].[RGID].bam
 Optional arguments:
    -L logFile  : log file name. default is listFile.log
    -v : turn on verbose mode