Thanks Syed,

Following your lead, I tried adding a filter for a number of SNPs and that
seems to do the trick :)

Thanks, Ariel.


|------------>
| From:      |
|------------>
  
>----------------------------------------------------------------------------------------------------------------------------------------|
  |Syed Haider <[email protected]>                                         
                                                           |
  
>----------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>----------------------------------------------------------------------------------------------------------------------------------------|
  |Ariel Farkash/Haifa/i...@ibmil                                               
                                                            |
  
>----------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc:        |
|------------>
  
>----------------------------------------------------------------------------------------------------------------------------------------|
  |"[email protected]" <[email protected]>                                    
                                                           |
  
>----------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>----------------------------------------------------------------------------------------------------------------------------------------|
  |16/11/2009 11:45 AM                                                          
                                                           |
  
>----------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>----------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [mart-dev] Having problem with web service client access to biomart      
                                                           |
  
>----------------------------------------------------------------------------------------------------------------------------------------|





Hi Ariel,

I am pretty confident that its because of size of SNP dataset that takes
a long time to run large queries. The safest with SNP dataset is to use
web interface and ask for results as Email option. that would work.

Best,
Syed


Ariel Farkash wrote:
> Hello,
>
> I'm trying to access the biomart data via WebService described in:
> http://www.biomart.org/martservice.html (SOAP access)
> I was directed to you by ensembl helpdesk.
>
> I am able to retrieve the list of attributes for my requested dataset:
> hsapiens_snp
> but when I try to query I get no data, until I get socket time out.
>
> maybe my query line is wrong, this is it:
> proxy.query("default", 0, 0, 0, new Dataset[]{dataset});
>
> My client program and output can be seen below
>
> Thanks, Ariel.
>
> Client code:
>         final String wsAddress = "http://www.biomart.org/biomart/martsoap
";
>         final MartServiceSoapProxy proxy = new MartServiceSoapProxy();
>         proxy.setEndpoint(wsAddress);
>
>         /*
>          * Here is where I extract the attributes, this succeeded :)
>          */
>         try
>         {
>             AttributePage[] attrPages = proxy.getAttributes
("hsapiens_snp",
> "default");
>             for(AttributePage attributePage : attrPages)
>             {
>                 System.out.println("Attribute Page: [" +
> attributePage.getName() + "]");
>                 AttributeGroup[] attrGroup =
> attributePage.getAttributeGroup();
>                 for(AttributeGroup attributeGroup : attrGroup)
>                 {
>                     System.out.println("\tAttribute Group: [" +
> attributeGroup.getName() + "]");
>                     AttributeCollection[] attrCollect =
> attributeGroup.getAttributeCollection();
>                     for(AttributeCollection attributeCollection :
> attrCollect)
>                     {
>                         System.out.println("\t\tAttribute Collection: ["
+
> attributeCollection.getName() + "]");
>                         AttributeInfo[] attrInfo =
> attributeCollection.getAttributeInfo();
>                         for(AttributeInfo attributeInfo : attrInfo)
>                         {
>                             System.out.println("\t\t\tAttribute [" +
> attributeInfo.getName() + "]");
>                         }
>                     }
>                 }
>             }
>         }
>         catch(RemoteException ex1)
>         {
>             final String msg = "Exception: [" + ex1.getMessage() + "]";
>             sLogger.error(msg);
>             throw new RimonException(msg, ex1);
>         }
>
>         /*
>          * Prepare request
>          */
>         final Attribute[] attrs = new Attribute[4];
>         attrs[0] = new Attribute("dbsnp");
>         attrs[1] = new Attribute("chr_name");
>         attrs[2] = new Attribute("chrom_start");
>         attrs[3] = new Attribute("allele");
>         final Dataset dataset = new Dataset("hsapiens_snp", null, attrs);
>
>         /*
>          * Send request
>          */
>         String[][] wsResult = null;
>         try
>         {
>             wsResult = proxy.query("default", 0, 0, 0, new Dataset
> []{dataset});
>         }
>         catch(RemoteException ex)
>         {
>             final String msg = "Exception: [" + ex.getMessage() + "]";
>             sLogger.error(msg);
>             throw new RimonException(msg, ex);
>         }
>
>         /*
>          * Let's see the result
>          */
>         for(String[] array : wsResult)
>         {
>             for(String result : array)
>             {
>                 System.out.println("result [" + result + "]");
>             }
>         }
>
> Output
> Attribute Page: [snp]
>       Attribute Group: [snp]
>             Attribute Collection: [snpsatts]
>                   Attribute [refsnp_id]
>                   Attribute [chr_name]
>                   Attribute [chrom_start]
>                   Attribute [chrom_strand]
>                   Attribute [allele]
>                   Attribute [mapweight]
>                   Attribute [validated]
>                   Attribute [allele_1]
>             Attribute Collection: [variation_annotation]
>                   Attribute [associated_gene]
>                   Attribute [ega_stable_id]
>                   Attribute [phenotype_name]
>                   Attribute [phenotype_description]
>                   Attribute [associated_variant_risk_allele]
>                   Attribute [risk_allele_freq_in_controls]
>                   Attribute [p_value]
>                   Attribute [variation_names]
>                   Attribute [study]
>                   Attribute [study_type]
>                   Attribute [source_name]
>             Attribute Collection: [source]
>                   Attribute [dbsnp]
>                   Attribute [uniprot_synonym]
>                   Attribute [affy100]
>                   Attribute [affy500]
>                   Attribute [affy6]
>                   Attribute [ensembl_watson]
>                   Attribute [ensembl_venter]
>                   Attribute [illumina_cytosnp12v1]
>                   Attribute [illumina_human1mduov3]
>                   Attribute [illumina_human660wquad]
>       Attribute Group: [genesnpatts]
>             Attribute Collection: [ensemblatts]
>                   Attribute [ensembl_gene_stable_id]
>                   Attribute [ensembl_transcript_stable_id]
>                   Attribute [ensembl_transcript_chrom_strand]
>                   Attribute [ensembl_type]
>                   Attribute [consequence_type_tv]
>                   Attribute [ensembl_peptide_shift]
>                   Attribute [cdna_start]
>                   Attribute [cdna_end]
>                   Attribute [translation_start]
>                   Attribute [translation_end]
> Attribute Page: [sequences]
>       Attribute Group: [sequence]
>             Attribute Collection: [snp_seq_scope]
>                   Attribute [snp]
>             Attribute Collection: [upstream]
>                   Attribute [upstream_flank]
>             Attribute Collection: [downstream]
>                   Attribute [downstream_flank]
>       Attribute Group: [region]
>             Attribute Collection: [chromosomeatts]
>                   Attribute [chr_name]
>                   Attribute [chrom_start]
>                   Attribute [chrom_strand]
>       Attribute Group: [snp]
>             Attribute Collection: [snpatts]
>                   Attribute [source]
>                   Attribute [refsnp_id]
>                   Attribute [allele]
>                   Attribute [validated]
>                   Attribute [mapweight]
>                   Attribute [ensembl_peptide_shift]
> Attribute Page: [poly_strain]
>       Attribute Group: [snp_atts]
>             Attribute Collection: [snpatts]
>                   Attribute [refsnp_id]
>                   Attribute [chr_name]
>                   Attribute [chrom_start]
>                   Attribute [chrom_strand]
>                   Attribute [allele]
>                   Attribute [validated]
>                   Attribute [mapweight]
>             Attribute Collection: [ensemblatts]
>                   Attribute [ensembl_gene_stable_id]
>                   Attribute [ensembl_transcript_stable_id]
>                   Attribute [ensembl_type]
>                   Attribute [consequence_type_tv]
>                   Attribute [ensembl_peptide_shift]
>                   Attribute [cdna_start]
>                   Attribute [cdna_end]
>                   Attribute [ensembl_transcript_chrom_strand]
>                   Attribute [translation_start]
>                   Attribute [translation_end]
> Exception in thread "main"
> com.ibm.hrl.rimon.common.exception.RimonException: Exception: [; nested
> exception is:
>       java.net.SocketTimeoutException: Read timed out]
>       at com.ibm.hrl.rimon.bii.ws.client.FetchEnsemblQueryWsClient.main(
> FetchEnsemblQueryWsClient.java:105)
> Caused by: java.net.SocketTimeoutException: Read timed out
>       at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
>       at org.apache.axis.transport.http.HTTPSender.invoke(
> HTTPSender.java:154)
>       at org.apache.axis.strategies.InvocationStrategy.visit(
> InvocationStrategy.java:32)
>       at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>       at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>       at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
>       at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
>       at org.apache.axis.client.Call.invoke(Call.java:2767)
>       at org.apache.axis.client.Call.invoke(Call.java:2443)
>       at org.apache.axis.client.Call.invoke(Call.java:2366)
>       at org.apache.axis.client.Call.invoke(Call.java:1812)
>       at org.biomart.www.MartServiceSoap.BioMartSoapBindingStub.query(
> BioMartSoapBindingStub.java:595)
>       at org.biomart.www.MartServiceSoap.MartServiceSoapProxy.query(
> MartServiceSoapProxy.java:74)
>       at com.ibm.hrl.rimon.bii.ws.client.FetchEnsemblQueryWsClient.main(
> FetchEnsemblQueryWsClient.java:99)
> Caused by: java.net.SocketTimeoutException: Read timed out
>       at java.net.SocketInputStream.read(SocketInputStream.java:140)
>       at java.io.BufferedInputStream.fill(BufferedInputStream.java:229)
>       at java.io.BufferedInputStream.read(BufferedInputStream.java:248)
>       at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(
> HTTPSender.java:583)
>       at org.apache.axis.transport.http.HTTPSender.invoke(
> HTTPSender.java:143)
>       ... 12 more
>



Reply via email to