Question: how to set boolean filter
0
20 months ago by
shenwei13760 wrote:

Hi every,

I was trying to extract the gene informations from a list of swissprot ID (proteins: Q3T052, F1N3Q7....). Here is the code I used:

library("biomaRt")
proteinID<-dataset\$Accession Number #extract the protein ID from the dataset
ensembl=useMart("ensembl", dataset="btaurus_gene_ensembl")
ensemblIDConversion<-getBM(attributes = c('uniprotswissprot','external_gene_name'),
filters = 'with_uniprotswissprot',
values = proteinID,
mart=ensembl)

And here is the error message I received:

Error in FUN(X[[i]], ...) : biomaRt error:
with_uniprotswissprot is a boolean filter and needs a corresponding logical value of TRUE or FALSE to indicate if the query should retrieve all data that fulfill the boolean or alternatively that all data that not fulfill the requirement should be retrieved.

Wondering if anybody help with this boolean filter value setting. Thank you very much !

modified 20 months ago • written 20 months ago by shenwei13760
Answer: how to set boolean filter
0
20 months ago by
shenwei13760 wrote:

problem solved!!!

use "uniprotswissprot" instead of "with_uniprotswissprot" will skip this issue. However, biomart works every inefficiently in term of converting the IDs. This is the 2nd time I found this issue. Only less than half my protein list was get converted. Instead, "AnnotationDbi" package works way more better than "biomart". I never missed any of my gene in the list. I am not sure if this because I only tried twice, while if anybody want to do simple ID conversion, "AnnotationDbi" is really recommended!!!