view absval/absval.xml @ 1:aff6409d16d1 draft

Uploaded
author fubar2
date Fri, 08 Dec 2023 08:47:36 +0000
parents
children
line wrap: on
line source

<tool name="absval" id="absval" version="1" profile="22.05">
  <!--Source in git at: https://github.com/fubar2/galaxy_tf_overlay-->
  <!--Created by toolfactory@galaxy.org at 08/12/2023 08:31:05 using the Galaxy Tool Factory.-->
  <description>Returns a file of absolute values from differences</description>
  <requirements>
    <requirement type="package">python</requirement>
  </requirements>
  <version_command><![CDATA[echo "1"]]></version_command>
  <command><![CDATA[python
'$runme'
<
$absin
>
$absout]]></command>
  <configfiles>
    <configfile name="runme"><![CDATA[#raw
import sys
inp = []
for line in sys.stdin:
    if line.strip() > '':
        ls = line.split()
        if len(ls) > 2:
            x = abs(int(ls[2]) - int(ls[1]))
            ls.append((str(x)))
            inp.append('\t'.join(ls))
    else:
        break
sys.stdout.write('\n'.join(inp))
#end raw]]></configfile>
  </configfiles>
  <inputs>
    <param name="absin" type="data" optional="false" label="absin" help="Input file to be converted using abs()" format="csfasta,txt,tabular" multiple="false"/>
  </inputs>
  <outputs>
    <data name="absout" format="txt" hidden="false"/>
  </outputs>
  <tests>
    <test>
      <param name="absin" value="absin_sample"/>
      <output name="absout" value="absout_sample"/>
    </test>
  </tests>
  <help><![CDATA[
 **What it Does**
 Takes absolute values on the input 
 
 This tool is a temporary step to enable the Sanger TreeVal NF gap_finder workflow to be
 translated into Galaxy
 
 See https://github.com/fubar2/treeval_gal/tree/main/gap_finder
  ]]></help>
  <citations>
    <citation type="doi">10.1093/bioinformatics/bts573</citation>
  </citations>
</tool>