In the biomaRt
package, there is a function getBM
which among a few things is useful for mapping between different gene representations. Currently, I'm using it as follows, to map Ensembl transcript IDs to gene names and Ensembl gene IDs.
ensemble2gene <- getBM(attributes=c("ensembl_transcript_id",
"external_gene_name",
"ensembl_gene_id"),
values = as.list(transcripts),
mart = mart)
How is the following code different:
ensemble2gene <- getBM(attributes=c("ensembl_transcript_id",
"external_gene_name",
"ensembl_gene_id"),
filters = "ensembl_transcript_id",
values = as.list(transcripts),
mart = mart)
It's unclear to me from the description of the filters
argument here. But just based on results, I get less results when I run the second one.