Changes

From Genome Analysis Wiki
Jump to navigationJump to search
300 bytes added ,  15:21, 30 June 2010
no edit summary
Line 74: Line 74:       −
== Read a SAM/BAM file and write as a SAM/BAM file ==
+
== convert ==
This executable takes 2/3 arguments.  The first argument is the input file.  The second argument is the output file.  The executable converts the first file into the format of the second file.  So if you want to convert a BAM file to a SAM file, from the pipeline/bam/ directory you just call:
+
The <code>convert</code> option on the bam executable reads a SAM/BAM file and writes it as a SAM/BAM file.
  ./bam <bamFile>.bam <newSamFile>.sam
+
 
 +
The executable converts the input file into the format of the output file.  So if you want to convert a BAM file to a SAM file, from the pipeline/bam/ directory you just call:
 +
  ./bam --in <bamFile>.bam --out <newSamFile>.sam
 
Don't forget to put in the paths to the executable and your test files.
 
Don't forget to put in the paths to the executable and your test files.
The third argument, <code>NOEOF</code>, specifies that the End-Of-File Block should not be checked for when opening the file.
+
 
 +
=== Parameters ===
 +
<pre>
 +
    Required Parameters:
 +
--in : the SAM/BAM file to be read
 +
--out : the SAM/BAM file to be written
 +
    Optional Parameters:
 +
--noeof            : do not expect an EOF block on a bam file.
 +
</pre>
    
=== Usage ===
 
=== Usage ===
  ./bam <inputFile> <outputFile.sam/bam/ubam (ubam is uncompressed bam)> [NOEOF]
+
  ./bam convert --in <inputFile> --out <outputFile.sam/bam/ubam (ubam is uncompressed bam)> [--noeof]
    
=== Return Value ===
 
=== Return Value ===
Line 93: Line 103:       −
== Print SAM/BAM header==
+
== dumpHeader ==
The <code>dump_header</code> option on the bam executable prints the header of the specified SAM/BAM file to cout.   
+
The <code>dumpHeader</code> option on the bam executable prints the header of the specified SAM/BAM file to cout.   
    
=== Parameters ===
 
=== Parameters ===
Line 119: Line 129:       −
== Split BAM by Chromosome ==
+
== splitChromosome ==
    
The <code>splitChromosome</code> option on the bam executable splits an indexed BAM file into multiple files based on the Chromosome (Reference Name).   
 
The <code>splitChromosome</code> option on the bam executable splits an indexed BAM file into multiple files based on the Chromosome (Reference Name).   
Line 186: Line 196:       −
== Dump a BAM index file ==
+
== dumpIndex ==
 +
The <code>dumpIndex</code> option on the bam executable prints BAM index file in an easy to read format.
    
=== Usage ===
 
=== Usage ===
  ./bam dump_index <bamIndexFile>
+
  ./bam dumpIndex <bamIndexFile>
    
=== Return Value ===
 
=== Return Value ===
Line 196: Line 207:       −
== Read & Write indexed BAM file ==
+
== readIndexedBam ==
 +
The <code>readIndexedBam</code> option on the bam executable reads an indexed BAM file reference id by reference id -1 to 22 and writes it out as a SAM/BAM file.
    
=== Usage ===
 
=== Usage ===
./bam read_indexed_bam <inputFilename> <outputFile.sam/bam> <bamIndexFile>
+
./bam readIndexedBam <inputFilename> <outputFile.sam/bam> <bamIndexFile>
    
=== Return Value ===
 
=== Return Value ===
 
* 0
 
* 0

Navigation menu