biomaRt getBM() returns 0 result
cancer gene dataset from NCG has some chromosome marked as "-", but if you look up ensembl they actually belong to some chromosome, so I want to retrieve this layer of information through biomaRt()
Here is my code:
mart = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
getBM(attributes = c("chromosome_name", "start_position", "end_position"), filters ="entrezgene", values = value, mart = mart)
the Cancer dataset looks like:
chromosome tstart tend entrez
1 chr9 133589707 133761067 25
2 chr1 179076856 179198532 27
3 chr7 5567382 5569288 60
4 chr2 158594046 158656005 90
5 chr12 52345528 52387891 91
6 chr2 148602722 148684840 92
value <- simpleCancer[simpleCancer$chromosome == "-",]$entrez
results:
[1] chromosome_name start_position end_position
<0 rows> (or 0-length row.names)
I don't know what is wrong?
Thank you,
Xp
• 12,851 views
•
link
1 answer
Just a follow up to the question:
So this morning, when I did it again, it returned the values for the command:
getBM(attributes = c("chromosome_name", "start_position", "end_position"), filters ="entrezgene", values = value, mart = mart)
chromosome_name start_position end_position
1 X 118386394 118386471
2 12 96489571 96875555
3 1 23581495 23640568
4 14 95650498 95679833
5 17 75776434 75785893
6 21 44681576 44682163
I guess it was the server problem
Thank you,
Xp
• 0 views
•
link
Log in to answer this question.
I modified your post to add code formatting using the 101010 button for increased readability. You can do the same next time, by selecting the text you want to format and click on the 101010 button.
ok, I'm green to the forum. Thank you I'll do that next time.
What does
any(simpleCancer$chromosome == "-")return? IfFALSEit means none of the values in your chromosome column is equal to "-", and hence the result. Question: why would chromosome be equal to "-"? Are you instead looking for strand?I figured it was the server problem last night, this morning it worked fine. To answer your question: I could not really find interpretation from NCG website regarding the dataset, especially chromesomes marked as "-", but I am guessing it is that those cancer genes come from unplaced contigs.
You need to translate chromsome name, because Ensembl' chromesome name is different from the cancer dataset which you want to filter.
Ok, thank you for thhe heads-up.