- A first step is to check which BioMart web services are available. The function listMarts will display all available BioMart web services.
- The useMart function can now be used to connect to a specified BioMart database, this must be a valid name given by listMarts.
- BioMart databases can contain several datasets, for Ensembl every species is a different dataset. In a next step, the datasets are available in the selected BioMart database can be visualised by using the function listDatasets.
- To select a dataset we can up date the Mart object using the function useDataset. Or alternatively if the dataset one wants to use is known in advance, one can select a BioMart database and dataset in one step by useMart("database",dataset="dataset").
- The getBM function is the main query function in biomaRt. For some frequently used queries to Ensembl, wrapper functions are available: getGene and getSequence. biomaRt has four main arguments:
- attributes: is a vector of attributes that one wants to retrieve (= the output of the query).
- filters: is a vector of filters that one wil use as input to the query.
- values: a vector of values for the filters. In case multple filters are in use, the values argument requires a list of values where each position in the list corresponds to the position of the filters in the filters argument.
- mart: is and object of class Mart, which is created by the useMart function.
=============================================================
No comments:
Post a Comment