A.2 Constructing Ranges
To construct an IRanges we require that there are at least two columns that represent at either a starting coordinate, finishing coordinate or the width of the interval.
#> IRanges object with 7 ranges and 0 metadata columns:
#> start end width
#> <integer> <integer> <integer>
#> [1] 2 1 0
#> [2] 1 1 1
#> [3] 0 1 2
#> [4] -1 1 3
#> [5] 13 14 2
#> [6] 14 14 1
#> [7] 15 14 0
To construct a GRanges we require a column that represents that sequence name ( contig or chromosome id), and an optional column to represent the strandedness of an interval.
#> GRanges object with 7 ranges and 1 metadata column:
#> seqnames ranges strand | gc
#> <Rle> <IRanges> <Rle> | <numeric>
#> [1] chr2 2-1 - | 0.762551
#> [2] chr1 1 - | 0.669022
#> [3] chr2 0-1 + | 0.204612
#> [4] chr2 -1-1 - | 0.357525
#> [5] chr1 13-14 - | 0.359475
#> [6] chr1 14 - | 0.690291
#> [7] chr2 15-14 - | 0.535811
#> -------
#> seqinfo: 2 sequences from an unspecified genome; no seqlengths