View source: R/overallSimilarity.R
transformToVector | R Documentation |
Given a vector of genes that represents a genome, transform it into a simple sugar degradation enzyme profile as a vector of 0 and 1. A 0 indicates the gene represented by element name is absent in the genome, and a 1 indicates its presence.
transformToVector(geneVec, allGenes)
geneVec |
A vector of gene names, represented by 3-5 characters, such as "eno", this vector includes all simple sugar degradation enzymes present in a microbial genome of interest. |
allGenes |
A vector containing all (unique) sugar degradation genes of interest. |
A named vector of 0 and 1, indicating whether each sugar degradation enzyme, represented by the element's name, is presetn in the geneVec.
## Not run: ED <- microCompet::EnzymeDistribution allGenes <- ED$Gene geneVec <- ED$Gene[4:25] genomeVec <- transformToVector(geneVec, allGenes) genomeVec ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.