Hi Kamila,

You could use the select() method instead;

select(mogene20sttranscriptcluster.db, ids, "ACCNUM")

Which will return NA appropriately.

Best,

Jim
On Mar 18, 2013 2:48 PM, "Naxerova, Kamila" <naxerova@fas.harvard.edu>
wrote:

> Hi all,
>
> I have a little problem using an annotation package that I know how to
> work around, but I am wondering how to do it more elegantly and efficiently.
>
> I am analyzing a bunch of Mouse Gene 2.0 ST arrays. I built my own
> annotation package (with much help from all of you!). I am using Limma and
> want to look up annotation for diff exp genes provided by topTable(). So
> it's really a standard situation. On the Bioconductor website, this
> sequence of commands is suggested (
> http://www.bioconductor.org/help/workflows/annotation-data/)
>
> tbl <- topTable(efit, coef=2)
> ids <- tbl[["ID"]]
> entrez <- hgu95av2ENTREZID[ids]
>
> Looks beautiful! But when I try to do the same thing, I get:
>
> tbl<-topTable(fit2all,number=100)
> ids <- tbl[["ID"]]
> mogene20sttranscriptclusterACCNUM[ids]
>
> Error in .checkKeys(value, Lkeys(x), x@ifnotfound) :
>   value for "17549282" not found
>
>
> This error is evidently generated because some of the ids don't map to any
> accession numbers. I can work around this by filtering my ids first, but am
> I doing it wrong? Of course lots of probe ids on the array are not going to
> map to any accession numbers or symbols or names -- why can't they just
> come back with NA instead of an error message and abortion of the whole
> process?
>
> Thanks!
> Kamila
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

