[BioC] mget plus regular expression

Vincent Carey stvjc at channing.harvard.edu
Mon Jul 19 19:30:27 CEST 2010


> unlist(mget('NM_016951', revmap(hgug4112aREFSEQ)))
    NM_0169511     NM_0169512     NM_0169513
"A_23_P118061" "A_23_P206396" "A_24_P215804"

This has nothing to do with regular expressions.  It has to do with
name mangling and an odd application of
mget.

> mget('NM_016951', revmap(hgug4112aREFSEQ))
$NM_016951
[1] "A_23_P118061" "A_23_P206396" "A_24_P215804"

you don't need mget for this application.  if you use it and unlist()
the results, unlist will add distinguishing tokens
to the names of the list elements as their names are pushed onto the
unlisted data.

> unlist(list(a=c(2,3)))
a1 a2
 2  3

> unlist(list(a=c(b=2,d=3)))
a.b a.d
  2   3




On Mon, Jul 19, 2010 at 12:28 PM, Marco Fabbri <fabbri.marco at gmail.com> wrote:
> I am looking for refseq NM_016951 but mget returns me three results,
> how can I get only for NM_016951 (the first one):
>
> unlist(mget('NM_016951', revmap(hgug4112aREFSEQ))
>    NM_016951     NM_0169512     NM_0169513
> "A_23_P118061" "A_23_P206396" "A_24_P215804"
>
> thank you
>
> Marco
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list