html3D {made4}R Documentation

Produce web page with a 3D graph that can be viewed using Chime web browser plug-in, and/or a pdb file that can be viewed using Rasmol

Description

html3D produces a pdb file that can be viewed using the freeware protein structure viewer Rasmol and a html web page with a 3D graph that can be rotated and manipulated in a web browser that supports the chime web browser plug-in.

Usage

html3D(df, classvec = NULL, writepdb = FALSE, filenamebase = "output", 
       writehtml = FALSE, title = NULL, scaled=TRUE,xyz.axes=c(1:3) ...)

Arguments

df A matrix or data.frame containing the x,y,z coordinates. Typically the output from bga such as the $ls or $co files, or other xyz coordinates ($li or $co) produced by PCA, COA or other dudi
classvec factor or vector which describes classes in the df. Default is NULL. If specified each group will be coloured in contrasting colours
writepdb Logical. The default is FALSE. If TRUE a file will be saved which can be read into Rasmol.
writehtml Logical. The default is FALSE, If TRUE a web html file will be saved which can be viewed in any web browser than supports chime.
filenamebase Character. The basename of the html or pdb file(s) to be saved. The default is "output", which will save files output.pdb, output.html, if writepdb or writehtml are TRUE respectively.
title Character, the title (header) of the web page saved if writehtml is TRUE. The default is NULL.
scaled Logical indicating whether the data should be scaled for best fit. The default is TRUE
xyz.axes
... further arguments passed to or from other methods

Details

Produces a html file, of a 3D graph which can be rotated using the FREEWARE chime (win, MacOS). Chime can be downloaded from http://www.mdlchime.com/.

html3D will colour samples by classvec if given one, and will produce chime script to highlight groups, spin on/off, and include button for restore for example see http://bioinf.ucd.ie/research/BGA/supplement.html

html3d calls chime3D to produce the html web page with a 3D graph.

Value

html3D produces the pdb output file which can be read in Rasmol or other molecular structure viewers. html3D produces a html file with a 3D graph that can be rotated and manipulated in a web browser that supports the chime web browser plug-in.

Note

Note chime is only available on windows or Mac OS currently. Using the chime plug-in on Linux is slightly complicated but is available if the CrossOver Plug-in is installed. Instructions on installing this and chime on Linux are available at http://mirrors.rcsb.org/SMS/STINGm/help/chime_linux.html

If you wish to view a 3D graph in Rasmol, you will need to execute a Rasmol script similar to

load pdbfilename.pdb; 
set axes on; select off; 
connect;set ambient 40; 
rotate x 180; select *;  
spacefill 40

html3D calls chime3D to produce the html file from the pdb file.

The author would like to thank Willie Taylor, The National Institute for Medical Research, London, UK for help with the awk command on which this function is based.

Author(s)

Aedin Culhane

See Also

Examples

data(khan)
if (require(ade4, quiet = TRUE)) {
khan.bga<-bga(khan$train[1:500,], khan$train.classes)
}

out.3D <-html3D(khan.bga$bet$ls, khan.bga$fac, writepdb=TRUE, 
filenamebase ="Khan" , writehtml=TRUE)

browseURL(paste("file://", file.path(paste(getwd(),"/khan.html", 
sep="")), sep=""))


[Package made4 version 0.6 Index]