This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Finding subcellular localization of genes using biomaRt - filter not found

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

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

0 answers

No answers yet.

Log in to answer this question.