Entering edit mode
3.8 years ago
andyincolorado
•
0
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!
If
any( is.na( values ) )
returns TRUE, you've got anNA
in your list ofhgnc_symbol
s, which you'll need to remove.