Learn R Programming

longreadvqs (version 0.1.4)

otucompare: Comparing operational taxonomic unit (OTU) by k-means clustering between samples

Description

Pools noise-minimized down-sampled read samples and compares their diversity based on operational taxonomic unit (OTU) classified by k-means clustering of single nucleotide variant (SNV) distance. This function is a subset of "vqscompare" function.

Usage

otucompare(samplelist = list(BC1, BC2, BC3), kmeans.n = 20)

Value

Comparative table of OTU diversity metrics between listed samples calculated from consensus sequence of each OTU by QSutils package

Arguments

samplelist

List of samples, i.e., name of resulting objects from "vqsassess" or "vqscustompct" functions, for example list(BC1, BC2, BC3).

kmeans.n

Number of operational taxonomic units (OTUs) needed from k-means clustering on multidimensional scale (MDS) of all samples' pairwise genetic distance.

Examples

Run this code
## Locate input FASTA files-----------------------------------------------------------------------
sample1filepath <- system.file("extdata", "s1.fasta", package = "longreadvqs")
sample2filepath <- system.file("extdata", "s2.fasta", package = "longreadvqs")

## Prepare data for viral quasispecies comparison between two samples-----------------------------
sample1 <- vqsassess(sample1filepath, pct = 10, samsize = 20, label = "sample1")
sample2 <- vqsassess(sample2filepath, pct = 10, samsize = 20, label = "sample2")

## Compare OTU (4 clusters) diversity metrics between two samples---------------------------------
otucompare(samplelist = list(sample1, sample2), kmeans.n = 4)

Run the code above in your browser using DataLab