html3D: Produce web page with a 3D graph that can be viewed using...

Description Usage Arguments Details Value Note Author(s) Examples

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

1
2
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

vector indicating which axes to use for x, y and z axes. By default, the first 3 columns of df.

...

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

1
2
3
4
5
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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(khan)
if (require(ade4, quiet = TRUE)) {
khan.bga<-bga(khan$train, khan$train.classes)
}

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

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

## End(Not run)

SamGG/made4 documentation built on Sept. 29, 2020, 1:33 p.m.