コード例 #1
0
 def test_plot_dist_matrix_88_bins(self):
     """Plot a distance matrix with 88 samples"""
     names = [
         "sample0_gt1000_bin{}".format(i) for i in range(88)
     ]
     matrix = np.genfromtxt(ospj(DATA_PATH, "expected_dist_matrix_88_bins.tsv"),
             delimiter="\t")
     heatmap = ospj(TMP_BASENAME_DIR, "hclust_heatmap.pdf")
     dendrogram = ospj(TMP_BASENAME_DIR, "hclust_dendrogram.pdf")
     dnadiff_dist_matrix.plot_dist_matrix(matrix, names, heatmap, dendrogram)
     ok_(os.path.exists(heatmap))
     ok_(os.path.exists(dendrogram))
コード例 #2
0
 def test_plot_dist_matrix_88_bins(self):
     """Plot a distance matrix with 88 samples"""
     names = ["sample0_gt1000_bin{}".format(i) for i in range(88)]
     matrix = np.genfromtxt(ospj(DATA_PATH,
                                 "expected_dist_matrix_88_bins.tsv"),
                            delimiter="\t")
     heatmap = ospj(TMP_BASENAME_DIR, "hclust_heatmap.pdf")
     dendrogram = ospj(TMP_BASENAME_DIR, "hclust_dendrogram.pdf")
     dnadiff_dist_matrix.plot_dist_matrix(matrix, names, heatmap,
                                          dendrogram)
     ok_(os.path.exists(heatmap))
     ok_(os.path.exists(dendrogram))
コード例 #3
0
 def test_plot_dist_matrix(self):
     """Plot a distance matrix"""
     names = [
         "sample0_gt1000_bin0",
         "sample0_gt1000_bin10",
         "sample0_gt1000_bin11",
         "sample0_gt1000_bin1",
         "sample0_gt1000_bin2",
         "sample1_gt1000_bin51",
         "sample1_gt1000_bin67",
         "sample1_gt1000_bin6",
     ]
     matrix = np.genfromtxt(ospj(DATA_PATH, "expected_dist_matrix.tsv"),
             delimiter="\t")
     heatmap = ospj(TMP_BASENAME_DIR, "hclust_heatmap.pdf")
     dendrogram = ospj(TMP_BASENAME_DIR, "hclust_dendrogram.pdf")
     dnadiff_dist_matrix.plot_dist_matrix(matrix, names, heatmap, dendrogram)
     ok_(os.path.exists(heatmap))
     ok_(os.path.exists(dendrogram))
コード例 #4
0
 def test_plot_dist_matrix(self):
     """Plot a distance matrix"""
     names = [
         "sample0_gt1000_bin0",
         "sample0_gt1000_bin10",
         "sample0_gt1000_bin11",
         "sample0_gt1000_bin1",
         "sample0_gt1000_bin2",
         "sample1_gt1000_bin51",
         "sample1_gt1000_bin67",
         "sample1_gt1000_bin6",
     ]
     matrix = np.genfromtxt(ospj(DATA_PATH, "expected_dist_matrix.tsv"),
                            delimiter="\t")
     heatmap = ospj(TMP_BASENAME_DIR, "hclust_heatmap.pdf")
     dendrogram = ospj(TMP_BASENAME_DIR, "hclust_dendrogram.pdf")
     dnadiff_dist_matrix.plot_dist_matrix(matrix, names, heatmap,
                                          dendrogram)
     ok_(os.path.exists(heatmap))
     ok_(os.path.exists(dendrogram))