diff options
author | Frederick Muriuki Muriithi | 2021-10-04 04:46:14 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-10-19 10:12:51 +0300 |
commit | fe39bccc23186d0a0f0b51a792d4577aaca88bd1 (patch) | |
tree | a9360bb04a4105840114da781b3d7ca5cb18791c /gn3/heatmaps.py | |
parent | 77099cac68e8f4792bf54d8e1f7ce6f315bedfa7 (diff) | |
download | genenetwork3-fe39bccc23186d0a0f0b51a792d4577aaca88bd1.tar.gz |
Remove file I/O statements
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/non-clustered-heatmaps-and-flipping.gmi
* Remove file I/O from the function. If file I/O is needed, it will be
provided outside of this function.
Diffstat (limited to 'gn3/heatmaps.py')
-rw-r--r-- | gn3/heatmaps.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gn3/heatmaps.py b/gn3/heatmaps.py index adbfbc6..42231bf 100644 --- a/gn3/heatmaps.py +++ b/gn3/heatmaps.py @@ -224,7 +224,6 @@ def build_heatmap(traits_names, conn: Any): process_traits_data_for_heatmap( organised, traits_ids, chromosome_names), clustered, - "single_heatmap_{}".format(random_string(10)), y_axis=tuple( ordered_traits_names[traits_ids[order]] for order in traits_order), @@ -355,6 +354,9 @@ def generate_clustered_heatmap( loci_names: Sequence[Sequence[str]] = tuple(), output_dir: str = TMPDIR, colorscale=((0.0, '#0000FF'), (0.5, '#00FF00'), (1.0, '#FF0000'))): + data, clustering_data, x_axis=None, x_label: str = "", y_axis=None, + y_label: str = "", loci_names: Sequence[Sequence[str]] = tuple(), + colorscale=((0.0, '#0000FF'), (0.5, '#00FF00'), (1.0, '#FF0000'))): """ Generate a dendrogram, and heatmaps for each chromosome, and put them all into one plot. @@ -419,6 +421,4 @@ def generate_clustered_heatmap( showlegend=True, showscale=True, selector={"name": x_axis[-1]}) - image_filename = "{}/{}.html".format(output_dir, image_filename_prefix) - fig.write_html(image_filename) - return image_filename, fig + return fig |