From 83d7465deaff11019e40dd44648853e98f97888f Mon Sep 17 00:00:00 2001 From: Sarah Bastkowski Date: Mon, 16 May 2022 11:59:00 +0100 Subject: [PATCH] changed label in PresenceAbsence class for tree from logFC --- albatradis/PresenceAbsence.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/albatradis/PresenceAbsence.py b/albatradis/PresenceAbsence.py index 035a642..605e4cb 100644 --- a/albatradis/PresenceAbsence.py +++ b/albatradis/PresenceAbsence.py @@ -190,19 +190,18 @@ def logfc_matrix(self, outputfile): X[i, j] = sane_logfc(self.reports_to_genes[report][j]) linked = linkage(X, 'single') - xlabels = [os.path.basename(x) for x in self.genereports] plt.figure(figsize=(10, 7)) dendrogram(linked, orientation='top', - labels=xlabels, + labels=self.genereports, distance_sort='descending', show_leaf_counts=True) plt.ylabel("LogFC Distance") plt.savefig(outputfile + ".png") tree = hierarchy.to_tree(linked, False) - ntree = self.get_newick(tree, "", tree.dist, xlabels) + ntree = self.get_newick(tree, "", tree.dist, self.genereports) with open(outputfile, 'w') as fh: fh.write(ntree)