Attributes construct error in biomaRt
3
0
Entering edit mode
@seantaylor-7638
Last seen 5.7 years ago
United States

I recently switched jobs and am installing biomaRt on my new windows machine. The package seems to download and install fine, but so far my commands to useMart() or even just listMarts() generate the same error:

> listMarts()
AttValue: " or ' expected
attributes construct error
Couldn't find end of Start Tag IMG line 5
AttValue: " or ' expected
attributes construct error
Couldn't find end of Start Tag FONT line 6
Opening and ending tag mismatch: TD line 6 and FONT
Opening and ending tag mismatch: TD line 6 and TR
Opening and ending tag mismatch: TR line 4 and TABLE
Opening and ending tag mismatch: P line 20 and BODY
Opening and ending tag mismatch: P line 18 and HTML
Premature end of data in tag P line 14
Premature end of data in tag BR line 11
Premature end of data in tag P line 9
Premature end of data in tag TABLE line 3
Premature end of data in tag BODY line 2
Premature end of data in tag HTML line 1
Error: 1: AttValue: " or ' expected
2: attributes construct error
3: Couldn't find end of Start Tag IMG line 5
4: AttValue: " or ' expected
5: attributes construct error
6: Couldn't find end of Start Tag FONT line 6
7: Opening and ending tag mismatch: TD line 6 and FONT
8: Opening and ending tag mismatch: TD line 6 and TR
9: Opening and ending tag mismatch: TR line 4 and TABLE
10: Opening and ending tag mismatch: P line 20 and BODY
11: Opening and ending tag mismatch: P line 18 and HTML
12: Premature end of data in tag P line 14
13: Premature end of data in tag BR line 11
14: Premature end of data in tag P line 9
15: Premature end of data in tag TABLE line 3
16: Premature end of data in tag BODY line 2
17: Premature end of data in tag HTML line 1

This generates the exact same error:

> ensembl <- useMart("ensembl", dataset="hsapiens_gene_ensembl")

I tried to make sure I had the most up to date biomaRt version for my R installation (R 3.1.2), but that has not seemed to resolved the issue. I have not encountered this before and am at a loss. Any advice?

Thanks,

Sean 

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
[1] biomaRt_2.22.0

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.28.2 Biobase_2.26.0       BiocGenerics_0.12.1  bitops_1.0-6         DBI_0.3.1            GenomeInfoDb_1.2.5  
 [7] IRanges_2.0.1        parallel_3.1.2       RCurl_1.95-4.5       RSQLite_1.0.0        S4Vectors_0.4.0      stats4_3.1.2        
[13] tools_3.1.2          XML_3.98-1.1        
biomart • 3.2k views
ADD COMMENT
1
Entering edit mode
@steffen-durinck-4894
Last seen 9.7 years ago

Hi Sean,

What do you get by running:

listMarts(verbose=TRUE)

or copy paste the URL printed by listMarts in your browser

http://www.biomart.org:80/biomart/martservice?type=registry&requestid=biomaRt

Maybe that will return a message that give you more info on the problem.  Also check the biomaRt vignette on resolving proxy issues.

Cheers,

Steffen

ADD COMMENT
0
Entering edit mode

Hi Steffan,

