diff rename_scaffold.xml @ 5:7c8b327f298c draft

planemo upload commit f565a59d3e28d34d1caf326fcee83d04a939c359
author yating-l
date Tue, 31 Jul 2018 13:50:21 -0400
parents e35a3509c160
children 2d143f0ac727
line wrap: on
line diff
--- a/rename_scaffold.xml	Thu Jul 26 15:46:24 2018 -0400
+++ b/rename_scaffold.xml	Tue Jul 31 13:50:21 2018 -0400
@@ -1,14 +1,10 @@
-<tool id="rename_scaffold" name="rename the scaffolds" version="2.1">
+<tool id="rename_scaffold" name="rename the scaffolds" version="2.2">
     <description>a Galaxy tool to rename or truncate the scaffold names in the reference genome so that they won't exceed 31 characters</description>
 <stdio>
     <exit_code range="1:" />
 </stdio>
 <command><![CDATA[
-    #if $manipulate_selector == "rename"
-      python $__tool_directory__/rename.py $input $manipulate_selector $output $index
-    #elif $manipulate_selector == "truncate"
-      python $__tool_directory__/rename.py $input $manipulate_selector $output
-    #end if
+    python $__tool_directory__/rename.py $input $manipulate_selector $output $index
 ]]></command>
 <inputs>
     <param name="input" type="data" format="fasta"/>
@@ -19,9 +15,7 @@
 </inputs>
 <outputs>
     <data name="output" format="fasta" label="${tool.name} on ${on_string}: fixed_reference" />
-    <data name="index" format="csv" label="${tool.name} on ${on_string}: name mapping">
-        <filter>manipulate_selector == "rename"</filter>
-    </data>
+    <data name="index" format="csv" label="${tool.name} on ${on_string}: name mapping" />
 </outputs>
 <tests>
     <test>
@@ -29,26 +23,28 @@
         <param name="input" value="Dbia3.fa" />
         <param name="manipulate_selector" value="rename" />
         <output name="output" file="Dbia3_renamed.fa"/>
-        <output name="index" file="Dbia3_index.csv"/>
+        <output name="index" file="renamed_Dbia3_name_mapping.csv"/>
     </test>
     <test>
         <!-- Test truncate input Dbia3.fa -->
         <param name="input" value="Dbia3.fa" />
         <param name="manipulate_selector" value="truncate" />
         <output name="output" file="Dbia3.fa"/>
+        <output name="index" file="truncated_Dbia3_name_mapping.csv"/>
     </test>
     <test>
         <!-- Test rename input with non-ASCII charaters -->
         <param name="input" value="sequence_with_noascii.fa" />
         <param name="manipulate_selector" value="rename" />
         <output name="output" file="renamed_sequence_with_noascii.fa" />
-        <output name="index" file="noascii_index.csv"/>
+        <output name="index" file="renamed_noascii_name_mapping.csv"/>
     </test>
     <test>
         <!-- Test truncate input with non-ASCII charaters -->
         <param name="input" value="sequence_with_noascii.fa" />
         <param name="manipulate_selector" value="truncate" />
         <output name="output" file="truncated_sequence_with_noascii.fa" />
+        <output name="index" file="truncated_noascii_name_mapping.csv"/>
     </test>
     <test expect_failure="true">
         <!-- Test truncate input with non-ASCII charaters. Expect fail: name conflict! -->
@@ -60,12 +56,13 @@
         <param name="input" value="sequence_with_tab.fa" />
         <param name="manipulate_selector" value="truncate" />
         <output name="output" file="fixed_reference_with_tab.fasta" />
+        <output name="index" file="truncated_noascii_with_tab_name_mapping.csv"/>
     </test>
 </tests>
 <help><![CDATA[
 This tool is to rename scaffolds in the reference genome so that the sequence names are less than 31 characters. Rename all scaffolds to scaffold_1, scaffold_2, ..., scaffold_N and also output a name mapping file.
 
-Or truncate the scaffold names that are more than 31 characters and replace each invalid character (non-ASCII, '\\t', '\\n', '\\x0b', '\\x0c', '\\r') with '_'
+Or truncate the scaffold names that are more than 31 characters and replace each invalid character (non-ASCII, '\\t', '\\n', '\\x0b', '\\x0c', '\\r') with '_' and also output a name mapping file.
 ]]></help>
 <citations>
 </citations>