Coverage¶
The coverage transform computes coverage for overlapping segments. The result is a new list of non-overlapping segments with the coverage values. The segments must be sorted by their start coordinates.
Parameters¶
asStart
- The output field for the start coordinate.
- Default: Same as
start
end
Required- The field representing the end coordinate of the segment (exclusive).
weight
- A field representing an optional weight for the segment. Can be used with copy ratios, for example.
asEnd
- The output field for the end coordinate.
- Default: Same as
end
asChrom
- The output field for the chromosome.
- Default: Same as
chrom
start
Required- The field representing the start coordinate of the segment (inclusive).
as
- The output field for the computed coverage.
chrom
- An optional chromosome field that is passed through.
Example¶
Given the following data:
start | end |
---|---|
0 | 4 |
1 | 3 |
... and configuration:
{ "type": "coverage", "start": "startpos", "end": "endpos" }
A new list of segments is produced:
start | end | coverage |
---|---|---|
0 | 1 | 1 |
1 | 3 | 2 |
3 | 4 | 1 |
Interactive example¶
The following example demonstrates both coverage
and pileup
transforms.