Description Usage Arguments Details Examples
This function is a wrapper for the vegan function vegedist and hclust. It allows the user to cluster samples using a number of different distance measure and clustering methods. Please see the documentation for vegedist and hclust for a more indepth explanation.
1 | clusterSamples(object, ...)
|
object |
An OTUset or a TAXset object |
... |
Additional arguments. These will depend on if the object is an OTUset or a TAXset object. |
These are other arguments passed to clusterSamples
. For further information on specific arguments, please see abundance
, vegdist
, or hclust
.
taxCol Column of the tax
slot dataframe on which to cluster (unique to TAXset objects). Passed to the abundance
function.
assignmentCol Column of the assignmentData
dataframe used to classify sequences for clustering. This overrides the default of using the OTUs to cluster samples. This is passed to the abundance
function.
collab Specifies a column of the sampleData
dataframe that will provide the sample lables for the cluster analysis. This is passed to the abundance
function.
distmethod The distance method to be used. This value is passed to the vegedist
function. The default is the Bray-Curtis distance.
clustermethod The clustering method to be used. This value is passed to the hclust
function. The default is complete
clustering.
1 2 3 4 5 6 7 8 | ## locate directory with data
dirPath <- system.file("extdata/Sogin_2006", package="OTUbase")
## read in data into OTUset object
soginOTU <- readOTUset(dirPath=dirPath, level="0.03", samplefile="sogin.groups", fastafile="sogin.fasta", otufile="sogin.unique.filter.fn.list", sampleADF="sample_metadata.txt")
## cluster samples
clusterSamples(soginOTU, collab="Site", distmethod="jaccard")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.