Entering edit mode
7.6 years ago
xioli2013
▴
10
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
What does
any(simpleCancer$chromosome == "-")
return? IfFALSE
it 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.
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.