chromosome start & end for genes in biomart R not showing
1
0
Entering edit mode
22 months ago
Alewa ▴ 170

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
ensembl bioconductor biomart • 1.3k views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Looks like OP wants to use GRCm38 based on the other question so using the latest release would force them to use GRCm39.

ADD REPLY
0
Entering edit mode

yes! GenoMax @barslmn

ADD REPLY
3
Entering edit mode
22 months ago
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.

ADD COMMENT
0
Entering edit mode

Yay! I got it. it was labelled as "start_position" & "end_position" in listAttributes(ensembl102). Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2781 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6