-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manage scanpy plots #23
base: master
Are you sure you want to change the base?
Manage scanpy plots #23
Conversation
Deconstruct nextflow script
Test nsforest module
Add preprocessing option
Fix result directory path
@@ -0,0 +1,455 @@ | |||
#!/usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a script I use for demonstrating how to run NSForest using Nextflow
markers_dict = dict(zip(df_results["clusterName"], df_results["NSForest_markers"])) | ||
on_target_ratio = calculate_fraction.markers_onTarget(adata, cluster_header, markers_dict, medians_header, save_supplementary = save_supplementary, output_folder = output_folder, outputfilename_prefix = outputfilename_prefix) | ||
df_results = df_results.merge(on_target_ratio, on = "clusterName", how = "left") | ||
if not df_results.empty: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Encountered an error when df_results as empty
@@ -45,7 +45,7 @@ def scatter_w_clusterSize(df, col, save = False, output_folder = "", outputfilen | |||
col: str | |||
Column in `df` to plot against "clusterSize". | |||
save: bool (default: False) | |||
Whether to save html file. | |||
Whether to save plot as an SVG file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need SVG plots in order to make the plots interactive in the user interface
@@ -64,37 +64,39 @@ def scatter_w_clusterSize(df, col, save = False, output_folder = "", outputfilen | |||
fig.write_html(filename) | |||
return fig | |||
|
|||
def dotplot(adata, markers, cluster_header, gene_symbols = None, dendrogram = True, save = False, output_folder = "", outputfilename_suffix = ""): | |||
def dotplot(adata, markers, cluster_header, gene_symbols = None, dendrogram = True, save = False, show = False, output_folder = "", outputfilename_suffix = ""): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plots of interest use scanpy, which allows setting of save and show separately. Show is helpful when interactive, but problematic when running non-interactively, for example, in Nextflow. Allowing save to be optional just seems sensible and consistent.
No description provided.