diff cpo_galaxy_tree.py @ 24:e5a7da2239af draft

planemo upload
author jjjjia
date Wed, 29 Aug 2018 02:31:49 -0400
parents 596bf8a792de
children 573136f142b6
line wrap: on
line diff
--- a/cpo_galaxy_tree.py	Wed Aug 29 01:42:01 2018 -0400
+++ b/cpo_galaxy_tree.py	Wed Aug 29 02:31:49 2018 -0400
@@ -96,6 +96,8 @@
         self.MLSTScheme = "?"
         self.CarbapenemResistanceGenes ="?"
         self.plasmidBestMatch ="?"
+		self.plasmididentity =-1
+		self.plasmidsharedhashes ="?"
         self.OtherAMRGenes="?"
         self.TotalPlasmids = -1
         self.plasmids = []
@@ -182,6 +184,8 @@
         _results.OtherAMRGenes = (str(r.loc[r.index[i], 'Other AMR Genes']))
         _results.TotalPlasmids = int(r.loc[r.index[i], 'Total Plasmids'])
         _results.plasmidBestMatch = str(r.loc[r.index[i], 'Plasmid Best Match'])
+		_results.plasmididentity = str(r.loc[r.index[i], 'Plasmid Identity'])
+        _results.plasmidsharedhashes = float(r.loc[r.index[i], 'Plasmid Shared Hash'])
         for j in range(0,_results.TotalPlasmids):
             _plasmid = plasmidObj()
             _plasmid.PlasmidsID =(((str(r.loc[r.index[i], 'Plasmids ID'])).split(";"))[j])
@@ -273,6 +277,8 @@
             index = index + 1
             (t&"Reference").add_face(addFace("Plasmid Best Match"), index, "aligned")
             index = index + 1
+            (t&"Reference").add_face(addFace("Best Match Identity"), index, "aligned")
+            index = index + 1
             for i in range(len(distanceDict[list(distanceDict.keys())[0]])): #this loop adds the distance matrix
                 (t&"Reference").add_face(addFace(distanceDict[list(distanceDict.keys())[0]][i]), index + i, "aligned")
             index = index + len(distanceDict[list(distanceDict.keys())[0]])
@@ -326,6 +332,8 @@
             index = index + 1
             n.add_face(addFace(mData.plasmidBestMatch), index, "aligned")
             index = index + 1
+            n.add_face(addFace(mData.plasmididentity), index, "aligned")
+            index = index + 1			
             for i in range(len(distanceDict[list(distanceDict.keys())[0]])): #this loop adds distance matrix
                 if (n.name in distanceDict): #make sure the column is in the distance matrice
                     n.add_face(addFace(list(distanceDict[n.name])[i]), index + i, "aligned")