Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Private Member Functions
Bio.Graphics.GenomeDiagram._CrossLink.CrossLink Class Reference

List of all members.

Public Member Functions

def __init__
def startA
def endA
def startB
def endB

Public Attributes

 featureA
 featureB
 color
 border
 flip

Private Member Functions

def _trackA
def _trackB

Detailed Description

Hold information for drawing a cross link between features.

Definition at line 12 of file _CrossLink.py.


Constructor & Destructor Documentation

def Bio.Graphics.GenomeDiagram._CrossLink.CrossLink.__init__ (   self,
  featureA,
  featureB,
  color = colors.lightgreen,
  border = None,
  flip = False 
)
Create a new cross link.

Arguments featureA and featureB should GenomeDiagram feature objects,
or 3-tuples (track object, start, end), and currently must be on
different tracks.

The color and border arguments should be ReportLab colour objects, or
for border use a boolean False for no border, otherwise it defaults to
the same as the main colour.

The flip argument draws an inverted cross link, useful for showing a
mapping where one sequence has been reversed. It is conventional to
also use a different colour (e.g. red for simple links, blue for any
flipped links).

Definition at line 16 of file _CrossLink.py.

00016 
00017                  color=colors.lightgreen, border=None, flip=False):
00018         """Create a new cross link.
00019         
00020         Arguments featureA and featureB should GenomeDiagram feature objects,
00021         or 3-tuples (track object, start, end), and currently must be on
00022         different tracks.
00023         
00024         The color and border arguments should be ReportLab colour objects, or
00025         for border use a boolean False for no border, otherwise it defaults to
00026         the same as the main colour.
00027         
00028         The flip argument draws an inverted cross link, useful for showing a
00029         mapping where one sequence has been reversed. It is conventional to
00030         also use a different colour (e.g. red for simple links, blue for any
00031         flipped links).
00032         """
00033         # Initialise attributes
00034         self.featureA = featureA
00035         self.featureB = featureB
00036         self.color = color            # default color to draw the feature
00037         self.border = border
00038         self.flip = flip

Here is the caller graph for this function:


Member Function Documentation

def Bio.Graphics.GenomeDiagram._CrossLink.CrossLink._trackA (   self,
  tracks 
) [private]

Definition at line 55 of file _CrossLink.py.

00055 
00056     def _trackA(self, tracks):
00057         try:
00058             track, start, end = self.featureA
00059             assert track in tracks
00060             return track
00061         except:
00062             for track in tracks:
00063                 for feature_set in track.get_sets():
00064                     if hasattr(feature_set, "features"):
00065                         if self.featureA in feature_set.features.values():
00066                             return track
00067             return None

def Bio.Graphics.GenomeDiagram._CrossLink.CrossLink._trackB (   self,
  tracks 
) [private]

Definition at line 84 of file _CrossLink.py.

00084 
00085     def _trackB(self, tracks):
00086         try:
00087             track, start, end = self.featureB
00088             assert track in tracks
00089             return track
00090         except:
00091             for track in tracks:
00092                 for feature_set in track.get_sets():
00093                     if hasattr(feature_set, "features"):
00094                         if self.featureB in feature_set.features.values():
00095                             return track
00096             return None

Definition at line 48 of file _CrossLink.py.

00048 
00049     def endA(self):
00050         try:
00051             return self.featureA.end
00052         except AttributeError:
00053             track, start, end = self.featureA
00054             return end
    

Definition at line 77 of file _CrossLink.py.

00077 
00078     def endB(self):
00079         try:
00080             return self.featureB.end
00081         except AttributeError:
00082             track, start, end = self.featureB
00083             return end
    

Definition at line 40 of file _CrossLink.py.

00040 
00041     def startA(self):
00042         try:
00043             return self.featureA.start
00044         except AttributeError:
00045             track, start, end = self.featureA
00046             return start

Definition at line 69 of file _CrossLink.py.

00069 
00070     def startB(self):
00071         try:
00072             return self.featureB.start
00073         except AttributeError:
00074             track, start, end = self.featureB
00075             return start


Member Data Documentation

Definition at line 36 of file _CrossLink.py.

Definition at line 35 of file _CrossLink.py.

Definition at line 33 of file _CrossLink.py.

Definition at line 34 of file _CrossLink.py.

Definition at line 37 of file _CrossLink.py.


The documentation for this class was generated from the following file: