Changes

From Genome Analysis Wiki
Jump to navigationJump to search
983 bytes added ,  18:28, 3 January 2014
no edit summary
Line 1: Line 1: −
== SplitBam ==
+
= Overview of the <code>splitBam</code> function of <code>bamUtil</code> =
Split a BAM file into multiple BAM files based on ReadGroup according to the following details.
+
The <code>splitBam</code> option on the [[bamUtil]] executable 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 each ReadGroup ID (RGID) existing in the bam file
 
# Creates multiple output files named [outprefix].[RGID].bam, for each ReadGroup ID (RGID) existing in the bam file
 
# Headers are a copy of the original file, removing @RG and @PG headers where IDs match with the other ReadGroup IDs.
 
# Headers are a copy of the original file, removing @RG and @PG headers where IDs match with the other ReadGroup IDs.
 
# 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
 +
 +
 +
= Usage =
 +
 +
./bam splitBam [-v] -i <inputBAMFile> -o <outPrefix> [-L logFile]
 +
 +
 +
= Parameters =
 
<pre>
 
<pre>
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
+
  -o/--out [outPrefix] : prefix of output bam files of [outprefix].[RGID].bam
    -o/--out [outPrefix] : prefix of output bam files of [outprefix].[RGID].bam
+
Optional arguments:
Optional arguments:
+
  -L/--log [logFile]  : log file name. default is listFile.log
    -L/--log [logFile]  : log file name. default is listFile.log
+
  -v/--verbose : turn on verbose mode
    -v/--verbose : turn on verbose mode
+
  -n/--noeof : turn off the check for an EOF block at the end of a bam file
 
</pre>
 
</pre>
 +
{{PhoneHomeParamDesc}}
 +
 +
== Required Parameters ==
 +
{{InBAMInputFile}}
 +
 +
=== Output File Basename (<code>--out</code>) ===
 +
Use <code>--out</code> followed by the base output filename (no extension) to specify the BAM basename to use for the output files.
    +
The read group name and <code>.bam</code> will be appended to the specified basename.
 +
 +
== Optional Parameters ==
 +
 +
=== Specify Log Filename (<code>--log</code>) ===
 +
Use <code>--log</code> followed by the log filename to specify the log filename.  Default is the output file basename with a <code>.log</code> extension
 +
 +
=== Verbose (<code>--verbose</code>) ===
 +
Use <code>--verbose</code> to turn on verbose mode.
 +
 +
{{noeofBGZFParameter}}
 +
{{PhoneHomeParameters}}
 +
 +
= Return Value =
 +
*    0: Success.
 +
* non-0: Failure.
 +
 +
[[Category:BamUtil|splitBam]]
 +
[[Category:BAM Software]]
 
[[Category:Software]]
 
[[Category:Software]]
[[Category:StatGen Download]]
  −
[[Category:BAM Software]]
 

Navigation menu