competeMicrobiota: Visualize A Microbe's Competition For Simple Sugars With...

View source: R/competeMicrobiota.R

competeMicrobiotaR Documentation

Visualize A Microbe's Competition For Simple Sugars With Other Microbiota Members

Description

This fuction visualizes the competition of one microbe of interest (specified by genomeName and geneVec) with other microbiota members (in ED data.frame) based on the simple sugar degradation pathways, considering their pathway existence and completeness.

Usage

competeMicrobiota(
  genomeName,
  geneVec,
  ER,
  ED,
  firstMicrobe,
  lastMicrobe = ncol(ED)
)

Arguments

genomeName

Steing represents the name of a genome/microbe.

geneVec

A list of sugar degradation gene names in microbe genomeName

ER

A data.frame that describing enzymatic reactions with at least 3 factors, "Gene" for gene name encoding an enzyme, "Reaction.EC" for categorization of one enzymatic reaction, and "Sugar" for the degradation pathway this enzyme involves in. Column names are case sensitive, see ?EnzymaticReactions for example.

ED

An enzyme distribution data.frame that represents sugar degradation enzyme profiles in genomes that genomeName microbe is to be compared with. This data.frame contains a column "Gene" (case sensitive), and at least one genome profile from column index firstMicrobe to column index lastMicrobe CONTINUOUSLY. Genome profiles use 1 to indicate the presence of a gene, and 0 for absence. T/TRUE and F/FALSE can be coerced into 1 and 0, but not recommended. See ?EnzymeDistribution for example.

firstMicrobe

Column index of first microbe genome in dataset ED

lastMicrobe

Column index of last microbe genome in dataset ED. Default set to the last column of ED.

Details

The output result is a radar chart, and the score one microbe achieves for one sugar degradation pathway is calculated as (number of steps can be catalyzed) over (total steps required to fully degrade one simple sugar).

Value

A radar chart for comparing completeness of sugar degradation pathways for microbe of interest and microbiota members.

Examples

 ## Not run: 
 library("microCompet")
 genomeName <- "L. johnsonii"
 ED <- microCompet::EnzymeDistribution
 full_enzyme_geneVec <- ED$Gene
 genomeFilePath <- system.file("extdata",
                               "Lactobacillus_johnsonii.gb",
                               package = "microCompet",
                               mustWork = TRUE)
 carboGenes <- extractCarboGenes(genomeFilePath, fullEnzymeGeneVec)
 firstMicrobe <- 5
 lastMicrobe <- 13
 ER <- microCompet::EnzymaticReactions
 competitions <- competeMicrobiota(genomeName, carboGenes, ER,
                                   ED, firstMicrobe, lastMicrobe)
 competitions
 
## End(Not run)


MolyWang/microCompet documentation built on Feb. 26, 2023, 9:29 p.m.