1
|
1 <tool name="absval" id="absval" version="1" profile="22.05">
|
|
2 <!--Source in git at: https://github.com/fubar2/galaxy_tf_overlay-->
|
|
3 <!--Created by toolfactory@galaxy.org at 08/12/2023 08:31:05 using the Galaxy Tool Factory.-->
|
|
4 <description>Returns a file of absolute values from differences</description>
|
|
5 <requirements>
|
|
6 <requirement type="package">python</requirement>
|
|
7 </requirements>
|
|
8 <version_command><![CDATA[echo "1"]]></version_command>
|
|
9 <command><![CDATA[python
|
|
10 '$runme'
|
|
11 <
|
|
12 $absin
|
|
13 >
|
|
14 $absout]]></command>
|
|
15 <configfiles>
|
|
16 <configfile name="runme"><![CDATA[#raw
|
|
17 import sys
|
|
18 inp = []
|
|
19 for line in sys.stdin:
|
|
20 if line.strip() > '':
|
|
21 ls = line.split()
|
|
22 if len(ls) > 2:
|
|
23 x = abs(int(ls[2]) - int(ls[1]))
|
|
24 ls.append((str(x)))
|
|
25 inp.append('\t'.join(ls))
|
|
26 else:
|
|
27 break
|
|
28 sys.stdout.write('\n'.join(inp))
|
|
29 #end raw]]></configfile>
|
|
30 </configfiles>
|
|
31 <inputs>
|
|
32 <param name="absin" type="data" optional="false" label="absin" help="Input file to be converted using abs()" format="csfasta,txt,tabular" multiple="false"/>
|
|
33 </inputs>
|
|
34 <outputs>
|
|
35 <data name="absout" format="txt" hidden="false"/>
|
|
36 </outputs>
|
|
37 <tests>
|
|
38 <test>
|
|
39 <param name="absin" value="absin_sample"/>
|
|
40 <output name="absout" value="absout_sample"/>
|
|
41 </test>
|
|
42 </tests>
|
|
43 <help><![CDATA[
|
|
44 **What it Does**
|
|
45 Takes absolute values on the input
|
|
46
|
|
47 This tool is a temporary step to enable the Sanger TreeVal NF gap_finder workflow to be
|
|
48 translated into Galaxy
|
|
49
|
|
50 See https://github.com/fubar2/treeval_gal/tree/main/gap_finder
|
|
51 ]]></help>
|
|
52 <citations>
|
|
53 <citation type="doi">10.1093/bioinformatics/bts573</citation>
|
|
54 </citations>
|
|
55 </tool>
|
|
56
|