Entering edit mode
4.5 years ago
Learner ▴ 260
I am trying to follow what is said in here , however, without any success
when I do it as described here, I am fine
ex <- c("ENSG00000215417", "ENSG00000224078", "ENSG00000198366", "ENSG00000196176", "ENSG00000166012", "ENSG00000158406", "ENSG00000196787") mart <- useMart("ensembl", dataset = "hsapiens_gene_ensembl") gene2genomeEx <- getBM(values = ex, filters = "ensembl_gene_id", mart = mart, attributes = c("ensembl_gene_id", "entrezgene","hgnc_symbol", "external_gene_id", "external_gene_db", "description", "chromosome_name", "strand"))
however, when I try to use gene name, it crashes and gets me error
ex <- c("ACTN4","TUBA1B","ACTN1","TP53") mart <- useMart("ensembl", dataset = "hsapiens_gene_ensembl") gene2genomeEx <- getBM(values = ex, filters = "external_gene_name", mart = mart, attributes = c("external_gene_name", "entrezgene","hgnc_symbol", "external_gene_id", "external_gene_db", "description", "chromosome_name", "strand"))
any thought ?
@Kevin Blighe Kevin, how did you check for it? I checked the attributes but with no success. is there a way to unique them based on GO id?
This is the first time that you mention GO id. What do you mean? Please try to explain in detail the issue that faces you.
@Kevin Blighe instead the gene_name, please now try this one, you will see that you get error
If you're trying to run exactly the same query, but providing a list of GO ids then it expected you will get an error (or at least no results). The
filtersargument defines the column in the database you want to search. If you're asking to search a column containing gene IDs or symbols, but looking for GO ids (which are completely different from gene names) then you wont find any results.
You'll need to include the full code that produced the error, otherwise it's very hard to see what exactly you're trying to do.
@Mike Smith I get this error but I don't know the argument of 'listFilters'
To filter by GO IDs you have to use the filter for GO IDs. If you're just looking to get genes associated with those exact terms, use
go, if you want to get the genes associated with all their child terms too, use
Hi Kevin, I've tried to copy paste exactly what you did
But it does't like the attrubute entrezgene:
Do you have a suggestion of why?
Try using the attribute
entrezgene_idinstead. Ensembl changed this in release 97, which only just came out (http://ftp.ensembl.org/pub/release-97/release_97_biomart_changes.txt ).
Thanks Mike. I noticed this change myself and will update old code where needed, including my answer here (above).