Hi,
I have a list of Gene Ontology IDs, and I would like to extract the genes (ensembl IDs) that belong to these GO terms. To do this I would like to use the biomaRt package. However, I cannot get it to work; i get an error indicating an invalid filter is used. This also happens when running an example from the vignette.... Apparently 'go_id'
nor 'go'
are good names for the GO filter anymore....? I would appreciate some assistance with this.
Thanks, Guido
library("biomaRt") ensembl = useMart("ensembl",dataset="hsapiens_gene_ensembl") # example from vignette: https://www.bioconductor.org/packages/release/bioc/vignettes/biomaRt/inst/doc/biomaRt.html#retrieve-all-hugo-gene-symbols-of-genes-that-are-located-on-chromosomes-1720-or-y-and-are-associated-with-specific-go-terms go=c("GO:0051330","GO:0000080","GO:0000114","GO:0000082") chrom=c(17,20,"Y") getBM(attributes= "hgnc_symbol", filters=c("go_id","chromosome_name"), values=list(go, chrom), mart=ensembl) Error in getBM(attributes = "hgnc_symbol", filters = c("go_id", "chromosome_name"), : Invalid filters(s): go_id Please use the function 'listFilters' to get valid filter names # listFilters finds this gene ontology idetifier, but doesn't work either...: > listFilters(ensembl)[82,] name description 82 go GO ID(s) [e.g. GO:0000002]
> sessionInfo() R version 3.5.1 Patched (2018-08-13 r75130) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 Matrix products: default locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] biomaRt_2.36.1 loaded via a namespace (and not attached): [1] Rcpp_0.12.18 AnnotationDbi_1.42.1 magrittr_1.5 BiocGenerics_0.26.0 [5] hms_0.4.2 progress_1.2.0 IRanges_2.14.12 bit_1.1-14 [9] R6_2.2.2 rlang_0.2.2 httr_1.3.1 stringr_1.3.1 [13] blob_1.1.1 tools_3.5.1 parallel_3.5.1 Biobase_2.40.0 [17] DBI_1.0.0 bit64_0.9-7 digest_0.6.17 assertthat_0.2.0 [21] crayon_1.3.4 S4Vectors_0.18.3 bitops_1.0-6 RCurl_1.95-4.11 [25] memoise_1.1.0 RSQLite_2.1.1 stringi_1.2.4 compiler_3.5.1 [29] prettyunits_1.0.2 stats4_3.5.1 XML_3.98-1.16 pkgconfig_2.0.2 >
In fairness to the OP the example does state it comes from the biomaRt vignette & fails in the same manner. I've updated the devel vignette with the correct filter name now.
Thanks for the pointers; got it working.