FiltLoss: Filtering Loss

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/FiltLoss.R

Description

Sequential filtering loss calculation for removing a set of J_j taxa for J= 1, ..., p.

Usage

1
FiltLoss(X, Order = "NP", Order.user = NULL, type = "Cumu", Plot = TRUE)

Arguments

X

OTU table, where taxa are columns and samples are rows of the table. It should be a in data frame format with columns corresponding to taxa names.

Order

Taxa ordering. The default ordering is the number of occurrences (NP) of the taxa in all samples. Other types of order are number of connected taxa and weighted number of connected taxa, denoted as "NC", "NCw" respectively. More details about taxa ordering are described in Smirnova et al. User can also specify their preference order with Order.user.

Order.user

User's taxa ordering. This argument takes a character vector of ordered taxa names.

type

Type of filtering loss calculation.

"Ind"

Individual taxon's filtering loss FL_u(j)

"Cumu"

Cumulative filtering loss FL(J) due to removing a set of taxa J

Plot

Binary TRUE/FALSE value. If TRUE, the function returns plot of sequential differences in filtering loss.

Details

The individual filtering loss due to removing one taxon j is defined as:

FL_u(j)= 1- (||X^T_-j X_-j||_F^2/||X^TX||_F^2),

where X_-j is the matrix X without column corresponding to jth taxon and ||Z||_F is the Frobenious norm of a matrix Z.

The cumulative filtering loss due to removing a set of taxa is defined as:

FL(J)= 1- (||X^T_-J X_-J||_F^2\||X^TX||_F^2),

where X_-J is the n x (p-|J|) dimensional matrix obtained by removing the columns indexed by the set J from the data matrix X.

The cumulative filtering loss is calculated sequentially for each set of taxa J_j, j=1, ..., p.

Value

FL

Filtering loss values.

p_FL

Plot of filtering loss values.

Author(s)

Ekaterina Smirnova

References

Smirnova, E., Huzurbazar, H., Jafari, F. “PERFect: permutation filtration of microbiome data", to be submitted.

See Also

DiffFiltLoss

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(mock2)

# Proportion data matrix
Prop <- mock2$Prop

# Counts data matrix
Counts <- mock2$Counts

#Calculate cumulative filtering loss
FL <- FiltLoss(X=Prop, Order = "NP", type = "Cumu", Plot = TRUE)

#Differences in filtering loss values
FL$FL

#Plot of the differences in filtering loss
FL$p_FL

PERFect documentation built on Nov. 8, 2020, 7:43 p.m.