BamUtil: dumpHeader

From Genome Analysis Wiki
Revision as of 16:26, 6 January 2014 by Mktrost (talk | contribs)
Jump to navigationJump to search


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