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

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

handle_starttag(tag, attrs)[source]

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