Yay! I got it. it was labelled as "start_position" & "end_position" in listAttributes(ensembl102). Thank you!
• 0 views
•
link
I have a list of genes which i want to get their cordinates and ref-seq ids but "start" & "end" attributes in biomart keeps throwing error. could you please take a look?
library(biomart)
#define which database to use
ensembl102 <- useEnsembl(biomart = 'genes',
dataset = 'mmusculus_gene_ensembl',
version = 102)
#define gene ids to query
ids <- c("ENSMUSG00000047180", "ENSMUSG00000025964", "ENSMUSG00000012187", "ENSMUSG00000055980", "ENSMUSG00000034220",
"ENSMUSG00000026463","ENSMUSG00000026688", "ENSMUSG00000015090", "ENSMUSG00000026879", "ENSMUSG00000027254")
#run annotations
gene_annotations <- getBM(filters = "ensembl_gene_id",
attributes = c("chromosome_name", "start", "end", "mgi_symbol"),
values = ids,
mart = ensembl102)
Error in getBM(filters = "ensembl_gene_id", attributes = c("chromosome_name", :
Invalid attribute(s): start, end
Please use the function 'listAttributes' to get valid attribute names
Invalid attribute(s): start, end
Please use the function 'listAttributes' to get valid attribute names
That error message is on the point and even provides you with the solution! You are requesting start and end, but both don't exist. Use
listAttributes(ensembl102)
to list all available annotations.
Yay! I got it. it was labelled as "start_position" & "end_position" in listAttributes(ensembl102). Thank you!
Log in to answer this question.
There is a very useful document here that goes over your example too. https://bioconductor.org/packages/release/bioc/vignettes/biomaRt/inst/doc/accessing_ensembl.html
Also, current Ensembl release is 108 if you don't have a specific reason you should stick with the latest release.
Looks like OP wants to use GRCm38 based on the other question so using the latest release would force them to use GRCm39.
yes! GenoMax @barslmn