Skip to content

Commit 6eb9d0c

Browse files
authored
Merge pull request #97 from mwang87/abundance-in-featuredetection
including abundance in feature finding overlay
2 parents 5b9d944 + dca53f6 commit 6eb9d0c

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

app.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,6 +1659,9 @@ def _create_map_fig(filename, map_selection=None, show_ms2_markers=True, polarit
16591659
def _perform_feature_finding(filename, feature_finding=None):
16601660
import tasks
16611661

1662+
print("BEFORE WORKER")
1663+
print(_is_worker_up())
1664+
16621665
# Checking if local or worker
16631666
if _is_worker_up():
16641667
# If we have the celery instance up, we'll push it
@@ -1671,7 +1674,7 @@ def _perform_feature_finding(filename, feature_finding=None):
16711674
sleep(3)
16721675
features_list = result.get()
16731676
else:
1674-
features_list = tasks.task_featurefinding.delay(filename, feature_finding)
1677+
features_list = tasks.task_featurefinding(filename, feature_finding)
16751678

16761679
features_df = pd.DataFrame(features_list)
16771680

@@ -1712,9 +1715,18 @@ def _integrate_feature_finding(filename, lcms_fig, map_selection=None, feature_f
17121715
features_df = features_df[features_df["mz"] > min_mz]
17131716
features_df = features_df[features_df["mz"] < max_mz]
17141717

1715-
feature_overlay_fig = go.Scattergl(x=features_df["rt"], y=features_df["mz"], mode='markers', marker=dict(color='green', size=10, symbol="diamond", opacity=0.7), name="Feature Detection")
1716-
lcms_fig.add_trace(feature_overlay_fig)
1718+
#feature_overlay_fig = go.Scattergl(x=features_df["rt"], y=features_df["mz"], mode='markers', marker=dict(color='green', size=10, symbol="diamond", opacity=0.7), name="Feature Detection")
1719+
1720+
feature_overlay_fig = px.scatter(features_df, x="rt", y="mz", hover_name="i")
1721+
feature_overlay_fig.update_traces(marker=dict(symbol="diamond", color='green', size=10, opacity=0.7))
1722+
1723+
_intermediate_fig = feature_overlay_fig.data[0]
1724+
_intermediate_fig.name = "Feature Detection"
1725+
_intermediate_fig.showlegend = True
1726+
1727+
lcms_fig.add_trace(_intermediate_fig)
17171728
except:
1729+
raise
17181730
pass
17191731

17201732
return lcms_fig, features_df

0 commit comments

Comments
 (0)