Skip to content

Commit

Permalink
update GCPD
Browse files Browse the repository at this point in the history
added 1-pd or pd selector to gcpd plugin.
includes link to help doc.
  • Loading branch information
akeddy committed May 15, 2016
1 parent 99e4db8 commit 5f69500
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 20 deletions.
Binary file modified bin/PythonCode.pyc
Binary file not shown.
Binary file modified bin/images/Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/images/Logo2.5.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions bin/release_notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
<h3>New Features</h3>
<p>See <b>kiwi.cs.dal.ca/GenGIS/Revision_History</b> for all bug fixes.</p>

<h4>Version 2.5.1 (May 15, 2016)</h4>
<ul>
<li> Renamed Phylogenetic Distance Plugin to GCPD.<\li>
<li> Added PD/(1-PD) selection to GCPD plugin.<\li>
</ul>

<h4>Version 2.5.0 (March 5, 2016)</h4>

<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import dendropy


class PhylogeneticDistance( PhylogeneticDistanceLayout ):
class GCPD( PhylogeneticDistanceLayout ):

combinationMethods = {"Average(Local)": "AVGLOCAL", "Average(Global)": "AVGGLOBAL", "Sum": "SUM"}

Expand All @@ -32,6 +32,7 @@ def __init__(self, parent=None):
self.m_cboTreeLayerField.Append(tree.GetName())
self.m_cboTreeLayerField.SetSelection(0)
self.OnMeasureChanged("fake")


def OnOK(self, event):
self.Close()
Expand Down Expand Up @@ -59,8 +60,11 @@ def OnCalculate(self, event):
self.treeIndex = self.m_cboTreeLayerField.GetSelection()
# get selected combination method
selectedMethod = self.m_cboMeasure.GetStringSelection()
# get the state of the pd calculation (pd = 0, (1-pd)=1)
# GetSelection() -> returns index of selected colomn
state = self.m_rboxPDState.GetSelection()-1;

self.locWeights = self.Main( self.locSetIndex, self.treeIndex, self.combinationMethods[selectedMethod] )
self.locWeights = self.Main( self.locSetIndex, self.treeIndex, self.combinationMethods[selectedMethod],state )
self.PrintWeights(self.locSetIndex, self.locWeights)

def PrintWeights(self, locSetIndex, locWeights):
Expand Down Expand Up @@ -138,7 +142,7 @@ def AddDataToLocationLayer(self):
val.append("0")
GenGIS.layerTree.GetLocationSetLayer(self.locSetIndex).GetController().AddMetadata( name , val )

def Main(self,locationLayer, treeLayer, combinationMethod):
def Main(self,locationLayer, treeLayer, combinationMethod,flipWeights=False):
#need at least location, and tree layers.
# check required data has been loaded
# treeLayer = 0
Expand Down Expand Up @@ -229,7 +233,7 @@ def Main(self,locationLayer, treeLayer, combinationMethod):
PhyloDistance[a,b].extend(weights)
else:
PhyloDistance[a,b] = weights
flipWeights = True
#flipweights = True
if flipWeights:
# flip PD so that closely related things have the largest values
for key, val in PhyloDistance.iteritems():
Expand All @@ -243,3 +247,6 @@ def Main(self,locationLayer, treeLayer, combinationMethod):
# print phyloDistComb
locationWeights = self.WeightsToLocations(phyloDistComb)
return locationWeights

def OnHelp( self, event ):
wx.LaunchDefaultBrowser( 'http://kiwi.cs.dal.ca/GenGIS/index.php/Description_of_GenGIS_plugins#Geographically_Coupled_Phylogenetic_Distance_.28GCPD.29' )
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<property name="size">650,600</property>
<property name="style">wxDEFAULT_FRAME_STYLE</property>
<property name="subclass"></property>
<property name="title">Phylogenetic Distance Calculator</property>
<property name="title">Geographically Coupled Phylogenetic Distance Calculator</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
Expand Down Expand Up @@ -97,16 +97,16 @@
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="0">
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer4</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="0">
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
Expand Down Expand Up @@ -456,13 +456,72 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;PD&quot; &quot;1-PD&quot;</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">PD State</property>
<property name="majorDimension">2</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_rboxPDState</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property>
<property name="label">Details</property>
<property name="minimum_size"></property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class PhylogeneticDistanceLayout ( wx.Frame ):

