[BioC] getGene function in biomaRt

Sean Davis sdavis2 at mail.nih.gov
Mon Apr 14 15:27:50 CEST 2008


On Mon, Apr 14, 2008 at 9:17 AM, Gonzalo Gómez <ggomez at cnio.es> wrote:
> Hi Sean, I dont know if there´s  something wrong in the getGene function.
> The same code that you sent me does not work in my computer...and the data
> type proposed does not work...
>
>  Thanks again
>
>  G
>
>  This is the code:
>
>  > library(biomaRt)
>  Loading required package: XML
>  Loading required package: RCurl
>
>  > ensembl = useMart("ensembl", dataset = "mmusculus_gene_ensembl")
>  Checking attributes and filters ... ok
>
>  > AgiIDs<- c("A_51_P227502","A_52_P330395","A_51_P183051")
>
>  > Agilent<-getGene(AgiIDs, type = 'agilent_probe', mart=ensembl)
>  Error in mapFilter(type) : invalid type choose either affy, refseq, embl,
> hugo, ensembl, ensemblTrans, unigene, agilentprobe or entrezgene
>
>  > Agilent<-getGene(AgiIDs, type = 'agilentprobe', mart=ensembl)
>  Error in getBM(attributes = c(filter, symbol, "description", chrname,  :
>    Invalid attribute(s): agilentprobe
>  Please use the function 'listAttributes' to get valid attribute names
>
>  > sessionInfo()
>  R version 2.4.1 (2006-12-18)
>  i386-apple-darwin8.8.1
>
>  locale:
>  en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
>
>  attached base packages:
>  [1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  "methods"
> "base"
>  other attached packages:
>  biomaRt   RCurl     XML
>  "1.8.2" "0.8-0" "1.7-2"

Hi, Gonzalo.  It would be helpful to always write to the bioconductor
list with questions.  First, there are people who use biomaRt much
more that I do that read and answer the list.  In addition, everyone
then gets the benefit of the exchange.

As you can see below, this works fine for me.  Since you included your
sessionInfo(), I see that you are using a version of R that is about
2-1/2 years out-of-date and that your biomaRt is very old, also.  I
would suggest upgrading your R to the most recent release, installing
biomaRt, and then trying your query again.

Sean



> library(biomaRt)
Loading required package: RCurl
> ensembl = useMart("ensembl", dataset = "mmusculus_gene_ensembl")
Checking attributes and filters ... ok
> AgiIDs<- c("A_51_P227502","A_52_P330395","A_51_P183051")
> Agilent<-getGene(AgiIDs, type = 'agilent_probe', mart=ensembl)
> Agilent
  agilent_probe mgi_symbol
1  A_51_P183051       Upb1
2  A_51_P227502      Mfap2
3  A_52_P330395      Farp1


description
1         Beta-ureidopropionase (EC 3.5.1.6) (Beta-alanine synthase)
(N- carbamoyl-beta-alanine amidohydrolase).
[Source:Uniprot/SWISSPROT;Acc:Q8VC97]
2 Microfibrillar-associated protein 2 precursor (MFAP-2) (Microfibril-
associated glycoprotein) (MAGP) (MAGP-1).
[Source:Uniprot/SWISSPROT;Acc:P55002]
3
FERMRhoGEF (Arhgef) and pleckstrin domain protein 1
[Source:RefSeq_peptide;Acc:NP_598843]
  chromosome_name band strand start_position end_position    ensembl_gene_id
1              10 B5.3      1       74869760     74904424 ENSMUSG00000033427
2               4   D3      1      140566596    140571882 ENSMUSG00000060572
3              14   E4      1      121434766    121682948 ENSMUSG00000025555
> sessionInfo()
R version 2.7.0 Under development (unstable) (2008-01-15 r44010)
x86_64-unknown-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] biomaRt_1.13.10 RCurl_0.8-3

loaded via a namespace (and not attached):
[1] XML_1.93-2


More information about the Bioconductor mailing list