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

planemo upload for repository commit b6de14061c479f0418cd89e26d6f5ac26e565a07
author drosofff
date Wed, 09 Nov 2016 11:24:13 -0500
parents 2f7278120be9
line wrap: on
line source

<tool id="fasta_tabular_converter" name="fasta - tabular" version="1.1.0">
      python '$__tool_directory__'/
      --input '$input'
      --output '$output'
      --type $switch.conversionType
    <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>
       <when value="fasta2tabular">
          <param name="input" type="data" format="fasta" label="fasta file to convert to tabular"/>
       <when value="tabular2fasta">
          <param name="input" type="data" format="tabular" label="tabular file to convert to fasta"/>
       <when value="tabular2fastaweight">
          <param name="input" type="data" format="tabular" label="tabular file to convert to fasta weighted"/>
       <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 value="fastaweight2fasta">
          <param name="input" type="data" format="fasta" label="fasta weighted file to convert to fasta"/>

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

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


**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:

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