We will be offering an R workshop December 18-20, 2019. Learn more.

Difference between revisions of "Heatmap.sim"

From mothur
Jump to: navigation, search
(Options)
(Options)
Line 40: Line 40:
 
===column & name===
 
===column & name===
 
To read in a [[column-formatted distance matrix]] you must provide a filename for [[read.dist#The name option | the name option]]:
 
To read in a [[column-formatted distance matrix]] you must provide a filename for [[read.dist#The name option | the name option]]:
 +
 +
mothur > read.dist(column=96_sq_column_amazon.dist, name=amazon.names)
 +
or
 +
mothur > read.dist(column=96_lt_column_amazon.dist, name=amazon.names)
 +
 +
Again, the column-formatted distance matrix can be square or lower-triangle and mothur will figure it out.
 +
  
 
===calc===
 
===calc===

Revision as of 18:35, 27 January 2010

The heatmap.sim command will generate a heatmap indicating the pairwise similarity between multiple samples using a variety of calculators comparing community membership and structure. As an example, we will use the example from the Sogin data analysis example.


Default settings

Before running the heatmap.sim command shared OTU data must be read into mothur by one of two methods:

mothur > read.otu(list=read.otu(list=sogin.unique.good.filter.fn.list, group=sogin.good.groups)

or

mothur > read.otu(shared=sogin.unique.good.filter.fn.shared)

Then running the following command will generate the heatmaps for the jest and thetayc calculators for each line in the list or shared file

mothur > heatmap.sim()


Options

phylip

To read in a phylip-formatted distance matrix you need to use the phylip option:

mothur > read.dist(phylip=98_sq_phylip_amazon.dist)

or

mothur > read.dist(phylip=98_lt_phylip_amazon.dist)

Whereas dotur required you to indicate whether the matrix was square or lower-triangular, mothur is able to figure this out for you.

Once you execute the command, mothur reads in the matrix and generates a progress bar:

mothur > read.dist(phylip=98_lt_phylip_amazon.dist)
*******************#****#****#****#****#****#****#****#****#****#****#
Reading matrix:    |||||||||||||||||||||||||||||||||||||||||||||||||||
**********************************************************************

At this point the distance matrix is stored into memory for downstream analyses.


column & name

To read in a column-formatted distance matrix you must provide a filename for the name option:

mothur > read.dist(column=96_sq_column_amazon.dist, name=amazon.names)

or

mothur > read.dist(column=96_lt_column_amazon.dist, name=amazon.names)

Again, the column-formatted distance matrix can be square or lower-triangle and mothur will figure it out.


calc

The calc parameter will allow you to use any of the similarity calculators provided within mothur to generate heatmaps comparing the membership or structure of your samples. For example, the following command will generate heatmaps for the classical Sorenson index, Yue & Clayton's theta, and the Morisita-Horn index:

mothur > heatmap.sim(calc=sorclass-thetayc-morisitahorn)


groups

At this point, if you run the following command:

mothur > get.group()

You would have seen that there were 8 groups here: 112R, 115R, 137, 138, 53R, 55R, FS312, and FS396. Say you just wanted to generate a heatmap for the seawater samples without the diffuse flow samples (i.e. FS312 and FS396). You could then use the groups option:

mothur > heatmap.sim(groups=112R-115R-137-138-53R-55R)


label

There may only be a couple of lines in your OTU data that you are interested in generating a heatmap 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 > heatmap.sim(label=unique-0.03-0.05-0.10)