Line 70: |
Line 70: |
| | | |
| = Usage = | | = Usage = |
− | ./bam dedup --in <InputBamFile> --out <OutputBamFile> [--minQual <minPhred>] [--log <logFile>] [--oneChrom] [--rmDups] [--force] [--verbose] [--noeof] [--params] [--recab] | + | ./bam dedup --in <InputBamFile> --out <OutputBamFile> [--minQual <minPhred>] [--log <logFile>] [--oneChrom] [--rmDups] [--force] [--excludeFlags <flag>] [--verbose] [--noeof] [--params] [--recab] |
| | | |
| Additional Recalibration Usage is documented at [[BamUtil: recab#Usage|BamUtil: recab -> Usage]] | | Additional Recalibration Usage is documented at [[BamUtil: recab#Usage|BamUtil: recab -> Usage]] |
Line 87: |
Line 87: |
| duplicates and apply this duplicate marking logic. Default is to throw errors | | duplicates and apply this duplicate marking logic. Default is to throw errors |
| and exit when trying to run on an already mark-duplicated BAM | | and exit when trying to run on an already mark-duplicated BAM |
| + | --excludeFlags <flag> : exclude reads with any of these flags set when determining or marking duplicates |
| + | by default (0x304): exclude unmapped, secondary reads, and QC failures |
| --verbose : Turn on verbose mode | | --verbose : Turn on verbose mode |
| --noeof : Do not expect an EOF block on a bam file. | | --noeof : Do not expect an EOF block on a bam file. |
Line 95: |
Line 97: |
| Additional Recalibration Parameters are documented at [[BamUtil: recab#Parameters|BamUtil: recab -> Parameters]] | | Additional Recalibration Parameters are documented at [[BamUtil: recab#Parameters|BamUtil: recab -> Parameters]] |
| | | |
| + | == Required Parameters == |
| {{inBAMInputFile}} | | {{inBAMInputFile}} |
| | | |
Line 100: |
Line 103: |
| {{outBAMOutputFile}} | | {{outBAMOutputFile}} |
| | | |
− | == Minimum Quality for Quality Calculations (<code>--minQual</code>) == | + | == Optional Parameters== |
| + | === Minimum Quality for Quality Calculations (<code>--minQual</code>) === |
| | | |
| When duplicate reads are encountered, the read with the highest quality is kept. | | When duplicate reads are encountered, the read with the highest quality is kept. |
Line 106: |
Line 110: |
| To determine the quality of a read, all of the phred base quality scores above the <code>--minQual</code> value are added together. If <code>--minQual</code> is not specified, it is defaulted to 15. | | To determine the quality of a read, all of the phred base quality scores above the <code>--minQual</code> value are added together. If <code>--minQual</code> is not specified, it is defaulted to 15. |
| | | |
− | == Output log & Summary Statistics FileName (<code>--log</code>) == | + | === 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 112: |
Line 116: |
| 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. |
| | | |
− | == Treat Reads with Mates On Different Chromosomes As Single-Ended (<code>--oneChrom</code>) == | + | === Treat Reads with Mates On Different Chromosomes As Single-Ended (<code>--oneChrom</code>) === |
| | | |
| If a read's mate is not found it will not be used for duplicate marking. If you are running on a single chromosome, all read's whose mates are on different chromosomes will not be used for duplicate marking. The <code>--oneChrom</code> option will treat reads with mates on a different chromosome as single-ended. | | If a read's mate is not found it will not be used for duplicate marking. If you are running on a single chromosome, all read's whose mates are on different chromosomes will not be used for duplicate marking. The <code>--oneChrom</code> option will treat reads with mates on a different chromosome as single-ended. |
| | | |
− | == Remove Duplicates (<code>--rmDups</code>) == | + | === Remove Duplicates (<code>--rmDups</code>) === |
| | | |
| Instead of marking a read as duplicate in the flag, the <code>--rmDups</code> option will remove it from the output BAM file. | | Instead of marking a read as duplicate in the flag, the <code>--rmDups</code> option will remove it from the output BAM file. |
| | | |
− | == Ignore Previous Duplicate Marking (<code>--force</code>) == | + | === Ignore Previous Duplicate Marking (<code>--force</code>) === |
| | | |
| By default the deduper will throw an error and stop if a read is already marked as duplicate. The <code>--force</code> option will removes any previous duplicate marking and marks the reads from scratch. The resulting output file will only have reads determined by the deduper marked as duplicates. | | By default the deduper will throw an error and stop if a read is already marked as duplicate. The <code>--force</code> option will removes any previous duplicate marking and marks the reads from scratch. The resulting output file will only have reads determined by the deduper marked as duplicates. |
| | | |
− | == Turn on Verbose Mode (<code>--verbose</code>) == | + | === Skip Records with any of the Specified Flags (<code>--excludeFlags</code>)=== |
| + | Skip records with any of the specified flags set, default 0x304 |
| + | |
| + | By default skips reads with any of the following flags set: |
| + | * unmapped |
| + | * secondary alignment |
| + | * fails QC checks |
| + | |
| + | This parameter was added in version 1.0.10. |
| + | |
| + | === 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 136: |
Line 150: |
| | | |
| See [[BamUtil: recab]] for recalibration details. | | See [[BamUtil: recab]] for recalibration details. |
| + | |
| + | {{PhoneHomeParameters}} |
| | | |
| = Return Value = | | = Return Value = |
Line 141: |
Line 157: |
| 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). |