Hi everyone, I know this may be the dumbest of the questions but I still can't understand how to work with human gene ids on biomaRt in R.
I just want a panel of attributes for a vector of ensembl names, which are all under the same filter. I've been reading manuals but I still can't let it work
how is it that:
nmid<-c("ENSSSCG00000011590",'ENSSSCG00000026755',"ENSSSCG00000003794","ENSSSCG00000002730")
mart <- useMart(biomart = "ensembl", dataset = "sscrofa_gene_ensembl")
s<-getBM(attributes = c("ensembl_gene_id", "external_gene_name"),
filters = "ensembl_gene_id",
values = nmid, mart = mart)
works fine while this one, with the same commands (just using the human filters and attributes):
nmid<-c("ENSG00000225630","ENSG00000248527","ENSG00000116251","ENSG00000074800")
mart <- useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl")
s<-getBM(attributes = c("ensembl_gene_id", "external_gene_name"),
filters = "with_ens_hs_gene",
values = nmid, mart = mart)
gives me this output error?
biomaRt error: with_ens_hs_gene 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.
I tried to input values as values= list(nmid, TRUE)
as in How To Use Boolean Filters In Biomart Under R? but nothing changes
where should I put the TRUE, then?
on the latest biomaRt manual they say
"7.2.1 filterType
Boolean filters need a value TRUE or FALSE in biomaRt. Setting the value TRUE will include all information that fulfill the filter requirement. Setting FALSE will exclude the information that fulfills the filter requirement and will return all values that don’t fulfill the filter. "
but I still don't understand which other filter (or where to put the TRUE value) should I specify if I just want to filter by ensembl gene ids and use a list of names listed in values.
And by the way,
s<-getBM(mart = mart,attributes = c("ensembl_gene_id", "external_gene_name"),values= TRUE ,
filters = c( "with_ens_hs_gene"))
works and gives an empty matrix (of course). Where should I put my gene names vector (or list?)
I know, it's that stupid. Anyone can help? many thanks