Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions tools/biostudies_upload/biostudies_upload.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<tool id="biostudies_upload" name="BioStudies upload" version="0.1" profile="25.1">
<description>Upload data to BioStudies using Aspera high-speed transfer</description>
<xrefs>
<xref type="bio.tools">aspera</xref>
</xrefs>
<requirements>
<requirement type="package" version="4.20.0">aspera-cli</requirement>
<credentials name="biostudies" version="0.1" label="BioStudies" description="The BioStudies database holds descriptions of biological studies, links to data from these studies in other databases at EMBL-EBI or outside, as well as data that do not fit in the structured archives at EMBL-EBI. The database can accept a wide range of types of studies described via a simple format. It also enables manuscript authors to submit supplementary information and link to it from the publication.">
<secret name="password" inject_as_env="BIOSTUDIES_PASS" optional="false" label="Password" description="Your password to upload to BioStudies"/>
<secret name="secret_dir" inject_as_env="BIOSTUDIES_SECRET_DIR" optional="false" label="Secret Directory" description="Secret directory root where your files will be uploaded"/>
</credentials>
</requirements>
<command><![CDATA[
## Determine what to upload based on the dataset format
## For regular files, we can upload directly
#set $upload_path = $input_to_upload
#if $input_to_upload.extension == 'zarr' and not $input_to_upload.is_deferred
## For Zarr datasets, we need to upload the folder structure
## Append the store_root to the extra_files_path to get the full path to the zarr store
## TODO: verify if we need to use '$input_to_upload.extra_files_path/$input_to_upload.metadata.store_root'
## for zarr.zip datasets that uncompress into a subfolder pointed by store_root
#set $upload_path = $input_to_upload.extra_files_path
#end if
ascli config ascp install > /dev/null 2>&1 &&
ascli server upload '$upload_path' --url=ssh://fasp.ebi.ac.uk:33001 --username=bs-upload --password=\$BIOSTUDIES_PASS --to-folder=\$BIOSTUDIES_SECRET_DIR/$target_dir 2>&1 | tee $stdout
]]>
</command>
<inputs>
<param name="input_to_upload" type="data" format="data" label="Input file"/>
<param name="target_dir" type="text" optional="false" label="Target remote folder name"/>
</inputs>
<outputs>
<data name="stdout" format="txt" label="Upload Log"/>
</outputs>
<tests>
<test expect_num_outputs="1">
<param name="input_to_upload" value="smaller_MT_image.tiff"/>
<param name="target_dir" value="galaxy_tool_test"/>
<output name="stdout">
<assert_contents>
<has_text text="100%"/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
**What it does**

This tool uploads data files to the BioStudies database at EMBL-EBI using the Aspera high-speed file transfer protocol. BioStudies is a repository that holds descriptions of biological studies and associated data that may not fit in other structured archives.

The tool uses Aspera CLI to securely transfer your files to a specified directory in your BioStudies submission area.

------

**Inputs**

- **Input file**: Any biological study data file you wish to upload
- **Target remote folder name**: Name of the destination folder in your BioStudies secret directory where files will be uploaded

------

**Outputs**

- **Upload Log**: A text file containing the transfer process details.

------

**Authentication**

This tool requires BioStudies credentials configured in Galaxy:

- **Password**: Your BioStudies upload password
- **Secret Directory**: The root directory path where you have permission to upload files in BioStudies

------

**Additional Information**

The tool uses Aspera's FASP (Fast and Secure Protocol) technology for accelerated file transfer, which is particularly useful for large datasets.

For more information about BioStudies, visit: https://www.ebi.ac.uk/biostudies/


]]> </help>
<citations>
<citation type="doi">10.1126/science.abl5197</citation>
</citations>
</tool>
Binary file not shown.
Loading