biomaRt getBM() returns 0 result
1
0
Entering edit mode
7.0 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

R biomaRt bioconductor • 11k views
ADD COMMENT
1
Entering edit mode

What does any(simpleCancer$chromosome == "-") return? If FALSE 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?

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

You need to translate chromsome name, because Ensembl' chromesome name is different from the cancer dataset which you want to filter.

ADD REPLY
0
Entering edit mode

Ok, thank you for thhe heads-up.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

ok, I'm green to the forum. Thank you I'll do that next time.

ADD REPLY
0
Entering edit mode
7.0 years ago
xioli2013 ▴ 10

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

ADD COMMENT

Login before adding your answer.

Traffic: 2660 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6