get_vennlist: generate a vennlist for VennDiagram

get_vennlistR Documentation

generate a vennlist for VennDiagram

Description

generate a vennlist for VennDiagram

Usage

get_vennlist(obj, ...)

## S4 method for signature 'phyloseq'
get_vennlist(obj, factorNames, ...)

## S4 method for signature 'data.frame'
get_vennlist(obj, sampleinfo = NULL, factorNames = NULL, ...)

Arguments

obj

phyloseq, phyloseq class or data.frame a dataframe contained one character column and the others are numeric. or all columns should be numeric if sampleinfo isn't NULL.

...

additional parameters

factorNames

character, a column name of sampleinfo, when sampleinfo isn't NULL, factorNames shouldn't be NULL, default is NULL, when the input is phyloseq, the factorNames should be provided.

sampleinfo

dataframe; a sample information, default is NULL.

Value

return a list for VennDiagram.

Author(s)

Shuangbin Xu

Examples

## Not run: 
data(test_otu_data)
test_otu_data %<>% as.phyloseq()
vennlist <- get_vennlist(test_otu_data, 
                 factorNames="group")
vennlist
library(VennDiagram)
venn.diagram(vennlist, height=5, 
             width=5, filename = "./test_venn.pdf", 
             alpha = 0.85, fontfamily = "serif", 
             fontface = "bold",cex = 1.2, 
             cat.cex = 1.2, cat.default.pos = "outer",
             cat.dist = c(0.22,0.22,0.12,0.12), 
             margin = 0.1, lwd = 3, 
             lty ='dotted', 
             imagetype = "pdf")

## End(Not run)

xiangpin/MicrobitaProcess documentation built on Nov. 6, 2024, 1:15 a.m.