We will be offering mothur and R workshops throughout 2019. Learn more.


From mothur
Revision as of 14:16, 17 November 2009 by Westcott (Talk | contribs) (label & line)

Jump to: navigation, search

The venn command generates a Venn diagram from data provided in a *.shared file. The command can generate diagrams (as SVG files) to compare the richness shared among 2, 3, or 4 groups. The SVG file that can be further modified in a program like Gimp or Adobe Illustrator to scale the areas to be proportional to the richness represented by the region. Options are available to measure richness based on the observed richness or the estimated richness using the chao and sharedchao calculators. This tutorial uses the data files in AbRecovery.zip.

Default settings

To execute venn(), shared data must be stored in memory by either of these approaches:

mothur > read.dist(phylip=abrecovery.dist, cutoff=0.10)
mothur > cluster()  
mothur > read.otu(list=abrecovery.fn.list, group=abrecovery.groups)
mothur > venn()


mothur > read.otu(shared=abrecovery.fn.shared)
mothur > venn()

This will generate 12 SVG files - a venn diagram for each OTU definition between unique and 0.10 (because of the cutoff in the read.dist command). For example, the venn diagram that is generated for OTUs defined at the 0.10 level would be abrecovery.fn.0.10.venn.sobs.svg.



By default the venn() command will calculate the shared richness based on the observed OTUs. Alternatively, it is possible to use the chao and sharedchao or the ace and sharedace calculators to predict the richness of each region. This option can be implemented by the following command:

mothur > venn(calc=sharedchao)

Alternatively the observed richness can be used with the command:

mothur > venn(calc=sharedsobs)

Both can be run simultaneously by the command:

mothur > venn(calc=sharedsobs-sharedchao)

label & line

There may only be a couple of lines in your OTU data that you are interested in generating a venn diagram for. There are two options. You could: (i) manually delete the lines you aren't interested in from you list or shared file; (ii) or use the label option. If you only want to read in the data for the lines labeled unique, 0.03, 0.05 and 0.10 you would enter:

mothur > venn(label=unique-0.03-0.05-0.10)


At this point, if you run the following command:

mothur > get.group()

You would have seen that there were 3 groups here: A, B, and C. If you just want the venn diagrams between groups A and B, A and C, or B and C enter the following:

mothur > venn(groups=A-B)
mothur > venn(groups=A-C)
mothur > venn(groups=B-C)

Note that if you run these commands, the SVG files will have the same name and will be written over for each execution. You will need to rename the file between executions.