getBM                package:biomaRt                R Documentation

_R_e_t_r_i_e_v_e_s _i_n_f_o_r_m_a_t_i_o_n _f_r_o_m _t_h_e _B_i_o_M_a_r_t _d_a_t_a_b_a_s_e

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

     This function is the main biomaRt query function.  Given a set of
     filters and corresponding values, it retrieves the user specified
     attributes from the BioMart database one is connected to

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

     getBM(attributes, filters = "", values = "", mart, curl = NULL, checkFilters = TRUE, verbose = FALSE, uniqueRows = TRUE, output = "data.frame", list.names = NULL, na.value = NA)

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

attributes: Attributes you want to retrieve.  A possible list of
          attributes can be retrieved using the function
          listAttributes.

 filters: Filters (one or more) that should be used in the query.  A
          possible list of filters can be retrieved using the function
          listFilters.

  values: Values of the filter, e.g. vector of affy IDs.  If multiple
          filters are specified then the argument should be a list of
          vectors of which the position of each vector corresponds to
          the position of the filters in the filters argument.

    mart: object of class Mart, created with the useMart function.

    curl: An optional 'CURLHandle' object, that can be used to speed up
          getBM when used in a loop.

checkFilters: Sometimes attributes where a value needs to be specified,
          for example upstream_flank with value 20 for obtaining
          upstream sequence flank regions of length 20bp, are treated
          as filters in BioMarts.  To enable such a query to work, one
          must specify the attribute as a filter and set checkFilters =
          FALSE for the query to work.

 verbose: When using biomaRt in webservice mode and setting verbose to
          TRUE, the XML query to the webservice will be printed.

uniqueRows: If the result of a query contains multiple identical rows,
          setting this argument to TRUE (default) will result in
          deleting the duplicated rows in the query result at the
          server side.

  output: getBM always outputs a data.frame.  Use the getBMlist
          function if a list is required, note that this is not the
          recommended way to query and getBM should be prefered.

list.names: getBM always outputs a data.frame.  Use the getBMlist
          function if a list is required, note that this is not the
          recommended way to query and getBM should be prefered.

na.value: getBM always outputs a data.frame.  Use the getBMlist
          function if a list is required, note that this is not the
          recommended way to query and getBM should be prefered.

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

     Steffen Durinck, <URL: http://www.stat.berkeley.edu/~steffen>

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

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

     }

