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))
#>       375       274       417       359       550       627       121       549 
#> 0.9544271 0.9740745 0.9697819 0.9400998 1.0000000 0.9924852 0.8616764 0.9974634 
#>       382       701 
#> 0.9883227 0.9757424