Line 45: |
Line 45: |
| | | |
| == Return Value == | | == Return Value == |
− | The software returns 0 on success, non-0 on failure. | + | The software returns 0 on completion, or -1 if the parameters could not be read or there was a problem reading an input file. |
| | | |
| == Output == | | == Output == |
− | A status message is written to cerr on failures, and upon successful completion, "Done writing to " followed by the output file name is written to cerr. | + | A status message is written to cerr on failures, and upon completion, "Done writing to " followed by the output file name is written to cerr. |
| + | |
| + | |
| + | = subsetBaseQCStats = |
| + | Reduce the [[BamUtil:_stats#BaseQC|BAM BaseQC]] stats files in the to only positions in the specified regions. |
| + | |
| + | ==Usage== |
| + | subsetBaseQCStats --inStats <originalStatsFile> --regionList <subset of regions> --outStats <outputStatsFile> |
| + | |
| + | == Parameters == |
| + | --inStats : stats file to narrow down to just a subset of positions |
| + | --regionList : File containing the subset of regions to keep (assumed to be sorted) |
| + | Formated as chr<tab>start_pos<tab>end_pos. |
| + | Positions are 0 based and the end_pos is not included in the region. |
| + | --outStats : stats file to write the subset of stats into |
| + | |
| + | === input File (<code>--inStats</code>) === |
| + | |
| + | The input stats files that needs to be narrowed down to just a subset of regions. |
| + | |
| + | The software can read either compressed or uncompressed stats files, but they must be in a [[BamUtil:_stats#BaseQC|BAM BaseQC format]]. |
| + | |
| + | === region List File (<code>--regionList</code>) === |
| + | |
| + | The file containing the list of regions to keep from the input stats file. |
| + | |
| + | The regions should be specified, one region per line. |
| + | |
| + | Each column is separated by tabs. |
| + | |
| + | {|border="1" cellspacing="0" cellpadding="2" |
| + | ! Column # !! Description |
| + | |- |
| + | | 1 |
| + | | Chromosome as written in the stats file. |
| + | |- |
| + | | 2 |
| + | | 0-based region start position (included in the output file). |
| + | |- |
| + | | 3 |
| + | | 0-based region end position (not included in the output file). |
| + | |} |
| + | |
| + | |
| + | === output File (<code>--outStats</code>) === |
| + | |
| + | Use <code>--outStats</code> followed by your file name to specify the output file for the subset of stats. |
| + | |
| + | The file extension is used to determine whether or not to compressed the output file. A <code>-</code> is used to indicate stdout. |
| + | |
| + | {|border="1" cellspacing="0" cellpadding="2" |
| + | |uncompressed to file |
| + | | <code>--out yourFileName.stats</code> |
| + | |- |
| + | |compressed to file |
| + | | <code>--out yourFileName.stats.gz</code> |
| + | |- |
| + | |uncompressed to stdout |
| + | | <code>--out -</code> |
| + | |- |
| + | |compressed to stdout |
| + | | <code>--out -.gz</code> |
| + | |} |
| + | |
| + | |
| + | == Return Value == |
| + | The software returns 0 on completion, or -1 if the parameters could not be read or there was a problem reading an input file. |
| + | |
| + | == Output == |
| + | A status message is written to cerr on failures, and upon completion, "Done writing to " followed by the output file name is written to cerr. |
| | | |
| | | |
| [[Category:BAM_Software]] [[Category:Software]] | | [[Category:BAM_Software]] [[Category:Software]] |