Question: trying to retrieve data on go term from ensembl through biomaRt
0
gravatar for chrisclarkson100
4.7 years ago by
European Union
chrisclarkson10070 wrote:

Trying to retrieve data on genes pertaining to the GO term mentioned.... it won't work...

ensembl = useMart("ensembl",dataset="hsapiens_gene_ensembl")
go=c("GO:0006306")
getBM(attributes="hgnc_symbol", "hgnc_id"
       filters=c("go", "chromosome_name"),
       values=list(go, chrom), mart=ensembl)

Returns:

getBM(attributes="hgnc_symbol", "hgnc_id"
+        filters=c("go", "chromosome_name"),
Error: unexpected symbol in:
"getBM(attributes="hgnc_symbol", "hgnc_id"
       filters"
>        values=list(go, chrom), mart=ensembl)
Error: unexpected ',' in "       values=list(go, chrom),"
> getBM(attributes="hgnc_symbol", "hgnc_id"
+        filters=c("go", "chromosome_name"),
Error: unexpected symbol in:
"getBM(attributes="hgnc_symbol", "hgnc_id"
       filters"
>        values=list(go, chrom))

any tips?

Thanks

R • 1.6k views
ADD COMMENTlink modified 2.3 years ago by Biostar ♦♦ 20 • written 4.7 years ago by chrisclarkson10070
2
gravatar for Devon Ryan
4.7 years ago by
Devon Ryan90k
Freiburg, Germany
Devon Ryan90k wrote:

You forgot an enclosure.

getBM(attributes="hgnc_symbol", "hgnc_id"

should be

getBM(attributes=c("hgnc_symbol", "hgnc_id"),
ADD COMMENTlink written 4.7 years ago by Devon Ryan90k

Also,

filters=c("go", "chromosome_name"),

should be:

filters=c("go_id", "chromosome_name"),
ADD REPLYlink written 4.7 years ago by Devon Ryan90k

Hey Devon Ryan,

So my new code is:

getBM(attributes="hgnc_symbol", "hgnc_id")
       filters=c("go", "chromosome_name"),
       values=list(go, chrom), mart=ensembl)

and it returns:

getBM(attributes="hgnc_symbol", "hgnc_id")
Error in martCheck(mart) : 
  You must provide a valid Mart object. To create a Mart object use the function: useMart.  Check ?useMart for more information.
>        filters=c("go", "chromosome_name"),
Error: unexpected ',' in "       filters=c("go", "chromosome_name"),"
>        values=list(go, chrom),
Error: unexpected ',' in "       values=list(go, chrom),"
>        mart=ensembl)
Error: unexpected ')' in "       mart=ensembl)"

ADD REPLYlink written 4.7 years ago by chrisclarkson10070

You forgot a comma on the first line :)

ADD REPLYlink written 4.7 years ago by Devon Ryan90k
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: 1715 users visited in the last hour