diff hal_halAlignmentDepth.xml @ 0:25489f7c4cff draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/haltools commit 6244b9d15a5ad97ae20191e2f8fbafe2050c3cac
author iuc
date Fri, 06 Feb 2026 10:35:39 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hal_halAlignmentDepth.xml	Fri Feb 06 10:35:39 2026 +0000
@@ -0,0 +1,148 @@
+<tool id="hal_halalignmentdepth" name="halAlignmentDepth" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>makes a alignment depth wiggle plot for a genome</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/> 
+    <expand macro="stdio"/>
+    <command detect_errors="aggressive"><![CDATA[
+        halAlignmentDepth
+            #if $genome.reference == 'custom':
+                $genome.noAncestors
+            #end if 
+            #if $mode.export == 'sequence':
+                --refSequence '$mode.sequence'
+            #end if
+            --start $start
+            --length $length
+            ## --step $step ## Has a known bug https://github.com/ComparativeGenomicsToolkit/hal/issues/326
+            #if $filter.option == '--targetGenomes':
+                --targetGenomes '$filter.targetGenomes'
+            #else if $filter.option == '--rootGenome':
+                --rootGenome '$filter.rootGenome'
+            #end if 
+            $countDupes
+            '$input_hal' 
+            #if $genome.reference == 'custom':
+                '$genome.refGenome'
+            #else
+                "\"\""  ## Defaults to input HAL file's tree root
+            #end if 
+            > '$out_file'
+    ]]></command>
+    <inputs>        
+        <expand macro="input_hal"/>
+        <expand macro="params_conditional_refGenome"/>
+        <conditional name="mode">
+            <param name="export" type="select" label="Convert options">
+                <option value="default" selected="true">Convert full reference genome (default)</option>
+                <option value="sequence">Convert a reference sequence (--refSequence)</option>
+            </param>
+            <when value="default"/>
+            <when value="sequence">
+                <expand macro="params_sequence"/>
+            </when>
+        </conditional>
+        <expand macro="params_start"/>
+        <expand macro="params_length"/>
+        <conditional name="filter">
+            <param name="option" type="select" label="Genomes to include in the output">
+                <option value="" selected="true">All genomes (default)</option>
+                <option value="--targetGenomes">Specific target genomes (--targetGenomes)</option>
+                <option value="--rootGenome">Only genomes in the subtree to a root (--rootGenome)</option>
+            </param>
+            <when value=""/>
+            <when value="--targetGenomes">
+                <expand macro="params_targetGenomes"/>
+            </when>
+            <when value="--rootGenome">
+                <expand macro="params_rootGenome"/>
+            </when>
+        </conditional>
+        <param argument="--countDupes" type="boolean" truevalue="--countDupes" falsevalue="" checked="false" label="Count duplicates" help="Count every aligned position instead of counting unique genomes. This includes paralogous matches, so a genome can be counted multiple times. This will give the height of the MAF column created with hal2maf"/>
+    </inputs>
+    <outputs>
+        <data name="out_file" format="wig" label="${tool.name} on ${on_string}"/>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="input_hal" value="halTest.hal"/>
+            <output name="out_file" ftype="wig">
+                <assert_contents>
+                    <has_line line="fixedStep chrom=Genome_0_seq start=1 step=1"/>
+                    <has_line line="3"/>
+                    <has_line line="0"/>
+                    <has_n_lines n="1759"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input_hal" value="halTest.hal"/>
+            <conditional name="mode">
+                <param name="export" value="sequence"/>
+                <param name="sequence" value="Genome_0_seq"/>
+            </conditional>
+            <param name="start" value="10"/>
+            <param name="length" value="50"/>
+            <output name="out_file" ftype="wig">
+                <assert_contents>
+                    <has_line line="fixedStep chrom=Genome_0_seq start=11 step=1"/>
+                    <has_line line="3"/>
+                    <has_n_lines n="51"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input_hal" value="halTest.hal"/>
+            <param name="countDupes" value="true"/>
+            <output name="out_file" ftype="wig">
+                <assert_contents>
+                    <has_line line="fixedStep chrom=Genome_0_seq start=1 step=1"/>
+                    <has_line line="5"/>
+                    <has_line line="10"/>
+                    <has_line line="0"/>
+                    <has_n_lines n="1759"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input_hal" value="halTest.hal"/>
+            <conditional name="filter">
+                <param name="option" value="--targetGenomes"/>
+                <param name="targetGenomes" value="Genome_1,Genome_2"/>
+            </conditional>
+            <output name="out_file" ftype="wig">
+                <assert_contents>
+                    <has_line line="fixedStep chrom=Genome_0_seq start=1 step=1"/>
+                    <has_line line="2"/>
+                    <has_line line="0"/>
+                    <has_n_lines n="1759"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input_hal" value="halTest.hal"/>
+            <conditional name="genome">
+                <param name="reference" value="custom"/>
+                <param name="refGenome" value="Genome_1"/>
+                <param name="noAncestors" value="true"/>
+            </conditional>
+            <output name="out_file" ftype="wig">
+                <assert_contents>
+                    <has_line line="fixedStep chrom=Genome_1_seq start=1 step=1"/>
+                    <has_line line="2"/>
+                    <has_line line="0"/>
+                    <has_n_lines n="5473"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+halAlignmentDepth computes alignment depth across a reference genome from a HAL alignment. 
+The tool reports, for each base, how many genomes it aligns to. 
+By default, each genome is counted once per position, including ancestral genomes. 
+The result is written as a wiggle track.
+    ]]></help>
+    <expand macro="citation"/>
+    <expand macro="creator"/>
+</tool>
\ No newline at end of file