view embl2fa.xml @ 0:3c8c9911cf2a draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/embl2fa commit 6e5860cedc0ed0bc807ff64f752e62355c1b19d4
author artbio
date Sun, 13 Nov 2022 00:23:23 +0000
parents
children a0b6fec3b066
line wrap: on
line source

<tool id="embl2fa" name="Convert embl flat file to fasta" version="0.1">
  <description></description>
  <stdio>
      <exit_code range="1:" level="fatal" description="Tool exception" />
  </stdio>
  <command detect_errors="exit_code"><![CDATA[
       grep -P "(^ID)|(^ +[GATCNgatcn ]+\d+)" "$input" > "$output" &&
       sed -i -E "s/^ID   />/" "$output" &&
       sed -i -E "s/(>[^ ]+) .+/\1/g"  "$output" &&
       sed -i -E "s/([GATCNgatcn]+) /\1/g" "$output" &&
       sed -i -E "s/^ +//g" "$output" &&
       sed -i -E "s/ +[0-9]+//g" "$output"
  ]]></command>
  <inputs>
      <param format="txt" name="input" type="data" label="EMBL flat file" />
  </inputs>
  <outputs>
    <data name="output" format="fasta" label="fasta file" />
  </outputs>
  <tests>
      <test>
          <param name="input" value="transposon_sequence_set_v9.5.embl.txt" ftype="txt" />
          <output name="output" file="transposon_sequence_set_v9.5.fa" ftype="fasta"/>
      </test>
  </tests>
  <help>

.. class:: infomark

**What it does**

Converts file in EMBL flat format to fasta file
  </help>
</tool>