BamUtil: dumpRefInfo
Overview of the dumpRefInfo
function of bamUtil
The dumpRefInfo
option on the bamUtil executable prints the SAM/BAM file's reference information.
Usage
./bam dumpRefInfo --in <inputFilename> [--noeof] [--printRecordRefs] [--params]
Parameters
Required Parameters: --in : the SAM/BAM file to be read Optional Parameters: --noeof : do not expect an EOF block on a bam file. --printRecordRefs : print the reference information for the records in the file (grouped by reference). --params : print the parameter settings
PhoneHome: --noPhoneHome : disable PhoneHome (default enabled) --phoneHomeThinning : adjust the PhoneHome thinning parameter (default 50)
Required Parameters
Input File (--in
)
Use --in
followed by your file name to specify the SAM/BAM input 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 | --in yourFileName
|
SAM from stdin | --in - |
BAM from stdin | --in -.bam |
Uncompressed BAM from stdin | --in -.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.
Optional Parameters
Do not require BGZF EOF block (--noeof
)
Use --noeof
if you do not expect a trailing eof block in your bgzf file.
By default, the trailing empty block is expected and checked for.
Print Number of Records for each Chromosome (--printRecordRefs
)
Use the --printRecordRefs
option to also output each reference/chromsome id, name, and the number of records with that id/name in the SAM/BAM file.
Example:
Ref ID: 0 Ref Name: 1 NumRecs: 4
Ref ID: -1 indicates unmapped (Ref Name will be *)
Print the Program Parameters (--params
)
Use --params
to print the parameters for your program to stderr.
PhoneHome 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 thinning parameter.
Adjust the Frequency of PhoneHome (--phoneHomeThinning
)
Use --phoneHomeThinning
to modify the percentage of the time that PhoneHome will run (0-100).
- By default,
--phoneHomeThinning
is set to 50, running 50% of the time. - PhoneHome will only occur if the run's random number modulo 100 is less than the --phoneHomeThinning value.
- N/A if
--noPhoneHome
is set.
Return Value
- 0: the file was processed successfully.
- non-0: the file was not processed successfully.
Sample Output
Reference Index 0; Name: 1 Reference Index 1; Name: 2 Reference Index 2; Name: 3 Reference Index 3; Name: 4 Reference Index 4; Name: 5 Reference Index 5; Name: 6 Reference Index 6; Name: 7 Reference Index 7; Name: 8 Reference Index 8; Name: 9 Reference Index 9; Name: 10 Reference Index 10; Name: 11 Reference Index 11; Name: 12 Reference Index 12; Name: 13 Reference Index 13; Name: 14 Reference Index 14; Name: 15 Reference Index 15; Name: 16 Reference Index 16; Name: 17 Reference Index 17; Name: 18 Reference Index 18; Name: 19 Reference Index 19; Name: 20 Reference Index 20; Name: 21 Reference Index 21; Name: 22 Reference Index 22; Name: X Ref ID: 0 Ref Name: 1 NumRecs: 4 Ref ID: 1 Ref Name: 2 NumRecs: 1 Ref ID: 0 Ref Name: 1 NumRecs: 1 Ref ID: 1 Ref Name: 2 NumRecs: 1 Ref ID: 2 Ref Name: 3 NumRecs: 1 Ref ID: -1 Ref Name: * NumRecs: 2