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))
#>       420       159      1120       723       341       469       804      1219 
#> 0.9425019 0.5869103 0.9611184 0.9780203 0.9362408 0.9352564 0.9531870 0.9653768 
#>       916      1104 
#> 0.9889474 0.8915187