NMF: Nematode Metabolic Footprints (NMF) Calculation

View source: R/nematode_metabolic_footprints.R

NMFR Documentation

Nematode Metabolic Footprints (NMF) Calculation

Description

This function calculates various Nematode Metabolic Footprints (NMF) based on the input data and abundance information. It supports multiple types of NMF calculations and can handle data in different formats (data.frame or matrix).

Usage

NMF(data, abundance, type = "All", ...)

## S3 method for class 'data.frame'
NMF(data, abundance, type = "All", ...)

## S3 method for class 'matrix'
NMF(data, abundance, type = "All", ...)

## Default S3 method:
NMF(data, abundance, type = "all", ...)

Arguments

data

data.frame or matrix. The nematode abundance table where rows represent samples and columns represent nematode genera. Each element indicates the count of a specific nematode genus in the corresponding sample. Row names must be sample names, and column names must be nematode genus names.

abundance

data.frame. A data frame with sample names as row names and a single column containing the total nematode abundance for each sample.

type

Character vector specifying the type(s) of NMF to calculate. All is the default value. Valid options include:

  • "BaMF" - Bacterial Feeders Nematode Metabolic Footprints

  • "FuMF" - Fungal Feeders Nematode Metabolic Footprints

  • "PpMF" - Plant Feeders Nematode Metabolic Footprints

  • "OpMF" - Omnivore/Predator Nematode Metabolic Footprints

  • "Fe" - Enrichment Footprints (CP group <= 2)

  • "Fs" - Structure Footprints (CP group > 2)

  • "TNMF" - Total Nematode Metabolic Footprints

  • "FMF" - Functional Metabolic Footprints (product of Fe and Fs)

  • "All" - Calculate all the above types

...

Additional arguments (currently unused).

Value

A data.frame containing the calculated NMF values for each sample. The columns represent different NMF types, and the rows correspond to samples.

Examples

data <- data.frame(
  Cephalobus = c(10, 20, 30),
  Eucephalobus = c(5, 10, 12),
  Acrobeloides = c(1, 2, 3),
  Caenorhabditis = c(5, 8, 15),
  Aphelenchus = c(5, 13, 11),
  Leptonchus = c(3, 10, 15),
  Pratylenchus = c(9, 2, 15),
  Tylenchus = c(5, 0, 15),
  Mesodorylaimus = c(7, 10, 18),
  Discolaimus = c(1, 10, 25),
  row.names = c("Sample1", "Sample2", "Sample3")
)
abundance <- data.frame(
  Abundance = c(100, 200, 300),
  row.names = c("Sample1", "Sample2", "Sample3")
)
result <- NMF(data, abundance, type = "All")
print(result)

Nematode documentation built on Aug. 21, 2025, 5:58 p.m.

Related to NMF in Nematode...