cleanBM               package:biomaRt               R Documentation

_C_l_e_a_r _g_e_t_B_M _r_e_s_u_l_t _f_r_o_m _d_u_p_l_i_c_a_t_e_s

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

     This function removes duplicated results retrieved by getBM.  Two
     sets of IDs are required in the query result to be able to use
     this function.  The query id that was used in  the getBM function
     as filter and was also used as attribute to retrieve e.g.
     affy_hg_u95av2 and a result id e.g. GO identifiers that were
     retrieved.

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

     cleanBM(bmresult, query_id_col=1, result_id_col=2)

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

bmresult: A data.frame that was returned by the getBM function

query_id_col: Index of column of the query id in the result

result_id_col: Index of column of the result id in the result

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

     Steffen Durinck, <URL: http://www.esat.kuleuven.ac.be/~sdurinck>

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

     if(interactive()){
     mart <- useMart("ensembl")
     datasets <- listDatasets(mart)
     mart<-useDataset("hsapiens_gene_ensembl",mart)
     bm=getBM(attributes=c("affy_hg_u95av2","go","hgnc_symbol","chromosome_name","band"),filters="affy_hg_u95av2",values=c("1939_at","1000_at","1454_at"), mart=mart)

     writeLines("## before duplicate removal ##")

     print(bm)

     writeLines("## After duplicate removal ##")
     print(cleanBM(bm,1,2))
     }

