![]() colors, linewidth = 0 )) # Test our drawing functions with example annotation annotation = seq. height, # Create head with 90 degrees tip # -> head width/length ratio = 1/2 head_ratio = 0.5, draw_head = draw_head, color = biotite. ![]() AdaptiveFancyArrow ( x, y, dx, dy, self. MISS_RIGHT : # If the feature extends into the prevoius or next line # do not draw an arrow head draw_head = False else : draw_head = True axes. qual = "sheet" : return True return False def draw ( self, axes, feature, bbox, loc, style_param ): x = bbox. key = "SecStr" : if "sec_str_type" in feature. _tail_width = tail_width def matches ( self, feature ): if feature. FeaturePlotter ): def _init_ ( self, head_width = 0.8, tail_width = 0.5 ): self. ![]() plot ( x_val, y_val, linewidth = 2, color = biotite. height, color = "white", linewidth = 0 ) axes. y0 # Draw white background to overlay the guiding line background = Rectangle ( bbox. sin ( x_val ) + 1 ) / 2 # Transform values for correct location in feature map x_val *= bbox. ![]() 1 turn per 3.6 residues to resemble natural helix n_turns = np. qual = "helix" : return True return False # The drawing function itself def draw ( self, axes, feature, bbox, loc, style_param ): # Approx. ![]() FeaturePlotter ): def _init_ ( self ): pass # Check whether this class is applicable for drawing a feature def matches ( self, feature ): if feature. # Code source: Patrick Kunzmann # License: BSD 3 clause from tempfile import gettempdir import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import Rectangle import biotite import biotite.structure as struc import .mmtf as mmtf import quence as seq import as graphics import .genbank as gb import as rcsb import as entrez import as dssp # Create 'FeaturePlotter' subclasses # for drawing the scondary structure features class HelixPlotter ( graphics. ![]()
0 Comments
Leave a Reply. |