Skip to contents

Objects from this class are generated by function automorphism_bycoef.

Value

AutomorphismByCoef-class definition.

AutomorphismByCoefList-class methods

unlist(x):

It transforms a AutomorphismByCoefList-class object into an AutomorphismByCoef-class object.

as(x, "AutomorphismByCoefList")

It transforms a 'list' of AutomorphismByCoef-class object into an AutomorphismByCoefList-class object.

Examples

## Let's transform a AutomorphismByCoefList-class object into an 
## AutomorphismByCoef-class object
data("autby_coef")
unlist(autby_coef[1:2])
#> AutomorphismByCoef object with 683 ranges and 7 metadata columns:
#>                     seqnames    ranges strand |        seq1        seq2
#>                        <Rle> <IRanges>  <Rle> | <character> <character>
#>     human_1.human_2        1     1-238      + |         ATG         ATG
#>     human_1.human_2        1     1-238      + |         GAT         GAT
#>     human_1.human_2        1     1-238      + |         TTA         TTA
#>     human_1.human_2        1     1-238      + |         TCT         TCT
#>     human_1.human_2        1     1-238      + |         GCT         GCT
#>                 ...      ...       ...    ... .         ...         ...
#>   human_1.gorilla_1        1   729-761      + |         CCC         CCC
#>   human_1.gorilla_1        1   729-761      + |         ATC         ATC
#>   human_1.gorilla_1        1   729-761      + |         CAC         CAC
#>   human_1.gorilla_1        1   729-761      + |         AGC         AGC
#>   human_1.gorilla_1        1   729-761      + |         TGA         TGA
#>                             aa1         aa2      autm    mut_type        cube
#>                     <character> <character> <numeric> <character> <character>
#>     human_1.human_2           M           M         1         HHH        ACGT
#>     human_1.human_2           D           D         1         HHH        ACGT
#>     human_1.human_2           L           L         1         HHH        ACGT
#>     human_1.human_2           S           S         1         HHH        ACGT
#>     human_1.human_2           A           A         1         HHH        ACGT
#>                 ...         ...         ...       ...         ...         ...
#>   human_1.gorilla_1           P           P         1         HHH        ACGT
#>   human_1.gorilla_1           I           I         1         HHH        ACGT
#>   human_1.gorilla_1           H           H         1         HHH        ACGT
#>   human_1.gorilla_1           S           S         1         HHH        ACGT
#>   human_1.gorilla_1           *           *         1         HHH        ACGT
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths

## Herein a 'list' object of AutomorphismByCoef-class objects
lista <- list(human = autby_coef[[1]], gorilla = autby_coef[[2]])

## Let's transform the the last list 'lista' into an
## AutomorphismByCoefList-class object
aut <- as(lista, "AutomorphismByCoefList")
aut
#> AutomorphismByCoefList object of length 2:
#> $human
#> AutomorphismByCoef object with 239 ranges and 7 metadata columns:
#>         seqnames    ranges strand |        seq1        seq2         aa1
#>            <Rle> <IRanges>  <Rle> | <character> <character> <character>
#>     [1]        1     1-238      + |         ATG         ATG           M
#>     [2]        1     1-238      + |         GAT         GAT           D
#>     [3]        1     1-238      + |         TTA         TTA           L
#>     [4]        1     1-238      + |         TCT         TCT           S
#>     [5]        1     1-238      + |         GCT         GCT           A
#>     ...      ...       ...    ... .         ...         ...         ...
#>   [235]        1   511-761      + |         CCC         CCC           P
#>   [236]        1   511-761      + |         CTT         CTT           L
#>   [237]        1   511-761      + |         CCT         CCT           P
#>   [238]        1   511-761      + |         ATA         ATA           I
#>   [239]        1   511-761      + |         TGA         TGA           *
#>                 aa2      autm    mut_type        cube
#>         <character> <numeric> <character> <character>
#>     [1]           M         1         HHH        ACGT
#>     [2]           D         1         HHH        ACGT
#>     [3]           L         1         HHH        ACGT
#>     [4]           S         1         HHH        ACGT
#>     [5]           A         1         HHH        ACGT
#>     ...         ...       ...         ...         ...
#>   [235]           P         1         HHH        ACGT
#>   [236]           L         1         HHH        ACGT
#>   [237]           P         1         HHH        ACGT
#>   [238]           I         1         HHH        ACGT
#>   [239]           *         1         HHH        ACGT
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths
#> 
#> $gorilla
#> AutomorphismByCoef object with 444 ranges and 7 metadata columns:
#>         seqnames    ranges strand |        seq1        seq2         aa1
#>            <Rle> <IRanges>  <Rle> | <character> <character> <character>
#>     [1]        1      1-59      + |         ATG         ATG           M
#>     [2]        1      1-59      + |         GAT         GAT           D
#>     [3]        1      1-59      + |         TTA         TTA           L
#>     [4]        1      1-59      + |         TCT         TCT           S
#>     [5]        1      1-59      + |         GCT         GCT           A
#>     ...      ...       ...    ... .         ...         ...         ...
#>   [440]        1   729-761      + |         CCC         CCC           P
#>   [441]        1   729-761      + |         ATC         ATC           I
#>   [442]        1   729-761      + |         CAC         CAC           H
#>   [443]        1   729-761      + |         AGC         AGC           S
#>   [444]        1   729-761      + |         TGA         TGA           *
#>                 aa2      autm    mut_type        cube
#>         <character> <numeric> <character> <character>
#>     [1]           M         1         HHH        ACGT
#>     [2]           D         1         HHH        ACGT
#>     [3]           L         1         HHH        ACGT
#>     [4]           S         1         HHH        ACGT
#>     [5]           A         1         HHH        ACGT
#>     ...         ...       ...         ...         ...
#>   [440]           P         1         HHH        ACGT
#>   [441]           I         1         HHH        ACGT
#>   [442]           H         1         HHH        ACGT
#>   [443]           S         1         HHH        ACGT
#>   [444]           *         1         HHH        ACGT
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths
#> 

## Let's get the element names from object 'aut'
names(aut)
#> [1] "human"   "gorilla"

## Let's assign new names
names(aut) <- c("human_1", "gorilla_1")
names(aut)
#> [1] "human_1"   "gorilla_1"