changeset 2:6f3df153a095 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/amplican commit b0c19fe7aab9a309cb70baafa4aa2eee5bb7113e
author iuc
date Fri, 18 Jul 2025 07:42:27 +0000
parents 8c1bba8d544a
children
files amplican.xml macros.xml
diffstat 2 files changed, 72 insertions(+), 76 deletions(-) [+]
line wrap: on
line diff
--- a/amplican.xml	Mon Oct 04 10:03:20 2021 +0000
+++ b/amplican.xml	Fri Jul 18 07:42:27 2025 +0000
@@ -1,11 +1,11 @@
-<tool id='amplican' name='AmpliCan' version='@TOOL_VERSION@+galaxy@SUFFIX_VERSION@' profile='20.01'>
+<tool id="amplican" name="AmpliCan" version="@TOOL_VERSION@+galaxy@SUFFIX_VERSION@" profile="20.01">
     <description>analysis tool for genome editing </description>
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro='requirements' />
     <expand macro="bio_tools"/>
-    <command detect_errors='exit_code'><![CDATA[
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
         #import re
         mkdir ./fastq_folder ./output_folder
         #for $i in $fastq_files
@@ -25,8 +25,8 @@
             && mv ./output_folder/reports/id_report.html '${output_html.extra_files_path}'
         #end if
     ]]>    </command>
