diff fasta_tabular_converter.xml @ 0:951cb6b3979b draft

planemo upload for repository https://bitbucket.org/drosofff/gedtools/
author drosofff
date Sun, 21 Jun 2015 14:28:49 -0400
parents
children 2f7278120be9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fasta_tabular_converter.xml	Sun Jun 21 14:28:49 2015 -0400
@@ -0,0 +1,75 @@
+<tool id="fasta_tabular_converter" name="fasta - tabular" version="1.0.2">
+  <description>conversions</description>
+  <command interpreter="python">fasta_tabular_converter.py $input $output $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>