cscs: Calculate CSCS distance

Description Usage Arguments Details Value References Examples

View source: R/cscs.R

Description

Calculate CSCS distance

Usage

1
2
cscs(features, css, dissimilarity = T, cosine_threshold = 0.6,
  weighted = T, normalize = T)

Arguments

features

Matrix of feature intensities in each sample (pxn)

css

Square matrix of cosine similarities of features (pxp)

dissimilarity

Output dissimilarity matrix

cosine_threshold

Only include features below this threshold

weighted

Weight features by intensity (TRUE) or absence/presence (FALSE)

Details

The value of cosine_threshold is 0.6 in Sedio et al. but for certain applications other values might be better.

Value

A pxp matrix of CSCS distances

References

Sedio et al, 2016

Examples

1
2
3
4
5
6
#Get arbitrary GNPS project
gnps <- prepare_GNPS("0310e20491314ddbbf12d56b592548b4")
dist <- cscs(gnps$features, gnps$css)

#GlobalEuphorbia data
cscs(GEfeatures, GEcss)

askerdb/rCSCS documentation built on April 7, 2020, 10:51 a.m.