ample.modelling.octopus_predict module

Created on 18 Feb 2013

@author: jmht

Query the octopus server http://octopus.cbr.su.se to get transmembrane predictions

class OctopusPredict[source]

Bases: object

Query the octopus server http://octopus.cbr.su.se to get transmembrane predictions

Methods

getFasta(fastafile) Given a fastafile, extract the first sequence
getPredict(name, fasta[, directory]) Get the octopus prediction for the given fasta sequence string
octopusFileUrls(fasta) Query the server for a prediction for the given fasta sequence.
writeFiles(name, directory) Write the files on the server to disk
getFasta(fastafile)[source]
Given a fastafile, extract the first sequence and return it as

separated string

getPredict(name, fasta, directory=None)[source]

Get the octopus prediction for the given fasta sequence string

Args: fasta – fasta sequence string name – name for the files directory – directory to write files to

Sets the topo and nnprf attributes

octopusFileUrls(fasta)[source]

Query the server for a prediction for the given fasta sequence.

Args: fasta – a single fasta sequence as a string

Sets the urls of the topo and nnprf files

writeFiles(name, directory)[source]

Write the files on the server to disk

Args: directory: where to write files name: name for files (with suffix .topo and .nnprf)

class ParseFileUrl[source]

Bases: HTMLParser.HTMLParser

Parse the page returned by an octopus search to get the links to the files

Attributes:
entitydefs

Methods

check_for_whole_start_tag(i)
close() Handle any buffered data.
feed(data) Feed data to the parser.
get_starttag_text() Return full source of start tag: ‘<…>’.
getpos() Return current line number and offset.
goahead(end)
handle_charref(name)
handle_comment(data)
handle_data(data)
handle_decl(decl)
handle_endtag(tag)
handle_entityref(name)
handle_pi(data)
handle_startendtag(tag, attrs)
handle_starttag(tag, attrs) Set recording whenever we encounter a tag so handle_data can process it
parse_bogus_comment(i[, report])
parse_comment(i[, report])
parse_declaration(i)
parse_endtag(i)
parse_html_declaration(i)
parse_marked_section(i[, report])
parse_pi(i)
parse_starttag(i)
reset() Reset this instance.
updatepos(i, j)
clear_cdata_mode  
error  
set_cdata_mode  
unescape  
unknown_decl  
handle_starttag(tag, attrs)[source]

Set recording whenever we encounter a tag so handle_data can process it