listFilters: List or search the filters available in the selected dataset

Description Usage Arguments Author(s) Examples

View source: R/biomaRt.R

Description

Filters are what we use as inputs for a biomaRt query. For example, if we want to retrieve all entrezgene identifiers on chromosome X, chromosome will be the filter, with corresponding value X.

Usage

1
2
    listFilters(mart, what = c("name", "description"))
    searchFilters(mart, pattern)

Arguments

mart

object of class Mart created using the useMart function

what

character vector indicating what information to display about the available filters. Valid values are name, description, options, fullDescription, filters, type, operation, filters8, filters9.

pattern

Character vector defining the regular expression (regex) to be used for the search. If left blank the default is to use ".*" which will match everything.

Author(s)

Steffen Durinck, Mike Smith

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if(interactive()){

    ## list the available Ensembl marts and use Ensembl Genes
    listEnsembl()
    ensembl <- useEnsembl(biomart = "ensembl", dataset = 'hsapiens_gene_ensembl')

    ## list the available datasets in this Mart
    listFilters(mart = ensembl)

    ## the list of filters is long and not easy to read
    ## we can search for a term of interest to reduce this e.g. 'gene'
    searchFilters(mart = ensembl, pattern = "gene")
    
    ## search the available filters to find entries containing 'entrez' or 'hgnc'
    searchFilters(mart = ensembl, 'entrez|hgnc') 
}

biomaRt documentation built on Nov. 1, 2018, 3:34 a.m.