Changes

From Genome Analysis Wiki
Jump to navigationJump to search
381 bytes added ,  18:27, 3 January 2014
Line 8: Line 8:     
It has options to allow for the conversion of the sequence to/from '=' from/to the actual bases by using the reference sequence.  
 
It has options to allow for the conversion of the sequence to/from '=' from/to the actual bases by using the reference sequence.  
 +
 +
It also has an option to left shift indels in the CIGARs before writing the output file.
    
If you want to convert a BAM file to a SAM file, just call:  
 
If you want to convert a BAM file to a SAM file, just call:  
Line 18: Line 20:  
= Usage  =
 
= Usage  =
   −
  ./bam convert --in <inputFile> --out <outputFile.sam/bam/ubam (ubam is uncompressed bam)> [--refFile <reference filename>] [--seqBases|--seqEquals|--seqOrig] [--recover] [--noeof] [--params]
+
  ./bam convert --in <inputFile> --out <outputFile.sam/bam/ubam (ubam is uncompressed bam)> [--refFile <reference filename>] [--useBases|--useEquals|--useOrigSeq] [--lshift] [--noeof] [--params]
       
= Parameters  =
 
= Parameters  =
<pre>   Required Parameters:
+
<pre> Required Parameters:
        --in       &nbsp;: the SAM/BAM file to be read
+
--in         : the SAM/BAM file to be read
        --out     &nbsp;: the SAM/BAM file to be written
+
--out       : the SAM/BAM file to be written
    Optional Parameters:
+
Optional Parameters:
--refFile &nbsp;: reference file name
+
--refFile   : reference file name
        --noeof   &nbsp;: do not expect an EOF block on a bam file.
+
--lshift    : left shift indels when writing records
        --params   &nbsp;: print the parameter settings
+
--noeof     : do not expect an EOF block on a bam file
        --recover &nbsp;: attempt to recover the input bam file.
+
--params     : print the parameter settings
    Optional Sequence Parameters (only specify one):
+
--recover   : attempt error recovery while reading a bam file
--seqOrig  &nbsp;: Leave the sequence as is (default &amp; used if reference is not specified).
+
Optional Sequence Parameters (only specify one):
--seqBases &nbsp;: Convert any '=' in the sequence to the appropriate base using the reference (requires --ref).
+
--useOrigSeq : Leave the sequence as is (default & used if reference is not specified)
--seqEquals&nbsp;: Convert any bases that match the reference to '=' (requires --ref).
+
--useBases  : Convert any '=' in the sequence to the appropriate base using the reference (requires --refFile)
</pre>  
+
--useEquals  : Convert any bases that match the reference to '=' (requires --refFile)
 +
</pre>
 +
{{PhoneHomeParamDesc}}
    +
== Required Parameters==
 
{{InBAMInputFile}}
 
{{InBAMInputFile}}
 +
{{OutBAMOutputFile}}
 +
 +
== Optional Parameters ==
 +
{{refFile}}
 +
 +
=== Left Shift Indels in the CIGAR (<code>--lshift</code>) ===
 +
 +
Left shift indels as far as they can go in the read.
   −
{{OutBAMOutputFile}}
+
{{noeofBGZFParameter}}
 +
{{paramsParameter}}
   −
== Recover a corrupted BAM file (<code>--recover</code>) ==
+
=== Recover a corrupted BAM file (<code>--recover</code>) ===
    
See [[#BAM File Recovery |BAM File Recovery]].
 
See [[#BAM File Recovery |BAM File Recovery]].
   −
 
+
== Sequence Representation Parameters (<code>--useOrigSeq</code>, <code>--useBases</code>, <code>--useEquals</code>, <code>--refFile</code>) ==
== Sequence Representation Parameters (<code>--seqOrig</code>, <code>--seqBases</code>, <code>--seqEquals</code>, <code>--refFile</code>) ==
      
The sequence parameters options specify how to represent the sequence if the reference is specified (refFile option).  
 
The sequence parameters options specify how to represent the sequence if the reference is specified (refFile option).  
   −
If the reference is not specified or seqOrig is specified, no modifications are made to the sequence.  
+
If the reference is not specified or useOrigSeq is specified, no modifications are made to the sequence.  
   −
If the reference and seqBases is specified, any matches between the sequence and the reference are represented in the sequence as the appropriate base.  
+
If the reference and useBases is specified, any matches between the sequence and the reference are represented in the sequence as the appropriate base.  
   −
If the reference and seqEquals is specified, any matches between the sequence and the reference are represented in the sequence as '='.  
+
If the reference and useEquals is specified, any matches between the sequence and the reference are represented in the sequence as '='.  
    
=== Examples  ===
 
=== Examples  ===
Line 85: Line 98:  
  Sequence with Equals: AA======G===GGG
 
  Sequence with Equals: AA======G===GGG
    +
{{PhoneHomeParameters}}
    
= BAM File Recovery  =
 
= BAM File Recovery  =
Line 107: Line 121:  
= Return Value  =
 
= Return Value  =
   −
Returns the SamStatus for the reads/writes.  
+
Returns the SamStatus for the reads/writes (0 for success, non-0 for failure).
    
= Example Output  =
 
= Example Output  =

Navigation menu