Skip to contents

Several methods are available to be applied on Automorphism-class and AutomorphismList-class objects.

Usage

as.AutomorphismList(x, grs = GRanges(), ...)

# S4 method for GRangesList,GRanges_OR_NULL
as.AutomorphismList(x, grs = GRanges(), ...)

# S4 method for list,GRanges_OR_NULL
as.AutomorphismList(x, grs = GRanges(), ...)

Arguments

x

A DataFrame or a automorphisms class object.

grs

A GRanges-class object.

...

Not in use yet.

Value

The returned an AutomorphismList-class object.

Examples

## Load a dataset
data("brca1_autm", package = "GenomAutomorphism")

## Let's transforming into a list of Automorphisms-class objects
x1 <- as.list(brca1_autm[seq(2)])

## Now, object 'x1' is transformed into a AutomorphismList-class object
as.AutomorphismList(x1)
#> AutomorphismList object of length: 2
#> names(2): human_1.human_2 human_1.gorilla_1 
#> ------- 
#> Automorphism object with 761 ranges and 8 metadata columns:
#>         seqnames    ranges strand |        seq1        seq2         aa1
#>            <Rle> <IRanges>  <Rle> | <character> <character> <character>
#>     [1]        1         1      + |         ATG         ATG           M
#>     [2]        1         2      + |         GAT         GAT           D
#>     [3]        1         3      + |         TTA         TTA           L
#>     [4]        1         4      + |         TCT         TCT           S
#>     [5]        1         5      + |         GCT         GCT           A
#>     ...      ...       ...    ... .         ...         ...         ...
#>   [757]        1       757      + |         CAC         CAC           H
#>   [758]        1       758      + |         AGC         AGC           S
#>   [759]        1       759      + |         CAC         CAC           H
#>   [760]        1       760      + |         TAC         TAC           Y
#>   [761]        1       761      + |         TGA         TGA           *
#>                 aa2    coord1    coord2      autm        cube
#>         <character> <numeric> <numeric> <numeric> <character>
#>     [1]           M        50        50         1        ACGT
#>     [2]           D        11        11         1        ACGT
#>     [3]           L        60        60         1        ACGT
#>     [4]           S        31        31         1        ACGT
#>     [5]           A        27        27         1        ACGT
#>     ...         ...       ...       ...       ...         ...
#>   [757]           H         5         5         1        ACGT
#>   [758]           S        33        33         1        ACGT
#>   [759]           H         5         5         1        ACGT
#>   [760]           Y        13        13         1        ACGT
#>   [761]           *        44        44         1        ACGT
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths
#> ...
#> <1 more DFrame element(s)>
#> Two slots: 'DataList' & 'SeqRanges'
#> ------- 

## Alternatively, let's transform the list 'x1' into a GRangesList-class 
## object.
x1 <- GRangesList(x1)

## Next, object 'x1' is transformed into a AutomorphismList-class object
as.AutomorphismList(x1)
#> AutomorphismList object of length: 2
#> names(2): human_1.human_2 human_1.gorilla_1 
#> ------- 
#> Automorphism object with 761 ranges and 8 metadata columns:
#>         seqnames    ranges strand |        seq1        seq2         aa1
#>            <Rle> <IRanges>  <Rle> | <character> <character> <character>
#>     [1]        1         1      + |         ATG         ATG           M
#>     [2]        1         2      + |         GAT         GAT           D
#>     [3]        1         3      + |         TTA         TTA           L
#>     [4]        1         4      + |         TCT         TCT           S
#>     [5]        1         5      + |         GCT         GCT           A
#>     ...      ...       ...    ... .         ...         ...         ...
#>   [757]        1       757      + |         CAC         CAC           H
#>   [758]        1       758      + |         AGC         AGC           S
#>   [759]        1       759      + |         CAC         CAC           H
#>   [760]        1       760      + |         TAC         TAC           Y
#>   [761]        1       761      + |         TGA         TGA           *
#>                 aa2    coord1    coord2      autm        cube
#>         <character> <numeric> <numeric> <numeric> <character>
#>     [1]           M        50        50         1        ACGT
#>     [2]           D        11        11         1        ACGT
#>     [3]           L        60        60         1        ACGT
#>     [4]           S        31        31         1        ACGT
#>     [5]           A        27        27         1        ACGT
#>     ...         ...       ...       ...       ...         ...
#>   [757]           H         5         5         1        ACGT
#>   [758]           S        33        33         1        ACGT
#>   [759]           H         5         5         1        ACGT
#>   [760]           Y        13        13         1        ACGT
#>   [761]           *        44        44         1        ACGT
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths
#> ...
#> <1 more DFrame element(s)>
#> Two slots: 'DataList' & 'SeqRanges'
#> -------