Hi! I want to retrieve the cdna sequences of Glycine max using the getSequence function but when I try I get this error:
Error in martCheck(mart, c("ensembl", "ENSEMBL_MART_ENSEMBL")) : This function only works when used with the ensembl BioMart.This function only works when used with the ENSEMBL_MART_ENSEMBL BioMart.
My code is this:
library(biomaRt) #I define the soybean dataset using the plants_mart ensembl_soybean = useMart(host="plants.ensembl.org", "plants_mart", dataset = "gmax_eg_gene") #As I want all the genes I filter according to the chromosome name, which I obtain it using this instruction chrom = keys(ensembl_soybean, keytype = "chromosome_name") #I get soybean gene and transcripts info Soybean_Seq_Info = getBM(attributes = c("ensembl_gene_id","ensembl_transcript_id", "external_gene_name"), filters = "chromosome_name", values = chrom, mart = ensembl_soybean) #I define an object of GenesIDs from the retrieved data GenesID = unique(Soybean_Seq_Info$ensembl_gene_id) #With the ensembl genes IDs I retrieve I want to get the cdna sequences, for a test I only use the first 10 genes Soybean_Genes = getSequence(id = GenesID[1:10], type="ensembl", seqType = "cdna", mart=ensembl_soybean)
But then I get the error I showed at the beginning, how can I obtain the cdna sequences according to their ensembl gene ID?