Hi Allyson,
Just tried your query on SoapUI, works fine. The count is correct too, it returns 2. 2 means there are two gene names (cdc13 and CDC13) in UNIPROT PROTOTYPE mart and the number of result rows are ~60 because of GO IDs attributes selection which makes the result set with all the GO IDs against the said gene names. Unfortunately, I cant be of any help on your Soap client why its misbehaving, somebody from list please ????

Hope this helps a bit,
Syed


Allyson Lister wrote:
Hi all,

I've tried to recreate a simple query done in biomart.org <http://biomart.org>'s own MartView using the new SOAP services. Here is my Unit Test method where I've done the query:

public class TestClass {

    MartServiceSoap client;

    @Before
    public void setUp() {
// the JaxWsProxyFactoryBean method of getting the client doesn't work. While the interceptors work and are // clearly getting the right sort of response from the biomart service, the getRegistry() calls and similar
        // don't work properly.
        BioMartSoapService biomartService = new BioMartSoapService();
        client = biomartService.getBioMartSoapPort();

    }

    /**
     * Test the XML-equivalent query:
     * <?xml version="1.0" encoding="UTF-8"?>
     * <!DOCTYPE Query>
* <Query virtualSchemaName = "default" formatter = "TSV" header = "0" uniqueRows = "0" count = "" datasetConfigVersion = "0.5" >
     * <p/>
     * <Dataset name = "uniprot" interface = "default" >
     * <Filter name = "gene_name" value = "cdc13"/>
     * <Attribute name = "go_id" />
     * <Attribute name = "go_name" />
     * </Dataset>
     * </Query>
     */
    @Test
    public void GoFromUniProtTest() throws BioMartException_Exception {

        Filter filter = new Filter();
        filter.setName( "gene_name" );
        filter.setValue( "cdc13" );

        Attribute a1 = new Attribute();
        a1.setName( "go_id" );
        Attribute a2 = new Attribute();
        a2.setName( "go_name" );

        Dataset dataset = new Dataset();
        dataset.setName( "uniprot" );
        dataset.getFilter().add( filter );
        dataset.getAttribute().add( a1 );
        dataset.getAttribute().add( a2 );
        List<String> results =
client.query( "default", 0, 1, 0, new ArrayList<Dataset>( Arrays.asList( dataset ) ) );
        int iii = 0;
        for ( String result : results ) {
            System.err.println( "result: " + iii++ + " " + result );
        }
    }
}

I have done this test twice, once with count set to 0 (to return actual results) and once with count set to 1, to see how many results we'd get. In the MartView, there are 50 results. Here is the output when count == 0:

result: 0
result: 1
result: 2
result: 3
result: 4
result: 5
result: 6
result: 7
result: 8
result: 9
result: 10
result: 11
result: 12
result: 13
result: 14
result: 15
result: 16
result: 17
result: 18
result: 19
result: 20
result: 21
result: 22
result: 23
result: 24
result: 25
result: 26
result: 27
result: 28
result: 29
result: 30
result: 31
result: 32
result: 33
result: 34
result: 35
result: 36
result: 37
result: 38
result: 39
result: 40
result: 41
result: 42
result: 43
result: 44
result: 45
result: 46
result: 47
result: 48
result: 49
result: 50
result: 51
result: 52
result: 53
result: 54
result: 55
result: 56
result: 57
result: 58
result: 59
result: 60
result: 61
result: 62
result: 63
result: 64
result: 65
result: 66

As you can see, there are only empty strings in the results, and yet there are 66 empty strings. How am I misinterpreting the return value of the query? Also, why is the size of the results List 66, when martview returns 50?

When I run with count == 1, I get the following result:
result: 0 2

This means there was only one item in the list, which contained the string value "2". This implies that there are only 2 results for this query, when martview says there are 50.

I am confused! Martview says the query has 50 results, and provides those results. MartSoap says there are 66 (or 2!) but cannot display any of those results.

Please let me know what I'm doing wrong!

--

Allyson Lister
http://lurena.vox.com

CISBAN, http://www.cisban.ac.uk
Newcastle University

Reply via email to