I'm trying to access Cyanobase through BiomaRt, but failing:
library(biomaRt)
cyanobase <- useMart("cyanobase_1",dataset="Synechocystis")
Checking attributes ... ok
Checking filters ... ok
attributes <- listAttributes(cyanobase) # this shows me there is an attribute called "CDS" for example.
getBM(attribute=("CDS"), mart = cyanobase)
Error in getBM(attribute = ("CDS"), mart = cyanobase) :
Invalid attribute(s): CDS
Please use the function 'listAttributes' to get valid attribute names
I have checked the attributes list and CDS is there but I don't know why the getBM function fails to find it. I tried changing the dataset to another cyanobacteria and it still fails, I've also tried other attributes, but no luck. I also tried the human example using ensemble in the biomaRt manual and this works fine. When I change to cyanobase, it fails with this error. Any ideas? Thanks.
Your code is not reproducible for us because you are missing the difinition of how you get to cyanobase. Please provide a reproducible example.
Thanks, I added the cyanobase line so it can be run. Actually, the problem was simpler than the vector answer you gave below. the description was "CDS" but the name was "coding". R printed out the attributes as a single column due to my screen width, which made it looks like all of the list were the names, but half were descriptions too. It now works with or without the c("... but thanks all the same.
Yep, works and returns a bunch of sequences. And I should have seen that cyanobase was in listMarts(), I tried but overlooked that, sorry.