Difference between revisions of "BamUtil: dumpHeader"

From Genome Analysis Wiki
Jump to: navigation, search
(Add link back to bamUtil)
Line 5: Line 5:
 
= Overview of the <code>dumpHeader</code> function of <code>bamUtil</code> =
 
= Overview of the <code>dumpHeader</code> function of <code>bamUtil</code> =
 
The <code>dumpHeader</code> option on the [[bamUtil]] executable prints the header of the specified SAM/BAM file to cout.   
 
The <code>dumpHeader</code> option on the [[bamUtil]] executable prints the header of the specified SAM/BAM file to cout.   
 +
 +
= Usage =
 +
 +
./bam dumpHeader <inputFile>
  
 
= Parameters =
 
= Parameters =
Line 10: Line 14:
 
     Required Parameters:
 
     Required Parameters:
 
filename : the sam/bam filename whose header should be printed.
 
filename : the sam/bam filename whose header should be printed.
 +
</pre>
 +
<pre>
 +
    PhoneHome:
 +
--noPhoneHome      : disable PhoneHome (default enabled)
 
</pre>
 
</pre>
  
= Usage =
+
== Input File (1st Parameter) ==
 +
 
 +
The 1st argumentis the input SAM/BAM file.  The program automatically determines if your input file is SAM/BAM/uncompressed BAM without any input other than a filename from the user, unless your input file is stdin.
 +
 
 +
A <code>-</code> is used to indicate to read from stdin and the extension is used to determine the file type (no extension indicates SAM).
 +
 
 +
{|border="1" cellspacing="0" cellpadding="2"
 +
|SAM/BAM/Uncompressed BAM from file
 +
| <code>yourFileName</code>
 +
|-
 +
|SAM from stdin
 +
| <code>-</code>
 +
|-
 +
|BAM from stdin
 +
| <code>-.bam</code>
 +
|-
 +
|Uncompressed BAM from stdin
 +
| <code>-.ubam</code>
 +
|}
 +
 
 +
Note: Uncompressed BAM is compressed using compression level-0 (so it is not an entirely uncompressed file).  This matches the <code>samtools</code> implementation so pipes between our tools and <code>samtools</code> are supported.
 +
 
 +
== Phone Home Parameters ==
 +
See [[PhoneHome]] for more information on how PhoneHome works and what it does.
  
./bam dumpHeader <inputFile>
+
=== Turn off PhoneHome (<code>--noPhoneHome</code>) ===
 +
Use the <code>--noPhoneHome</code> option to completely disable PhoneHome.  PhoneHome is enabled by default based on the default thinning parameter.
  
 
= Return Value =
 
= Return Value =

Revision as of 16:26, 6 January 2014


Overview of the dumpHeader function of bamUtil

The dumpHeader option on the bamUtil executable prints the header of the specified SAM/BAM file to cout.

Usage

./bam dumpHeader <inputFile>

Parameters

    Required Parameters:
	filename : the sam/bam filename whose header should be printed.
    PhoneHome:
	--noPhoneHome       : disable PhoneHome (default enabled)

Input File (1st Parameter)

The 1st argumentis the input SAM/BAM file. The program automatically determines if your input file is SAM/BAM/uncompressed BAM without any input other than a filename from the user, unless your input file is stdin.

A - is used to indicate to read from stdin and the extension is used to determine the file type (no extension indicates SAM).

SAM/BAM/Uncompressed BAM from file yourFileName
SAM from stdin -
BAM from stdin -.bam
Uncompressed BAM from stdin -.ubam

Note: Uncompressed BAM is compressed using compression level-0 (so it is not an entirely uncompressed file). This matches the samtools implementation so pipes between our tools and samtools are supported.

Phone Home Parameters

See PhoneHome for more information on how PhoneHome works and what it does.

Turn off PhoneHome (--noPhoneHome)

Use the --noPhoneHome option to completely disable PhoneHome. PhoneHome is enabled by default based on the default thinning parameter.

Return Value

  • 0: the header was successfully read and printed.
  • non-0: the header was not successfully read or was not printed. (Returns the SamStatus.)


Example Output

@SQ	SN:1	LN:247249719
@SQ	SN:2	LN:242951149
@SQ	SN:3	LN:199501827