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

Class SequenceQuery

source code

       object --+    
                |    
SequenceDataQuery --+
                    |
                   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_or_query, 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)
Add a constraint to the query, and return self for chaining.
source code
 
set_sequence(self, f)
Add a sequence holding object to the query.
source code

Inherited from SequenceDataQuery: bed, fasta, gff3

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_or_query, root=None)
(Constructor)

source code 

Constructor

>>> s = Service("www.flymine.org/query")
>>> bio_query = SequenceQuery(s, "Gene")
<interminebio.SequenceQuery xxx>
>>> q = s.new_query("Gene").where(s.model.Gene.symbol == ["h", "r", "eve", "zen"])
>>> bio_query = SequenceQuery(q)
<interminebio.SequenceQuery yyy>
Parameters:
  • service_or_query (intermine.webservice.Service or intermine.query.Query) - The service to connect to, or a query to wrap.
  • 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.