view abslen_bed/abslen_bed.xml @ 1:0183cad9d13b draft

planemo upload
author fubar
date Thu, 22 Feb 2024 10:48:01 +0000
parents
children
line wrap: on
line source

<tool name="abslen_bed" id="abslen_bed" version="1" profile="22.05">
  <!--Source in git at: https://github.com/fubar2/galaxy_tf_overlay-->
  <!--Created by toolfactory@galaxy.org at 10/12/2023 11:37:03 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="bed" 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>