Utopia

This is a test of the BLAST (DDBJ) service.
Test filesDownload the files for this test
Test runRun test now
Support reference#169-170
Tests the BLAST search using the Utopia plugin.
Show/hide recent test logs
view log 1 week agoFAILED

Test began: 2012-05-09 02:02:12 Test ended: 2012-05-09 02:02:13 Result : Test failure ------ stderr and stdout follow ------ The BLAST service test replies on getting a sequence from UniProt. This step has failed.Download this log...
view log 2 weeks agoFAILED

Test began: 2012-05-07 11:29:10 Test ended: 2012-05-07 11:29:11 Result : Test failure ------ stderr and stdout follow ------ The BLAST service test replies on getting a sequence from UniProt. This step has failed.Download this log...
view log 2 weeks agoFAILED

Test began: 2012-05-04 02:50:24 Test ended: 2012-05-04 02:50:29 Result : Test failure ------ stderr and stdout follow ------ The BLAST service test replies on getting a sequence from UniProt. This step has failed.Download this log...
view log 1 month agoFAILED

Test began: 2012-04-15 12:50:04 Test ended: 2012-04-15 12:50:05 Result : Test failure ------ stderr and stdout follow ------ The BLAST service test replies on getting a sequence from UniProt. This step has failed.Download this log...
view log 1 month agoFAILED

Test began: 2012-04-13 14:31:01 Test ended: 2012-04-13 14:31:02 Result : Test failure ------ stderr and stdout follow ------ The BLAST service test replies on getting a sequence from UniProt. This step has failed.Download this log...
view log 1 month agoFAILED

Test began: 2012-04-11 15:01:13 Test ended: 2012-04-11 15:01:14 Result : Test failure ------ stderr and stdout follow ------ The BLAST service test replies on getting a sequence from UniProt. This step has failed.Download this log...
view log 2 months agoFAILED

Test began: 2012-04-01 21:23:59 Test ended: 2012-04-01 21:24:00 Result : Test failure ------ stderr and stdout follow ------ The BLAST service test replies on getting a sequence from UniProt. This step has failed.Download this log...
view log 2 months agoFAILED

Test began: 2012-03-09 06:07:27 Test ended: 2012-03-09 06:07:28 Result : Test failure ------ stderr and stdout follow ------ The BLAST service test replies on getting a sequence from UniProt. This step has failed.Download this log...
view log 2 months agoFAILED

Test began: 2012-03-07 15:29:05 Test ended: 2012-03-07 15:29:06 Result : Test failure ------ stderr and stdout follow ------ The BLAST service test replies on getting a sequence from UniProt. This step has failed.Download this log...
view log 3 months agoFAILED

Test began: 2012-02-17 20:21:33 Test ended: 2012-02-17 20:21:49 Result : Test failure ------ stderr and stdout follow ------ The BLAST service test replies on getting a sequence from UniProt. This step has failed.Download this log...
This test consists of the following files:
blast.py
#!/usr/bin/python
## SERVICE INTERFACE
import utopia
import SOAPpy
class BLAST(utopia.Service):
def description(self):
return 'protein_sequence', 'searching', 'UniProt_accession_list', 'BLAST search against the UniProt protein database'
def invoke(self, source):
# Ensure input are of correct type (they should be!)
if type(source) != utopia.Node or source.getNodeClass() != 'source':
return utopia.Exception('Expected %s but got %s' % (utopia.Node, type(source)))
# Get source > complex > protein > sequence
cx = source.getComplex()
seq = cx.getSequence()
# Get the ID of the sequence
ID = ''
if cx.has_key('utopia name'):
ID = cx['utopia name']
else:
return utopia.Exception("Could not find an ID for the input sequence")
# Get list of residue nodes
residues = seq.getResidues()
# Serialise sequence
seq_str = utopia.serialize(seq, 'raw')
# Remove gaps
seq_str = seq_str.replace('-','')
# finally, create a fasta sequence from the input
fastaStr = '>' + ID + '\n' + seq_str +'\n'
# Get web service proxy
proxy = SOAPpy.WSDL.Proxy('http://xml.nig.ac.jp/wsdl/Blast.wsdl')
# BLAST the query sequence
blastResult = proxy.searchSimple(program='blastp', database='UNIPROT', query=fastaStr)
# Check to see if we have any valid results, bail if not
if blastResult.find('No hits found') != -1 or blastResult.find('Sequences producing significant alignments:') == -1:
return utopia.Exception('No hits were found')
# Split results up into lines
lines = blastResult.splitlines()
# Skip through to the start of the results
lineCount = 0
while lines[lineCount].find('Sequences producing significant alignments:') == -1:
lineCount += 1
lineCount += 1
while len(lines[lineCount]) == 0:
lineCount += 1
hits = []
while len(lines[lineCount]) != 0:
hit = '';
# parse the hit
pos = 0;
while lines[lineCount][pos] != '|':
pos += 1
pos += 1
while lines[lineCount][pos] != '|':
pos += 1
pos += 1
while lines[lineCount][pos] != ' ':
hit += lines[lineCount][pos];
pos += 1
hit += ' '
# append the description - we don't filter out the scores
while lines[lineCount][pos] == ' ':
pos += 1
while pos != len(lines[lineCount]):
hit += lines[lineCount][pos];
pos += 1
hits.append(hit)
lineCount += 1
return hits
__all__ = ['BLAST']
if __name__ == '__main__':
import sys
utopia.init()
from uniprot_fetch import UniProtFetch
ret = 0
try:
input = 'OPSD_HUMAN'
plugin = UniProtFetch()
output = plugin.invoke(input)
if type(output) != utopia.Node:
ret = 1
print 'The BLAST service test replies on getting a sequence from UniProt. This step has failed.'
else:
input = output
plugin = BLAST()
output = plugin.invoke(input)
if type(output) != list:
ret = 1
print 'Service returned something other than a list.'
elif len(output) == 0:
ret = 2
print 'Service returned an empty list. This test should return hundreds.'
except Exception, e:
ret = 1
print e
sys.exit(ret)
»
- Login to post comments