Skip to contents

For all sequences in a cluster(s) the MAD score.

Usage

calc_mad(phylota, cid)

Arguments

phylota

Phylota object

cid

Cluster ID(s)

Value

vector

Details

MAD is a measure of the deviation in sequence length of a cluster. Values range from 0 to 1. Clusters with values close to 1 have sequences with similar lengths.

Examples

data("bromeliads")
random_cids <- sample(bromeliads@cids, 10)
(calc_mad(phylota = bromeliads, cid = random_cids))
#>      1061       577       911         7       207       296       551      1279 
#> 0.9604403 0.9975728 0.8632116 0.7303475 0.8608540 0.5875619 0.9845506 0.9688013 
#>        47      1217 
#> 0.6698142 0.9363895