Postgres 8.3: Many ways to join a table

| Thursday, July 30, 2009

In BioSQL, PhyloDB module, there are tables like this:



This becomes a problem when I want to retrieve values that are related to one tree. For example, here are some data from the table

tree_idterm_idvaluerank
21"Wagner78"0
22"Single Tree"0
23"Wagner78"0
25"885"0
26"Ladiges, P. Y.; Humphries, C. J."0
27"A cladistic study of Arillastrum, Angophora, and Eucalyptus (Myrtaceae). "0
28"Transformed cladistic; character compatibility; branch and bound, and Farris-Wagner methods ...0


There is another table term that has term_id, and name. For example, the term (term_id=2) has the name 'dc.title'
I found a few ways to join the data and create a tabular format that each row belongs to one tree_id.

First, I can use what is called self join :



Here I used different table aliases for the same table, and each alias represents a different instance of the table.

Another way is to use FULL OUTER JOIN:


Interestingly, I also tried to use the PostgreSQL XML support to generate a piece of XML from that table. Here instead of using JOIN, I used UNION:



This will produce some thing like:



For a table with 5287 different tree_id, and a total of 42320 rows, the three method takes 1080ms, 1136ms, 1338ms (average of three tests). With no surprise that the last method takes longer as it puts the XML together.

Setting up BioSQL 1.0.1 on Postgresql 8.3, ubuntu 9.04

| Tuesday, July 21, 2009

BioSQL is a relational model that covers many kinds of data models in biology. The core schema has models for sequences, features, annotations, taxonomy (focused on NCBI taxonomy), and ontologies. It also has a PhyloDB extension module.
In this post, I'll record how I setup BioSQL on a Postgresql database on Ubuntu Jaunty (9.04)
Install PostgreSQL
There is a very good step-by-step instruction on how to install PostgreSQL on Ubuntu. Here is the link:
https://help.ubuntu.com/community/PostgreSQL
Even though it doesn't cover Ubuntu version after 8.04, and it says it's for PostgreSQL 8.1, I can still follow all the steps to install PostgreSQL 8.3 on Jaunty.
Install BioSQL
The BioSQL website has detailed installation instructions. But it is also very verbose, and the page has instructions for MySQL, PostgreSQL, and Oracle, even steps on how to install the databases. I wish there were separate pages for each database, though. Anyway, creating a BioSQL database on PostgreSQL is very straight forward. Here is what you all need to do:
> createdb biosql 
> psql biosql < biosqldb-pg.sql

To add the PhyloDB extension, first follow the instruction to check it out from SVN. Then do
> psql biosql < biosql-phylodb-pg.sql

Import NCBI Taxonomy into BioSQL
BioSQL has several scripts to import data into the database. Here I am just explaining how to import the NCBI taxonomy into the database.
First bioperl and bioperl-db need to be installed. Again, these steps are included in the BioSQL installation page. However, it's much easier to do it the Ubuntu way.
> sudo apt-get install bioperl

