Package Bio :: Package Graphics :: Package GenomeDiagram :: Module _GraphSet :: Class GraphSet
[hide private]
[frames] | no frames]

Class GraphSet

source code

object --+
         |
        GraphSet

Graph Set.

Attributes:
Instance Methods [hide private]
 
__init__(self, name=None)
Initialize.
source code
 
new_graph(self, data, name=None, style='bar', color=Color(.564706,.933333,.564706,1), altcolor=Color(.560784,.737255,.545098,1), linewidth=1, center=None, colour=None, altcolour=None, centre=None)
Add a GraphData object to the diagram.
source code
 
del_graph(self, graph_id)
Remove a graph from the set, indicated by its id.
source code
 
get_graphs(self)
Return list of all graphs in the graph set, sorted by id.
source code
 
get_ids(self)
Return a list of all ids for the graph set.
source code
 
range(self)
Return the lowest and highest base (or mark) numbers as a tuple.
source code
 
data_quartiles(self)
Return (minimum, lowerQ, medianQ, upperQ, maximum) values as a tuple.
source code
 
to_string(self, verbose=0)
Return a formatted string with information about the set.
source code
 
__len__(self)
Return the number of graphs in the set.
source code
 
__getitem__(self, key)
Return a graph, keyed by id.
source code
 
__str__(self)
Return a formatted string with information about the feature set.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name=None)
(Constructor)

source code 

Initialize.

Arguments:
  • name String identifying the graph set sensibly
Overrides: object.__init__

new_graph(self, data, name=None, style='bar', color=Color(.564706,.933333,.564706,1), altcolor=Color(.560784,.737255,.545098,1), linewidth=1, center=None, colour=None, altcolour=None, centre=None)

source code 

Add a GraphData object to the diagram.

Arguments:
  • data List of (position, value) int tuples
  • name String, description of the graph
  • style String ('bar', 'heat', 'line') describing how the graph will be drawn
  • color colors.Color describing the color to draw all or 'high' (some styles) data (overridden by backwards compatible argument with UK spelling, colour).
  • altcolor colors.Color describing the color to draw 'low' (some styles) data (overridden by backwards compatible argument with UK spelling, colour).
  • linewidth Float describing linewidth for graph
  • center Float setting the value at which the x-axis crosses the y-axis (overridden by backwards compatible argument with UK spelling, centre)

Add a GraphData object to the diagram (will be stored internally).

get_graphs(self)

source code 

Return list of all graphs in the graph set, sorted by id.

Sorting is to ensure reliable stacking.

to_string(self, verbose=0)

source code 

Return a formatted string with information about the set.

Arguments:
  • verbose - Flag indicating whether a short or complete account of the set is required

__str__(self)
(Informal representation operator)

source code 
Return a formatted string with information about the feature set.
Overrides: object.__str__