Line 78: |
Line 78: |
| | | |
| = Usage = | | = Usage = |
− | ./bam recab (options) --in <InputBamFile> --out <OutputFile> [--log <logFile>] [--verbose] [--noeof] [--params] --refFile <ReferenceFile> [--dbsnp <dbsnpFile>] [--minBaseQual <minBaseQual>] [--maxBaseQual <maxBaseQual>] [--blended <weight>] [--fitModel] [--fast] [--keepPrevDbsnp] [--keepPrevNonAdjacent] [--useLogReg] | + | ./bam recab (options) --in <InputBamFile> --out <OutputFile> [--log <logFile>] [--verbose] [--noeof] [--params] --refFile <ReferenceFile> [--dbsnp <dbsnpFile>] [--minBaseQual <minBaseQual>] [--maxBaseQual <maxBaseQual>] [--blended <weight>] [--fitModel] [--fast] [--keepPrevDbsnp] [--keepPrevNonAdjacent] [--useLogReg] [--qualField <tag>] [--storeQualTag <tag>] [--buildExcludeFlags <flag>] [--applyExcludeFlags <flag>] |
| | | |
| = Parameters = | | = Parameters = |
Line 117: |
Line 117: |
| (default is to get it from the Quality field) | | (default is to get it from the Quality field) |
| --storeQualTag <quality tag> : tag to store the previous quality into | | --storeQualTag <quality tag> : tag to store the previous quality into |
| + | --buildExcludeFlags <flag> : exclude reads with any of these flags set when building the |
| + | recalibration table |
| + | --applyExcludeFlags <flag> : do not apply the recalibration table to any reads with any of these flags set |
| </pre> | | </pre> |
| | | |
| + | == Required Generic Parameters == |
| {{inBAMInputFile}} | | {{inBAMInputFile}} |
| {{outBAMOutputFile}} | | {{outBAMOutputFile}} |
| | | |
− | == Output log & Summary Statistics FileName (<code>--log</code>) == | + | == Optional Generic Parameters == |
| + | === Output log & Summary Statistics FileName (<code>--log</code>) === |
| | | |
| Output file name for writing logs & summary statistics. | | Output file name for writing logs & summary statistics. |
Line 128: |
Line 133: |
| If this parameter is not specified, it will write to the output file specified in <code>--out</code> + ".log". Or if the output bam is written to stdout (<code>--out</code> starts with '-'), the logs will be written to stderr. If the filename after --log starts with '-' it will write to stderr. | | If this parameter is not specified, it will write to the output file specified in <code>--out</code> + ".log". Or if the output bam is written to stdout (<code>--out</code> starts with '-'), the logs will be written to stderr. If the filename after --log starts with '-' it will write to stderr. |
| | | |
− | == Turn on Verbose Mode (<code>--verbose</code>) == | + | === Turn on Verbose Mode (<code>--verbose</code>) === |
| | | |
| Turn on verbose logging to get more log messages in the log and to stderr. | | Turn on verbose logging to get more log messages in the log and to stderr. |
Line 135: |
Line 140: |
| {{paramsParameter}} | | {{paramsParameter}} |
| | | |
− | == Reference File (<code>--refFile</code>) == | + | {{PhoneHomeParameters}} |
| + | |
| + | == Required Recalibration Parameters == |
| + | === Reference File (<code>--refFile</code>) === |
| | | |
| The reference file is a required parameter used for comparing read bases to the reference. | | The reference file is a required parameter used for comparing read bases to the reference. |
| | | |
− | == DBSNP File (<code>--dbsnp</code>) == | + | == Optional Recalibration Parameters == |
| + | |
| + | === DBSNP File (<code>--dbsnp</code>) === |
| | | |
| The dbsnp file that specifies positions to skip recalibrating. Tab delimited file with the chromosome in the first column and the 1-based position in the 2nd column. | | The dbsnp file that specifies positions to skip recalibrating. Tab delimited file with the chromosome in the first column and the 1-based position in the 2nd column. |
| | | |
− | == Minimum Recalibration Base Quality (<code>--minBaseQual</code>) == | + | === Minimum Recalibration Base Quality (<code>--minBaseQual</code>) === |
| | | |
| When recalibrating reads, only positions with a base quality greater than this minimum phred quality will be recalibrated. If <code>--minBaseQual</code> is not specified, it is defaulted to 5. | | When recalibrating reads, only positions with a base quality greater than this minimum phred quality will be recalibrated. If <code>--minBaseQual</code> is not specified, it is defaulted to 5. |
Line 149: |
Line 159: |
| The ILLUMINA specs indicate that any quality below 5 can be used as an error indicator so we do not want to recalibrate those. | | The ILLUMINA specs indicate that any quality below 5 can be used as an error indicator so we do not want to recalibrate those. |
| | | |
− | == Maximum Recalibration Base Quality (<code>--maxBaseQual</code>) == | + | === Maximum Recalibration Base Quality (<code>--maxBaseQual</code>) === |
| | | |
| This value sets the maximum phred base quality assigned to a base after recalibrating. Any qualities above this value will be set to this value. It is defaulted to 50. | | This value sets the maximum phred base quality assigned to a base after recalibrating. Any qualities above this value will be set to this value. It is defaulted to 50. |
| | | |
− | == Blended Model Weight (<code>--blended</code>) == | + | === Blended Model Weight (<code>--blended</code>) === |
| | | |
| <span style="color:red">TBD - this parameter is not yet implemented.</span> | | <span style="color:red">TBD - this parameter is not yet implemented.</span> |
| | | |
− | == Fit Model (<code>--fitModel</code>) == | + | === Fit Model (<code>--fitModel</code>) === |
| | | |
| Check if the logistic regression model fits the data. | | Check if the logistic regression model fits the data. |
Line 165: |
Line 175: |
| This option cannot be used in conjunction with [[#Fast Recalibration (--fast)|<code>--fast</code>]] and is overriden by <code>--fast</code>, but automatically applied by useLogReg | | This option cannot be used in conjunction with [[#Fast Recalibration (--fast)|<code>--fast</code>]] and is overriden by <code>--fast</code>, but automatically applied by useLogReg |
| | | |
− | == Fast Recalibration (<code>--fast</code>) == | + | === Fast Recalibration (<code>--fast</code>) === |
| | | |
| Use a compact representation of the Recalibration Table that only allows: | | Use a compact representation of the Recalibration Table that only allows: |
Line 176: |
Line 186: |
| This option cannot be used in conjunction with [[#Fit Model (--fitModel)|<code>--fitModel</code>]], or [[#Logistic Regression (--useLogReg)|<code>--useLogReg</code>]] and overrides [[#Fit Model (--fitModel)|<code>--fitModel</code>]], but is overridden by [[#Logistic Regression (--useLogReg)|<code>--useLogReg</code>]]. | | This option cannot be used in conjunction with [[#Fit Model (--fitModel)|<code>--fitModel</code>]], or [[#Logistic Regression (--useLogReg)|<code>--useLogReg</code>]] and overrides [[#Fit Model (--fitModel)|<code>--fitModel</code>]], but is overridden by [[#Logistic Regression (--useLogReg)|<code>--useLogReg</code>]]. |
| | | |
− | == Allow Previous Base DBSNP (<code>--keepPrevDbsnp</code>) == | + | === Allow Previous Base DBSNP (<code>--keepPrevDbsnp</code>) === |
| | | |
| By default bases where the previous base is in DBSNP are excluded from the Recalibration Table. | | By default bases where the previous base is in DBSNP are excluded from the Recalibration Table. |
Line 182: |
Line 192: |
| This option includes these bases in the building of the Recalibration Table. | | This option includes these bases in the building of the Recalibration Table. |
| | | |
− | == Allow Previous Base Non-Match/Mismatch (<code>--keepPrevNonAdjacent</code>) == | + | === Allow Previous Base Non-Match/Mismatch (<code>--keepPrevNonAdjacent</code>) === |
| | | |
| By default bases where the previous base is not a CIGAR Match/Mismatch are excluded from the Recalibration Table. | | By default bases where the previous base is not a CIGAR Match/Mismatch are excluded from the Recalibration Table. |
Line 189: |
Line 199: |
| | | |
| | | |
− | == Logistic Regression (<code>--useLogReg</code>) == | + | === Logistic Regression (<code>--useLogReg</code>) === |
| | | |
| Use the logistic regression empirical qualities for setting the new base qualities instead of the default formula. | | Use the logistic regression empirical qualities for setting the new base qualities instead of the default formula. |
Line 195: |
Line 205: |
| This option automatically enables [[#Fit Model (--fitModel)|<code>--fitModel</code>]] and disables [[#Fast Recalibration (--fast)|<code>--fast</code>]]. | | This option automatically enables [[#Fit Model (--fitModel)|<code>--fitModel</code>]] and disables [[#Fast Recalibration (--fast)|<code>--fast</code>]]. |
| | | |
− | == Read the quality from a tag (<code>--qualField</code>) == | + | === Read the quality from a tag (<code>--qualField</code>) === |
| | | |
| If this parameter is set, then read the quality string from the specified tag name. If the tag is not found, the quality is read from the quality field. | | If this parameter is set, then read the quality string from the specified tag name. If the tag is not found, the quality is read from the quality field. |
| | | |
− | == Store the original quality (<code>--storeQualTag</code>) == | + | === Store the original quality (<code>--storeQualTag</code>) === |
| | | |
| If this parameter is set, the original quality will be stored as a string in the specified tag. | | If this parameter is set, the original quality will be stored as a string in the specified tag. |
| + | |
| + | === Skip Records with any of the Specified Flags (<code>--buildExcludeFlags</code>, <code>--applyExcludeFlags</code>) === |
| + | Use <code>--buildExcludeFlags</code> to skip records with any of the specified flags set when building the recalibration table, default 0x704. |
| + | |
| + | By default, when building the recalibration table reads with any of the following flags set are skipped: |
| + | * unmapped |
| + | * secondary alignment |
| + | * fails QC checks |
| + | * duplicate |
| + | |
| + | Use <code>--applyExcludeFlags</code> to skip records with any of the specified flags set when applying the recalibration table. The default value is 0x000, do not skip any reads. |
| + | |
| + | These parameters were added in version 1.0.10. |
| | | |
| = Return Value = | | = Return Value = |
Line 207: |
Line 230: |
| Returns -1 if input parameters are invalid. | | Returns -1 if input parameters are invalid. |
| | | |
− | Returns the SamStatus for the reads/writes (0 on success). | + | Returns the SamStatus for the reads/writes (0 on success, non-0 on failure). |