Skip to content

Commit

Permalink
Coverage example
Browse files Browse the repository at this point in the history
  • Loading branch information
CiaranOMara committed Jun 13, 2020
1 parent 8a6c44c commit 997132f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/coverage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ For example, given intervals like:
This function would return a new set of disjoint intervals with annotated coverage like:
[1][-2-][-1-][--2--][--1--]
# Example
```jldoctest
julia> intervals = [
Interval("chr1", 1, 8),
Interval("chr1", 4, 20),
Interval("chr1", 14, 27)];
julia> coverage(intervals)
IntervalCollection{UInt32} with 5 intervals:
chr1:1-3 . 1
chr1:4-8 . 2
chr1:9-13 . 1
chr1:14-20 . 2
chr1:21-27 . 1
```
"""
function coverage(stream, seqname_isless::Function=isless)
cov = IntervalCollection{UInt32}()
Expand Down

0 comments on commit 997132f

Please sign in to comment.