Compute the normalized Fst of a matrix of compositional vectors
Source:R/fava_functions.R
fava_norm.RdThis function computes the normalized Fst given the number of rows and the mean abundance of the most abundant category. We employ the normalization employed in the FSTruct package by Morrison, Alcala, and Rosenberg (2020) doi:10.1111/1755-0998.13647 .
Usage
fava_norm(relab_matrix, K = ncol(relab_matrix))Arguments
- relab_matrix
A matrix or data frame with rows containing non-negative entries that sum to 1. Each row represents a sample, each column represents a category, and each entry represents the abundance of that category in the sample. If
relab_matrixcontains any metadata, it must be on the left-hand side of the matrix, the rightKentries of each row must sum to 1, andKmust be specified. Otherwise, all entries of each row must sum to 1.- K
Optional; an integer specifying the number of categories in the data. Default is
K=ncol(relab_matrix).