Package interminebio :: Class SequenceQuery
[hide private]
[frames] | no frames]

Class SequenceQuery

source code

object --+
         |
        SequenceQuery

Class for querying InterMine Webservices for Sequence based data

This module allows you to construct queries that retrieve data about sequences and sequence features in biologically relevant formats.

The currently supported formats are UCSC-BED, GFF3, and FASTA.

Instance Methods [hide private]
 
__init__(self, service, root=None) source code
 
add_sequence_feature(self, *features)
Fasta, GFF3 and BED queries all can read information from SequenceFeatures.
source code
 
where(self, *args, **kwargs) source code
 
set_sequence(self, f)
Add a sequence holding object to the query.
source code
 
bed(self, ucsc_compatible=True)
Return a BedIterator object, which stringifies to the BED results, and works as an iterator over the lines.
source code
 
fasta(self)
Return a FastaIterator object, which stringifies to the Fasta results, and works as an iterator over the records (not the lines).
source code
 
gff3(self)
Return a GFF3Iterator object, which stringifies to the GFF3 results, and works as an iterator over the lines.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, service, root=None)
(Constructor)

source code 

Constructor

Parameters:
  • service (intermine.webservice.Service) - The service to connect to.
  • root (str) - The root class of the query
Overrides: object.__init__

add_sequence_feature(self, *features)

source code 

Add an arbitrarily long list of sequence features to the query.

Fasta, GFF3 and BED queries all can read information from SequenceFeatures. For Fasta you are advised to use the set_sequence method instead, as unlike the GFF3 and BED services, the Fasta service can only handle queries with one output column.

set_sequence(self, f)

source code 

Set the sequence column to retrieve.

Add a sequence holding object to the query. It can be a SequenceFeature, Protein or Sequence object.

Fasta queries, which read sequences rather than sequence features, currently only permit one output column.

bed(self, ucsc_compatible=True)

source code 

Get results as BED

Return a BedIterator object, which stringifies to the BED results, and works as an iterator over the lines. After iteration the header information is accessible with the iter.header() method

gff3(self)

source code 

Get results as GFF3

Return a GFF3Iterator object, which stringifies to the GFF3 results, and works as an iterator over the lines. After iteration the header information is accessible with the iter.header() method