Skip to content
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

Add drug2cell tool #6684

Open
wants to merge 77 commits into
base: main
Choose a base branch
from
Open

Add drug2cell tool #6684

wants to merge 77 commits into from

Conversation

Mennayousef
Copy link

Wrapping drug2cell tool into Galaxy

Copy link
Member

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

Thanks @Mennayousef! A few comments inside, looks very good!

tools/drug2cell/drug2cell.xml Outdated Show resolved Hide resolved
<command>
<![CDATA[
# Python script to execute drug2cell scoring and differential expression
python3 <<CODE
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 use a configfile in Galaxy to store your code and reuse this.

<configfile name="script_file"><![CDATA[

Copy link
Member

Choose a reason for hiding this comment

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

Oh it seems you have reverted the configfile change.

Copy link
Author

Choose a reason for hiding this comment

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

yeah, it was just a test to see if without configfile will pass all checks, unfortunately it is still failing the test. with this error "Test output file (expected-output/dotplot2.png) is missing. If you are using planemo, try adding --update_test_data to generate it." I tried to manually create the expected-output folder, but no luck. Although the test passes when I run local galaxy instance.

</help>

<citations>
<citation type="bibtex">@article{kanemaru2023spatially,
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 use here type="doi" and use a doi instead.

@Mennayousef
Copy link
Author

@bgruening Could you please help? Why the checks are failing?

Copy link
Member

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

remove the folder expected-output and put the dotplot1 and the umap_plot.png into the test-data folder

<tests>
<test>
<param name="adata" value="tiny_adata.h5ad"/>
<output name="d2c_output" file="d2c_output.h5ad"/>
Copy link
Member

Choose a reason for hiding this comment

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

You could add here some asserts tests and check for specific keys etc in your h5ad file:

https://docs.galaxyproject.org/en/latest/dev/schema.html#has-h5-attribute

Copy link
Author

Choose a reason for hiding this comment

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

Hi @bgruening , I get this error when I add 'has_h5_attribute' "Invalid XML: Element 'has_h5_attribute': This element is not expected."
Maybe it is only supported for certain simpler types of HDF5 files, not this type of anndata files (h5ad)

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you show us what you tried?

Copy link
Author

@Mennayousef Mennayousef Feb 11, 2025

Choose a reason for hiding this comment

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

Yes sure, here is the commit history. Those are the minimum two keys that should be present for drug2cell to work. Mennayousef@bbf49fa

Copy link
Contributor

Choose a reason for hiding this comment

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

This should be something like:

        <output name="d2c_output" file="d2c_output.h5ad">
         <has_contents>
          <has_h5_attribute key="obs"/>
          <has_h5_attribute key="var"/>
         </has_contents>
       </output>

has_contents was missing and evertthingt needs to be in output (before you closed it immediately).

Copy link
Author

Choose a reason for hiding this comment

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

ERROR (XSD): Invalid XML: Element 'has_h5_attribute': This element is not expected. Expected is one of ( element, discovered_dataset, assert_contents, extra_files, metadata ).

Unfortunately this doesn't work if I added them to tests section, or outputs, or both.

Do you have a working example on h5ad file ? Otherwise I think I will leave it as it is before adding has_h5_attribute

Copy link
Contributor

Choose a reason for hiding this comment

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

Mennayousef and others added 12 commits February 11, 2025 10:20
@bgruening
Copy link
Member

assert_has_h5_attribute() missing 1 required positional argument: 'value'

You are missing the value.

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.

3 participants