Changes

From Genome Analysis Wiki
Jump to navigationJump to search
185 bytes added ,  17:00, 6 January 2014
Line 26: Line 26:  
* turn off position comparison
 
* turn off position comparison
 
* turn off cigar comparison
 
* turn off cigar comparison
 +
 +
 +
= Usage =
 +
./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]
 +
    
= Parameters =
 
= Parameters =
Line 51: Line 56:  
--onlyDiffs  : only print the fields that are different, otherwise for any diff all the fields that are compared are printed.
 
--onlyDiffs  : only print the fields that are different, otherwise for any diff all the fields that are compared are printed.
 
--recPoolSize : number of records to allow to be stored at a time, default value: 1000000
 
--recPoolSize : number of records to allow to be stored at a time, default value: 1000000
--posDiff    : max base pair difference between possibly matching records100000
+
                Set to -1 for unlimited number of records
 +
--posDiff    : max base pair difference between possibly matching records, default value: 100000
 
--noeof      : do not expect an EOF block on a bam file.
 
--noeof      : do not expect an EOF block on a bam file.
 
--params      : print the parameter settings
 
--params      : print the parameter settings
 
</pre>
 
</pre>
 +
{{PhoneHomeParamDesc}}
 +
 +
== Required Parameters ==
   −
== input Files 1 & 2 (<code>--in1</code> and <code>--in2</code>)  ==
+
=== input Files 1 & 2 (<code>--in1</code> and <code>--in2</code>)  ===
    
Use <code>--in1</code> and <code>--in2</code> followed by your file names to specify the SAM/BAM input files to compare.  They are both required.
 
Use <code>--in1</code> and <code>--in2</code> followed by your file names to specify the SAM/BAM input files to compare.  They are both required.
Line 81: Line 90:  
Note: Uncompressed BAM is compressed using compression level-0 (so it is not an entirely uncompressed file).  This matches the <code>samtools</code> implementation so pipes between our tools and <code>samtools</code> are supported.
 
Note: Uncompressed BAM is compressed using compression level-0 (so it is not an entirely uncompressed file).  This matches the <code>samtools</code> implementation so pipes between our tools and <code>samtools</code> are supported.
   −
 
+
== Optional Parmaeters ==
== output File (<code>--out</code>)  ==
+
=== output File (<code>--out</code>)  ===
 
   
Use <code>--out</code> (optional) to specify the name of the output file.
 
Use <code>--out</code> (optional) to specify the name of the output file.
    
It is output in [[Diff Format]] by default.  Specify the filename with a .bam, .sam, .ubam extension to output in [[SAM/BAM Format]].
 
It is output in [[Diff Format]] by default.  Specify the filename with a .bam, .sam, .ubam extension to output in [[SAM/BAM Format]].
   −
 
+
=== Fields to Diff (<code>--all</code>, <code>--flag</code>, <code>--mapQual</code>, <code>--mate</code>, <code>--isize</code>, <code>--seq</code>, <code>--baseQual</code>, <code>--tags</code>, <code>--everyTag</code>, <code>--noCigar</code>, <code>--noPos</code>, )===
== Fields to Diff (<code>--all</code>, <code>--flag</code>, <code>--mapQual</code>, <code>--mate</code>, <code>--isize</code>, <code>--seq</code>, <code>--baseQual</code>, <code>--tags</code>, <code>--everyTag</code>, <code>--noCigar</code>, <code>--noPos</code>, )==
      
By default only the chromosome/position and cigar are compared for each record.
 
By default only the chromosome/position and cigar are compared for each record.
Line 128: Line 135:  
'''OR use <code>--all</code> to diff all SAM/BAM record fields.
 
'''OR use <code>--all</code> to diff all SAM/BAM record fields.
   −
 
+
=== Only print different fields (<code>--onlyDiffs</code>)===
== Only print different fields (<code>--onlyDiffs</code>)==
      
Specify <code>--onlyDiffs</code> to only print the fields that are different, otherwise for any diff all the fields that are compared are printed.  The read name is always printed.
 
Specify <code>--onlyDiffs</code> to only print the fields that are different, otherwise for any diff all the fields that are compared are printed.  The read name is always printed.
   −
 
+
=== Maximum Number of Records That Can be Allocated (<code>--recPoolSize</code>)===
== Maximum Number of Records That Can be Allocated (<code>--recPoolSize</code>)==
   
When comparing the files, matching reads may not have the same positions and thus may not be at the same location in the files.  In this case, reads need to be stored until its match is found in the other file.
 
When comparing the files, matching reads may not have the same positions and thus may not be at the same location in the files.  In this case, reads need to be stored until its match is found in the other file.
   Line 145: Line 150:  
When the Pool Size is exceeded, the oldest record in the file that has more records stored is released and treated as unique to that file.  If the matching record is later found in the other file, it will also be treated as unique to its file.  At the end of the run, a warning message is printed with the number of times the PoolSize was hit and records were forced to be released.
 
When the Pool Size is exceeded, the oldest record in the file that has more records stored is released and treated as unique to that file.  If the matching record is later found in the other file, it will also be treated as unique to its file.  At the end of the run, a warning message is printed with the number of times the PoolSize was hit and records were forced to be released.
   −
== Maximum Base Pair Difference Between Possibly Matching Records (<code>--posDiff</code>)==
+
=== Maximum Base Pair Difference Between Possibly Matching Records (<code>--posDiff</code>)===
 
In order to limit th number of records that are held onto while looking for matching records, a maximum difference in position between the matches is used.  This value is defaulted to 100000 amd cam be modified using <code>--posDiff</code>.  Any matching pairs that are further than <code>--posDiff</code> are treated as unique to their files.
 
In order to limit th number of records that are held onto while looking for matching records, a maximum difference in position between the matches is used.  This value is defaulted to 100000 amd cam be modified using <code>--posDiff</code>.  Any matching pairs that are further than <code>--posDiff</code> are treated as unique to their files.
   Line 153: Line 158:  
{{paramsParameter}}
 
{{paramsParameter}}
   −
 
+
{{PhoneHomeParameters}}
 
  −
= Usage =
  −
./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 =

Navigation menu