taxFun: Run taxFun

View source: R/runTaxFun.R

taxFunR Documentation

Run taxFun

Description

Run taxFun

Usage

taxFun(fnName, inputTaxaFile, rank, ranks, refspec, supertaxon, 
outgroup, outputFile)

Arguments

fnName

Function name, either "id2name", "name2id", "getRank", "getRanks", "sortTaxonomyMatrix", "createTree", "createTreeSlow", "getRepresentative", "getClade", "getLCA" or "getAllTaxonomyRanks"

inputTaxaFile

Location of input taxa file (taxon names or/and ids)

rank

A selected taonomy rank (REQUIRED for some functions)

ranks

List of taxonomy ranks of interest (OPTIONAL)

refspec

Reference species (REQUIRED for some functions)

supertaxon

Supertaxon name or ID (REQUIRED for some functions)

outgroup

Output species used for rooting the tree (OPTIONAL for tree functions)

outputFile

Location of output file. If not given, it will be saved as <inputFile.out>

Value

Output file

Examples

inputTaxonIDs <- system.file(
    "extdata", "ids.txt", package = "taxFun", mustWork = TRUE
)
inputTaxonNames <- system.file(
    "extdata", "names.txt", package = "taxFun", mustWork = TRUE
)
taxFun("id2name", inputTaxonIDs)
taxFun("getRank", inputTaxonNames)
taxFun("getRanks", inputTaxonNames, ranks = c("class", "phylum"))
taxFun("createTree", inputTaxonNames, outgroup = 9606)
taxFun("sortTaxonomyMatrix", inputTaxonIDs, refspec = "Homo sapiens")
taxFun("getRepresentative", inputTaxonIDs, rank = "phylum")
taxFun("getClade", inputTaxonIDs, supertaxon = "metazoa")
taxFun("getLCA", inputTaxonNames)

trvinh/taxFun documentation built on July 3, 2023, 8:55 p.m.