Skip to content

Conversation

@Maed0x
Copy link

@Maed0x Maed0x commented Nov 25, 2025

FOR CONTRIBUTOR:

  • I have read the CONTRIBUTING.md document and this tool is appropriate for the tools-iuc repo.
  • License permits unrestricted use (educational + commercial)
  • This PR adds a new tool or tool collection
  • This PR updates an existing tool or tool collection
  • This PR does something else (explain below)

Adding the first tool of haltools

Copy link
Contributor

@SaimMomin12 SaimMomin12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Maed0x Congrats on your first contribution to IUC 🎉 .Some comments inline.

Comment on lines 4 to 5
long_description: |
A set of tools to for manipulating HAL alignment files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write a long description

- Sequence Analysis
auto_tool_repositories:
name_template: "{{ tool_id }}"
description_template: "Wrapper for hal tool suite: {{ tool_name }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description_template: "Wrapper for hal tool suite: {{ tool_name }}"
description_template: "Wrapper for haltools suite: {{ tool_name }}"

name: "suite_haltools"
description: "A set of tools to for manipulating HAL alignment files"
long_description: |
A set of tools to for manipulating HAL alignment files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too

@@ -0,0 +1,238 @@
<tool id="hal_halstats" name="HAL halStats" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="25.0">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<tool id="hal_halstats" name="HAL halStats" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="25.0">
<tool id="hal_halstats" name="HAL halStats" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define a PROFILE token in macros.xml

</xml>
<token name="@TOOL_VERSION@">2.9.9</token>
<token name="@VERSION_SUFFIX@">0</token>
<xml name="in_hal_file">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<xml name="in_hal_file">
<xml name="input_hal">

Comment on lines 96 to 98
<param name="allCoverage" type="boolean" truevalue="--allCoverage" falsevalue="" checked="false"
label="All Coverage"
help="Print histogram of coverage from all genomes to all genomes" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format

Comment on lines 101 to 103
<param name="baseComp" type="text" value=""
label="Base composition"
help="Print base composition for given genome by sampling every step bases. Parameter value is of the form genome,step. Ex: human,1000. The output is of the form fraction_of_As fraction_of_Gs fraction_of_Cs fraction_of_Ts" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe specify an example and considering defining a sanitizer

Comment on lines 216 to 228
<test expect_num_outputs="1">
<param name="in_hal_file" value="halTest.hal"/>
<output name="out_file_txt" file="halStats_output.txt"/>
</test>
<test expect_num_outputs="1">
<param name="in_hal_file" value="halTest.hal"/>
<conditional name="mode">
<param name="option" value="--allCoverage"/>
<param name="allCoverage" value="true"/>
</conditional>
<output name="out_file_csv" file="halStats_allCoverage_output.csv"/>
</test>
</tests>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please extend your test for other parameters.

</test>
</tests>
<help><![CDATA[
Some global information from a HAL file can be quickly obtained using halStats. It will return the number of genomes, their phylogenetic tree, and the size of each array in each genome.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some other help text would be benefits

</requirements>
</xml>
<token name="@TOOL_VERSION@">2.9.9</token>
<token name="@VERSION_SUFFIX@">0</token>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduce @Profile@ Token

<data name="out_file_txt" format="txt" from_work_dir="stats.txt" label="${tool.name} on ${on_string}: Stats">
<filter>mode['option'] != '--allCoverage'</filter>
</data>
<data name="out_file_csv" format="tabular" from_work_dir="stats.csv" label="${tool.name} on ${on_string}: CSV Stats">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<data name="out_file_csv" format="tabular" from_work_dir="stats.csv" label="${tool.name} on ${on_string}: CSV Stats">
<data name="out_file_csv" format="csv" from_work_dir="stats.csv" label="${tool.name} on ${on_string}: CSV Stats">

@@ -0,0 +1,238 @@
<tool id="hal_halstats" name="HAL halStats" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="25.0">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<tool id="hal_halstats" name="HAL halStats" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="25.0">
<tool id="hal_halstats" name="halStats" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="25.0">

@@ -0,0 +1,238 @@
<tool id="hal_halstats" name="HAL halStats" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="25.0">
<description>retrieves basic statistics from a hal file</description>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<description>retrieves basic statistics from a hal file</description>
<description>retrieve basic statistics from a HAL file</description>

@Maed0x Maed0x requested a review from SaimMomin12 November 27, 2025 13:14
<token name="@VERSION_SUFFIX@">0</token>
<token name="@PROFILE@">25.0</token>
<xml name="input_hal">
<param name="input_hal" type="data" format="hal" label="Input hal file to analyze" optional="false"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<param name="input_hal" type="data" format="hal" label="Input hal file to analyze" optional="false"/>
<param name="input_hal" type="data" format="hal" label="Input hal file to analyze"/>

Comment on lines +38 to +43
<citation type="bibtex">
@misc{githubhal,
title = {HAL GitHub page},
url = {https://github.com/ComparativeGenomicsToolkit/hal},
}
</citation>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<citation type="bibtex">
@misc{githubhal,
title = {HAL GitHub page},
url = {https://github.com/ComparativeGenomicsToolkit/hal},
}
</citation>

<xml name="input_hal">
<param name="input_hal" type="data" format="hal" label="Input hal file to analyze" optional="false"/>
</xml>
<xml name="params_inputFormat">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<xml name="params_inputFormat">
<xml name="hal_backend_format">

Perhaps a better name?

]]></command>
<inputs>
<expand macro="input_hal"/>
<expand macro="params_inputFormat"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<expand macro="params_inputFormat"/>
<expand macro="hal_backend_format"/>

Comment on lines +8 to +13
(
#if $mode.option == "--baseComp":
echo -e "fraction_of_As\tfraction_of_Gs\tfraction_of_Cs\tfraction_of_Ts";
#else if $mode.option == "--numSegments":
echo "numTopSegments numBottomSegments";
#end if
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some reason, why this is echoed? Is it part of the tool?

</conditional>
</inputs>
<outputs>
<data name="out_file" format="txt" label="${tool.name} on ${on_string}: Stats">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tool outputs different file formats? (csv,tsv is fine, but why bed file)?

</test>
</tests>
<help><![CDATA[
halStats lets you inspect the contents of a HAL database and pull out essential details about genomes, sequences, coverage, identity, and alignment structure. It provides quick checks on genome relationships, segment layout, metadata, and sequence level stats.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a bit more info on what are the inputs, outputs, etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants