Files
galaxy/tools/interactive/interactivetool_ethercalc.xml
T
mvdbeek a9eb669158 Add profile version to ethercalc
It writes to stderr, so that fails on most job runners (why not all???).
2022-03-02 14:10:52 +01:00

66 lines
2.1 KiB
XML

<tool id="interactive_tool_ethercalc" tool_type="interactive" name="EtherCalc" version="0.1" profile="20.01">
<requirements>
<container type="docker">shiltemann/ethercalc-galaxy-ie:17.05</container>
</requirements>
<entry_points>
<entry_point name="EtherCalc instance on $infile.display_name" requires_domain="True">
<port>8000</port>
</entry_point>
</entry_points>
<command><![CDATA[
export HOME=/root &&
forever start `which ethercalc` --cors &
bash $wait_script
&&
curl --include --request POST --header "Content-Type: application/json" --data-binary "{ \"room\": \"galaxy\", \"snapshot\": \"...\"}" 'http://localhost:8000/_'
&&
## put loading message into worksheet in case of large files
echo -e "Loading your,dataset\nThis may take, some time for, large files.." > loading.txt
&&
curl --include --request PUT --header "Content-Type: text/csv" --data-binary @loading.txt http://localhost:8000/_/galaxy
&&
## remove dump file so this doesnt appear in audit trail
rm /dump.json
&&
## load dataset into worksheet
curl --include --request PUT --header "Content-Type: text/csv" --data-binary @$infile http://localhost:8000/_/galaxy
&&
tail -f /etc/hosts
]]>
</command>
<configfiles>
<configfile name="wait_script">
<![CDATA[
## make sure ethercalc has finished starting up
STATUS=\$(curl --include 'http://localhost:8000/_/galaxy' 2>&1)
while [[ \${STATUS} =~ "refused" ]]
do
echo "waiting for ethercalc: \$STATUS \n"
STATUS=\$(curl --include 'http://localhost:8000/_/galaxy' 2>&1)
sleep 2
done
]]>
</configfile>
</configfiles>
<inputs>
<param name="infile" type="data" format="tabular,csv,tsv" label="Some tabular dataset"/>
</inputs>
<outputs>
<data name="outfile" format="txt" />
</outputs>
<tests>
</tests>
<help>
EtherCalc is a web spreadsheet.
https://ethercalc.net
</help>
</tool>