I am trying to import coding sequences from biomaRt using the following code (simplified example):
cds_seq = getSequence(id = "NM_004974", type = "refseq_mrna", seqType = "coding", mart = ensembl)
...and getting this output...
Error in biomaRt::getBM(attributes = c("hgnc_symbol", "ensembl_gene_id", : Invalid attribute(s): coding Please use the function 'listAttributes' to get valid attribute names
I ran the same code ~2 years ago and it worked fine. I've explored other Attributes via the "listAttributes()" function to see if the attribute name for coding sequence has been updated but I can't see to find anything close.
Note that I'm using an archived version of ensembl and wish to keep it that way so the code output doesn't change if any of the sequences of interest have been updated in newer versions. Not sure if this is relevant. Here's the command I used to import ensembl:
ensembl <- useEnsembl(biomart="ensembl", dataset="hsapiens_gene_ensembl", host="https://feb2014.archive.ensembl.org")
Please advise, and thank you!