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))
#>        34       835       526       910       285       336       926       416 
#> 0.8113746 0.9612520 0.9357076 0.9758065 0.7973824 0.9621558 0.9812049 0.9391166 
#>      1161       248 
#> 0.9933403 0.9587850