Skip to content

Commit

Permalink
added NA for heatmap
Browse files Browse the repository at this point in the history
  • Loading branch information
proost committed Sep 12, 2017
1 parent 0739c00 commit c02fea3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion planet/controllers/heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def heatmap_inchlib_json(cluster_id):
"nodes": {a["name"]: {
"count": 1,
"distance": 0,
"features": [round(a["values"][o], 3) for o in current_heatmap["order"]],
"features": [round(a["values"][o], 3) if a["values"][o] != '-' else None for o in current_heatmap["order"]],
"objects": [a["name"]]
} for a in current_heatmap['heatmap_data']},
"feature_names": [o for o in current_heatmap["order"]]
Expand Down
2 changes: 1 addition & 1 deletion planet/models/expression/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_heatmap(species_id, probes):

for o in order:
if row_mean == 0 or values[o] == 0:
values[o] = 0
values[o] = '-'
else:
values[o] = log(values[o]/row_mean, 2)

Expand Down
2 changes: 1 addition & 1 deletion planet/templates/expression_heatmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h1>Heatmap</h1>
<td><div><span>{{ p.name }}</span></div></td>
{% endif %}
{% for o in order %}
<td class="value">{{ p['values'][o]|round(2) }}</td>
<td class="value">{% if p['values'][o] != '-' %}{{ p['values'][o]|round(2) }}{% else %}-{% endif %}</td>
{% endfor %}
</tr>
{% endfor %}
Expand Down

0 comments on commit c02fea3

Please sign in to comment.