Skip to contents

An objects from 'CodonSeq' or 'MatrixList' class is returned by function get_coord. This object will store the coordinate of each sequence in a list of 3D-vectors or a list of vectors located in the slot named 'CoordList'. The original codon sequence (if provided) will be stored in the slot named 'SeqRanges'.

Usage

coordList(x)

# S4 method for CodonSeq
coordList(x)

seqRanges(x)

# S4 method for CodonSeq
seqRanges(x)

Arguments

x

An object from CodonSeq-class.

Value

Given the slot values define a CodonSeq-class.

Examples

## Load a DNA sequence alignment 
data("aln", package = "GenomAutomorphism")

## Get base coordinates on 'Z5'
coord <- get_coord(
    x = aln,
    cube = "ACGT",
    group = "Z5"
)
coordList(coord)
#> $coord1
#>  [1] 1 2 2 4 1 4 3 4 4 3 3 4 1 4 4 0 0 0 3 2 3 2 4 2 2 1 1 2 4 2 2 4 4 3 3 2 4 2
#> [39] 4 1 3 2 4 2 1 2 4 1 2 1 4
#> 
#> $coord2
#>  [1] 1 4 2 4 1 4 3 4 4 3 3 4 1 4 4 1 2 3 1 2 3 2 4 2 2 1 1 4 4 2 2 4 4 3 3 3 4 2
#> [39] 2 0 0 0 0 0 0 2 4 2 2 4 4
#> 
## Load a DNA sequence alignment
data("aln", package = "GenomAutomorphism")

## Get base coordinates on 'Z5'
coord <- get_coord(
    x = aln,
    cube = "ACGT",
    group = "Z5"
)

seqRanges(coord)
#> GRanges object with 51 ranges and 2 metadata columns:
#>        seqnames    ranges strand |        seq1        seq2
#>           <Rle> <IRanges>  <Rle> | <character> <character>
#>    [1]        1         1      + |           A           A
#>    [2]        1         2      + |           C           T
#>    [3]        1         3      + |           C           C
#>    [4]        1         4      + |           T           T
#>    [5]        1         5      + |           A           A
#>    ...      ...       ...    ... .         ...         ...
#>   [47]        1        47      + |           T           T
#>   [48]        1        48      + |           A           C
#>   [49]        1        49      + |           C           C
#>   [50]        1        50      + |           A           T
#>   [51]        1        51      + |           T           T
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths