Entering edit mode
11 days ago
anasjamshed
▴
140
I am trying to convert enseml to gene ids:
library(biomaRt)
library(stringr)
# Use biomaRt to map Ensembl IDs to gene names
mart <- useMart("ensembl", dataset = "mmusculus_gene_ensembl")
expression_data <- read.delim("combined_expression.tsv", header = TRUE, sep = "\t")
# Extract Ensembl IDs from the first column
ensembl_ids <- expression_data[,1] # Assuming the first column contains Ensembl IDs
gene_ids <- str_replace(ensembl_ids,
pattern = ".[0-9]+$",
replacement = "")
test_annotation <- getBM(attributes = c("ensembl_gene_id", "external_gene_name", "ensembl_transcript_id"),
filters = "ensembl_transcript_id",
values = gene_ids ,
mart = mart)
but its giving following error:
Error: Your query has been redirected to http://status.ensembl.org indicating this Ensembl service is currently unavailable.
Ensembl services have overall become less stable over the last few months. You have no option but to wait the downtime out.
do we have other options like use some other server?
Download the annotation GTF and parse locally.
how can I do this for mmusculus_gene_ensembl?
GTF file for GRCm39: https://ftp.ensembl.org/pub/release-113/gtf/mus_musculus/
You should be able to figure out where to get GRCm38 version if you need that.