changeset 6:747cd1b9ae98 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_reheader commit f667915d861dbf0a25cc8fd132cc956d82e73ee9"
author iuc
date Mon, 06 Jul 2020 18:13:42 +0000
parents f4d18be9994a
children 71db7f3a33b9
files macros.xml samtools_reheader.xml
diffstat 2 files changed, 24 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Sun Jul 28 14:49:41 2019 -0400
+++ b/macros.xml	Mon Jul 06 18:13:42 2020 +0000
@@ -77,18 +77,18 @@
        <param name="seed" type="integer" optional="True" label="Seed for random number generator" help="If empty a random seed is used." /> 
     </xml>
     <xml name="flag_options">
-        <option value="1">read is paired</option>
-        <option value="2">read is mapped in a proper pair</option>
-        <option value="4">read is unmapped</option>
-        <option value="8">mate is unmapped</option>
-        <option value="16">read reverse strand</option>
-        <option value="32">mate reverse strand</option>
-        <option value="64">read is the first in a pair</option>
-        <option value="128">read is the second in a pair</option>
-        <option value="256">alignment or read is not primary</option>
-        <option value="512">read fails platform/vendor quality checks</option>
-        <option value="1024">read is a PCR or optical duplicate</option>
-        <option value="2048">supplementary alignment</option>
+        <option value="1">Read is paired</option>
+        <option value="2">Read is mapped in a proper pair</option>
+        <option value="4">Read is unmapped</option>
+        <option value="8">Mate is unmapped</option>
+        <option value="16">Read is mapped to the reverse strand of the reference</option>
+        <option value="32">Mate is mapped to the reverse strand of the reference</option>
+        <option value="64">Read is the first in a pair</option>
+        <option value="128">Read is the second in a pair</option>
+        <option value="256">Alignment of the read is not primary</option>
+        <option value="512">Read fails platform/vendor quality checks</option>
+        <option value="1024">Read is a PCR or optical duplicate</option>
+        <option value="2048">Alignment is supplementary</option>
     </xml>
 
     <!-- region specification macros and tokens for tools that allow the specification 
--- a/samtools_reheader.xml	Sun Jul 28 14:49:41 2019 -0400
+++ b/samtools_reheader.xml	Mon Jul 06 18:13:42 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="samtools_reheader" name="Reheader" version="2.0.1">
+<tool id="samtools_reheader" name="Reheader" version="2.0.1+galaxy1">
     <description>copy SAM/BAM header between datasets</description>
     <macros>
         <import>macros.xml</import>
@@ -10,11 +10,15 @@
         samtools reheader
             '${input_header}'
             '${input_file}'
+            ${no_pg}
             > '${output}'
     ]]></command>
     <inputs>
         <param name="input_header" type="data" format="sam,bam" label="Select source dataset" help="Header from this dataset will be used to replace header in the target dataset. May be either SAM or BAM dataset."/>
         <param name="input_file" type="data" format="bam" label="Select target dataset" help="Header from the source dataset will be inserted here. Should be a BAM dataset."/>
+        <param argument="--no-PG" name="no_pg" type="boolean" truevalue="--no-PG" falsevalue=""
+        label="Keep the new header unmodified?"
+        help="By default, samtools reheader will add itself to the chain of tools used to manipulate the target dataset, which will cause one or more @PG records to be inserted into the new header. If you want the output dataset to end up with the header of the source dataset exactly, you should activate this option." />
     </inputs>
     <outputs>
         <data format="bam" name="output" label="${tool.name} on ${on_string}" />
@@ -25,11 +29,17 @@
             <param name="input_file" ftype="bam" value="reheader_input_file.bam"/>
             <output name="output" ftype="bam" file="reheader_out.bam" lines_diff="1"/><!-- samtools adds reheader line -->
         </test>
+        <test>
+            <param name="input_header" ftype="bam" value="reheader_input_header.bam"/>
+            <param name="input_file" ftype="bam" value="reheader_input_file.bam"/>
+            <param name="no_pg" value="true"/>
+            <output name="output" ftype="bam" file="reheader_out.bam" />
+        </test>
     </tests>
     <help>
 **What it does**
 
-Copies header from *source* dataset into *target* dataset using ``samtools reheader`` command.
+Generates a new BAM dataset with the contents of *target* dataset, but the header of *source* dataset using the ``samtools reheader`` command.
     </help>
     <expand macro="citations"/>
 </tool>