<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://structurefilter.embl.de/webservice/stylesheets/WSDLDocumentation.xslt"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
             xmlns:xs="http://www.w3.org/2001/XMLSchema"  
             xmlns:tns="http://structureFilter.embl.de/StructureFilter" 
             name="StructureFilter" 
             targetNamespace="http://structureFilter.embl.de/StructureFilter">
    <types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
                   xmlns:tns="http://structureFilter.embl.de/StructureFilter" 
                   targetNamespace="http://structureFilter.embl.de/StructureFilter" 
                   elementFormDefault="qualified" 
           	 	   attributeFormDefault="unqualified">
                     
        <xs:element name="RunJob">
            <xs:complexType>
                <xs:sequence>
                 
                    <xs:element name="identifier" type="xs:string" minOccurs = "1" maxOccurs="1"/>
                    
                    <!-- sequence must consist of upper-case characters. -->
                    <xs:element name="querySequence" minOccurs = "1" maxOccurs="1">
                    	<xs:simpleType>
                    		<xs:restriction base="xs:string">
                    			<xs:pattern value="([A-Z\s])*"/>
                    		</xs:restriction>
                    	</xs:simpleType>
                    </xs:element>
                    
                    <!-- max number of regular expressions is set to 5 -->
                    <xs:element name="regularExpression" minOccurs = "0" maxOccurs="5" default="">
                    	<xs:simpleType>
                    		<xs:restriction base="xs:string">
                    			<xs:pattern value="([ACDEFGHIKLMNPQRSTVWY0-9.,^$*+?|\[\]{}()\s])*"/>
                    		</xs:restriction>
                    	</xs:simpleType>
                    </xs:element>
                    
                    <!-- max number of elm identifier names is set to 5 -->
                    <xs:element name="elmIdentifierName" minOccurs = "0" maxOccurs="5" default="">
                    	<xs:simpleType>
                    		<xs:restriction base="xs:string">
                    			<xs:pattern value="([A-Za-z0-9\-_])*"/>
                    		</xs:restriction>
                    	</xs:simpleType>
                    </xs:element>
                    
                    <xs:element name="includeSecondaryStructureRecords" minOccurs="0" maxOccurs="1" default="no">
                        <xs:simpleType>
                        	<xs:restriction base="xs:string">
                            	<xs:enumeration value="yes"/>
                                <xs:enumeration value="no"/>
                            </xs:restriction>
                        </xs:simpleType>
                    </xs:element>
                    
                    <xs:element name="includeAccessibilityRecords" minOccurs="0" maxOccurs="1" default="no">
                        <xs:simpleType>
                        	<xs:restriction base="xs:string">
                            	<xs:enumeration value="yes"/>
                                <xs:enumeration value="no"/>
                            </xs:restriction>
                        </xs:simpleType>
                    </xs:element>
                    
                </xs:sequence>
            </xs:complexType>
        </xs:element>

        <xs:element name="RunJobResponse">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name = "JobIdentifier" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
            
        <xs:element name="GetStatus">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="JobIdentifier" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
            
        <xs:element name="Status" type="xs:string"/>
        <xs:element name="StatusDetails" type="xs:string"/>
        
        <xs:element name="GetStatusResponse">
            <xs:complexType>
                <xs:sequence>
                    <xs:element ref="tns:Status"/>
                    <xs:element ref="tns:StatusDetails" minOccurs="0" maxOccurs="1"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
            
        <xs:element name="GetResult">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="JobIdentifier" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
            
        <xs:element name="GetResultResponse">
        	
        	<xs:complexType>
				<xs:sequence>
					<xs:element name="sequence"  type="tns:SequenceType" minOccurs = "1" maxOccurs="1">
						<xs:annotation>
							<xs:documentation>Sequence details</xs:documentation>
						</xs:annotation>
					</xs:element>
					
					<xs:element name="structureFilterRecord"  type="tns:StructureFilterRecordType" minOccurs = "0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>Structure Filter Record details.</xs:documentation>
						</xs:annotation>
					</xs:element>
				
					<xs:element name="secondaryStructureRecord" type="tns:SecondaryStructureRecordType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>Secondary Structure Record details.</xs:documentation>
						</xs:annotation>
					</xs:element>
	
					<xs:element name="accessibilityRecord" type="tns:AccessibilityRecordType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>Accessibility Record details.</xs:documentation>
						</xs:annotation>
					</xs:element>
					
				</xs:sequence>
			</xs:complexType>
		
		</xs:element>
	
		<xs:complexType name="SequenceType">
			<xs:sequence>
				<xs:element name="identifier">
				    <xs:annotation>
						<xs:documentation>The identifier of an entry.</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
				    	<xs:restriction base="xs:string">
					   		<xs:pattern value=".*"/>
				    	</xs:restriction>
					</xs:simpleType>
				</xs:element>
				
				<xs:element name="sequence">
					<xs:annotation>
						<xs:documentation>The sequence of an entry.</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
				    	<xs:restriction base="xs:string">
					   		<xs:pattern value="[A-Za-z\n]+"/> 
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	    
	    <xs:complexType name="AccessibilityRecordType">
	    	<xs:annotation>
				<xs:documentation>accessibility details for the query sequence</xs:documentation>
			</xs:annotation>
			
			<xs:sequence>
				<xs:element name="position" type="xs:integer" minOccurs = "0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>This is the position in the sequence. This field may sometimes be empty due to gaps in
										  the sequence-structure alignment.
						</xs:documentation>
					</xs:annotation>
				</xs:element>
						
				<xs:element name="accessibility" type="xs:decimal" minOccurs = "0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>This is the accessibility for the specified position in the match in the sequence.</xs:documentation>
					</xs:annotation>
				</xs:element>
						
				<xs:element name="targetDomainStructure" type="xs:string">
					<xs:annotation>
						<xs:documentation>This is the target domain structure for the specified position in the sequence. The target domain identifier (derived/taken from SCOP) is 
						 	  		  	  composed of the pdb file (first 4 chars) and the specific polypeptide chain (subsequent chars)</xs:documentation>
					</xs:annotation>
				</xs:element>
					
			</xs:sequence>
		</xs:complexType>
					
		<xs:complexType name="SecondaryStructureRecordType">
			<xs:annotation>
				<xs:documentation>secondary structure details for the query sequence</xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<xs:element name="start" type="xs:integer" minOccurs = "0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>This is the start value of the match in the sequence. This field may sometimes be empty due to gaps in
										  the sequence-structure alignment</xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="end" type="xs:integer" minOccurs = "0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>This is the end value of the match in the sequence. This field may sometimes be empty due to gaps in
										  the sequence-structure alignment.</xs:documentation>
					</xs:annotation>
				</xs:element>
						
				<xs:element name="secondaryStructure" type="xs:string">
					<xs:annotation>
						<xs:documentation>This is the secondary structure for the specified positions in the sequence.</xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="targetDomainStructure" type="xs:string">
					<xs:annotation>
						<xs:documentation>This is the target domain structure for the specified positions in the sequence. The target domain identifier (derived/taken from SCOP) is 
							 	  		  composed of the pdb file (first 4 chars) and the specific polypeptide chain (subsequent chars)</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
        
        <xs:complexType name="StructureFilterRecordType">
        	<xs:annotation>
				<xs:documentation>details of each regular expression match evaluated by the structure filter</xs:documentation>
			</xs:annotation>
			
			<xs:sequence>
				<xs:element name="ELMIdentifier" type="xs:string" nillable="true">
					<xs:annotation>
						<xs:documentation>A reference to an ELM in the ELM resource(http://elm.eu.org) </xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="regularExpression" type="xs:string" nillable="false">
					<xs:annotation>
						<xs:documentation>A regular expression describing the linear motif.</xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="start" type="xs:integer">
					<xs:annotation>
						<xs:documentation>This is the start value of the match in the sequence.</xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="end" type="xs:integer">
					<xs:annotation>
						<xs:documentation>This is the end value of the match in the sequence.</xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="accessibilityScore" type="xs:decimal">
					<xs:annotation>
						<xs:documentation>This is the accessibility score for the specified match in the sequence. 
										  The scores vary over a range of 0.0 (worst) to 1.5 (best).</xs:documentation>
					</xs:annotation>
				</xs:element>
				
				<xs:element name="accessibilityScorePValue" type="xs:decimal">
					<xs:annotation>
						<xs:documentation>This is the p-value associated with the accessibility score for the specified match in the sequence. 
						</xs:documentation>
					</xs:annotation>
				</xs:element>
				
				<xs:element name="secondaryStructureScore" type="xs:decimal">
					<xs:annotation>
						<xs:documentation>This is the secondary structure score for the specified match in the sequence. 
							   		  	  The scores vary over a range of 0.0 (worst) to 1.0 (best).</xs:documentation>
					</xs:annotation>
				</xs:element>
				
				<xs:element name="secondaryStructureScorePValue" type="xs:decimal">
					<xs:annotation>
						<xs:documentation>This is the p-value associated with the secondary structure score for the specified match in the sequence. 
						</xs:documentation>
					</xs:annotation>
				</xs:element>
				
				<xs:element name="totalScore" type="xs:decimal">
					<xs:annotation>
						<xs:documentation>This is the total score for the specified match in the sequence. 
							   		  	  It is a combination of the secondary structure score and the accessibility score.</xs:documentation>
					</xs:annotation>
				</xs:element>
				
				<xs:element name="totalScorePValue" type="xs:decimal">
					<xs:annotation>
						<xs:documentation>This is the p-value associated with the total score for the specified match in the sequence. 
						</xs:documentation>
					</xs:annotation>
				</xs:element>
				
				<xs:element name="targetDomainStructure" type="xs:string">
					<xs:annotation>
						<xs:documentation>This is the target domain structure for the specified match in the sequence. The target domain identifier (derived/taken from SCOP) is 
								   		  composed of the pdb file (first 4 chars) and the specific polypeptide chain (subsequent chars)</xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="percentageIdentity" type="xs:decimal">
					<xs:annotation>
						<xs:documentation>The percentage identity gives the similarity of the domain sequence to the query sequence.</xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="benchmarkAssignment" type="xs:string">
					<xs:annotation>
						<xs:documentation>Based on a benchmark of true motifs in solved structures, the benchmark assignment is one of sparse, neutral or enriched.</xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="individualResidueValues" type="tns:IndividualResidueValuesType" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>The accessibility and secondary structure values for each residue in the match.</xs:documentation>
					</xs:annotation>
				</xs:element>
				
			</xs:sequence>
		</xs:complexType>
			
		<xs:complexType name="IndividualResidueValuesType">
			<xs:annotation>
				<xs:documentation>accessibility and secondary structure values for each residue in the match</xs:documentation>
			</xs:annotation>
		
			<xs:sequence>
			
				<xs:element name="position" type="xs:integer" minOccurs = "0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>This is the position in the specified match in the sequence. </xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="targetDomainStructure" type="xs:string" minOccurs = "0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>This is the target domain structure for the specified position in the sequence. The target domain identifier (derived/taken from SCOP) is 
										  composed of the pdb file (first 4 chars) and the specific polypeptide chain (subsequent chars)</xs:documentation>
					</xs:annotation>
				</xs:element>
			
		
				<xs:element name="accessibility" type="xs:decimal" minOccurs = "0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>This is the accessibility for the specified position in the match in the sequence.</xs:documentation>
					</xs:annotation>
				</xs:element>
			
				<xs:element name="secondaryStructure" type="xs:string" minOccurs = "0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>This is the secondary structure for the specified position in the match in the sequence. </xs:documentation>
					</xs:annotation>
				</xs:element>
			
			</xs:sequence>
		</xs:complexType>
	
        <xs:element name="FaultDescription" type="xs:string"/>
        
        <xs:element name="JobIdentifierFault">
            <xs:complexType>
                <xs:sequence>
                    <xs:element ref="tns:FaultDescription"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        
        </xs:schema>
    </types>
    
    <message name="RunJobMsg">
        <part name="parameters" element="tns:RunJob"/>
    </message>
    
    <message name="RunJobResponseMsg">
        <part name="parameters" element="tns:RunJobResponse"/>
    </message>
    
    <message name="GetStatusMsg">
        <part name="parameters" element="tns:GetStatus"/>
    </message>
    
    <message name="GetStatusResponseMsg">
        <part name="parameters" element="tns:GetStatusResponse"/>
    </message>
    
    <message name="GetResultMsg">
        <part name="parameters" element="tns:GetResult"/>
    </message>
    
    <message name="GetResultResponseMsg">
        <part name="parameters" element="tns:GetResultResponse"/>
    </message>
    
    <message name="JobIdentifierFaultMsg">
        <part name="fault" element="tns:JobIdentifierFault"/>
    </message>
    
    <portType name="StructureFilter">
    
        <operation name="RunJob">
            <documentation>This operation is the initial operation in a stateful interaction with the Structure Filter service.</documentation>
            <input message="tns:RunJobMsg"/>
            <output message="tns:RunJobResponseMsg"/>
        </operation>
        
        <operation name="GetStatus">
            <documentation>This operation returns the status of a job identified by its job identifier. A client should use this operation to be aware when/if the results are available.</documentation>
            <input message="tns:GetStatusMsg"/>
            <output message="tns:GetStatusResponseMsg"/>
            <fault name="JobIdentifierFault" message="tns:JobIdentifierFaultMsg"/>
        </operation>
        
        <operation name="GetResult">
            <documentation>This operation returns the resulting predictions.</documentation>
            <input message="tns:GetResultMsg"/>
            <output message="tns:GetResultResponseMsg"/>
            <fault name="JobIdentifierFault" message="tns:JobIdentifierFaultMsg"/>
        </operation>
        
    </portType>
    
    <binding name="StructureFilterBinding" type="tns:StructureFilter">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        
        <operation name="RunJob">
            <soap:operation soapAction="http://structureFilter.embl.de/StructureFilter/RunJob"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
        
        <operation name="GetStatus">
            <soap:operation soapAction="http://structureFilter.embl.de/StructureFilter/GetStatus"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
            <fault name="JobIdentifierFault">
                <soap:fault name="JobIdentifierFault" use="literal"/>
            </fault>
        </operation>
        
        <operation name="GetResult">
            <soap:operation soapAction="http://structureFilter.embl.de/StructureFilter/GetResult"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
            <fault name="JobIdentifierFault">
                <soap:fault name="JobIdentifierFault" use="literal"/>
            </fault>
        </operation>
    
    </binding>
    
    <service name="StructureFilter">
        <documentation>This  WSDL file describe the Structure Filter Web Service. 
	    This web service is useful for evaluating the location of candidate short regulatory sequences in proteins (linear motifs) 
	    which need to be accessible to interact with their ligand domains. The StructureFilter web-service calculates an accessibility 
	    score, secondary structure score and total score (as well as various other features) for each match of a regular expression or 
	    ELM in the query sequence for which structural information is available. (If a regular expression match is determined as having
	    no associated structural information available, no reference is made to this match in the result set.)
        <doc:ServiceDocumentation xmlns:doc="http://www.bccs.uib.no/ServiceDocumentation" 
        	                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                                  xsi:schemaLocation="http://www.bccs.uib.no/ServiceDocumentation http://structurefilter.embl.de/webservice/schema/ServiceDocumentation.xsd">
       		<doc:Reference>A structure filter for the Eukaryotic Linear Motif Resource. Allegra Via, Cathryn M Gould, Christine Gemuend, Toby J Gibson and 
       		Manuela Helmer-Citterich. (BMC Bioinformatics, 2009, in review)</doc:Reference>
       		<doc:WebSite></doc:WebSite>
       		<doc:SampleClient>http://structurefilter.embl.de/webservice/clients/structureFilterClient.txt</doc:SampleClient>
    	          
       </doc:ServiceDocumentation>
       </documentation>
       <port name="StructureFilter" binding="tns:StructureFilterBinding">
            <soap:address location="http://luna.embl.de:8080/axis2/services/StructureFilter"/>
        </port>
    </service>

</definitions>

