get_bm: Get a table based on filters and attributes.

Description Usage Arguments Examples

Description

The main difference to the biomaRt library is here that the filters are given as pairs of variable name and value separated by equal sign. Several filters can be given as a vector of such pairs. For a 'multiselection' filter multiple values can be given as a comma seperated list (see examples.)

Usage

1
get_bm(mart, dataset, filters = NULL, attributes, limit = NULL)

Arguments

mart

mart object

dataset

a dataset

filters

a vector variable=value pairs.

attributes

vector of attributes

limit

a number to limit the amount of returned records

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
library(biomart2)

#Uncomment the following to run locally

host <- "germplasmdb.cip.cgiar.org"

if(interactive()){
  marts <- list_marts(host)
  mart  <- marts$mart$config[[4]] #dspotatov01_config
  dataset<-list_datasets(marts, mart)
  
  x=get_bm(marts, dataset$name[1], , c("acipnumber","cultvrname","female","male"),20)
  x=get_bm(marts, dataset$name[1],"fbiostat=500 Advanced or Improved cultivar", 
           c("acipnumber","cultvrname","female","male"),20)
  x=get_bm(marts, dataset$name[1],c("fbiostat=500 Advanced or Improved cultivar","fcountry=ARG,AUS"), 
           c("acipnumber","cultvrname","female","male"),20)
  x=get_bm(marts, dataset$name[1],c("fbiostat=500 Advanced or Improved cultivar","fcountry=ARG,PER"), 
           c("acipnumber","cultvrname","female","male","country"),200)
  
}

c5sire/biomart2 documentation built on May 13, 2019, 9:57 a.m.