BamUtil: splitBam: Difference between revisions

From Genome Analysis Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 5: Line 5:
# Copy each of the original file's BAM record to one of the output file where the ReadGroup ID matches
# Copy each of the original file's BAM record to one of the output file where the ReadGroup ID matches
<pre>
<pre>
  Usage : splitBAM [-v] [-i inputBAMFile] [-o outPrefix] [-L logFile]
  Usage : splitBAM [-v] -i <inputBAMFile> -o <outPrefix> [-L logFile]
  Required arguments:
  Required arguments:
     -i/--in [inputBAMFile] : Original BAM file containing readGroup info
     -i/--in [inputBAMFile] : Original BAM file containing readGroup info

Revision as of 22:47, 1 November 2010

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/--in [inputBAMFile] : Original BAM file containing readGroup info
    -o/--out [outPrefix] : prefix of output bam files of [outprefix].[RGID].bam
 Optional arguments:
    -L/--log [logFile]  : log file name. default is listFile.log
    -v/--verbose : turn on verbose mode