Mercurial > repos > iuc > hal_halstats
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 0:25dcde5bf94e | 1:4b1c38d744a0 |
|---|---|
| 5 </macros> | 5 </macros> |
| 6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
| 7 <expand macro="stdio"/> | 7 <expand macro="stdio"/> |
| 8 <command detect_errors="aggressive"><![CDATA[ | 8 <command detect_errors="aggressive"><![CDATA[ |
| 9 set -o pipefail; ## Sets the pipeline’s exit code to halStats’s on failure. | 9 set -o pipefail; ## Sets the pipeline’s exit code to halStats’s on failure. |
| 10 ( ## echo headers for specific numerical data | 10 ## echo headers for specific numerical data |
| 11 #if $mode.option == '--baseComp': | 11 #if $mode.option == '--baseComp': |
| 12 echo -e 'fraction_of_As\tfraction_of_Gs\tfraction_of_Cs\tfraction_of_Ts'; | 12 echo -e 'fraction_of_As\tfraction_of_Gs\tfraction_of_Cs\tfraction_of_Ts' >> '$out_file' && |
| 13 #else if $mode.option == '--numSegments': | 13 #else if $mode.option == '--numSegments': |
| 14 echo -e 'numTopSegments\tnumBottomSegments'; | 14 echo -e 'numTopSegments\tnumBottomSegments' >> '$out_file' && |
| 15 #end if | 15 #end if |
| 16 halStats | 16 halStats |
| 17 #if $mode.option == '--allCoverage': | 17 #if $mode.option == '--allCoverage': |
| 18 --allCoverage | 18 --allCoverage |
| 19 #else if $mode.option == '--branches': | 19 #else if $mode.option == '--branches': |
| 24 --metaData | 24 --metaData |
| 25 #else if $mode.option == '--root': | 25 #else if $mode.option == '--root': |
| 26 --root | 26 --root |
| 27 #else if $mode.option == '--tree': | 27 #else if $mode.option == '--tree': |
| 28 --tree | 28 --tree |
| 29 #else if $mode.option == '--assembly': | |
| 30 --assembly | |
| 29 #else if $mode.option == '--baseComp': | 31 #else if $mode.option == '--baseComp': |
| 30 --baseComp '$mode.baseComp' | 32 --baseComp '$mode.baseComp' |
| 31 #else if $mode.option == '--bedSequences': | 33 #else if $mode.option == '--bedSequences': |
| 32 --bedSequences '$mode.bedSequences' | 34 --bedSequences '$mode.bedSequences' |
| 33 #else if $mode.option == '--bottomSegments': | 35 #else if $mode.option == '--bottomSegments': |
| 58 --spanRoot '$mode.spanRoot' | 60 --spanRoot '$mode.spanRoot' |
| 59 #else if $mode.option == '--topSegments': | 61 #else if $mode.option == '--topSegments': |
| 60 --topSegments '$mode.topSegments' | 62 --topSegments '$mode.topSegments' |
| 61 #end if | 63 #end if |
| 62 '$input_hal' | 64 '$input_hal' |
| 63 ## 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. | 65 ## 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. |
| 64 #if $mode.option == '--allCoverage' or $mode.option == '--sequenceStats' or $mode.option == '--percentID' or $mode.option == '--coverage': | 66 #if $mode.option == '--allCoverage' or $mode.option == '--sequenceStats' or $mode.option == '--percentID' or $mode.option == '--coverage' or $mode.option == '--assembly': |
| 65 | tr ',' '\t' | 67 | sed $'s/, */\t/g' |
| 66 #else if $mode.option == '--numSegments': | 68 #else if $mode.option == '--numSegments': |
| 67 | tr ' ' '\t' ## Replace spaces | 69 | tr ' ' '\t' ## Replace spaces |
| 68 #end if | 70 #end if |
| 69 ) > '$out_file' | 71 >> '$out_file' |
| 70 ]]></command> | 72 ]]></command> |
| 71 <inputs> | 73 <inputs> |
| 72 <expand macro="input_hal"/> | 74 <expand macro="input_hal"/> |
| 73 <conditional name="mode"> | 75 <conditional name="mode"> |
| 74 <param name="option" type="select" label="Select the type of statistics you are interested in"> | 76 <param name="option" type="select" label="Select the type of statistics you are interested in"> |
| 76 <option value="--genomes">List of genomes in alignment (--genomes)</option> | 78 <option value="--genomes">List of genomes in alignment (--genomes)</option> |
| 77 <option value="--sequences">List of sequences in a given genome (--sequences)</option> | 79 <option value="--sequences">List of sequences in a given genome (--sequences)</option> |
| 78 <option value="--bedSequences">List of sequences in a given genome (in BED format) (--bedSequences)</option> | 80 <option value="--bedSequences">List of sequences in a given genome (in BED format) (--bedSequences)</option> |
| 79 <option value="--sequenceStats">Stats for each sequence in a given genome (--sequenceStats)</option> | 81 <option value="--sequenceStats">Stats for each sequence in a given genome (--sequenceStats)</option> |
| 80 <option value="--tree">Newick tree (--tree)</option> | 82 <option value="--tree">Newick tree (--tree)</option> |
| 83 <option value="--assembly">Assembly stats for each genome (--assembly)</option> | |
| 81 <option value="--branches">List of branches specified by the child genome (--branches)</option> | 84 <option value="--branches">List of branches specified by the child genome (--branches)</option> |
| 82 <option value="--span">Branches on path (or spanning tree) between given list of genomes (--span)</option> | 85 <option value="--span">Branches on path (or spanning tree) between given list of genomes (--span)</option> |
| 83 <option value="--spanRoot">Genomes on path (or spanning tree) with spanning tree root between given list of genomes (--spanRoot)</option> | 86 <option value="--spanRoot">Genomes on path (or spanning tree) with spanning tree root between given list of genomes (--spanRoot)</option> |
| 84 <option value="--children">Names of children of a given genome (--children)</option> | 87 <option value="--children">Names of children of a given genome (--children)</option> |
| 85 <option value="--root">Root genome name (--root)</option> | 88 <option value="--root">Root genome name (--root)</option> |
| 172 <expand macro="sanitizer_default"/> | 175 <expand macro="sanitizer_default"/> |
| 173 <expand macro="validator_trim"/> | 176 <expand macro="validator_trim"/> |
| 174 </param> | 177 </param> |
| 175 </when> | 178 </when> |
| 176 <when value="--root"/> | 179 <when value="--root"/> |
| 180 <when value="--assembly"/> | |
| 177 <when value="--sequenceStats"> | 181 <when value="--sequenceStats"> |
| 178 <param name="sequenceStats" type="text" value="" label="Genome name"> | 182 <param name="sequenceStats" type="text" value="" label="Genome name"> |
| 179 <expand macro="sanitizer_default"/> | 183 <expand macro="sanitizer_default"/> |
| 180 <expand macro="validator_trim"/> | 184 <expand macro="validator_trim"/> |
| 181 </param> | 185 </param> |
| 211 <when input="mode.option" value="--coverage" format="tabular"/> | 215 <when input="mode.option" value="--coverage" format="tabular"/> |
| 212 <when input="mode.option" value="--chromSizes" format="tabular"/> | 216 <when input="mode.option" value="--chromSizes" format="tabular"/> |
| 213 <when input="mode.option" value="--baseComp" format="tabular"/> | 217 <when input="mode.option" value="--baseComp" format="tabular"/> |
| 214 <when input="mode.option" value="--metaData" format="tabular"/> | 218 <when input="mode.option" value="--metaData" format="tabular"/> |
| 215 <when input="mode.option" value="--genomeMetaData" format="tabular"/> | 219 <when input="mode.option" value="--genomeMetaData" format="tabular"/> |
| 220 <when input="mode.option" value="--assembly" format="tabular"/> | |
| 216 <when input="mode.option" value="--bedSequences" format="bed"/> | 221 <when input="mode.option" value="--bedSequences" format="bed"/> |
| 217 <when input="mode.option" value="--topSegments" format="bed"/> | 222 <when input="mode.option" value="--topSegments" format="bed"/> |
| 218 <when input="mode.option" value="--bottomSegments" format="bed"/> | 223 <when input="mode.option" value="--bottomSegments" format="bed"/> |
| 219 </change_format> | 224 </change_format> |
| 220 </data> | 225 </data> |
| 236 <conditional name="mode"> | 241 <conditional name="mode"> |
| 237 <param name="option" value="--allCoverage"/> | 242 <param name="option" value="--allCoverage"/> |
| 238 </conditional> | 243 </conditional> |
| 239 <output name="out_file" ftype="tabular"> | 244 <output name="out_file" ftype="tabular"> |
| 240 <assert_contents> | 245 <assert_contents> |
| 241 <has_line line="FromGenome	 ToGenome	 sitesCovered1Times	 sitesCovered2Times	 sitesCovered3Times	 sitesCovered4Times	 sitesCovered5Times"/> | 246 <has_line line="FromGenome	ToGenome	sitesCovered1Times	sitesCovered2Times	sitesCovered3Times	sitesCovered4Times	sitesCovered5Times"/> |
| 242 <has_line line="Genome_1	 Genome_1	 5472	 4688	 3516	 2637	 1465"/> | 247 <has_line line="Genome_1	Genome_1	5472	4688	3516	2637	1465"/> |
| 243 <has_n_lines n="10"/> | 248 <has_n_lines n="10"/> |
| 249 </assert_contents> | |
| 250 </output> | |
| 251 </test> | |
| 252 <test expect_num_outputs="1"> | |
| 253 <param name="input_hal" value="halTest.hal"/> | |
| 254 <conditional name="mode"> | |
| 255 <param name="option" value="--coverage"/> | |
| 256 <param name="coverage" value="Genome_1"/> | |
| 257 </conditional> | |
| 258 <output name="out_file" ftype="tabular"> | |
| 259 <assert_contents> | |
| 260 <has_line line="Genome	sitesCovered1Times	sitesCovered2Times	sitesCovered3Times	sitesCovered4Times	sitesCovered5Times"/> | |
| 261 <has_line line="Genome_1	5472	4688	3516	2637	1465"/> | |
| 262 <has_n_lines n="4"/> | |
| 244 </assert_contents> | 263 </assert_contents> |
| 245 </output> | 264 </output> |
| 246 </test> | 265 </test> |
| 247 <test expect_num_outputs="1"> | 266 <test expect_num_outputs="1"> |
| 248 <param name="input_hal" value="halTest.hal"/> | 267 <param name="input_hal" value="halTest.hal"/> |
| 331 <param name="option" value="--sequenceStats"/> | 350 <param name="option" value="--sequenceStats"/> |
| 332 <param name="sequenceStats" value="Genome_0"/> | 351 <param name="sequenceStats" value="Genome_0"/> |
| 333 </conditional> | 352 </conditional> |
| 334 <output name="out_file" ftype="tabular"> | 353 <output name="out_file" ftype="tabular"> |
| 335 <assert_contents> | 354 <assert_contents> |
| 336 <has_line line="SequenceName	 Length	 NumTopSegments	 NumBottomSegments"/> | 355 <has_line line="SequenceName	Length	NumTopSegments	NumBottomSegments"/> |
| 337 <has_line line="Genome_0_seq	 1758	 0	 8"/> | 356 <has_line line="Genome_0_seq	1758	0	8"/> |
| 338 <has_n_lines n="3"/> | 357 <has_n_lines n="3"/> |
| 339 </assert_contents> | 358 </assert_contents> |
| 340 </output> | 359 </output> |
| 341 </test> | 360 </test> |
| 342 <test expect_num_outputs="1"> | 361 <test expect_num_outputs="1"> |
| 370 <param name="option" value="--percentID"/> | 389 <param name="option" value="--percentID"/> |
| 371 <param name="percentID" value="Genome_0"/> | 390 <param name="percentID" value="Genome_0"/> |
| 372 </conditional> | 391 </conditional> |
| 373 <output name="out_file" ftype="tabular"> | 392 <output name="out_file" ftype="tabular"> |
| 374 <assert_contents> | 393 <assert_contents> |
| 375 <has_line line="Genome	 % ID	 numID	 numSites"/> | 394 <has_line line="Genome	% ID	numID	numSites"/> |
| 376 <has_line line="Genome_0	 1	 1758	 1758"/> | 395 <has_line line="Genome_0	1	1758	1758"/> |
| 377 <has_n_lines n="5"/> | 396 <has_n_lines n="5"/> |
| 378 </assert_contents> | 397 </assert_contents> |
| 379 </output> | 398 </output> |
| 380 </test> | 399 </test> |
| 381 <test expect_num_outputs="1"> | 400 <test expect_num_outputs="1"> |
| 464 <output name="out_file" ftype="tabular"> | 483 <output name="out_file" ftype="tabular"> |
| 465 <assert_contents> | 484 <assert_contents> |
| 466 <has_line line="fraction_of_As	fraction_of_Gs	fraction_of_Cs	fraction_of_Ts"/> | 485 <has_line line="fraction_of_As	fraction_of_Gs	fraction_of_Cs	fraction_of_Ts"/> |
| 467 <has_line line="0.5	0	0.5	0"/> | 486 <has_line line="0.5	0	0.5	0"/> |
| 468 <has_n_lines n="2"/> | 487 <has_n_lines n="2"/> |
| 488 </assert_contents> | |
| 489 </output> | |
| 490 </test> | |
| 491 <test expect_num_outputs="1"> | |
| 492 <param name="input_hal" value="halTestExtended.hal"/> | |
| 493 <conditional name="mode"> | |
| 494 <param name="option" value="--span"/> | |
| 495 <param name="span" value="Genome_0,Genome_2"/> | |
| 496 </conditional> | |
| 497 <output name="out_file" ftype="txt"> | |
| 498 <assert_contents> | |
| 499 <has_text text="Insert Genome_2"/> | |
| 500 <has_n_lines n="1"/> | |
| 501 </assert_contents> | |
| 502 </output> | |
| 503 </test> | |
| 504 <test expect_num_outputs="1"> | |
| 505 <param name="input_hal" value="halTest.hal"/> | |
| 506 <conditional name="mode"> | |
| 507 <param name="option" value="--assembly"/> | |
| 508 </conditional> | |
| 509 <output name="out_file" ftype="tabular"> | |
| 510 <assert_contents> | |
| 511 <has_line line="Genome	TotalLength	NumContigs	MinContigLength	MaxContigLength	MeanContigLength	MedianContigLength	N50	L50"/> | |
| 512 <has_line line="Genome_1	5472	1	5472	5472	5472	0	5472	1"/> | |
| 513 <has_n_lines n="5"/> | |
| 469 </assert_contents> | 514 </assert_contents> |
| 470 </output> | 515 </output> |
| 471 </test> | 516 </test> |
| 472 </tests> | 517 </tests> |
| 473 <help><![CDATA[ | 518 <help><![CDATA[ |
| 480 | 525 |
| 481 **Output** | 526 **Output** |
| 482 | 527 |
| 483 The tool generates different output formats based on the selected type of statistic: | 528 The tool generates different output formats based on the selected type of statistic: |
| 484 | 529 |
| 485 - **Tabular** for --coverage, --allCoverage, --sequenceStats, --percentID, --baseComp, --chromSizes, --metaData, --numSegments, or --genomeMetaData | 530 - **Tabular** for --coverage, --allCoverage, --sequenceStats, --percentID, --baseComp, --chromSizes, --metaData, --numSegments, --genomeMetaData, or --assembly |
| 486 - **BED** for --bedSequences, --topSegments, or --bottomSegments | 531 - **BED** for --bedSequences, --topSegments, or --bottomSegments |
| 487 - Plain **text** for all other type of statistics | 532 - Plain **text** for all other type of statistics |
| 488 | 533 |
| 489 ]]></help> | 534 ]]></help> |
| 490 <expand macro="citation"/> | 535 <expand macro="citation"/> |