That'll install bioperl 1.5.2, with bioperl-db.
Then simply run (suppose you have already setup the PostgreSQL and you can run it with your username.
> load_ncbi_taxonomy.pl --diver Pg --download yes<br /><br />Update: 7/23/2009<br />Hilmar has pointed out that the bioperl in my post is only 1.5.2, and it seems in Karmic (9.10), ubuntu will have BioPERL 1.6.0 available in universe.<br /> <br /><br /><br />


install postgresql on ubuntu

| Monday, July 13, 2009

It turns out that I have to create database myself. I decided to install postgresql on my ubuntu server, and dump treebase data into it.

To install postgresql 8.3 on Ubuntu 9.04, basically I followed the steps in this article. Although the author was addressing an earlier version of Ubuntu (8.04), I found the steps are still correct.

http://hocuspokus.net/2008/05/install-postgresql-on-ubuntu-804

This post is based on postgresql 8.1. It also shows how to make the current user a superuser.

https://help.ubuntu.com/community/PostgreSQL


I also installed pgadmin3 on another ubuntu box where I have a ubuntu desktop installed. I found that in order to access the server remotely, I have to do the following on the server:

1. Add port 5432 to the allowed list
2. Give user a password. Do something like
<code>sudo su postgres -c psql 
=# ALTER USER myusername WITH PASSWORD 'password';
=# \q
</code>




Nice XPath API article

| Sunday, June 28, 2009

There is a nice XPath API article on IBM developerworks site.
"XPath expressions are much easier to write than detailed Document Object Model (DOM) navigation code. When you need to extract information from an XML document, the quickest and simplest way is to embed an XPath expression inside your Java™ program. Java 5 introduces the javax.xml.xpath package, an XML object-model independent library for querying documents with XPath."
The Java XPath API

In Phylr, I am using XPath to get information from nexml, and put them into a lucene index. The tutorial if very helpful. I also found out that namespace makes things very complicated. If the XML has namespaces, then the NamespaceContext implementation has to use the same namespaces.  But the NamespaceContext is acutally used to define namespaces in the xpaths. Therefore, they have to corresponds to the correct prefix used in the xpaths, not in the XML.




Maven eclipse plugin

| Tuesday, June 9, 2009

m2eclipse is a nice plugin to have to run maven inside eclipse. After struggling with command line maven for a while, I started to look at m2eclipse and fall in love with it very quickly.

Here are some links:

1. How to start a maven webapp, integrated with eclipse WTP: http://docs.codehaus.org/display/M2ECLIPSE/WTP+mini+howto#WTPminihowto-Launchwebapplicationontheserver
2. Use Nexus indexer inside eclipse: http://docs.codehaus.org/display/M2ECLIPSE/Maven+Indexes+view
3. An article about using maven to create a webapp project, based on the command line tool:
http://www.burlesontech.com/wiki/display/btg/How+to+create+a+Maven+web+app+and+deploy+to+Tomcat+-+fast
4. The nexus maven repository manager (integrated in m2eclipse): http://nexus.sonatype.org/

Setting up an internal maven repository on google code

| Tuesday, June 2, 2009

A maven repository can be setup on google code. The following post explains how (thanks lucie).

I will setup one for phylr (nexmlLuceneIndexer for now, more accurately), since it uses maven to build.

Your Very Own Google Code Maven Repo - The Web Semantic

Phylr Testing Report (Week1)

| Saturday, May 30, 2009

Today, I deployed the phylr following the README, and tested it with the OCLC SRU Service Test service.

Here are the results (
1 warnings given,
84 tests given,
6 tests failed):

The first two errors are not really errors. The XSLT in the response is not using full URL, but a relative path, and the OCLC service tester can't process it. A browser can correctly process the XSLT, however.

The last few errors are concerning SRU diagnostics, here is the page that contains list of all SRU diagnostics:
http://www.loc.gov/standards/sru/resources/diagnostics-list.html


running SRU tests for baseURL: http://jinan.ads.iu.edu:8080/SRW/search/treebase
tests of Explain

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase
reading stylesheet: /SRW/explainResponse.xsl
from source: http://jinan.ads.iu.edu:8080/SRW/search/treebase
unable to load stylesheet: javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: File "file:///SRW/explainResponse.xsl" not found.
successfully parsed Explain record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?operation=explain

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?operation=explain&version=1.1

trying: http://localhost:8080/SRW/search/treebase?
** Warning: Content-Type not set to text/xml or application/xml
Content-type: null
test failed: opening URL: Connection refused
** Error: the URL created by combining your host, port and database name
** resulted in a bad URL
** Comparing the URL I was given to your Explain record:
** original host: jinan.ads.iu.edu, Explain host: localhost
** original port: 8080, Explain port: 8080
** original database: /SRW/search/treebase, Explain database: SRW/search/treebase
tests of Scan

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.authors+=+dog&operation=scan&responsePosition=3&maximumTerms=5
reading stylesheet: /SRW/scanResponse.xsl
from source: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.authors+=+dog&operation=scan&responsePosition=3&maximumTerms=5
unable to load stylesheet: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: File "file:///SRW/scanResponse.xsl" not found.
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.authors+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.identifier+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.identifier+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.datatype+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.datatype+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=cql.serverChoice+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=cql.serverChoice+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.abstract+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.abstract+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.otus+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.otus+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.datatype+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.datatype+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.subject+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.subject+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.hasbranchlengths+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.hasbranchlengths+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.scientificName+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.scientificName+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.keywords+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.keywords+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.creator+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.creator+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.treesize+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.treesize+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.description+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.description+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.treeid+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.treeid+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.treesize+=+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.treesize+exact+dog&operation=scan&responsePosition=3&maximumTerms=5
successfully parsed Scan record
Diagnostic: info:srw/diagnostic/1/120, details=3

tests of searchRetrieve

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.authors+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
reading stylesheet: /SRW/searchRetrieveResponse.xsl
from source: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.authors+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
unable to load stylesheet: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: File "file:///SRW/searchRetrieveResponse.xsl" not found.
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.authors++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.identifier+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.identifier++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.datatype+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.datatype++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=cql.serverChoice+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=cql.serverChoice++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.abstract+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.abstract++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.otus+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.otus++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.datatype+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.datatype++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.subject+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.subject++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.hasbranchlengths+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.hasbranchlengths++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.scientificName+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.scientificName++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.keywords+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.keywords++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.creator+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.creator++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.treesize+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.treesize++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.description+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.description++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.treeid+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.treeid++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.treesize+=+%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.treesize++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1
successfully parsed searchRetrieve record

tests to generate diagnostics

trying for info:srw/diagnostic/1/5 (unsupported version)
sending version=9.9
trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=9.9&query=phylo.treesize+=+%22dog%22&operation=searchRetrieve&maximumRecords=1&startRecord=1
successfully parsed searchRetrieve record
** Error: expected diagnostic info:srw/diagnostic/1/5
trying for info:srw/diagnostic/1/6 (unsupported parameter value)
sending a bad maximumRecords value
trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve&query=phylo.treesize+=+%22dog%22&maximumRecords=a&startRecord=1
successfully parsed searchRetrieve record
info:srw/diagnostic/1/6

trying for info:srw/diagnostic/1/7 (Mandatory parameter not supplied)
omitted the query parameter on the search
trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve
successfully parsed searchRetrieve record
info:srw/diagnostic/1/7

trying for info:srw/diagnostic/1/8 (Unsupported parameter)
sending the parameter diagnosticTest=true
trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve&query=phylo.treesize+=+%22dog%22&diagnosticTest=true
successfully parsed searchRetrieve record
** Error: expected diagnostic info:srw/diagnostic/1/8
trying for info:srw/diagnostic/1/10 (Query syntax error)
sending &query=%22dog%22+=
trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve&query=%22dog%22+=
successfully parsed searchRetrieve record
info:srw/diagnostic/1/1
** Error: expected diagnostic info:srw/diagnostic/1/10 but got info:srw/diagnostic/1/1
trying for info:srw/diagnostic/1/16 (Unsupported index)
sending &query=badIndex=%22doh%22
trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve&query=badIndex=%22doh%22
successfully parsed searchRetrieve record
** Error: expected diagnostic info:srw/diagnostic/1/16
trying for info:srw/diagnostic/1/61 (First record position out of range)
sending startRecord=9999999
trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve&query=phylo.treesize+=+%22dog%22&maximumRecords=1&startRecord=9999999
successfully parsed searchRetrieve record
** Error: expected diagnostic info:srw/diagnostic/1/61
1 warnings given
84 tests given
6 tests failed
problems detected!