range: Range calculation

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Calculate the range of dna_seg and comparisons.

Usage

1
2
3
4
5
6
## S3 method for class 'dna_seg'
range(x, ...)
## S3 method for class 'comparison'
range(x, overall=TRUE, ...)
## S3 method for class 'annotation'
range(x, ...)

Arguments

x

Object to calculate the range from.

overall

Logical, TRUE by default. Should the range be calculated over the whole object? If FALSE, a range is calculated on each side of the comparison.

...

Unused.

Details

Calculate the overall range of a dna_seg, comparison or an annotation object.

Value

A numeric of length 2. For comparison, if overall is FALSE, a data frame with two rows and two columns, xlim1 and xlim2.

Author(s)

Lionel Guy

See Also

dna_seg, comparison, trim for further examples.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Load data
data(three_genes)

## On dna_seg
dna_segs[[1]]
range(dna_segs[[1]])

## On comparison
comparisons[[2]]
range(comparisons[[2]])
range(comparisons[[2]], overall=FALSE)

Example output

Loading required package: ade4
Loading required package: grid
   name start  end strand  col lty lwd pch cex gene_type
1 feat1     2  600     -1 blue   1   1   8   1    arrows
2 feat2  1000  800     -1 grey   1   1   8   1    arrows
3 feat3  1050 1345      1  red   1   1   8   1    arrows
[1]    2 1345
  start1 end1 start2 end2 direction     col
1     50  500   1899 2034         1 #67000D
2    800 1100   2732 2508        -1 #08306B
[1]   50 2732
  xlim1 xlim2
1    50  1899
2  1100  2732

genoPlotR documentation built on Jan. 5, 2021, 3:02 p.m.