> listMarts(verbose=TRUE)
Attempting web service request:
http://www.biomart.org:80/biomart/martservice?type=registry&requestid=biomaRt
AttValue: " or ' expected
attributes construct error
Couldn't find end of Start Tag IMG line 5
AttValue: " or ' expected
attributes construct error
Couldn't find end of Start Tag FONT line 6
Opening and ending tag mismatch: TD line 6 and FONT
Opening and ending tag mismatch: TD line 6 and TR
Opening and ending tag mismatch: TR line 4 and TABLE
Opening and ending tag mismatch: P line 20 and BODY
Opening and ending tag mismatch: P line 18 and HTML
Premature end of data in tag P line 14
Premature end of data in tag BR line 11
Premature end of data in tag P line 9
Premature end of data in tag TABLE line 3
Premature end of data in tag BODY line 2
Premature end of data in tag HTML line 1
Error: 1: AttValue: " or ' expected
2: attributes construct error
3: Couldn't find end of Start Tag IMG line 5
4: AttValue: " or ' expected
5: attributes construct error
6: Couldn't find end of Start Tag FONT line 6
7: Opening and ending tag mismatch: TD line 6 and FONT
8: Opening and ending tag mismatch: TD line 6 and TR
9: Opening and ending tag mismatch: TR line 4 and TABLE
10: Opening and ending tag mismatch: P line 20 and BODY
11: Opening and ending tag mismatch: P line 18 and HTML
12: Premature end of data in tag P line 14
13: Premature end of data in tag BR line 11
14: Premature end of data in tag P line 9
15: Premature end of data in tag TABLE line 3
16: Premature end of data in tag BODY line 2
17: Premature end of data in tag HTML line 1

If I follow the link, I get a big html page. I will have to look through it to see if there is anything diagnostic in that, but at first blush I saw nothing obvious. I will check through the vignette as well.

Thanks,

Sean

(edited for formatting)

ADD REPLY
0
Entering edit mode

If the HTML page looks fine in your browser then maybe there is an issue in how your computer parses this data.

As I don't have access to Windows, I can't trouble shoot but I think you might be able to do some debugging on the xmlTreeParsing that is used inside biomaRt.

See if you can replicate the error by just doing:

library(XML)

bm = xmlTreeParse("http://www.biomart.org/biomart/martservice?type=registry&requestid=biomaRt")

And maybe you find a way to  make this step work by adding:

bm = xmlTreeParse("http://www.biomart.org/biomart/martservice?type=registry&requestid=biomaRt",isHTML=TRUE)

Or change some other parameter of xmlTreeParse function.

 

Steffen

 

 

 

 

 

 

 

ADD REPLY
0
Entering edit mode

Could you also check if this solves the issue:

 

bm = htmlTreeParse("http://www.biomart.org/biomart/martservice?type=registry&requestid=biomaRt")

 

ADD REPLY
0
Entering edit mode

And lastly,

The following work around could get you connected:

mart  = new("Mart",biomart="ensembl",host = "http://www.biomart.org:80/biomart/martservice",archive=FALSE,vschema="default")

ensembl = useDataset(mart=mart,dataset="hsapiens_gene_ensembl")

I think you should be able to do queries using that ensembl object.

 

 

 

ADD REPLY
0
Entering edit mode

It seems to be the firewall. I explicitly set the proxy with 

> Sys.setenv("http_proxy" = "http://my.proxy.settings:9999")
> head(listMarts())
              biomart                             version
1             ensembl        ENSEMBL GENES 79 (SANGER UK)
2                 snp    ENSEMBL VARIATION 79 (SANGER UK)
3          regulation   ENSEMBL REGULATION 79 (SANGER UK)
4                vega                VEGA 59  (SANGER UK)
5       fungi_mart_26           ENSEMBL FUNGI 26 (EBI UK)
6 fungi_variations_26 ENSEMBL FUNGI VARIATION 26 (EBI UK)

That seems to have done the trick.

Thanks for your help!

Sean

 

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

I don't think it is biomaRt:

> head(listMarts())
              biomart                             version
1             ensembl        ENSEMBL GENES 79 (SANGER UK)
2                 snp    ENSEMBL VARIATION 79 (SANGER UK)
3          regulation   ENSEMBL REGULATION 79 (SANGER UK)
4                vega                VEGA 59  (SANGER UK)
5       fungi_mart_26           ENSEMBL FUNGI 26 (EBI UK)
6 fungi_variations_26 ENSEMBL FUNGI VARIATION 26 (EBI UK)
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
[1] biomaRt_2.22.0

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.28.1 Biobase_2.26.0       BiocGenerics_0.12.1
 [4] bitops_1.0-6         DBI_0.3.1            GenomeInfoDb_1.2.4  
 [7] IRanges_2.0.1        parallel_3.1.1       RCurl_1.95-4.5      