-            <configfiles>
-            <configfile name="amplican_script"><![CDATA[
+    <configfiles>
+        <configfile name="amplican_script"><![CDATA[
             ## Setup R error handling to go to stderr
             options(
             show.error.messages = F,
@@ -79,28 +79,23 @@
             normalize = c("guideRNA", "Group")
             )
                 ]]></configfile>
-            </configfiles>
+    </configfiles>
     <inputs>
         <param name="config_file" type="data" format="txt" label="Configuration file"/>
-        <param name="fastq_files" type="data" format="fastq, fastq.gz, fastqsanger, fastqsanger.gz"
-            multiple="true" label="FASTQ files"/>
+        <param name="fastq_files" type="data" format="fastqsanger,fastqsanger.gz" label="FASTQ files" multiple="true"/>
         <section name="quality_options" title="Sequence quality options">
-            <param argument="average_quality" type="integer" min="0" max="93" 
-                value="0" label="Average quality" 
-                help="If the average quality of the reads fall below value of average_quality then sequence is filtered. Default is 0" />
-            <param argument="min_quality" type="integer" min="0" max="93" 
-                value="20" label="Minimum quality" 
-                help="If one of nucleotides has quality below min_quality, then the sequence is filtered. Default is 20" />
+            <param argument="average_quality" type="integer" min="0" max="93" value="0" label="Average quality" help="If the average quality of the reads fall below value of average_quality then sequence is filtered. Default is 0"/>
+            <param argument="min_quality" type="integer" min="0" max="93" value="20" label="Minimum quality" help="If one of nucleotides has quality below min_quality, then the sequence is filtered. Default is 20"/>
         </section>
         <section name="alignment_options" title="Alignment options">
-            <param argument="gap_opening" type="integer" min="0" max="40" value="25" label="Gap opening" help="The opening gap score" />
-            <param argument="gap_extension" type="integer" min="0" max="40" value="0" label="Gap extension" help="The gap extension score" />
-            <param argument="primer_mismatch" type="integer" min="0" max="40" value="0" label="Primer mismatch" help="Decide how many mismatches are allowed during primer matching of the reads, that groups reads by experiments. When primer_mismatch = 0 no mismatches are allowed, which can increase number of unasssigned read" />
-            <param argument="donor_mismatch" type="integer" min="0" max="40" value="3" label="Donor mismatch" help="How many events of length 1 (mismatches, deletions and insertions of length 1) are allowed when aligning toward the donor template. This parameter is only used when donor template is specified. The higher the parameter the less strict will be algorithm accepting read as HDR. Set to 0 if only perfect alignments to the donor template marked as HDR, unadvised due to error rate of the sequencers" />
+            <param argument="gap_opening" type="integer" min="0" max="40" value="25" label="Gap opening" help="The opening gap score"/>
+            <param argument="gap_extension" type="integer" min="0" max="40" value="0" label="Gap extension" help="The gap extension score"/>
+            <param argument="primer_mismatch" type="integer" min="0" max="40" value="0" label="Primer mismatch" help="Decide how many mismatches are allowed during primer matching of the reads, that groups reads by experiments. When primer_mismatch = 0 no mismatches are allowed, which can increase number of unasssigned read"/>
+            <param argument="donor_mismatch" type="integer" min="0" max="40" value="3" label="Donor mismatch" help="How many events of length 1 (mismatches, deletions and insertions of length 1) are allowed when aligning toward the donor template. This parameter is only used when donor template is specified. The higher the parameter the less strict will be algorithm accepting read as HDR. Set to 0 if only perfect alignments to the donor template marked as HDR, unadvised due to error rate of the sequencers"/>
             <section name="scoring_matrix" title="Scoring matrix options" expanded="False">
                 <param argument="match_scoring" type="integer" min="0" max="20" value="5" label="Match scoring"/>
                 <param argument="mismatch_scoring" type="integer" min="-20" max="0" value="-4" label="Mismatch scoring"/>
-                <param argument="base_only" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Base only" />
+                <param argument="base_only" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Base only"/>
                 <param argument="scoring_type" type="select" label="Scoring matrix type">
                     <option value="DNA" selected="true">DNA</option>
                     <option value="RNA">RNA</option>
@@ -114,10 +109,10 @@
                 <option value="1">Use only the forward FASTQ file</option>
                 <option value="2">Use only the reverse FASTQ file</option>
             </param>
-            <param argument="primer_dimer" type="integer" min="0" max="50" value="30" label="Primer dimer" help="Value specifying buffer for PRIMER DIMER detection. For a given read it will be recognized as PRIMER DIMER when alignment will introduce gap of size bigger than: length of amplicon - (lengths of PRIMERS + PRIMER_DIMER value)" />
-            <param argument="event_filter" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Event filter" help="Whether detection of offtarget reads, should be enabled" />
-            <param argument="cut_buffer" type="integer" min="0" max="30" value="5" label="Cut buffer" help="The number of bases by which extend expected cut sites (specified as UPPER case letters in the amplicon) in 5' and 3' directions" />
-            <param argument="promiscuous_consensus" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Promiscuous consensus" help="Whether rules of amplicanConsensus should be promiscuous. When promiscuous, we allow indels that have no confirmation on the other strand" />    
+            <param argument="primer_dimer" type="integer" min="0" max="50" value="30" label="Primer dimer" help="Value specifying buffer for PRIMER DIMER detection. For a given read it will be recognized as PRIMER DIMER when alignment will introduce gap of size bigger than: length of amplicon - (lengths of PRIMERS + PRIMER_DIMER value)"/>
+            <param argument="event_filter" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Event filter" help="Whether detection of offtarget reads, should be enabled"/>
+            <param argument="cut_buffer" type="integer" min="0" max="30" value="5" label="Cut buffer" help="The number of bases by which extend expected cut sites (specified as UPPER case letters in the amplicon) in 5' and 3' directions"/>
+            <param argument="promiscuous_consensus" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Promiscuous consensus" help="Whether rules of amplicanConsensus should be promiscuous. When promiscuous, we allow indels that have no confirmation on the other strand"/>
         </section>
         <section name="output_options" title="Output options">
             <param argument="write_alignment_format" type="select" label="Alignment format output" help="Whether it should write alignments results to separate files">
@@ -125,19 +120,19 @@
                 <option value="txt" selected="true">Text file: read information followed by forward read and amplicon sequence followed by reverse read with its amplicon sequence</option>
                 <option value="fasta">FASTA file: outputs alignments in fasta format where header indicates experiment ID, read id and number of reads</option>
             </param>
-            <param name="outputs" type="select" label="Additional output files" display="checkboxes" multiple="true" help="Select the output files.">
-                    <option value="config_summary" selected="true">Configuration summary (config_summary.csv)</option>
-                    <option value="barcode_reads" selected="true">Barcode reads filters (barcode_reads_filters.csv)</option>
-                    <option value="knit_reports" selected="true" >Knitr HTML report</option>
-                    <option value="parameters" >Parameters (RunParameters.txt)</option>
-                    <option value="alignments_rds" selected="true">Alignments Rda file (AlignmentsExperimentSet.rds)</option>
-                    <option value="events_filtered_shifted" selected="true">Events filtered shifted (events_filtered_shifted.csv)</option>
-                    <option value="events_filtered_shifted_normalized" selected="true">Events filtered shifted normalized (events_filtered_shifted_normalized.csv)</option>
-                    <option value="raw_events" selected="true">Raw events (raw_events.csv)</option>
-                    <option value="unassigned_reads" selected="true">Unnasigned reads (unassigned_reads.csv) </option>
+            <param name="outputs" type="select" label="Additional output files" help="Select the output files." display="checkboxes" multiple="true">
+                <option value="config_summary" selected="true">Configuration summary (config_summary.csv)</option>
+                <option value="barcode_reads" selected="true">Barcode reads filters (barcode_reads_filters.csv)</option>
+                <option value="knit_reports" selected="true">Knitr HTML report</option>
+                <option value="parameters">Parameters (RunParameters.txt)</option>
+                <option value="alignments_rds" selected="true">Alignments Rda file (AlignmentsExperimentSet.rds)</option>
+                <option value="events_filtered_shifted" selected="true">Events filtered shifted (events_filtered_shifted.csv)</option>
+                <option value="events_filtered_shifted_normalized" selected="true">Events filtered shifted normalized (events_filtered_shifted_normalized.csv)</option>
+                <option value="raw_events" selected="true">Raw events (raw_events.csv)</option>
+                <option value="unassigned_reads" selected="true">Unnasigned reads (unassigned_reads.csv) </option>
             </param>
         </section>
-    </inputs>      
+    </inputs>
     <outputs>
         <data name="config_summary" from_work_dir="./output_folder/config_summary.csv" format="csv" label="${tool.name} on ${on_string}: config summary">
             <filter>"config_summary" in output_options["outputs"]</filter>
@@ -176,8 +171,8 @@
     <tests>
         <!-- Test default inputs -->
         <test expect_num_outputs="10">
-            <param name="config_file" value="config.csv" />
-            <param name="fastq_files" value="R1_001.fastq,R1_002.fastq,R2_001.fastq,R2_002.fastq" />
+            <param name="config_file" value="config.csv"/>
+            <param name="fastq_files" value="R1_001.fastq,R1_002.fastq,R2_001.fastq,R2_002.fastq"/>
             <section name="quality_options">
                 <param name="average_quality" value="0"/>
                 <param name="min_quality" value="20"/>
@@ -189,7 +184,7 @@
                 <param name="donor_mismatch" value="3"/>
                 <section name="scoring_matrix">
                     <param name="match_scoring" value="5"/>
-                    <param name="mismatch scoring" value="-4"/>
+                    <param name="mismatch_scoring" value="-4"/>
                     <param name="base_only" value="true"/>
                     <param name="scoring_type" value="DNA"/>
                 </section>
@@ -200,66 +195,66 @@
                 <param name="event_filter" value="true"/>
                 <param name="cut_buffer" value="5"/>
                 <param name="promiscuous_consensus" value="true"/>
-            </section>            
+            </section>
             <section name="output_options">
                 <param name="write_alignment_format" value="txt"/>
                 <param name="outputs" value="config_summary,barcode_reads,knit_reports,parameters,alignments_rds,events_filtered_shifted,events_filtered_shifted_normalized,raw_events,unassigned_reads"/>
             </section>
             <output name="config_summary" file="config_summary.csv" ftype="csv" lines_diff="10">
                 <assert_contents>
-                    <has_size value="2896" delta="300" />
+                    <has_size value="2896" delta="300"/>
                 </assert_contents>
             </output>
             <output name="barcode_reads" file="barcode_reads_filtered.csv" ftype="tabular">
                 <assert_contents>
-                    <has_size value="212" delta="300" />
+                    <has_size value="212" delta="300"/>
                 </assert_contents>
             </output>
             <output name="output_html" file="output_html.html" ftype="html" lines_diff="17">
                 <assert_contents>
-                    <has_size value="1641557" delta="300" />
+                    <has_size value="1641557" delta="300"/>
                 </assert_contents>
             </output>
             <output name="parameters" file="RunParameters.txt" ftype="txt" lines_diff="4">
                 <assert_contents>
-                    <has_size value="418" delta="300" />
+                    <has_size value="418" delta="300"/>
                 </assert_contents>
             </output>
             <output name="alignments_rds" ftype="rdata">
                 <assert_contents>
-                    <has_size value="86527" delta="300" />
+                    <has_size value="86527" delta="300"/>
                 </assert_contents>
             </output>
             <output name="alignments_txt" file="alignments.txt" ftype="txt">
                 <assert_contents>
-                    <has_size value="13406" delta="300" />
+                    <has_size value="13406" delta="300"/>
                 </assert_contents>
             </output>
             <output name="events_filtered_shifted" file="events_filtered_shifted.csv" ftype="csv">
                 <assert_contents>
-                    <has_size value="4826" delta="300" />
+                    <has_size value="4826" delta="300"/>
                 </assert_contents>
             </output>
             <output name="events_filtered_shifted_normalized" file="events_filtered_shifted_normalized.csv" ftype="csv">
                 <assert_contents>
-                    <has_size value="4826" delta="300" />
+                    <has_size value="4826" delta="300"/>
                 </assert_contents>
             </output>
             <output name="raw_events" file="raw_events.csv" ftype="csv">
                 <assert_contents>
-                    <has_size value="4455" delta="300" />
+                    <has_size value="4455" delta="300"/>
                 </assert_contents>
             </output>
             <output name="unassigned_reads" file="unassigned_reads.csv" ftype="csv">
                 <assert_contents>
-                    <has_size value="1176" delta="300" />
+                    <has_size value="1176" delta="300"/>
                 </assert_contents>
             </output>
         </test>
         <!-- Test alignment output in fasta format -->
         <test expect_num_outputs="10">
-            <param name="config_file" value="config.csv" />
-            <param name="fastq_files" value="R1_001.fastq,R1_002.fastq,R2_001.fastq,R2_002.fastq" />
+            <param name="config_file" value="config.csv"/>
+            <param name="fastq_files" value="R1_001.fastq,R1_002.fastq,R2_001.fastq,R2_002.fastq"/>
             <section name="quality_options">
                 <param name="average_quality" value="0"/>
                 <param name="min_quality" value="20"/>
@@ -271,7 +266,7 @@
                 <param name="donor_mismatch" value="3"/>
                 <section name="scoring_matrix">
                     <param name="match_scoring" value="5"/>
-                    <param name="mismatch scoring" value="-4"/>
+                    <param name="mismatch_scoring" value="-4"/>
                     <param name="base_only" value="true"/>
                     <param name="scoring_type" value="DNA"/>
                 </section>
@@ -287,61 +282,61 @@
                 <param name="write_alignment_format" value="fasta"/>
                 <param name="outputs" value="config_summary,barcode_reads,knit_reports,parameters,alignments_rds,events_filtered_shifted,events_filtered_shifted_normalized,raw_events,unassigned_reads"/>
             </section>
-            <output name="config_summary" ftype="csv" >
+            <output name="config_summary" ftype="csv">
                 <assert_contents>
-                    <has_size value="2896" delta="300" />
+                    <has_size value="2896" delta="300"/>
                 </assert_contents>
             </output>
             <output name="barcode_reads" ftype="tabular">
                 <assert_contents>
-                    <has_size value="212" delta="300" />
+                    <has_size value="212" delta="300"/>
                 </assert_contents>
             </output>
             <output name="output_html" ftype="html">
                 <assert_contents>
-                    <has_size value="1641557" delta="300" />
+                    <has_size value="1641557" delta="300"/>
                 </assert_contents>
             </output>
-            <output name="parameters"  ftype="txt" lines_diff="2">
+            <output name="parameters" ftype="txt" lines_diff="2">
                 <assert_contents>
-                    <has_size value="418" delta="300" />
+                    <has_size value="418" delta="300"/>
                 </assert_contents>
             </output>
             <output name="alignments_rds" ftype="rdata">
                 <assert_contents>
-                    <has_size value="86527" delta="300" />
+                    <has_size value="86527" delta="300"/>
                 </assert_contents>
             </output>
-            <output name="alignments_fasta"  ftype="fasta">
+            <output name="alignments_fasta" ftype="fasta">
                 <assert_contents>
-                    <has_size value="16146" delta="300" />
+                    <has_size value="16146" delta="300"/>
                 </assert_contents>
             </output>
             <output name="events_filtered_shifted" ftype="csv">
                 <assert_contents>
-                    <has_size value="4826" delta="300" />
+                    <has_size value="4826" delta="300"/>
                 </assert_contents>
             </output>
             <output name="events_filtered_shifted_normalized" ftype="csv">
                 <assert_contents>
-                    <has_size value="4826" delta="300" />
+                    <has_size value="4826" delta="300"/>
                 </assert_contents>
             </output>
             <output name="raw_events" ftype="csv">
                 <assert_contents>
-                    <has_size value="4455" delta="300" />
+                    <has_size value="4455" delta="300"/>
                 </assert_contents>
             </output>
-            <output name="unassigned_reads"  ftype="csv">
+            <output name="unassigned_reads" ftype="csv">
                 <assert_contents>
-                    <has_size value="1176" delta="300" />
+                    <has_size value="1176" delta="300"/>
                 </assert_contents>
             </output>
         </test>
         <!-- Test limit outputs -->
         <test expect_num_outputs="2">
-            <param name="config_file" value="config.csv" />
-            <param name="fastq_files" value="R1_001.fastq,R1_002.fastq,R2_001.fastq,R2_002.fastq" />
+            <param name="config_file" value="config.csv"/>
+            <param name="fastq_files" value="R1_001.fastq,R1_002.fastq,R2_001.fastq,R2_002.fastq"/>
             <section name="quality_options">
                 <param name="average_quality" value="0"/>
                 <param name="min_quality" value="20"/>
@@ -353,7 +348,7 @@
                 <param name="donor_mismatch" value="3"/>
                 <section name="scoring_matrix">
                     <param name="match_scoring" value="5"/>
-                    <param name="mismatch scoring" value="-4"/>
+                    <param name="mismatch_scoring" value="-4"/>
                     <param name="base_only" value="true"/>
                     <param name="scoring_type" value="DNA"/>
                 </section>
@@ -371,31 +366,31 @@
             </section>
             <output name="config_summary" ftype="csv">
                 <assert_contents>
-                    <has_size value="2896" delta="300" />
+                    <has_size value="2896" delta="300"/>
                 </assert_contents>
             </output>
             <output name="alignments_fasta" ftype="fasta">
                 <assert_contents>
-                    <has_size value="16146" delta="300" />
+                    <has_size value="16146" delta="300"/>
                 </assert_contents>
             </output>
         </test>
         <!-- Test gzip files -->
         <test expect_num_outputs="2">
-            <param name="config_file" value="config_gzip.csv" />
-            <param name="fastq_files" value="R1_001.fastq.gz,R1_002.fastq.gz,R2_001.fastq.gz,R2_002.fastq.gz" />
+            <param name="config_file" value="config_gzip.csv"/>
+            <param name="fastq_files" value="R1_001.fastq.gz,R1_002.fastq.gz,R2_001.fastq.gz,R2_002.fastq.gz"/>
             <section name="output_options">
                 <param name="write_alignment_format" value="fasta"/>
                 <param name="outputs" value="config_summary"/>
             </section>
             <output name="config_summary" ftype="csv">
                 <assert_contents>
-                    <has_size value="2896" delta="300" />
+                    <has_size value="2896" delta="300"/>
                 </assert_contents>
             </output>
             <output name="alignments_fasta" ftype="fasta">
                 <assert_contents>
-                    <has_size value="16146" delta="300" />
+                    <has_size value="16146" delta="300"/>
                 </assert_contents>
             </output>
         </test>
@@ -434,5 +429,5 @@
 If you have only forward primers leave column Reverse_Primer empty, leave empty also the Reverse_Reads column. You can still use amplican like normal.                  
 
     ]]>    </help>
-    <expand macro="citations" />
+    <expand macro="citations"/>
 </tool>
--- a/macros.xml	Mon Oct 04 10:03:20 2021 +0000
+++ b/macros.xml	Fri Jul 18 07:42:27 2025 +0000
@@ -1,9 +1,10 @@
 <macros>
     <token name="@TOOL_VERSION@">1.14.0</token>
-    <token name="@SUFFIX_VERSION@">0</token>
+    <token name="@SUFFIX_VERSION@">1</token>
     <xml name="bio_tools">
         <xrefs>
             <xref type="bio.tools">amplican</xref>
+            <xref type="bioconductor">amplican</xref>
         </xrefs>
     </xml>
     <xml name="requirements">