Changes

From Genome Analysis Wiki
Jump to navigationJump to search
605 bytes added ,  14:44, 16 April 2012
no edit summary
Line 13: Line 13:     
Options are available to compare:
 
Options are available to compare:
 +
* all fields
 +
* flags
 +
* mapping quality
 +
* mate chromosome/position
 +
* insert size
 
* sequence
 
* sequence
 
* base quality
 
* base quality
 
* specified tags
 
* specified tags
 +
* all tags
 
* turn off position comparison
 
* turn off position comparison
 
* turn off cigar comparison
 
* turn off cigar comparison
Line 26: Line 32:  
Optional Parameters:
 
Optional Parameters:
 
--out        : output filename, use .bam extension to output in SAM/BAM format instead of diff format.
 
--out        : output filename, use .bam extension to output in SAM/BAM format instead of diff format.
                In SAMBAM format there will be 3 output files:
+
                In SAM/BAM format there will be 3 output files:
 
                    1) the specified name with record diffs
 
                    1) the specified name with record diffs
 
                    2) specified name with _only_<in1>.sam/bam with records only in the in1 file
 
                    2) specified name with _only_<in1>.sam/bam with records only in the in1 file
 
                    3) specified name with _only_<in2>.sam/bam with records only in the in2 file
 
                    3) specified name with _only_<in2>.sam/bam with records only in the in2 file
 +
--all        : diff all the SAM/BAM fields.
 +
--flag        : diff the flags.
 +
--mapQual    : diff the mapping qualities.
 +
--mate        : diff the mate chrom/pos.
 +
--isize      : diff the insert sizes.
 
--seq        : diff the sequence bases.
 
--seq        : diff the sequence bases.
 
--baseQual    : diff the base qualities.
 
--baseQual    : diff the base qualities.
 
--tags        : diff the specified Tags formatted as Tag:Type;Tag:Type;Tag:Type...
 
--tags        : diff the specified Tags formatted as Tag:Type;Tag:Type;Tag:Type...
 +
--everyTag    : diff all the Tags
 
--noCigar    : do not diff the the cigars.
 
--noCigar    : do not diff the the cigars.
 
--noPos      : do not diff the positions.
 
--noPos      : do not diff the positions.
Line 43: Line 55:     
= Usage =
 
= Usage =
  ./bam diff --in1 <inputFile> --in2 <inputFile> [--out <outputFile>] [--baseQual] [--tags <Tag:Type[;Tag:Type]*>] [--noCigar] [--noPos] [--onlyDiffs] [--recPoolSize <int>] [--posDiff <int>] [--noeof] [--params]
+
  ./bam diff --in1 <inputFile> --in2 <inputFile> [--out <outputFile>] [--all] [--flag] [--mapQual] [--mate] [--isize] [--seq] [--baseQual] [--tags <Tag:Type[;Tag:Type]*>] [--everyTag] [--noCigar] [--noPos] [--onlyDiffs] [--recPoolSize <int>] [--posDiff <int>] [--noeof] [--params]
    
= Return Value =
 
= Return Value =
Line 68: Line 80:     
The 3rd line (if a matching record was found) is the flag followed by the diff'd fields from the matching record.
 
The 3rd line (if a matching record was found) is the flag followed by the diff'd fields from the matching record.
      
The diff'd record lines are tab separated, and are in the following order if --onlyDiffs is not specified:
 
The diff'd record lines are tab separated, and are in the following order if --onlyDiffs is not specified:
Line 99: Line 110:     
If <code>onlyDiffs</code> is specified, only the fields that are specified and are different get printed in lines 2 & 3.
 
If <code>onlyDiffs</code> is specified, only the fields that are specified and are different get printed in lines 2 & 3.
 +
 +
If all fields are diffed and <code>--onlyDiffs</code> is specified, it may be difficult to determine which field is different.
    
=== Example Output ===
 
=== Example Output ===
Line 129: Line 142:  
When a record is found in both input files, but a difference is found, the record from the first file is written with additional tags to indicate the values from the second file, using the following tags:
 
When a record is found in both input files, but a difference is found, the record from the first file is written with additional tags to indicate the values from the second file, using the following tags:
 
* ZF - Flag
 
* ZF - Flag
* ZP - Pos
+
* ZP - Chrom/Pos
 
* ZC - Cigar
 
* ZC - Cigar
 +
* ZM - Mapping Quality
 +
* ZN - Mate chrom/pos
 +
* ZI - Insert Size
 
* ZS - Sequence
 
* ZS - Sequence
 
* ZQ - Base Quality
 
* ZQ - Base Quality
 
* ZT - Tags
 
* ZT - Tags

Navigation menu