Mercurial > repos > jjjjia > cpo_prediction
changeset 24:e5a7da2239af draft
planemo upload
author | jjjjia |
---|---|
date | Wed, 29 Aug 2018 02:31:49 -0400 |
parents | 2cca036ceb91 |
children | 573136f142b6 |
files | cpo_galaxy_prediction.py cpo_galaxy_tree.py |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/cpo_galaxy_prediction.py Wed Aug 29 01:42:01 2018 -0400 +++ b/cpo_galaxy_prediction.py Wed Aug 29 02:31:49 2018 -0400 @@ -677,7 +677,7 @@ for item in lindaOut: out.write("%s\n" % item) - tsvOut.append("new\tID\tExpected Species\tMLST Species\tSequence Type\tMLST Scheme\tCarbapenem Resistance Genes\tOther AMR Genes\tPlasmid Best Match\tTotal Plasmids\tPlasmids ID\tNum_Contigs\tPlasmid Length\tPlasmid RepType\tPlasmid Mobility\tNearest Reference\tDefinitely Plasmid Contigs\tLikely Plasmid Contigs") + tsvOut.append("new\tID\tExpected Species\tMLST Species\tSequence Type\tMLST Scheme\tCarbapenem Resistance Genes\tOther AMR Genes\tPlasmid Best Match\tPlasmid Identity\tPlasmid Shared Hash\tTotal Plasmids\tPlasmids ID\tNum_Contigs\tPlasmid Length\tPlasmid RepType\tPlasmid Mobility\tNearest Reference\tDefinitely Plasmid Contigs\tLikely Plasmid Contigs") #start with ID temp = "\t" temp += (ID + "\t") @@ -694,6 +694,8 @@ #lastly plasmids temp += str(plasmidFamily[list(plasmidFamily.keys())[0]].name) + "\t" + temp += str(plasmidFamily[list(plasmidFamily.keys())[0]].identity) + "\t" + temp += str(plasmidFamily[list(plasmidFamily.keys())[0]].sharedHashes) + "\t" temp+= str(len(mSuitePlasmids)) + "\t" plasmidID = "" contigs = ""
--- 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")