dbtrees             package:apTreeshape             R Documentation

_D_o_w_n_l_o_a_d _t_r_e_e_s _f_r_o_m _i_n_t_e_r_n_e_t _d_a_t_a_b_a_s_e_s.

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

     'dbtrees' connects to the internet phylogenetic tree database
     TreeBASE or Pandit, downloads trees with specified ID numbers, and
     converts them into either the '"treeshape"' or the '"phylo"'
     format. Can solve polytomies.

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

     dbtrees(db, tree, class="phylo", type="s", quiet=FALSE, 
           model=NULL, p=0.3)

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

      db: A character string equals to the name of the database to
          connect: '"pandit"' or '"treebase"'.

    tree: A vector or list of ID corresponding to the trees to be
          downloaded.

   class: The class of the downloaded objects: must be one of '"phylo"'
          (default) or '"treebase"'.

    type: The type of the tree: an object of class '"character"' equals
          to either '"s"' (default) or '"f"' (seed or full). This
          option is only used for the Pandit database.

   quiet: A 'logical' value. If 'TRUE', nothing will be printed on
          screen. If 'FALSE' (default), informations about the status
          of the download are displayed.

   model: Argument to be passed to 'as.treshape.phylo'. One of 'NULL'
          (default), '"pda"', '"biased"', '"aldous"' or '"yule"'

       p: Argument to be passed to 'as.treshape.phylo' (only for the
          biased speciation model).

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

     The aim of this function is to provide a simple method to retrieve
     trees and to put them into the '"treeshape"' or '"phylo"' format,
     in order to be able to apply the methods of 'ape' or
     'apTreeshape'. 
      This function connects to internet database and download trees
     using their internal reference number. There is currently no
     option to retrieve trees from names. See references for more
     details about the Pandit and TreeBASE databases and the
     description of their data. 
      This function can solve trees with polytomies using simulation
     methods (see 'as.treeshape' for more details about the polytomy
     resolution).

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

     An object of class '"treeshape"' or class '"phylo"' if only one
     tree is requested, a list of trees otherwise.

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

     Michael Blum <michael.blum@imag.fr>
      Nicolas Bortolussi <nicolas.bortolussi@imag.fr> 
      Eric Durand <eric.durand@imag.f>
      Olivier Franois <olivier.francois@imag.fr>

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.ebi.ac.uk/goldman-srv/pandit/> for more details
     about the Pandit database.

     <URL: http://www.treebase.org/treebase/> for informations about
     the TreeBASE database.

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

     'as.treeshape' for more details about the convertion of non-binary
     trees.

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

     if(!inherits(try(open(url("http://www.google.com")), silent = TRUE),
        "try-error")) {
     ## Sackin's index of a tree within TreeBASE.
     sackin(dbtrees(db="treebase", tree=715, class="treeshape"))

     ## Colless' index of a tree within Pandit
     colless(dbtrees(db="pandit", tree=1, class="treeshape"))
       
     ## Collects a tree without printings: 
     plot(dbtrees(db="pandit", tree=709, class="treeshape", quiet=TRUE))

     ## Collects a list of trees :
     trees=dbtrees(db="pandit", tree=1:5, class="treeshape")
     summary(trees[[2]])
       
     ## Collects a non-binary tree
     phy=dbtrees(db="pandit", tree=1, class="phylo")
     plot(phy)
     tree=dbtrees(db="treebase", tree=741, class="treeshape")
     tree=dbtrees(db="treebase", tree=741, class="treeshape", model="yule")
     plot(tree)
     }

