Skip to content

Instantly share code, notes, and snippets.

@ATpoint
Last active February 25, 2020 08:45
Show Gist options
  • Save ATpoint/21b54b4be5e614788959d5d62f9decfb to your computer and use it in GitHub Desktop.
Save ATpoint/21b54b4be5e614788959d5d62f9decfb to your computer and use it in GitHub Desktop.
library(biomaRt)
## get mouse transcript coordinates
mmusculus_genes <- getBM(attributes = c("ensembl_gene_id", "chromosome_name",
"transcript_start", "transcript_end"),
mart = useMart("ensembl", dataset = "mmusculus_gene_ensembl"))
## put in the exact same format as the example of the toplevel question,
## not caring about the fact that hgnc is not the correct name for mouse genes:
large.input <- data.frame(chrom = mmusculus_genes$chromosome_name,
start = mmusculus_genes$transcript_start,
end = mmusculus_genes$transcript_end,
hgnc = mmusculus_genes$ensembl_gene_id)
## See below for benchmarks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment