0
library(biomaRt)

biomart <- "plants_mart"
dataset <- "athaliana_eg_gene"

mart <- useMart(biomart = biomart, dataset = dataset)

protein_ids <- c("AT5G67220.1", "AT1G07110.1", "AT5G39570.1")

protein_sequences <- getSequence(id = protein_ids, type = "ensembl_gene_id", seqType = "protein", mart    = mart)

protein_data <- data.frame(Protein_ID = protein_ids, Protein_Sequence = protein_sequences, stringsAsFactors = FALSE)

output_file <- "protein_data.xlsx"

write.xlsx(protein_data, output_file)


> listMarts(host="https://plants.ensembl.org")
        biomart                      version
1       plants_mart      Ensembl Plants Genes 57
2 plants_variations Ensembl Plants Variations 57

I used the following listmarts to check the biomart and what I have used is correct, however, I am keep getting the below error message.

Error in .useMart(biomart, dataset, host = host, path = path, port = port, : Incorrect BioMart name, use the listMarts function to see which BioMart databases are available

0 Answers0