changeset 2:8ea7960ef43c draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/cramino commit dc58f578ee856d4656a1f580cc2cf144f940797d
author iuc
date Wed, 03 Dec 2025 16:06:43 +0000
parents ebf7acf24302
children
files cramino.xml test-data/histcount.txt
diffstat 2 files changed, 49 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/cramino.xml	Tue Oct 21 11:45:59 2025 +0000
+++ b/cramino.xml	Wed Dec 03 16:06:43 2025 +0000
@@ -1,8 +1,8 @@
 <tool id="cramino" name="Cramino" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.2">
 	<description>Extract QC metrics from CRAM or BAM files</description>
 	<macros>
-		<token name="@TOOL_VERSION@">1.1.0</token>
-		<token name="@VERSION_SUFFIX@">2</token>
+		<token name="@TOOL_VERSION@">1.2.0</token>
+		<token name="@VERSION_SUFFIX@">0</token>
 	</macros>
 	<requirements>
 		<requirement type="package" version="@TOOL_VERSION@">cramino</requirement>
@@ -35,13 +35,17 @@
    --arrow $arrow_output
  #end if
 
- #if $output_params.hist_out.hist.value == 'yes'
-   --hist $hist_output
+ #if $output_params.hist_out.histtype.value == 'hist'
+   --hist=$hist_output
+   $output_params.hist_out.scaled
+ #elif $output_params.hist_out.histtype.value == 'hist_count'
+   --hist-count=$hist_count_output
    $output_params.hist_out.scaled
  #end if
 
- ##output capture
- > $metrics 
+ ## stdout output capture
+ > $metrics
+
 
 	]]></command>
 	<inputs>
@@ -64,11 +68,15 @@
 			</param>
 			<param argument="--arrow" type="boolean" checked="false" truevalue="true" falsevalue="false" label="Write data to an arrow format file" help="An arrow file can be used with NanoPlot and NanoComp."/>
 			<conditional name="hist_out">
-				<param argument="--hist" type="select" label="Generate histograms" help="Histograms of read lengths and read identities.">
-					<option value="yes">Yes</option>
+				<param name="histtype" type="select" label="Generate histograms" help="Choose which histogram (data) to generate.">
+					<option value="hist">histogram (outputs actual histogram plot)</option>
+					<option value="hist_count">histogram counts (outputs read length histogram bin counts)</option>
 					<option value="no" selected="true">No</option>
 				</param>
-				<when value="yes">
+				<when value="hist">
+					<param argument="--scaled" type="boolean" checked="false" truevalue="--scaled" falsevalue="" label="Scale histogram" help="Scale histogram bins by total basepairs in each bin (not just read count)." />
+				</when>
+				<when value="hist_count">
 					<param argument="--scaled" type="boolean" checked="false" truevalue="--scaled" falsevalue="" label="Scale histogram" help="Scale histogram bins by total basepairs in each bin (not just read count)." />
 				</when>
 				<when value="no"/>
@@ -81,7 +89,10 @@
 			<filter>output_params['arrow'] is True</filter>
 		</data>
 		<data name="hist_output" format="txt"  label="${tool.name} on ${input_file.name}: Histogram Output">
-			<filter>output_params['hist_out']['hist'] == "yes"</filter>
+			<filter>output_params['hist_out']['histtype'] == "hist"</filter>
+		</data>
+		<data name="hist_count_output" format="txt"  label="${tool.name} on ${input_file.name}: Histogram Counts">
+			<filter>output_params['hist_out']['histtype'] == "hist_count"</filter>
 		</data>
 	</outputs>
 	<tests>
@@ -102,7 +113,7 @@
 			</section>
 			<section name="output_params">
 				<conditional name="hist_out">
-					<param name="hist" value="yes"/> 
+					<param name="histtype" value="hist"/> 
 				</conditional>
 			</section>
 			<output name="metrics">
@@ -119,7 +130,7 @@
 			</section>
 			<section name="output_params">
 				<conditional name="hist_out">
-					<param name="hist" value="yes"/> 
+					<param name="histtype" value="hist"/> 
 				</conditional>
 			</section>
 			<section name="output_params">
@@ -150,14 +161,32 @@
 					<has_text_matching expression=".num_reads.: 5"/>	
 				</assert_contents>
 			</output>
-				
+		</test>
+		<test expect_num_outputs="2">
+			<section name="inputs">
+				<param name="input_file" value="basecalls.bam"/> 
+			</section>
+			<section name="output_params">
+				<conditional name="hist_out">
+					<param name="histtype" value="hist_count"/> 
+				</conditional>
+			</section>
+			<output name="metrics">
+				<assert_contents>
+					<has_text text="File name"/>	
+					<has_text text="Creation time"/>	
+				</assert_contents>
+			</output>
+			<output name="hist_count_output" file="histcount.txt"/>
 		</test>
 	</tests>
 	<help><![CDATA[
 **Cramino - BAM/CRAM Inspector for Nanopore Data** 
+
 Cramino is a tool for quick quality assessment of cram and bam files, intended for long read sequencing.
 It generates **summary statistics**, and assess **data quality**.  
 
+
 **Usage Instructions**  
 
 1. **Input File**: Upload a **BAM/CRAM file** as input.  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/histcount.txt	Wed Dec 03 16:06:43 2025 +0000
@@ -0,0 +1,7 @@
+
+bin_start	bin_end	count
+0	2000	50
+2000	4000	66
+4000	6000	6
+6000	8000	1
+8000	10000	0