view fasta_tabular_converter.xml @ 3:36388b666bfc draft default tip

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/msp_fasta_tabular_converter commit b6de14061c479f0418cd89e26d6f5ac26e565a07
author drosofff
date Wed, 09 Nov 2016 11:24:13 -0500
parents 2f7278120be9
children
line wrap: on
line source

<tool id="fasta_tabular_converter" name="fasta - tabular" version="1.1.0">
  <description>conversions</description>
  <command><![CDATA[
      python '$__tool_directory__'/fasta_tabular_converter.py
      --input '$input'
      --output '$output'
      --type $switch.conversionType
  ]]></command>
  <inputs>
    <conditional name="switch">
       <param name="conversionType" type="select" label="conversion option">
          <option value="fasta2tabular" selected="true">fasta to tabular</option>
          <option value="tabular2fasta">tabular to fasta</option>
          <option value="tabular2fastaweight">tabular to weighted fasta</option>
          <option value="fastaweight2fastaweight">recompile weighted fasta to catenated fasta weighted</option>
          <option value="fastaweight2fasta">fasta weighted to fasta</option>
       </param>
       <when value="fasta2tabular">
          <param name="input" type="data" format="fasta" label="fasta file to convert to tabular"/>
       </when>
       <when value="tabular2fasta">
          <param name="input" type="data" format="tabular" label="tabular file to convert to fasta"/>
       </when>
       <when value="tabular2fastaweight">
          <param name="input" type="data" format="tabular" label="tabular file to convert to fasta weighted"/>
       </when>
       <when value="fastaweight2fastaweight">
          <param name="input" type="data" format="fasta" label="catenated fasta weighted to recompile" help="Use this option only if you known what you're doing"/>
       </when>
       <when value="fastaweight2fasta">
          <param name="input" type="data" format="fasta" label="fasta weighted file to convert to fasta"/>
       </when>
    </conditional>
   </inputs>

 <outputs>
   <data format="fasta" name="output" label="${switch.conversionType} conversion">
     <change_format>
        <when input="switch.conversionType" value="fasta2tabular" format="tabular"/>
        <when input="switch.conversionType" value="fastaweight2fastaweight" format="fasta"/>
        <when input="switch.conversionType" value="fastaweight2fasta" format="fasta"/>
     </change_format>
   </data>
</outputs>

    <tests>
        <test>
            <param name="conversionType" value="fasta2tabular" />
            <param ftype="fasta" name="input" value="input.fa" />
            <output file="output.tab" name="output" />
        </test>
        <test>
            <param name="conversionType" value="tabular2fastaweight" />
            <param ftype="tabular" name="input" value="output.tab" />
            <output file="output.faw" name="output" />
        </test>
    </tests>


<help>

**What it does**

Converts fasta files to tabular files with sequence on first column and occurence of the sequence in the second column; and reciprocally.

This format is suitable for storage of sequence datasets in the data library, and will be used in the future.

Regeneration of the original fasta file from the tabular format is ensured by the same tool

This tool also handle a fasta "weigthed" format with headers as:
>id_numberofreads
ATGCATGACCAGATAGGAC
etc...

with generation of the "weigthed" format from a tabular format, and recompilation of catenated weighted fasta files

</help>

</tool>