Skip to content

Biaftp update#1582

Merged
pavanvidem merged 14 commits intobgruening:masterfrom
pavanvidem:biaftp-update
Mar 7, 2025
Merged

Biaftp update#1582
pavanvidem merged 14 commits intobgruening:masterfrom
pavanvidem:biaftp-update

Conversation

@pavanvidem
Copy link
Copy Markdown
Collaborator

  • make mode param as select
  • put output images into a collection

@bgruening
Copy link
Copy Markdown
Owner

.. ERROR (XSD): Invalid XML: Element 'discovered_dataset': This element is not expected. Expected is ( element ).
.. ERROR (XSD): Invalid XML: Element 'discovered_dataset': This element is not expected. Expected is ( element ).
.. CHECK (TestsNoValid): 2 test(s) found.
.. ERROR (TestsOutputCollectionCheckDiscovered): Test 1: test collection 'images' must have a 'count' attribute or 'element' children
.. ERROR (TestsOutputCollectionCheckDiscovered): Test 2: test collection 'images' must have a 'count' attribute or 'element' children
.. INFO (OutputsNumber): 2 outputs found.
.. INFO (InputsNum): Found 3 input parameters.
.. CHECK (HelpPresent): Tool contains help section.
.. CHECK (HelpValidRST): Help contains valid reStructuredText.
.. CHECK (ToolIDValid): Tool defines an id [bia_download].
.. CHECK (ToolNameValid): Tool defines a name [FTP Link for Bioimage Archive].
.. CHECK (ToolProfileValid): Tool specifies profile version [22.05].
.. CHECK (ToolVersionValid): Tool defines a version [0.1.0+galaxy1].
.. INFO (CommandInfo): Tool contains a command.
.. CHECK (CitationsFound): Found 1 citations.
.. WARNING: Missing shed metadata field [long_description] for repository
.. WARNING: Missing shed metadata field [homepage_url] for repository

@pavanvidem
Copy link
Copy Markdown
Collaborator Author

Currently, this tool can download from BioImages-core. Let me check if we can download from other collections.

@pavanvidem pavanvidem marked this pull request as draft February 28, 2025 08:41
@pavanvidem
Copy link
Copy Markdown
Collaborator Author

I don't find what the error is :(

@bgruening
Copy link
Copy Markdown
Owner

error code of one ...

Try to not use the pipe and see where it is crashing. In the curl, or somewhere else...

@pavanvidem pavanvidem marked this pull request as ready for review March 3, 2025 15:57
curl https://www.ebi.ac.uk/biostudies/api/v1/studies/$study/info -s |jq -r .ftpLink >>ftpLink.txt
#end if
curl -s https://www.ebi.ac.uk/biostudies/api/v1/studies/$accession/info | jq -r .ftpLink >> ftpLink.txt &&
wget -q -r -l 0 -i ftpLink.txt &&
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

How do we make sure that we only get tif files?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We get the whole ftp directory of that accession.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

There is no particular directory structure. So I download everything and filter for tif later.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Can you not filter this file first, instead of downloading everything and throwing that away later?

</data>
<data format="txt" name="ftplinks" from_work_dir="ftpLink.txt" label="FTP Links">
<collection name="images" type="list" label="${tool.name} on ${on_string}: TIFF Images">
<discover_datasets pattern="(?P&lt;designation&gt;.*)\.tif" format="tif" directory="ftp.ebi.ac.uk" recurse="true" />
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Do you know if the format is tiff or ome.tiff ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

In the UI filtering options, it shows only tif as an option. I kept as it is.

Btw, there are also several other image formats like lif, lsm, mrc and so on. I skipped them because there is no Galaxy datatype.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

We can change the UI. The question is if the downloaded files are proper OME.tiff files. https://github.com/galaxyproject/galaxy/blob/5c686c62ecb5c23fa31ebae30db4f5a56c63630a/lib/galaxy/datatypes/images.py#L309

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

how to check that?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

<collection name="images" type="list" label="${tool.name} on ${on_string}: TIFF Images">
<collection name="images" type="list" label="${tool.name} on ${on_string}: Images">
<discover_datasets pattern="(?P&lt;designation&gt;.*)\.tif" format="tif" directory="ftp.ebi.ac.uk" recurse="true" />
<discover_datasets pattern="(?P&lt;designation&gt;.*)\.png" format="png" directory="ftp.ebi.ac.uk" recurse="true" />
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

should this 3 different collections? what is the usecase? Or should the users then filter the collection afterwards according to filetypes?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

in most cases, there is only one type of images. But it is better to create different collections.

@pavanvidem pavanvidem merged commit 2723029 into bgruening:master Mar 7, 2025
11 checks passed
@pavanvidem pavanvidem deleted the biaftp-update branch March 7, 2025 14:39
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.

2 participants