def __init__( self, parent ):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Phylogenetic Distance Calculator", pos = wx.DefaultPosition, size = wx.Size( 650,600 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Geographically Coupled Phylogenetic Distance Calculator", pos = wx.DefaultPosition, size = wx.Size( 650,600 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )

self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )
Expand Down Expand Up @@ -61,6 +61,11 @@ def __init__( self, parent ):

bSizer4.Add( fgSizer2, 0, wx.EXPAND, 5 )

m_rboxPDStateChoices = [ u"PD", u"1-PD" ]
self.m_rboxPDState = wx.RadioBox( self, wx.ID_ANY, u"PD State", wx.DefaultPosition, wx.DefaultSize, m_rboxPDStateChoices, 2, wx.RA_SPECIFY_COLS )
self.m_rboxPDState.SetSelection( 1 )
bSizer4.Add( self.m_rboxPDState, 0, wx.ALL, 5 )

bSizer5.Add( bSizer4, 0, wx.EXPAND, 5 )

sbSizer1 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"Details" ), wx.VERTICAL )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
def name():
return "Phylogenetic Distance"
return "GCPD"

def version():
return "Version 1.0"
return "Version 2.0"

def description():
return "Perform phylogenetic distance calculation for use with cartograms."
return "Perform geographically coupled phylogenetic distance calculation for use with cartograms."

def authors():
return "Alexander Keddy"
Expand Down
2 changes: 1 addition & 1 deletion src/core/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ App::App():
m_bCurrentlySerializing( false ),
m_bSaveIsUpToDate( true ),
m_bIsEmptySession( true ),
m_appVersion( wxT( "2.5.0" ) )
m_appVersion( wxT( "2.5.1" ) )

{
m_colourMapManager.reset(new ColourMapManager());
Expand Down
5 changes: 3 additions & 2 deletions src/core/App.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ namespace GenGIS
V2_41 = 14,
V2_42 = 15,
V2_50 = 16,
//V2_51= 17
V2_51= 17,
//V2_52=18,
//
GENGIS_VERSION = V2_50,
GENGIS_VERSION = V2_51,
SAVE_VERSION = V2_50 /* For serialization: The last version of GenGIS
whose session file is compatible with this release. */
};
Expand Down
8 changes: 4 additions & 4 deletions win32/InnoInstaller/GenGIS.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{DF26EC4F-7800-4CB5-94DC-83565D0CDC27}
AppId={{4E7EA3FD-F4D5-489B-9471-63722BA8912A}
AppName=GenGIS
AppVerName=GenGIS v2.5.0
AppVerName=GenGIS v2.5.1
; Remember to update the APP_VERSION::CURRENT enum in 'App.hpp' to match the AppVerName number
AppPublisher=Beiko Lab
AppPublisherURL=http://kiwi.cs.dal.ca/GenGIS
AppSupportURL=http://kiwi.cs.dal.ca/GenGIS
AppUpdatesURL=http://kiwi.cs.dal.ca/GenGIS
DefaultDirName={pf}\GenGIS2.5.0
DefaultGroupName=GenGIS2.5.0
DefaultDirName={pf}\GenGIS2.5.1
DefaultGroupName=GenGIS2.5.1
AllowNoIcons=yes
LicenseFile=..\..\bin\license.txt
OutputDir=..\..\win32\InnoInstaller\Setup
Expand Down

0 comments on commit 5f69500

Please sign in to comment.