Skip to content

Commit

Permalink
Remove deprecated 'center' aliases in GenomeDiagram
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Jul 12, 2013
1 parent 472aae3 commit d508b01
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 33 deletions.
14 changes: 0 additions & 14 deletions Bio/Graphics/GenomeDiagram/_AbstractDrawer.py
Expand Up @@ -433,20 +433,6 @@ def __init__(self, parent, pagesize='A3', orientation='landscape',
else:
self.cross_track_links = cross_track_links

@property
def xcentre(self):
"""Backwards compatible alias for xcenter (DEPRECATED)"""
warnings.warn("The .xcentre attribute is deprecated, use .xcenter instead",
Bio.BiopythonDeprecationWarning)
return self.xcenter

@property
def ycentre(self):
"""Backwards compatible alias for ycenter (DEPRECATED)"""
warnings.warn("The .ycentre attribute is deprecated, use .ycenter instead",
Bio.BiopythonDeprecationWarning)
return self.ycenter

def set_page_size(self, pagesize, orientation):
""" set_page_size(self, pagesize, orientation)
Expand Down
14 changes: 2 additions & 12 deletions Bio/Graphics/GenomeDiagram/_Graph.py
Expand Up @@ -86,7 +86,7 @@ class GraphData(object):
"""
def __init__(self, id=None, data=None, name=None, style='bar',
color=colors.lightgreen, altcolor=colors.darkseagreen,
center=None, colour=None, altcolour=None, centre=None):
center=None, colour=None, altcolour=None):
"""__init__(self, id=None, data=None, name=None, style='bar',
color=colors.lightgreen, altcolor=colors.darkseagreen)
Expand All @@ -107,8 +107,7 @@ def __init__(self, id=None, data=None, name=None, style='bar',
values (some styles only) (overridden by backwards
compatible argument with UK spelling, colour).
o center Value at which x-axis crosses y-axis (overridden by
backwards comparible argument with UK spelling, centre).
o center Value at which x-axis crosses y-axis.
"""

Expand All @@ -117,8 +116,6 @@ def __init__(self, id=None, data=None, name=None, style='bar',
color = colour
if altcolour is not None:
altcolor = altcolour
if centre is not None:
center = centre

self.id = id # Unique identifier for the graph
self.data = {} # holds values, keyed by sequence position
Expand All @@ -133,13 +130,6 @@ def __init__(self, id=None, data=None, name=None, style='bar',
self.linewidth = 2 # linewidth to use in line graphs
self.center = center # value at which x-axis crosses y-axis

@property
def centre(self):
"""Backwards compatible alias for center (DEPRECATED)."""
warnings.warn("The .centre attribute is deprecated, use .center instead",
Bio.BiopythonDeprecationWarning)
return self.center

def set_data(self, data):
""" set_data(self, data)
Expand Down
6 changes: 3 additions & 3 deletions DEPRECATED
Expand Up @@ -177,9 +177,9 @@ GenomeDiagram originally used colour and centre (UK spelling of color and
center) for argument names. As part of its integration into Biopython 1.50,
this will support both colour and color, and both centre and center, to help
people port existing scripts written for the standalone version of
GenomeDiagram. However, these were deprecated in Release 1.55 final, and we
intend to eventually remove support for colour and centre in later releases
of Biopython.
GenomeDiagram. However, these were deprecated in Release 1.55 final.
Support for centre was removed in Release 1.62, and we intend to eventually
remove support for colour in later releases of Biopython.

Bio.AlignAce and Bio.MEME
=========================
Expand Down
7 changes: 3 additions & 4 deletions Doc/Tutorial.tex
Expand Up @@ -80,7 +80,7 @@

\author{Jeff Chang, Brad Chapman, Iddo Friedberg, Thomas Hamelryck, \\
Michiel de Hoon, Peter Cock, Tiago Antao, Eric Talevich, Bartek Wilczy\'{n}ski}
\date{Last Update -- 22 March 2013 (Biopython 1.61+)}
\date{Last Update -- 12 July 2013 (Biopython 1.61+)}

%Hack to get the logo at the start of the HTML front page:
%(hopefully this isn't going to be too wide for most people)
Expand Down Expand Up @@ -15408,9 +15408,8 @@ \subsection{Converting old code}
you will have to make a few changes - most importantly to your import statements.

Also, the older version of GenomeDiagram used only the UK spellings of color and
center (colour and centre). As part of the integration into Biopython, both
forms can now be used for argument names. However, at some point in the future the
UK spellings may be deprecated.
center (colour and centre). You will need to change to the American spellings,
although for several years the Biopython version of GenomeDiagram supported both.

For example, if you used to have:
\begin{verbatim}
Expand Down

0 comments on commit d508b01

Please sign in to comment.