topgenes                package:made4                R Documentation

_T_o_p_g_e_n_e_s, _r_e_t_u_r_n_s _a _l_i_s_t _o_f _v_a_r_i_a_b_l_e_s _a_t _t_h_e _e_n_d_s (_p_o_s_i_t_i_v_e, _n_e_g_a_t_i_v_e _o_r _b_o_t_h) _o_f _a_n _a_x_i_s

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

     'topgenes' will return a list of the top N variables from the
     positive, negative or both ends of an axis. That is, it returns a
     list of variables that have the maximum and/or minimum values in 
     a vector.

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

     topgenes(x, n = 10, axis = 1, labels = row.names(x), ends = "both", ...)

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

       x: A 'vector', 'matrix' or 'data.frame'. Typically a data frame
          $co or $li  from 'dudi' or  $ls, $li, $co from  'bga'.

       n: An integer indicating the number of variables to be returned.
          Default is 5. 

    axis: An integer indicating the column of x. Default is 1 (first
          axis, of $co or $li file) 

  labels: A vector of row names, for x[,axis]. Default values is
          row.names(x)

    ends: A string, "both", "neg", "pos", indicating whether variable
          label should be return from both, the negative or the
          positive end of an axis.  The default is both.

     ...: further arguments passed to or from other methods 

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

     'topgenes' calls 'genes1d'. 'genes1d' is similar to 'genes', but
     returns an index of genes at the ends of one axis not two axes. 
     Given a $co or $li file it will return that variables at the ends
     of the axis.

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

     Returns a vector or list of vectors.

_N_o_t_e:

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

     AedinCulhane

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

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

     See Also as 'genes'

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

     # Simple example
     a<-rnorm(50)
     order(a)
     topgenes(a, labels=c(1:length(a)), ends="neg")

     # Applied example
     data(khan)
     if (require(ade4, quiet = TRUE)) {
     khan.coa<-dudi.coa(khan$train[1:100,1:10], scannf=FALSE, nf=2)
     }
     ind<-topgenes(khan.coa$li, ends="pos")
     ind.ID<-topgenes(khan.coa$li, ends="pos", labels=khan$gene.labels.imagesID)
     ind.symbol<-topgenes(khan.coa$li, ends="pos", labels=khan$annotation$Symbol)
     Top10.pos<- cbind("Gene Symbol"=ind.symbol, 
           "Clone ID"=ind.ID, "Coordinates"=khan.coa$li[ind,], row.names=c(1:length(ind)))
     Top10.pos

