mergeOtu {ebimetagenomics}R Documentation

Merges two OTU count data data frames to produce a combined OTU count data data frame

Description

This function merges two or more OTU count data data frames, such as returned by getRunOtu. The merged OTU data is returned as a data frame. The ordering of the two data frames to be merged should not be significant. The operation of merging should also be associative.

Usage

mergeOtu(...)

Arguments

...

A sequence of OTU data frames to be merged.

Value

An R data frame containing OTU count data. The first column is the OTU ID, the second is the count, and the third contains a taxonomic classification.

See Also

getSampleOtu, getRunOtu, projectRuns

Examples


ps=getProjectSummary("SRP047083")
samp=projectSamples(ps)
runs=runsBySample(ps,samp[2])

# merge two:
otu1=getRunOtu(runs[1])
otu2=getRunOtu(runs[2])
mergeOtu(otu1,otu2)

# merge many:
otuList=lapply(as.list(runs[1:5]),function(rid){getRunOtu(rid)})
Reduce(mergeOtu,otuList)

[Package ebimetagenomics version 0.7 Index]