Finding subcellular localization of genes using biomaRt - filter not found
0
0
Entering edit mode
3.8 years ago

I'm trying to find the subcellular localizations of a list of genes using biomaRt but I keep getting the error: Query ERROR: caught BioMart::Exception::Usage: Filter NA NOT FOUND.

My code is:

library("biomaRt")
ensembl <- useMart("ensembl")
ensembl <- useDataset("hsapiens_gene_ensembl", mart=ensembl)

#filters
filters <- c("hgnc_symbol")
#genes you want to query
values <- as.list(gene_list_biostar)

# select attributes to return
attributes <- c("hgnc_id", "namespace_1003", "name_1006", "go_id", "go_linkage_type", "definition_1006")
# perform biomart query
biomart_result_primary <- getBM(attributes=attributes, filters=filters, values=values, mart=ensembl)

Am I using a filter that doesn't exist? listFilters(ensembl) showed hngc_symbol to be a valid filter. If I change the filter to uniprot_gn_symbol, I still get the same error. If I remove the filter completely (which I tried), I get a timeout error after a long wait time. Advice on this filter error is appreciated!

R biomaRt • 1.6k views
ADD COMMENT
2
Entering edit mode

If any( is.na( values ) ) returns TRUE, you've got an NA in your list of hgnc_symbols, which you'll need to remove.

ADD REPLY

Login before adding your answer.

Traffic: 2153 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6