Skip to content

Commit

Permalink
changed label in PresenceAbsence class for tree from logFC
Browse files Browse the repository at this point in the history
  • Loading branch information
sbastkowski committed May 16, 2022
1 parent b2d3e04 commit 83d7465
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions albatradis/PresenceAbsence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 83d7465

Please sign in to comment.