Skip to content

Conversation

@khaled196
Copy link
Contributor

@khaled196 khaled196 commented Jan 26, 2026

FOR CONTRIBUTOR:

  • I have read the CONTRIBUTING.md document and this tool is appropriate for the tools-iuc repo.
  • License permits unrestricted use (educational + commercial)
  • This PR adds a new tool or tool collection
  • This PR updates an existing tool or tool collection
  • This PR does something else (explain below)

Copy link
Contributor

@SaimMomin12 SaimMomin12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some preliminary comments inline. @nilchia @pavanvidem would you like to review this PR more in detail?

@khaled196 khaled196 changed the title Wrapp Liana toolkit for Single-cell and Spatial Transcriptomics Wrap Liana toolkit for Single-cell and Spatial Transcriptomics Jan 28, 2026
@khaled196
Copy link
Contributor Author

I am changing the parameters label and help section. The updates will be shared ASAP

<section name="advanced_common">
<param name="show_log" value="true"/>
</section>
<output name="misty_out" location="https://zenodo.org/records/18388645/files/genericMistyData_rf.h5mu" ftype="h5mu" compare="sim_size" delta="100000">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pleas add a has_size assertion instead of sim_size. This has the huge advantage that we do not need to save the test data anywhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also note that there are has_h5_... assertions that could be useful here, e.g. https://docs.galaxyproject.org/en/master/dev/schema.html#has-h5-attribute

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bernt-matthias

The tools hate the has_size when they were tested on GitHub,

<has_size size="1500000" delta="100000"/>
<has_h5_keys keys="uns/liana_res"/>

For some of the tests, I am using both of the assertions, butthey still fail

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are equivalent to using compare="sim_size" where the size is determined for the given file.

<section name="advanced_common">
<param name="show_log" value="true"/>
</section>
<output name="mdata_out" location="https://zenodo.org/records/18388645/files/multi_lrs_to_views.h5mu" ftype="h5mu">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<output name="mdata_out" location="https://zenodo.org/records/18388645/files/multi_lrs_to_views.h5mu" ftype="h5mu">
<output name="mdata_out" ftype="h5mu">

Otherwise the file at zenodo and the file genereated in the test will be compared bitwise using diff which will fail:

Output misty_out:  different than expected, difference (using diff):
( /tmp/tmp3dobkgt8genericMistyData_rf.h5mu v. /tmp/tmp4ebi8nslgenericMistyData_rf.h5mu )
Binary data detected, not displaying diff

Copy link
Contributor Author

@khaled196 khaled196 Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bernt-matthias

Thank you, I have updated the wrapper with this. The tools fail due to a Zenodo issue, not for the test itself. I might move the input files to the GitHub repo and keep the output in Zenodo.

But please let me know if I need to update the wrapper to comply with Galaxy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have seen Parameter 'adata': the previously selected dataset has entered an unusable state in other tools. So this is not a problem of your PR.

@khaled196
Copy link
Contributor Author

Hi @pavanvidem

Please check if the wrapper is ready, including the label and the help sections for the parameters.

@pavanvidem
Copy link
Member

Hi @pavanvidem

Please check if the wrapper is ready, including the label and the help sections for the parameters.

@khaled196 where did you find the labels and help text? It seems they are far off from the documentation here: https://liana-py.readthedocs.io/en/latest/api.html

</xml>
<xml name="bio_tools">
<xrefs>
<xref type="bio.tools">liana</xref>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please improve the bio.tools entry with links, description, edam topics and so on?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would adding xrf do that work?

Copy link
Member

@pavanvidem pavanvidem Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please go to https://bio.tools/liana, request edit access and update it.
Once the bio.tools entry is complete, you don't have to change anything in the Galaxy tool.

Please let me know if you require any assistance.

