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

Class GraphSet

source code

object --+
         |
        GraphSet

GraphSet

Provides:

Methods:

o __init__(self, set_id=None, name=None)    Called on instantiation

o new_graph(self, data, name, style='bar', color=colors.lightgreen,
          altcolor=colors.darkseagreen)    Create new graph in the set
                  from the passed data, with the passed parameters

o del_graph(self, graph_id) Delete graph with the passed id

o get_graphs(self)  Returns a list of all graphs

o get_ids(self)     Returns a list of graph ids

o range(self)       Returns the range covered by the graphs in the set

o to_string(self, verbose=0)    Returns a string describing the set

o __len__(self)     Returns the length of sequence covered by the set

o __getitem__(self, key)    Returns the graph with the id of the passed key

o __str__(self)     Returns a string describing the set

Attributes:

o id        Unique identifier for the set

o name      String describing the set

Instance Methods [hide private]
 
__init__(self, name=None)
o name String identifying the graph set sensibly
source code
 
new_graph(self, data, name=None, style='bar', color=colors.lightgreen, altcolor=colors.darkseagreen)
o data List of (position, value) int tuples
source code
 
del_graph(self, graph_id)
o graph_id Identifying value of the graph
source code
[Graph, Graph, ...]

get_graphs(self)
Return a list of all graphs in the graph set, sorted by id (for...
source code
[int, int, ...]

get_ids(self)
Return a list of all ids for the graph set
source code
(int, int)

range(self)
Returns the lowest and highest base (or mark) numbers as a tuple
source code
(float, float, float, float, float)

data_quartiles(self)
Returns the (minimum, lowerQ, medianQ, upperQ, maximum) values as...
source code
""

to_string(self, verbose=0)
o verbose Flag indicating whether a short or complete account of the set is required
source code
int

__len__(self)
Return the number of graphs in the set
source code
Graph

__getitem__(self, key)
Return a graph, keyed by id
source code
""

__str__(self)
Returns 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 
o name      String identifying the graph set sensibly

Overrides: object.__init__

new_graph(self, data, name=None, style='bar', color=colors.lightgreen, altcolor=colors.darkseagreen)

source code 
o data      List of (position, value) int tuples

o name      String, description of the graph

o style     String ('bar', 'heat', 'line') describing how the graph
            will be drawn

o color    colors.Color describing the color to draw all or 'high'
           (some styles) data (overridden by backwards compatible
           argument with UK spelling, colour).

o altcolor  colors.Color describing the color to draw 'low' (some
            styles) data (overridden by backwards compatible argument
            with UK spelling, colour).

o linewidth     Float describing linewidth for graph

o 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

del_graph(self, graph_id)

source code 
o graph_id        Identifying value of the graph

Remove a graph from the set, indicated by its id

get_graphs(self)

source code 
Return a list of all graphs in the graph set, sorted by id (for
reliable stacking...)

Returns:
[Graph, Graph, ...]

data_quartiles(self)

source code 
Returns the (minimum, lowerQ, medianQ, upperQ, maximum) values as
a tuple

Returns:
(float, float, float, float, float)

to_string(self, verbose=0)

source code 
o verbose       Flag indicating whether a short or complete account
                of the set is required

Returns a formatted string with information about the set

Returns:
""

__str__(self)
(Informal representation operator)

source code 
Returns a formatted string with information about the feature set

Returns:
""

Overrides: object.__str__