view fasta_tabular_converter.xml @ 1:2f7278120be9 draft

planemo upload for repository commit 6a93f2809e2939f9d847c3238bfbff8ead367d9f
author drosofff
date Tue, 22 Mar 2016 18:54:00 -0400
parents 951cb6b3979b
children 36388b666bfc
line wrap: on
line source

<tool id="fasta_tabular_converter" name="fasta - tabular" version="1.1.0">
  <command interpreter="python">
                                          --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