Mercurial > repos > iuc > hal_halstats
diff hal_halStats.xml @ 1:4b1c38d744a0 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/haltools commit 30ac0af6dfa729277011bcd73cd5560efa03fb97
| author | iuc |
|---|---|
| date | Wed, 18 Mar 2026 15:06:06 +0000 |
| parents | 25dcde5bf94e |
| children |
line wrap: on
line diff
--- a/hal_halStats.xml Fri Feb 06 10:39:34 2026 +0000 +++ b/hal_halStats.xml Wed Mar 18 15:06:06 2026 +0000 @@ -7,11 +7,11 @@ <expand macro="stdio"/> <command detect_errors="aggressive"><![CDATA[ set -o pipefail; ## Sets the pipeline’s exit code to halStats’s on failure. - ( ## echo headers for specific numerical data + ## echo headers for specific numerical data #if $mode.option == '--baseComp': - echo -e 'fraction_of_As\tfraction_of_Gs\tfraction_of_Cs\tfraction_of_Ts'; + echo -e 'fraction_of_As\tfraction_of_Gs\tfraction_of_Cs\tfraction_of_Ts' >> '$out_file' && #else if $mode.option == '--numSegments': - echo -e 'numTopSegments\tnumBottomSegments'; + echo -e 'numTopSegments\tnumBottomSegments' >> '$out_file' && #end if halStats #if $mode.option == '--allCoverage': @@ -26,6 +26,8 @@ --root #else if $mode.option == '--tree': --tree + #else if $mode.option == '--assembly': + --assembly #else if $mode.option == '--baseComp': --baseComp '$mode.baseComp' #else if $mode.option == '--bedSequences': @@ -60,13 +62,13 @@ --topSegments '$mode.topSegments' #end if '$input_hal' - ## Pipes specific output to replace commas with tabs. Output is mostly numerical, and Genome names contain no commas, as this would invalidate the HAL Newick tree. - #if $mode.option == '--allCoverage' or $mode.option == '--sequenceStats' or $mode.option == '--percentID' or $mode.option == '--coverage': - | tr ',' '\t' - #else if $mode.option == '--numSegments': - | tr ' ' '\t' ## Replace spaces - #end if - ) > '$out_file' + ## Pipes specific output to replace commas with tabs. Output is mostly numerical, and Genome names contain no commas, as this would invalidate the HAL Newick tree. + #if $mode.option == '--allCoverage' or $mode.option == '--sequenceStats' or $mode.option == '--percentID' or $mode.option == '--coverage' or $mode.option == '--assembly': + | sed $'s/, */\t/g' + #else if $mode.option == '--numSegments': + | tr ' ' '\t' ## Replace spaces + #end if + >> '$out_file' ]]></command> <inputs> <expand macro="input_hal"/> @@ -78,6 +80,7 @@ <option value="--bedSequences">List of sequences in a given genome (in BED format) (--bedSequences)</option> <option value="--sequenceStats">Stats for each sequence in a given genome (--sequenceStats)</option> <option value="--tree">Newick tree (--tree)</option> + <option value="--assembly">Assembly stats for each genome (--assembly)</option> <option value="--branches">List of branches specified by the child genome (--branches)</option> <option value="--span">Branches on path (or spanning tree) between given list of genomes (--span)</option> <option value="--spanRoot">Genomes on path (or spanning tree) with spanning tree root between given list of genomes (--spanRoot)</option> @@ -174,6 +177,7 @@ </param> </when> <when value="--root"/> + <when value="--assembly"/> <when value="--sequenceStats"> <param name="sequenceStats" type="text" value="" label="Genome name"> <expand macro="sanitizer_default"/> @@ -213,6 +217,7 @@ <when input="mode.option" value="--baseComp" format="tabular"/> <when input="mode.option" value="--metaData" format="tabular"/> <when input="mode.option" value="--genomeMetaData" format="tabular"/> + <when input="mode.option" value="--assembly" format="tabular"/> <when input="mode.option" value="--bedSequences" format="bed"/> <when input="mode.option" value="--topSegments" format="bed"/> <when input="mode.option" value="--bottomSegments" format="bed"/> @@ -238,8 +243,8 @@ </conditional> <output name="out_file" ftype="tabular"> <assert_contents> - <has_line line="FromGenome	 ToGenome	 sitesCovered1Times	 sitesCovered2Times	 sitesCovered3Times	 sitesCovered4Times	 sitesCovered5Times"/> - <has_line line="Genome_1	 Genome_1	 5472	 4688	 3516	 2637	 1465"/> + <has_line line="FromGenome	ToGenome	sitesCovered1Times	sitesCovered2Times	sitesCovered3Times	sitesCovered4Times	sitesCovered5Times"/> + <has_line line="Genome_1	Genome_1	5472	4688	3516	2637	1465"/> <has_n_lines n="10"/> </assert_contents> </output> @@ -247,6 +252,20 @@ <test expect_num_outputs="1"> <param name="input_hal" value="halTest.hal"/> <conditional name="mode"> + <param name="option" value="--coverage"/> + <param name="coverage" value="Genome_1"/> + </conditional> + <output name="out_file" ftype="tabular"> + <assert_contents> + <has_line line="Genome	sitesCovered1Times	sitesCovered2Times	sitesCovered3Times	sitesCovered4Times	sitesCovered5Times"/> + <has_line line="Genome_1	5472	4688	3516	2637	1465"/> + <has_n_lines n="4"/> + </assert_contents> + </output> + </test> + <test expect_num_outputs="1"> + <param name="input_hal" value="halTest.hal"/> + <conditional name="mode"> <param name="option" value="--bedSequences"/> <param name="bedSequences" value="Genome_0"/> </conditional> @@ -333,8 +352,8 @@ </conditional> <output name="out_file" ftype="tabular"> <assert_contents> - <has_line line="SequenceName	 Length	 NumTopSegments	 NumBottomSegments"/> - <has_line line="Genome_0_seq	 1758	 0	 8"/> + <has_line line="SequenceName	Length	NumTopSegments	NumBottomSegments"/> + <has_line line="Genome_0_seq	1758	0	8"/> <has_n_lines n="3"/> </assert_contents> </output> @@ -372,8 +391,8 @@ </conditional> <output name="out_file" ftype="tabular"> <assert_contents> - <has_line line="Genome	 % ID	 numID	 numSites"/> - <has_line line="Genome_0	 1	 1758	 1758"/> + <has_line line="Genome	% ID	numID	numSites"/> + <has_line line="Genome_0	1	1758	1758"/> <has_n_lines n="5"/> </assert_contents> </output> @@ -469,6 +488,32 @@ </assert_contents> </output> </test> + <test expect_num_outputs="1"> + <param name="input_hal" value="halTestExtended.hal"/> + <conditional name="mode"> + <param name="option" value="--span"/> + <param name="span" value="Genome_0,Genome_2"/> + </conditional> + <output name="out_file" ftype="txt"> + <assert_contents> + <has_text text="Insert Genome_2"/> + <has_n_lines n="1"/> + </assert_contents> + </output> + </test> + <test expect_num_outputs="1"> + <param name="input_hal" value="halTest.hal"/> + <conditional name="mode"> + <param name="option" value="--assembly"/> + </conditional> + <output name="out_file" ftype="tabular"> + <assert_contents> + <has_line line="Genome	TotalLength	NumContigs	MinContigLength	MaxContigLength	MeanContigLength	MedianContigLength	N50	L50"/> + <has_line line="Genome_1	5472	1	5472	5472	5472	0	5472	1"/> + <has_n_lines n="5"/> + </assert_contents> + </output> + </test> </tests> <help><