Hello,
I am trying to perform functional enrichment with clusterProfiler and BioMart but I am having the following error:
**Starting BioMart query ...
Error in biomaRt::getBM(attributes = as.character(c(filters, attributes)), :
Invalid attribute(s): SYMBOL, SYMBOL
Please use the function 'listAttributes' to get valid attribute names**
I understand that it is for SYMBOL, but I don't know which one is correct.
My identifiers are like this: Zm00001eb002010
Could you help me?
My code:
# Set working directory
setwd("C:/todos/Diferenciales_lgn")
list.files()
# Read the DESeq2 table
diff_genes <- read_delim(file = "UP_lgn_vs_WT_filtrado_estricto.csv", delim = ",")
# Assign names to the first column
colnames(diff_genes)[1] <- "genes"
# Create a new table with the columns of interest
diff_genes <- diff_genes[, c("genes", "log2FoldChange")]
# Save the new table to a file
write.table(diff_genes, file = "diff_genes_up_maiz.tsv", sep = "\t", row.names = FALSE, quote = FALSE)
# We retrieved the zmays_eg_gene dataset from genome annotation version of the plant_mart mart.
biomartr::organismBM(organism = "zea mays")
#We retrieve attributes from zmays_eg_gene for Zea mays
zea_attributes <- biomartr::organismAttributes("zea mays") %>%
filter(dataset == "zmays_eg_gene")
# We obtain the correspondence between the Zea mays gene identifier and the NCBI Entrez gene identifier.
attributes_to_retrieve <- c("SYMBOL", "entrezgene_id")
result_BM <- biomartr::biomart(
genes = diff_genes$genes,
mart = "plants_mart",
dataset = "zmays_eg_gene",
attributes = attributes_to_retrieve,
filters = "SYMBOL"
)
head(result_BM)
listAttributes (mart, zmays)
You're using biomartr, not biomart. Please correct your question title and tag
cross-posted: https://support.bioconductor.org/p/9156018/#9156021