From Genome Analysis Wiki
Jump to navigationJump to search
2,197 bytes removed
, 10:41, 22 July 2010
Line 22: |
Line 22: |
| == validate == | | == validate == |
| | | |
− | The <code>validate</code> option on the bam executable reads and validates a SAM/BAM file. | + | The <code>validate</code> option on the bam executable reads and validates a SAM/BAM file. This option is documented at: [[BamValidator]] |
− | | |
− | The validation checks that the file is sorted as specified in the user options. Default is unsorted, in which case, no order validation is done.
| |
− | | |
− | SAM fields are validated against: [[SAM Validation Criteria]]
| |
− | | |
− | '''NOTE: Currently only minimal validation is currently done.'''
| |
− | | |
− | === Parameters ===
| |
− | <pre>
| |
− | Required Parameters:
| |
− | --in : the SAM/BAM file to be validated
| |
− | Optional Parameters:
| |
− | --noeof : do not expect an EOF block on a bam file.
| |
− | --so_flag : validate the file is sorted based on the header's @HD SO flag.
| |
− | --so_coord : validate the file is sorted based on the coordinate.
| |
− | --so_query : validate the file is sorted based on the query name.
| |
− | --quitAfterErrorNum : Number of records with errors/invalids to allow before quiting.
| |
− | -1 (default) indicates to not quit until the entire file is validated.
| |
− | 0 indicates not to read/validate anything.
| |
− | --maxReportedErrors : Maximum number of errors to print (defaults to 100)
| |
− | --disableStatistics : Turn off statistic generation
| |
− | | |
− | </pre>
| |
− | | |
− | === Usage ===
| |
− | | |
− | ./bam validate --in <inputFile> [--noeof] [--so_flag|--so_coord|--so_query] [--quitAfterErrorNum <numErrors>] [--maxReportedErrors <numReportedErrors>] [--disableStatistics]
| |
− | | |
− | === Return Value ===
| |
− | * 0: all records are successfully read, are valid, and are properly sorted.
| |
− | * non-0: at least one record was not successfully read, not valid, or not properly sorted.
| |
− | | |
− | === Example Output ===
| |
− | <pre>
| |
− | ./bam validate --in t.sam --disableStatistics
| |
− | | |
− | The following parameters are in effect:
| |
− | | |
− | Input Parameters
| |
− | --in [t.sam], --noeof, --quitAfterErrorNum [-1], --maxReportedErrors [100], --disableStatistics [ON]
| |
− | SortOrder : --so_flag, --so_coord, --so_query
| |
− | | |
− | Record 1
| |
− | FAIL_PARSE: Too few columns in the Record
| |
− | | |
− | Record 2
| |
− | FAIL_PARSE: Too few columns in the Record
| |
− | | |
− | | |
− | Number of records read = 2
| |
− | Number of valid records = 0
| |
− | Returning: 5 (FAIL_PARSE)
| |
− | </pre>
| |
− | | |
− | === Statistics Generated ===
| |
− | The following statistics are generated when disableStatistics option is not used:
| |
− | *TotalReads
| |
− | *MappedReads
| |
− | *PairedReads
| |
− | *ProperPair
| |
− | *DuplicateReads
| |
− | *QCFailureReads
| |
− | *MappingRate(%)
| |
− | *PairedReads(%)
| |
− | *ProperPair(%)
| |
− | *DupRate(%)
| |
− | *QCFailRate(%)
| |
− | *TotalBases
| |
− | *BasesInMappedReads
| |
| | | |
| == convert == | | == convert == |