changeset 0:d8b00ebb1567 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/preseq commit 730a243f12a30a36277b58fb0d92891c81af4c6f
author iuc
date Wed, 11 Mar 2026 19:19:33 +0000
parents
children
files macros.xml preseq_c_curve.xml test-data/test.bam test-data/test_c_curve.tsv test-data/test_lc_extrap.tsv
diffstat 5 files changed, 98 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Wed Mar 11 19:19:33 2026 +0000
@@ -0,0 +1,25 @@
+<macros>
+    <token name="@TOOL_VERSION@">3.2.0</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@PROFILE@">25.1</token>
+
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@TOOL_VERSION@">preseq</requirement>
+        </requirements>
+    </xml>
+
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1038/nmeth.2375</citation>
+        </citations>
+    </xml>
+    
+    <xml name="macro_input_bam">
+        <param name="input_bam" type="data" format="bam" label="Input BAM file" help="IMPORTANT: This BAM file must be sorted by coordinate!"/>
+    </xml>
+
+    <xml name="macro_verbose">
+        <param argument="-v" name="verbose" type="boolean" truevalue="-v" falsevalue="" checked="false" label="Verbose Output" help="Print more information to the tool standard error."/>
+    </xml>
+</macros>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/preseq_c_curve.xml	Wed Mar 11 19:19:33 2026 +0000
@@ -0,0 +1,59 @@
+<tool id="preseq_c_curve" name="Preseq c_curve" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>Library Complexity Analysis</description>
+    
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+
+    <command detect_errors="exit_code"><![CDATA[
+        ## 1. File Preparation: Symlink the input BAM to a standard name
+		ln -s '$input_bam' input.bam &&
+        
+		## 2. c_curve Analysis Execute
+        preseq c_curve 
+            -B input.bam 
+            $verbose
+            -s $step_size
+            #if $max_read_len:
+                -l $max_read_len
+            #end if
+            -o '$output_tsv' 
+    ]]></command>
+
+    <inputs>
+        <expand macro="macro_input_bam" />
+        <param argument="-s" name="step_size" type="integer" value="1000" min="100" label="Step Size" help="Step size for the calculation."/>  
+        <param argument="-l" name="max_read_len" type="integer" optional="true" value="" label="Maximum Read Length" help="Limits the length of reads considered. Leave empty for no limit."/>        
+        <expand macro="macro_verbose" />
+    </inputs>
+
+    <outputs>
+        <data name="output_tsv" format="tsv"/>
+    </outputs>
+
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="input_bam" value="test.bam" ftype="bam"/>
+            <param name="step_size" value="1000"/>
+            <output name="output_tsv" file="test_c_curve.tsv" ftype="tsv" lines_diff="4"/>
+        </test>
+    </tests>
+
+    <help><![CDATA[
+**Preseq: c_curve**
+
+The `c_curve` tool from the Preseq package estimates the complexity of a sequencing library. It plots the number of distinct reads against the total number of sequenced reads. This is highly useful for quality control to determine if a library has been sequenced to saturation or if further sequencing would yield more unique molecules.
+
+**Input**
+
+- A **coordinate-sorted** BAM file containing aligned reads.
+
+**Output**
+
+- A tabular (TSV) file containing the complexity curve data. This file is suitable for direct visualization or downstream reporting tools like MultiQC.
+    ]]></help>
+    
+    <expand macro="citations"/>
+
+</tool>
Binary file test-data/test.bam has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_c_curve.tsv	Wed Mar 11 19:19:33 2026 +0000
@@ -0,0 +1,3 @@
+total_reads	distinct_reads
+0	0
+1000	794
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_lc_extrap.tsv	Wed Mar 11 19:19:33 2026 +0000
@@ -0,0 +1,11 @@
+TOTAL_READS	EXPECTED_DISTINCT	LOWER_0.95CI	UPPER_0.95CI
+0	0	0	0
+10000.0	4419.7	3867.5	4892.9
+20000.0	6306.1	5185.3	7363.1
+30000.0	7389.4	5798.2	8944.7
+40000.0	8097.4	6178.2	10055.6
+50000.0	8587.5	6429.4	10874.3
+60000.0	8955.8	6609.1	11503.0
+70000.0	9233.2	6743.9	12001.0
+80000.0	9450.5	6848.8	12405.2
+90000.0	9627.0	6932.8	12739.8