[10] RSQLite_1.0.0        S4Vectors_0.4.0      stats4_3.1.1        
[13] XML_3.98-1.1        

Are you behind a firewall? Does

> setInternet2()
> library(biomaRt)
> listMarts()

help?

 

 

ADD COMMENT
0
Entering edit mode
@seantaylor-7638
Last seen 5.7 years ago
United States

No, I'm afraid that didn't do anything. I am behind a firewall though. However, I assumed that since I could communicate with biocLite and CRAN to download packages that the firewall was not the issue. Probably a bad assumption.

ADD COMMENT
0
Entering edit mode

You will help Steffen debug the problem if you give the results of

traceback()

right after you get the error. It looks like you are getting unparseable results back from the Biomart server, so knowing where things went wrong might help.

ADD REPLY
0
Entering edit mode

Good idea:

> setInternet2()
> library("biomaRt")
> listMarts()
AttValue: " or ' expected
attributes construct error
Couldn't find end of Start Tag IMG line 5
AttValue: " or ' expected
attributes construct error
Couldn't find end of Start Tag FONT line 6
Opening and ending tag mismatch: TD line 6 and FONT
Opening and ending tag mismatch: TD line 6 and TR
Opening and ending tag mismatch: TR line 4 and TABLE
Opening and ending tag mismatch: P line 20 and BODY
Opening and ending tag mismatch: P line 18 and HTML
Premature end of data in tag P line 14
Premature end of data in tag BR line 11
Premature end of data in tag P line 9
Premature end of data in tag TABLE line 3
Premature end of data in tag BODY line 2
Premature end of data in tag HTML line 1
Error: 1: AttValue: " or ' expected
2: attributes construct error
3: Couldn't find end of Start Tag IMG line 5
4: AttValue: " or ' expected
5: attributes construct error
6: Couldn't find end of Start Tag FONT line 6
7: Opening and ending tag mismatch: TD line 6 and FONT
8: Opening and ending tag mismatch: TD line 6 and TR
9: Opening and ending tag mismatch: TR line 4 and TABLE
10: Opening and ending tag mismatch: P line 20 and BODY
11: Opening and ending tag mismatch: P line 18 and HTML
12: Premature end of data in tag P line 14
13: Premature end of data in tag BR line 11
14: Premature end of data in tag P line 9
15: Premature end of data in tag TABLE line 3
16: Premature end of data in tag BODY line 2
17: Premature end of data in tag HTML line 1
> traceback()
5: stop(e)
4: (function (msg, ...) 
   {
       if (length(grep("\\\n$", msg)) == 0) 
           paste(msg, "\n", sep = "")
       if (immediate) 
           cat(msg)
       if (length(msg) == 0) {
           e = simpleError(paste(1:length(messages), messages, sep = ": ", 
               collapse = ""))
           class(e) = c(class, class(e))
           stop(e)
       }
       messages <<- c(messages, msg)
   })(character(0))
3: .Call("RS_XML_ParseTree", as.character(file), handlers, as.logical(ignoreBlanks), 
       as.logical(replaceEntities), as.logical(asText), as.logical(trim), 
       as.logical(validate), as.logical(getDTD), as.logical(isURL), 
       as.logical(addAttributeNamespaces), as.logical(useInternalNodes), 
       as.logical(isHTML), as.logical(isSchema), as.logical(fullNamespaceInfo), 
       as.character(encoding), as.logical(useDotNames), xinclude, 
       error, addFinalizer, as.integer(options), as.logical(parentFirst), 
       PACKAGE = "XML")
2: xmlTreeParse(registry, asText = TRUE)
1: listMarts()

(edited for formatting)

ADD REPLY

Login before adding your answer.

Traffic: 407 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6