</xml>
<xml name="param_kernel">
<param argument="kernel" type="select" label="Spatial weight kernel" help="Kernel for computing spatial weights from distance. misty_rbf: Gaussian-like (default); gaussian: standard Gaussian; exponential: exponential decay; linear: inverse distance weighting.">
<option value="misty_rbf" selected="true">misty_rbf - MISTy RBF (default)</option>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default is not always misty_rbf. For example, in util.spatial_neighbors, gaussian is default. Please check again and use the correct default based on the function it is used in.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can pass any attribute (for eg, value or help or selected of any param) by using a placeholder and pass the value while expanding macro.
Check out an example here:

</param>
<param argument="max_neighbours" type="integer" value="100" min="1" label="Maximum neighbors" help="Maximum nearest neighbors to include per spot/cell. Default: 100. Limits computation.">
</param>
<expand macro="param_kernel"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default is gaussian

</xml>
<!-- Simple resource name parameter -->
<xml name="param_resource_name">
<param argument="resource_name" type="select" label="Ligand-receptor database" help="Built-in database of ligand-receptor pair annotations. consensus: combines multiple resources (recommended); mouseconsensus: for mouse data. Affects which interactions are considered.">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the DB fetched every time one of the ligand-receptor methods is called?
If the DBs are updated, it might break the reproducibility. In that case, we need a datamanager that caches all the resources on Galaxy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the DB was obtained from Liana. I can see your concern if anyupdate happend. Any resources to create DM?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check this out: https://galaxyproject.org/admin/tools/data-managers/

There are links at the bottom of the page.

<option value="interactions">Enter specific interaction pairs</option>
</param>
<when value="resource_name">
<param argument="resource_name" type="select" label="Ligand-receptor database" help="Built-in L-R pair database. consensus recommended for general use; choose species-specific versions for cross-species studies.">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as before. If it breaks reproducibilty, we might need a datamanager.

@@ -0,0 +1,254 @@
<tool id="liana_resource" name="Liana Resource" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all the LR-methods in single-cell.xml, there is a select parameter that allows the user to select the resource.
So, why and where should the user run this tool?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://liana-py.readthedocs.io/en/latest/notebooks/mofatalk.html

the tools here added because of this tutorial.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw that it is also used in some other tutorials. Some functions need db_path param, which is an SQL DB, if not provided, it downloads from somewhere. It again breaks reproducibility.

As we discussed earlier, let's focus on the functions that are required for the first and last tutorials.

@nilchia any other tutorials of interest?

If some function downloads the data on the fly and is not used in the tutorials of interest, then we can safely leave them out now.

<param argument="seed" type="integer" value="1337" label="Random seed" help="Seed for reproducibility in stochastic methods. Default: 1337."/>
</xml>
<xml name="param_verbose">
<param argument="verbose" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Verbose progress output" help="If enabled: print progress messages during computation."/>
Copy link
Member

@pavanvidem pavanvidem Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If percentage-wise progress printed to stdout, it might generate a huge stdout. Please remove this param entirely and use the default of False in the function call.

</param>
</xml>
<xml name="param_de_method">
<param argument="de_method" type="select" label="Differential expression test" help="Statistical method for rank_genes_groups (1-vs-Rest). t-test: parametric; wilcoxon: non-parametric, robust; logreg: logistic regression. Default: t-test.">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find. Is a list of possible DE methods documented somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavanvidem
Copy link
Member

Halfway through. I will review the rest soon.

@pavanvidem
Copy link
Member

@khaled196, there are some unused macros or macros used only once. It will be hard to maintain if there are nested macros that are used only once in the entire suite. For example, the macros used in spatial.xml can be removed because most of the parameters are only used once in the tool suite. Please create (nested) macros only when required.

@khaled196
Copy link
Contributor Author

Hi @pavanvidem
Please check if the wrapper is ready, including the label and the help sections for the parameters.

@khaled196, where did you find the labels and help text? It seems they are far off from the documentation here: https://liana-py.readthedocs.io/en/latest/api.html

The help section and labels are my best attempts to clarify the parameters, as they can sometimes be unclear. Using the parameters provided by the API can be misleading for users.

I went through them again to read and adjust them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants