diff --git a/src/pycirclize/circos.py b/src/pycirclize/circos.py index b705c7b..470515b 100644 --- a/src/pycirclize/circos.py +++ b/src/pycirclize/circos.py @@ -444,10 +444,10 @@ def initialize_from_matrix( outer_track.xticks_by_interval(ticks_interval, **ticks_kws) # Plot links - fromto_label2color = {f"{t[0]}{t[1]}": t[2] for t in link_cmap} + fromto_label2color = {f"{t[0]}--->{t[1]}": t[2] for t in link_cmap} for link in matrix.to_links(): from_label, to_label = link[0][0], link[1][0] - fromto_label = f"{from_label}{to_label}" + fromto_label = f"{from_label}--->{to_label}" # Set link color if fromto_label in fromto_label2color: color = fromto_label2color[fromto_label] diff --git a/src/pycirclize/parser/matrix.py b/src/pycirclize/parser/matrix.py index 9692225..18af35d 100644 --- a/src/pycirclize/parser/matrix.py +++ b/src/pycirclize/parser/matrix.py @@ -103,7 +103,7 @@ def parse_fromto_table( for row in fromto_table.itertuples(): from_label, to_label, value = str(row[1]), str(row[2]), row[3] if float(value) > 0: - fromto = f"{from_label}{to_label}" + fromto = f"{from_label}-->{to_label}" fromto2value[fromto] = value label2value_sum[from_label] += value label2value_sum[to_label] += value @@ -134,7 +134,7 @@ def parse_fromto_table( for row_label in all_labels: row_data = [] for col_label in all_labels: - row_data.append(fromto2value[f"{row_label}{col_label}"]) + row_data.append(fromto2value[f"{row_label}-->{col_label}"]) matrix_data.append(row_data) matrix_df = pd.DataFrame(matrix_data, index=all_labels, columns=all_labels)