Question: biomaRt getBM() returns 0 result
0
gravatar for xioli2013
2.0 years ago by
xioli20130
xioli20130 wrote:

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

bioconductor biomart R • 864 views
ADD COMMENTlink modified 2.0 years ago • written 2.0 years ago by xioli20130
1

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 REPLYlink written 2.0 years ago by ddiez1.7k

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 REPLYlink modified 2.0 years ago • written 2.0 years ago by xioli20130
1

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

ADD REPLYlink written 2.0 years ago by zjhzwang180

Ok, thank you for thhe heads-up.

ADD REPLYlink written 2.0 years ago by xioli20130

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 REPLYlink modified 2.0 years ago • written 2.0 years ago by WouterDeCoster38k

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

ADD REPLYlink written 2.0 years ago by xioli20130
0
gravatar for xioli2013
2.0 years ago by
xioli20130
xioli20130 wrote:

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 COMMENTlink written 2.0 years ago by xioli20130
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1547 users visited in the last hour