comparison aarnet_filesender.xml @ 2:6d0c0961ae13 draft

planemo upload for repository https://github.com/usegalaxy-au/tools-au/tree/master/tools/aarnet_filesender commit c8e1e0914854bf50287ea4b9ee86dfeb747a3342
author galaxy-australia
date Mon, 21 Oct 2024 23:12:46 +0000
parents
children
comparison
equal deleted inserted replaced
1:17787c79af44 2:6d0c0961ae13
1 <tool id="aarnet_filesender" name="AARNet FileSender" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>transfer files with AARNet's FileSender Service</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="version_command"/>
8 <command detect_errors="exit_code"><![CDATA[
9 #if $test != "":
10 filesender -h &&
11 exit 0;
12 #end if
13
14 #set $apiuser = $__user__.extra_preferences.get('aarnet_filesender_account|username', "").strip()
15 #set $apikey = $__user__.extra_preferences.get('aarnet_filesender_account|apikey', "").strip()
16
17 #if $apiuser == "" or $apikey == "":
18 echo "ERROR: Please enter your FileSender Username in your user preferences under the AARNet FileSender Account Info section" >&2 &&
19 exit 1;
20 #end if
21
22 #if $to == "":
23 echo "WARNING: recipent email not set, setting to $__user_email__" &&
24 #set $to = $__user_email__
25 #end if
26
27 mkdir filestosend &&
28
29 #for $file in $data
30 if [ -f "filestosend/${file.element_identifier}" ]; then
31 echo "ERROR: two datasets have the same name (${file.element_identifier})" &&
32 exit 1;
33 fi &&
34 ln -s "$file" "filestosend/${file.element_identifier}" &&
35 #end for
36
37 filesender -p -u '$apiuser' -a '$apikey' -b https://filesender.aarnet.edu.au/rest.php -f '$__user_email__' -r '$to' -s 'Data sent from Galaxy' filestosend >$output 2>&1
38 ]]></command>
39 <inputs>
40 <param name="data" type="data" format="data" multiple="true" optional="false" label="Datasets to be sent:"/>
41 <param name="to" type="text" optional="true" label="Email address of recipent:">
42 <sanitizer sanitize="False"/>
43 </param>
44 <param name="test" type="hidden" value=""/>
45 </inputs>
46 <outputs>
47 <data name="output" format="txt" hidden="false"/>
48 </outputs>
49 <tests>
50 <test expect_exit_code="1" expect_failure="true">
51 <param name="data" value="summary_statistics.txt"/>
52 <assert_stderr>
53 <has_text text="ERROR: Please enter your FileSender Username in your user preferences under the AARNet FileSender Account Info section"/>
54 </assert_stderr>
55 </test>
56 <test>
57 <param name="data" value="summary_statistics.txt"/>
58 <param name="test" value="true"/>
59 <assert_stdout>
60 <has_text text="File Sender CLI client"/>
61 </assert_stdout>
62 </test>
63 </tests>
64 <help>
65 **What it does**
66
67 Uses `AARNet’s FileSender service`_ to send dataset(s) from Galaxy. The
68 recipient will receive an email with a link to download the files.
69
70 **Who can use it**
71
72 AARNet FileSender is available to all institutions affiliated with the
73 `Australian Access Federation (AAF)`_. You can use your institution
74 login details to access and use FileSender.
75
76 **How to connect your Galaxy account to FileSender**
77
78 To send files from Galaxy you will need to connect your Galaxy account
79 to FileSender. This is done by entering your FileSender API key into your
80 Galaxy user preferences.
81
82 1. Log in to FileSender, and copy your API key from the “API Secret” section on the FileSender “My
83 Profile” page. See the `AARNet Knowledge Base`_ for more information.
84 2. In Galaxy, add your API key to the “AARNet FileSender API Key” field
85 in User &gt; Preferences &gt; Manage Information. Your AARNet FileSender
86 Username is the email address you used to log in to FileSender.
87
88 .. _AARNet’s FileSender service: https://filesender.aarnet.edu.au
89 .. _Australian Access Federation (AAF): https://aaf.edu.au/subscribers/
90 .. _AARNet Knowledge Base: https://support.aarnet.edu.au/hc/en-us/articles/235972948-FileSender-API
91 </help>
92 <citations>
93 <citation type="bibtex">
94 @misc{FileSenderCLI_github,
95 title={FileSenderCLI Github page},
96 url = {https://github.com/madsi1m/FileSenderCLI},}
97 </citation>
98 </citations>
99 </tool>