getRelatedSTsByST

Description: Returns list of STs that match at at least the specified number of loci. Query is by ST.

Arguments

Sample Perl code

#!/usr/bin/perl
#Written by Keith Jolley

use SOAP::Lite;
use strict;
use warnings;

#####Sample arguments#########
my $database = 'neisseria';
my $match = 6;
my $st = 11;
##############################

my $soap = SOAP::Lite
    -> uri('http://pubmlst.org/MLST')
    -> proxy('http://pubmlst.org/cgi-bin/mlstdbnet/mlstFetch.pl');
my $soapResponse = $soap->getRelatedSTsByST($database,$match,$st);
unless ($soapResponse->fault){
    print "Matching STs:\n";
    for my $t ($soapResponse->valueof('//ST')) {
	print "$t\n";
    }
} else {
    print join ', ',$soapResponse->faultcode,$soapResponse->faultstring;
}

Sample Java code

package org.pubmlst.mlstSOAP;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;

import java.util.ArrayList;

public class GetRelatedSTsByST {

    public static void main(String[] args) {
	//Sample arguments////////////////
	String database = "neisseria";
	int match = 6;
	int st = 11;
	//////////////////////////////////
	try {
	    String endpoint = "http://pubmlst.org/cgi-bin/mlstdbnet/mlstFetch.pl";
	    Service service = new Service();
	    Call call = (Call) service.createCall();
	    call.setTargetEndpointAddress(new java.net.URL(endpoint));
	    call.setOperationName(new QName("http://pubmlst.org/MLST/",
					    "getRelatedSTsByST"));
	    Object stList = call.invoke(new Object[] { database,match,st });
	    System.out.println("Matching STs:");
	    if (stList instanceof ArrayList){
		for (int i=0; i<((ArrayList)stList).size(); i++){
		    System.out.println(((ArrayList)stList).get(i));
		}
	    } else if (stList instanceof Integer) {
		System.out.println(stList);
	    }
	} catch (Exception e) {
	    System.err.println(e.toString());
	}
    }
}

Output

Matching STs:
11
50
52
67
165
etc ...

Navigation

- PubMLST+ PubMLST
MLST Home
Search / site map
- Software+ Software
Bio-Linux
Web tools
Software
- Bacteria+ Bacteria
A. baumannii
Arcobacter
B. cereus
Bordetella
Brachyspira
B. cepacia
C. fetus
C. helveticus
C. insulaenigrae
C. jejuni & C. coli
C. lari
C. upsaliensis
Chlamydiales
H. pylori
L. monocytogenes
Neisseria
P. aeruginosa
P. gingivalis
S. agalactiae
S. uberis
S. zooepidemicus
Streptomyces
V. parahaemolyticus
V. vulnificus
Wolbachia
- Eukaryotes+ Eukaryotes
A. fumigatus
C. krusei
C. tropicalis
- Other dbases+ Other dbases
B. burgdorferi MLSA
Plasmid MLST
- Mirrors+ Mirrors
About our mirrors Primary |UK1 |UK2 |US1
- Developers+ Developers
SOAP API