Changes

From Genome Analysis Wiki
Jump to navigationJump to search
634 bytes added ,  15:59, 24 August 2017
Line 3: Line 3:  
= Overview of the <code>stats</code> function of <code>bamUtil</code>  =
 
= Overview of the <code>stats</code> function of <code>bamUtil</code>  =
   −
The <code>stats</code> option on the [[BamUtil]] executable generates the specified statistics on a SAM/BAM file.  
+
The <code>stats</code> option on the [[BamUtil]] executable generates the specified statistics on a SAM/BAM file.
 +
 
 +
== Troubleshooting ==
 +
See [[BamUtil:_FAQ#BamUtil:_stats|BamUtil: FAQ -> BamUtil: stats]] for troubleshooting help.
    
= Usage =
 
= Usage =
Line 12: Line 15:  
= Parameters  =
 
= Parameters  =
 
<pre>
 
<pre>
Required Parameters:
+
        Required Parameters:
--in : the SAM/BAM file to calculate stats for
+
                --in : the SAM/BAM file to calculate stats for
Types of Statistics that can be generated:
+
        Types of Statistics that can be generated:
--basic        : Turn on basic statistic generation
+
                --basic        : Turn on basic statistic generation
--qual          : Generate a count for each quality (displayed as non-phred quality)
+
                --qual          : Generate a count for each quality (displayed as non-phred quality)
--phred        : Generate a count for each quality (displayed as phred quality)
+
                --phred        : Generate a count for each quality (displayed as phred quality)
--pBaseQC      : Write per base statistics as Percentages to the specified file.
+
                --pBaseQC      : Write per base statistics as Percentages to the specified file. (use - for stdout)
                  pBaseQC & cBaseQC cannot both be specified.
+
                                  pBaseQC & cBaseQC cannot both be specified.
--cBaseQC      : Write per base statistics as Counts to the specified file.
+
                --cBaseQC      : Write per base statistics as Counts to the specified file. (use - for stdout)
                  pBaseQC & cBaseQC cannot both be specified.
+
                                  pBaseQC & cBaseQC cannot both be specified.
Optional Parameters:
+
        Optional Parameters:
--maxNumReads  : Maximum number of reads to process
+
                --maxNumReads  : Maximum number of reads to process
                  Defaults to -1 to indicate all reads.
+
                                  Defaults to -1 to indicate all reads.
--unmapped      : Only process unmapped reads (requires a bamIndex file)
+
                --unmapped      : Only process unmapped reads (requires a bamIndex file)
--bamIndex      : The path/name of the bam index file
+
                --bamIndex      : The path/name of the bam index file
                  (if required and not specified, uses the --in value + ".bai")
+
                                  (if required and not specified, uses the --in value + ".bai")
--regionList    : File containing the regions to be processed chr<tab>start_pos<tab>end_pos.
+
                --regionList    : File containing the regions to be processed chr<tab>start_pos<tab>end_pos.
                  Positions are 0 based and the end_pos is not included in the region.
+
                                  Positions are 0 based and the end_pos is not included in the region.
                  Uses bamIndex.
+
                                  Uses bamIndex.
--excludeFlags  : Skip any records with any of the specified flags set
+
                --excludeFlags  : Skip any records with any of the specified flags set
                  (specify an integer representation of the flags)
+
                                  (specify an integer representation of the flags)
--requiredFlags : Only process records with all of the specified flags set
+
                --requiredFlags : Only process records with all of the specified flags set
                  (specify an integer representation of the flags)
+
                                  (specify an integer representation of the flags)
--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.
Optional phred/qual Only Parameters:
+
        Optional phred/qual Only Parameters:
--withinRegion  : Only count qualities if they fall within regions specified.
+
                --withinRegion  : Only count qualities if they fall within regions specified.
                  Only applicable if regionList is also specified.
+
                                  Only applicable if regionList is also specified.
Optional BaseQC Only Parameters:
+
        Optional BaseQC Only Parameters:
--baseSum      : Print an overall summary of the baseQC for the file to stderr.
+
                --baseSum      : Print an overall summary of the baseQC for the file to stderr.
--bufferSize    : Size of the pileup buffer for calculating the BaseQC parameters.
+
                --bufferSize    : Size of the pileup buffer for calculating the BaseQC parameters.
                  Default: 1024
+
                                  Default: 1024
--minMapQual    : The minimum mapping quality for filtering reads in the baseQC stats.
+
                --minMapQual    : The minimum mapping quality for filtering reads in the baseQC stats.
--dbsnp        : The dbSnp file of positions to exclude from baseQC analysis.
+
                --dbsnp        : The dbSnp file of positions to exclude from baseQC analysis.
 
</pre>  
 
</pre>  
 
{{PhoneHomeParamDesc}}
 
{{PhoneHomeParamDesc}}
Line 118: Line 121:  
=== BaseQC (<code>--pBaseQC</code> and <code>--cBaseQC</code> and <code>--baseSum</code>) ===
 
=== BaseQC (<code>--pBaseQC</code> and <code>--cBaseQC</code> and <code>--baseSum</code>) ===
   −
The <code>pBaseQC</code> and <code>cBaseQC</code> options generate per base statistics.  Only one of these two options can be specified.  They write statistics generated for each position to the file specified after the option.  They use the same logic for calculating statistics, but <code>pBaseQC</code> writes the statistics as percentages, and <code>cBaseQC</code> writes them as counts.  The order of the statistics are also different.
+
The <code>pBaseQC</code> and <code>cBaseQC</code> options generate per base statistics.  Only one of these two options can be specified.  They write statistics generated for each position to the file specified after the option (use <code>-</code> to write to STDOUT).  They use the same logic for calculating statistics, but <code>pBaseQC</code> writes the statistics as percentages, and <code>cBaseQC</code> writes them as counts.  The order of the statistics are also different.
    
The <code>baseSum</code> option can be used with either <code>pBaseQC</code> or <code>cBaseQC</code> or on its own.  <code>baseSum</code> generates a summary of the per position statistics and writes it to stderr.  It calculates the per position base statistics even if they will not be written anywhere (neither <code>pBaseQC</code> nor <code>cBaseQC</code> are specified).
 
The <code>baseSum</code> option can be used with either <code>pBaseQC</code> or <code>cBaseQC</code> or on its own.  <code>baseSum</code> generates a summary of the per position statistics and writes it to stderr.  It calculates the per position base statistics even if they will not be written anywhere (neither <code>pBaseQC</code> nor <code>cBaseQC</code> are specified).

Navigation menu