Skip to contents

The following methods allow the user to access and manipulate multilocus lineages in genclone or snpclone objects.

Usage

mll(x, type = NULL)

nmll(x, type = NULL)

mll(x) <- value

Arguments

x

a genclone or snpclone object.

type

a character specifying "original", "contracted", or "custom" defining they type of mlgs to return. Defaults to what is set in the object.

value

a character specifying which mlg type is visible in the object. See details.

Value

an object of the same type as x.

Details

genclone and snpclone objects have a slot for an internal class of object called MLG. This class allows the storage of flexible mll definitions:

  • "original" - naive mlgs defined by string comparison. This is default.

  • "contracted" - mlgs defined by a genetic distance threshold.

  • "custom" - user-defined MLGs

Author

Zhian N. Kamvar

Examples


data(partial_clone)
pc <- as.genclone(partial_clone)
mll(pc)
#>  [1]  8  9 23 24 22 21 10  3 22 11 24  9 25  4 12  2 14  1  9  9  9 26  7 13 23
#> [26]  3 17 22  6 20 22 12  5 25 13 21 15 13 13 13  2 19 18 13 23 16  1 11 25  4
mll(pc) <- "custom"
mll(pc)
#>  [1] 8  9  23 24 22 21 10 3  22 11 24 9  25 4  12 2  14 1  9  9  9  26 7  13 23
#> [26] 3  17 22 6  20 22 12 5  25 13 21 15 13 13 13 2  19 18 13 23 16 1  11 25 4 
#> 26 Levels: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ... 26
mll.levels(pc) <- LETTERS
mll(pc)
#>  [1] H I W X V U J C V K X I Y D L B N A I I I Z G M W C Q V F T V L E Y M U O M
#> [39] M M B S R M W P A K Y D
#> Levels: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z