Hi David,

Apparently the Biomart server is doing something crazy and returning Alpaca
homologs. You can see this if you first do

options(error=recover)
dnds <- getBM(attributes = c("ensembl_gene_id", "mmusculus_homolog_dn","
mmusculus_homolog_ds"), filters = "ensembl_gene_id", values = ensgs, mart =
mart)

and then you will see something like

> getBM(attributes = c("ensembl_gene_id",
"mmusculus_homolog_dn","mmusculus_homolog_ds"), filters =
"ensembl_gene_id", values = ensgs, mart = mart)
Error in `[.data.frame`(result, , attributes) :
  undefined columns selected

Enter a frame number, or 0 to exit

1: getBM(attributes = c("ensembl_gene_id", "mmusculus_homolog_dn",
"mmusculus_
2: result[, attributes]
3: `[.data.frame`(result, , attributes)

If you choose 2, you will enter the debugger at that point and can then do
something like

Browse[1]> head(result)
  ensembl_gene_id vpacos_homolog_dn vpacos_homolog_ds
1 ENSG00000114786            0.1161            0.5425
2 ENSG00000125954                NA                NA
3 ENSG00000159403            0.1330            0.6510
4 ENSG00000251246            0.0765            0.6598
5 ENSG00000255730                NA                NA
6 ENSG00000256349            0.0536            0.6109

and then if you grep vpacos in the results from listAttributes, you can see
that these are Alpaca homologs. Or at least the header indicates that.

So either Steffen Durinck or somebody at Ensembl will have to look into
this, as I am now officially out of my depth.

Best,

Jim





On Tue, Mar 19, 2013 at 2:22 PM, David Wang <lemon.wang218@gmail.com> wrote:

> Dear Jim and all,
>     Thank you! I have changed the EntrezGene IDs to ensembl IDs to redo
> it. A simple example is as the following:
> dnds <- getBM(attributes = c("ensembl_gene_id",
> "mmusculus_homolog_dn","mmusculus_homolog_ds"), filters =
> "ensembl_gene_id", values = "ENSG00000139618", mart = mart)
> But there is an error as the following:
> Error in `[.data.frame`(result, , attributes) :
>   undefined columns selected
>
> Could you give me some suggestion about this? Thank you very much!
>
> On Tue, Mar 19, 2013 at 12:03 PM, James W. MacDonald <jmacdon@uw.edu>wrote:
>
>> Hi David,
>>
>>
>>
>> On 3/19/13 12:26 PM, David Wang wrote:
>> There are certain attribute pages on the Biomart server, and you cannot
>> get data from more than one.
>>
>> > x <- listAttributes(mart, what=c("name","description","**page"))
>> > x[x[,1] %in% c("entrezgene","mmusculus_**homolog_dn","mmusculus_**
>> homolog_ds"),]
>>                     name   description         page
>> 47            entrezgene EntrezGene ID feature_page
>> 577 mmusculus_homolog_dn            dN     homologs
>> 578 mmusculus_homolog_ds            dS     homologs
>>
>> So the homolog data you want come from the homologs page, but the
>> entrezgene data come from the feature_page, hence you cannot get all three
>> at one time.
>>
>> Best,
>>
>> Jim
>>
>>
>> --
> David Wang
>

	[[alternative HTML version deleted]]

