changeset 2:0287e2f82b64 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/map_damage commit 54378f7937205ec8ddf87440a5d78c3d0d3c8efa
author iuc
date Tue, 22 Jul 2025 09:02:06 +0000
parents 761b6fdcac6e
children
files map_damage.xml test-data/reference_lgdistribution.txt test-data/reference_misincorporation.txt
diffstat 3 files changed, 31 insertions(+), 72 deletions(-) [+]
line wrap: on
line diff
--- a/map_damage.xml	Wed Jul 16 08:09:11 2025 +0000
+++ b/map_damage.xml	Tue Jul 22 09:02:06 2025 +0000
@@ -1,30 +1,22 @@
 <tool id="map_damage" name="mapDamage" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.2">
-
     <description>Tracks and quantifies damage patterns in ancient DNA sequences</description>
-
     <macros>
-        <token name="@TOOL_VERSION@">2.2.2</token>
+        <token name="@TOOL_VERSION@">2.2.3</token>
         <token name="@VERSION_SUFFIX@">0</token>
     </macros>
-
     <xrefs>
         <xref type="bio.tools">mapdamage</xref>
     </xrefs>
-
     <requirements>
         <requirement type="package" version="@TOOL_VERSION@">mapdamage2</requirement>
     </requirements>
-
     <version_command><![CDATA[mapDamage --version]]></version_command>
