html3D                 package:made4                 R Documentation

_P_r_o_d_u_c_e _w_e_b _p_a_g_e _w_i_t_h _a _3_D _g_r_a_p_h _t_h_a_t _c_a_n _b_e _v_i_e_w_e_d _u_s_i_n_g _C_h_i_m_e _w_e_b _b_r_o_w_s_e_r _p_l_u_g-_i_n, _a_n_d/_o_r _a
_p_d_b _f_i_l_e _t_h_a_t _c_a_n _b_e _v_i_e_w_e_d _u_s_i_n_g _R_a_s_m_o_l

_D_e_s_c_r_i_p_t_i_o_n:

     '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.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

      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 

_D_e_t_a_i_l_s:

     Produces a html file, of a 3D graph which can be rotated using the
     FREEWARE chime (win, MacOS). Chime  can be downloaded from  <URL:
     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 <URL:
     http://bioinf.ucd.ie/research/BGA/supplement.html>

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

_V_a_l_u_e:

     '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.

_N_o_t_e:

     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   <URL:
     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.

_A_u_t_h_o_r(_s):

     Aedin Culhane

_S_e_e _A_l_s_o:

_E_x_a_m_p_l_e_s:

     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)

