Changes

From Genome Analysis Wiki
Jump to navigationJump to search
2,593 bytes added ,  17:17, 1 June 2012
no edit summary
Line 15: Line 15:     
== Parameters ==
 
== Parameters ==
 +
<pre>
 
  --out output merged stats file
 
  --out output merged stats file
 
  inputStatsFiles space separated list of files to merge.
 
  inputStatsFiles space separated list of files to merge.
 +
</pre>
    
=== output File (<code>--out</code>) ===
 
=== output File (<code>--out</code>) ===
Line 45: Line 47:     
== 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 ==
 +
<pre>
 +
--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
 +
</pre>
 +
 
 +
=== 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 successful completion, or non-zero on a failure.
 +
 
 +
== Output ==
 +
Status/error messages are written to cerr.
 +
 
 +
If an invalid region is found in the regionList, "NonOverlapRegionPos::add: Invalid Range, start must be < end, but ", followed by the start position, followed by " >= ", followed by the end position.
 +
 +
Upon completion, "Done subsetBaseQCStats." is written to cerr.
 +
 
 +
'''Example Output:'''
 +
NonOverlapRegionPos::add: Invalid Range, start must be < end, but 112 >= 111
 +
Done subsetBaseQCStats.
       
[[Category:BAM_Software]] [[Category:Software]]
 
[[Category:BAM_Software]] [[Category:Software]]

Navigation menu