-
     <command detect_errors="aggressive"><![CDATA[
-
+        
         ln -s '$sbam_file' alignment.$sbam_file.ext &&
-        
         #if $reference.ref_source == 'history':
             ln -s '$reference.history_reference' reference.fa &&
         #end if
-
     ## MAIN COMMAND LINE
     
         mapDamage
@@ -107,7 +99,6 @@
     <inputs>
 
         <!--INPUT FILES-->
-
         <param name="sbam_file" argument="--input" type="data" format="sam,bam" label="SAM / BAM input file of aligned reads to be analyzed." help="Must contain a valid header."/>
 
         <conditional name="reference">
@@ -129,11 +120,8 @@
         <!--GENERAL OPTIONS-->
 
         <param argument="--merge-reference-sequences" type="boolean" truevalue="--merge-reference-sequences" falsevalue="" label="Merge reference sequences in result files?" help="Useful for memory usage."/>
-
         <param argument="--min-basequal" type="integer" min="0" max="93" value="0" label="Minimum PHRED score for base to be considered" help="(assumes PHRED+33 score)"/>
-
         <param argument="--fasta" type="boolean" checked="false" truevalue="--fasta" falsevalue="" label="Output alignments in FASTA format?"/>
-
         <section name="downsampling" title="Downsampling">
             <conditional name="downsampling">
                 <param name="downsampling_type" type="select" label="Type of downsampling" help="Downsample using a percentage or a number of reads?">
@@ -153,9 +141,7 @@
                     <param argument="--downsample-seed" type="integer" optional="true" label="Downsampling seed" help="Seed (integer) used to randomly select reads for downsampling. Useful for reproducibility."/>
                 </when>
             </conditional>
-
         </section>
-
         <section name="window_size" title="Analysis Window Size">
             <param argument="--length" type="integer" min="1" value="70" label="Number of nucleotides to process, starting from 5p and 3p end of read" help="(Bases which are located further than this from one of the two read ends will not be analyzed)"/>
             <param argument="--around" type="integer" min="0" value="10" label="Number of nucleotides to retrieve before and after read" help="(This is used in order to look at purine enrichment before strand breaks)"/>
@@ -239,11 +225,9 @@
     </inputs>
 
     <outputs>
-
         <!--RUNTIME LOG FILE-->
+        <data name="runtime_log" format="txt" from_work_dir="mapDamage_results/Runtime_log.txt" label="${tool.name} on ${on_string}: Runtime_log.txt"/>
 
-        <data name="runtime_log" format="txt" from_work_dir="mapDamage_results/Runtime_log.txt" label="${tool.name} on ${on_string}: Runtime_log.txt"/>
-        
         <!--RESULT FILES THAT DESCRIBE DNA DAMAGE OBSERVED ON READS-->
 
         <collection name="damage_visualisation" type="list" label="${tool.name} on ${on_string}: Data description files and plots">
@@ -274,54 +258,43 @@
         <data name="rescaled_bam" format="bam" from_work_dir="mapDamage_results/alignment.rescaled.bam" label="${tool.name} on ${on_string}: Rescaled .bam file">
             <filter>rescale['rescaling']['rescale'] == '--rescale'</filter>
         </data>
-        
         <data name="fasta_alignment" format="fasta" from_work_dir="mapDamage_results/alignment.fasta" label="${tool.name} on ${on_string}: FASTA file of alignments">
             <filter>fasta</filter>
         </data>
-
     </outputs>
 
     <tests>
 
         <!--GENERAL TESTS-->
         <!--NB: only data_visualisation files are tested, as the statistical estimation process is stochastic and files will always be different-->
-
             <!--SAM input-->
-            <test expect_num_outputs="17" expect_exit_code="0">
-
-                <param name="sbam_file" value="test_align.sam" ftype="sam"/>
-                <conditional name="reference">
-                    <param name="ref_source" value="history"/>
-                    <param name="history_reference" value="ref.fa" ftype="fasta"/>
-                </conditional>
-
-                <output_collection name="damage_visualisation" type="list">
-                    <element name="misincorporation" file="reference_misincorporation.txt" compare="diff" lines_diff="2"/>
-                    <element name="lgdistribution" file="reference_lgdistribution.txt" compare="diff" lines_diff="2"/>
-                </output_collection>
-
-            </test>
+        <test expect_num_outputs="17" expect_exit_code="0">
+            <param name="sbam_file" value="test_align.sam" ftype="sam"/>
+            <conditional name="reference">
+                <param name="ref_source" value="history"/>
+                <param name="history_reference" value="ref.fa" ftype="fasta"/>
+            </conditional>
+            <output_collection name="damage_visualisation" type="list">
+                <element name="misincorporation" file="reference_misincorporation.txt" compare="diff" lines_diff="2"/>
+                <element name="lgdistribution" file="reference_lgdistribution.txt" compare="diff" lines_diff="2"/>
+            </output_collection>
+        </test>
 
-            <!--BAM input-->
-            <test expect_num_outputs="17" expect_exit_code="0">
-
-                <param name="sbam_file" value="test_align.bam" ftype="bam"/>
-                <conditional name="reference">
-                    <param name="ref_source" value="history"/>
-                    <param name="history_reference" value="ref.fa" ftype="fasta"/>
-                </conditional>
-
-                <output_collection name="damage_visualisation" type="list">
-                    <element name="misincorporation" file="reference_misincorporation.txt" compare="diff" lines_diff="2"/>
-                    <element name="lgdistribution" file="reference_lgdistribution.txt" compare="diff" lines_diff="2"/>
-                </output_collection>
-
-
-            </test>
+        <!--BAM input-->
+        <test expect_num_outputs="17" expect_exit_code="0">
+            <param name="sbam_file" value="test_align.bam" ftype="bam"/>
+            <conditional name="reference">
+                <param name="ref_source" value="history"/>
+                <param name="history_reference" value="ref.fa" ftype="fasta"/>
+            </conditional>
+            <output_collection name="damage_visualisation" type="list">
+                <element name="misincorporation" file="reference_misincorporation.txt" compare="diff" lines_diff="2"/>
+                <element name="lgdistribution" file="reference_lgdistribution.txt" compare="diff" lines_diff="2"/>
+            </output_collection>
+        </test>
 
         <!--TEST TO VERIFY BUILT-IN REFERENCE GENOMES WORK AS INTENDED-->
         <test expect_num_outputs="9" expect_exit_code="0">
-
             <param name="sbam_file" value="test_align.bam" ftype="bam"/>
             <conditional name="reference">
                 <param name="ref_source" value="builtin"/>
@@ -332,17 +305,14 @@
                     <param name="no_stats" value="--no-stats"/>
                 </conditional>
             </section>
-
             <output_collection name="damage_visualisation" type="list">
                 <element name="misincorporation" file="reference_misincorporation.txt" compare="diff" lines_diff="2"/>
                 <element name="lgdistribution" file="reference_lgdistribution.txt" compare="diff" lines_diff="2"/>
             </output_collection>
-
         </test>
 
         <!--TEST TO VERIFY no_stats OPTION WORKS AS INTENDED-->
         <test expect_num_outputs="9" expect_exit_code="0">
-
             <param name="sbam_file" value="test_align.sam" ftype="sam"/>
             <conditional name="reference">
                 <param name="ref_source" value="history"/>
@@ -353,18 +323,14 @@
                     <param name="no_stats" value="--no-stats"/>
                 </conditional>
             </section>
-
             <output_collection name="damage_visualisation" type="list">
                 <element name="misincorporation" file="reference_misincorporation.txt" compare="diff" lines_diff="2"/>
                 <element name="lgdistribution" file="reference_lgdistribution.txt" compare="diff" lines_diff="2"/>
             </output_collection>
-            
         </test>
 
         <!--TEST TO VERIFY fasta OPTION WORKS AS INTENDED-->
-
         <test expect_num_outputs="10" expect_exit_code="0">
-
             <param name="sbam_file" value="test_align.sam" ftype="sam"/>
             <conditional name="reference">
                 <param name="ref_source" value="history"/>
@@ -376,20 +342,16 @@
                 </conditional>
             </section>
             <param name="fasta" value="true"/>
-
             <output_collection name="damage_visualisation" type="list">
                 <element name="misincorporation" file="reference_misincorporation.txt" compare="diff" lines_diff="2"/>
                 <element name="lgdistribution" file="reference_lgdistribution.txt" compare="diff" lines_diff="2"/>
             </output_collection>
-
             <output name="fasta_alignment" file="alignment.fa" compare="diff" count="1"/>
-
         </test>
 
         <!--TEST TO VERIFY rescale OPTION WORKS AS INTENDED-->
         <!--BAM file is not compared, as it depends on the stochastic statistical estimations, and may therefore differ (though perhaps not with this dataset)-->
-        <test expect_num_outputs="18" expect_exit_code="0">
-            
+        <test expect_num_outputs="18" expect_exit_code="0">    
             <param name="sbam_file" value="test_align.sam" ftype="sam"/>
             <conditional name="reference">
                 <param name="ref_source" value="history"/>
@@ -400,14 +362,11 @@
                     <param name="rescale" value="--rescale"/>
                 </conditional>
             </section>
-
             <output_collection name="damage_visualisation" type="list">
                 <element name="misincorporation" file="reference_misincorporation.txt" compare="diff" lines_diff="2"/>
                 <element name="lgdistribution" file="reference_lgdistribution.txt" compare="diff" lines_diff="2"/>
             </output_collection>
-
         </test>
-
     </tests>
 
     <help><![CDATA[
--- a/test-data/reference_lgdistribution.txt	Wed Jul 16 08:09:11 2025 +0000
+++ b/test-data/reference_lgdistribution.txt	Tue Jul 22 09:02:06 2025 +0000
@@ -1,5 +1,5 @@
-# table produced by mapDamage version 2.2.2
-# using mapped file test_align.bam and ref.fa as reference file
+# table produced by mapDamage version 2.2.3
+# using mapped file alignment.sam and reference.fa as reference file
 # Std: strand of reads
 Std	Length	Occurences 
 +	82	1
--- a/test-data/reference_misincorporation.txt	Wed Jul 16 08:09:11 2025 +0000
+++ b/test-data/reference_misincorporation.txt	Tue Jul 22 09:02:06 2025 +0000
@@ -1,5 +1,5 @@
-# table produced by mapDamage version 2.2.2
-# using mapped file test_align.bam and ref.fa as reference file
+# table produced by mapDamage version 2.2.3
+# using mapped file alignment.sam and reference.fa as reference file
 # Chr: reference from sam/bam header, End: from which termini of DNA sequences, Std: strand of reads
 Chr	End	Std	Pos	A	C	G	T	Total	G>A	C>T	A>G	T>C	A>C	A>T	C>G	C>A	T>G	T>A	G>C	G>T	A>-	T>-	C>-	G>-	->A	->T	->C	->G	S
 minc:123214052	3p	+	1	0	1	0	2	3	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0