Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add checkm2 #6542

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

add checkm2 #6542

wants to merge 12 commits into from

Conversation

astrovsky01
Copy link
Contributor

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)

description: Rapid assessment of genome bin quality using machine learning
long_description: Enhanced version of checkm, using machine learning models for greater speed and accuracy
homepage_url: https://github.com/chklovski/CheckM2
remote_repository_url: https://github.com/galaxyproject/tools-iuc/
Copy link
Member

Choose a reason for hiding this comment

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

This could be more precise pointing to the folder.

<command detect_errors="exit_code"><![CDATA[
mkdir input_dir &&
#for $i, $file in enumerate($input):
cp $file input_dir/${file.element_identifier}.dat &&
Copy link
Member

Choose a reason for hiding this comment

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

single-quotes

Copy link
Contributor

Choose a reason for hiding this comment

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

  • can we symlink?
  • element_identifier needs cleaning (eg using re.sub).

<when value="no"/>
<when value="yes">
<!-- It's not all numbers and there's a check internally if it's in a specific list, so it had to be spelled out -->
<param argument="ttable" type="select" label="Prodigal table">
Copy link
Member

Choose a reason for hiding this comment

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

It would be useful for the user to tell what those numbers mean.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use the code table names for the text https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi

#end if
-x .dat
--threads "\${GALAXY_SLOTS:-1}"
--database_path "\${CHECKM2_DB_PATH:-$__tool_directory__/tool-data/CheckM2_database/uniref100.KO.1.dmnd}"
Copy link
Member

Choose a reason for hiding this comment

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

Is this database stable forever and will not change? If those databases update over time, we need a location file.

@astrovsky01 astrovsky01 marked this pull request as draft November 13, 2024 00:12
Copy link
Contributor

@bernt-matthias bernt-matthias left a comment

Choose a reason for hiding this comment

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

Excellent timing: One of my users just asked for the tool :)

Could contribute a data manager.

<token name="@IDX_DATA_TABLE@">checkm2_db_versioned</token>
</macros>
<xrefs>
<xref type="bio.tools">dada2</xref>
Copy link
Contributor

Choose a reason for hiding this comment

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

checkm2

<command detect_errors="exit_code"><![CDATA[
mkdir input_dir &&
#for $i, $file in enumerate($input):
cp $file input_dir/${file.element_identifier}.dat &&
Copy link
Contributor

Choose a reason for hiding this comment

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

  • can we symlink?
  • element_identifier needs cleaning (eg using re.sub).

<option value="--specific">Force the use of the specific quality prediction model (neural network)</option>
<option value="--allmodels">Output quality prediction for both models for each genome.</option>
</param>
<conditional name="ttable_manual">
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not use a conditional. Instead an optional select be used.

<when value="no"/>
<when value="yes">
<!-- It's not all numbers and there's a check internally if it's in a specific list, so it had to be spelled out -->
<param argument="ttable" type="select" label="Prodigal table">
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use the code table names for the text https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi

#end if
-x .dat
--threads "\${GALAXY_SLOTS:-1}"
--database_path $database.fields.path
Copy link
Contributor

Choose a reason for hiding this comment

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

also should be single quoted.

<inputs>
<param name="input" type="data" format="fasta" label="Input MAG/SAG datasets" multiple="true"/>

<param name="database" type="select" label="Select reference genome" help="Checkm2 Diamond database">
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be of interest if users upload their own dmnd databases (https://github.com/galaxyproject/tools-iuc/blob/main/tools/diamond/diamond_makedb.xml)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on the wording on their repo, I was under the impression you needed to use their specific diamond db?

<outputs>
<data name="quality" label="${tool.name} on ${on_string}: Quality report" format="tabular" from_work_dir="output/quality_report.tsv"/>
<collection name="protein_files" label="${tool.name} on ${on_string}: protein files" type="list">
<discover_datasets pattern="__name__" format="fasta" directory="output/protein_files"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

  • The extension of the files will be part of the element identfiers. Should we remove them?

Copy link
Member

Choose a reason for hiding this comment

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

is there a difference between ext and format (see below)

@astrovsky01 astrovsky01 marked this pull request as ready for review November 15, 2024 20:15
mkdir input_dir &&
#for $i, $file in enumerate($input):
#set $cleaned = re.sub('[^\s\w\-\\.]', '_', str($file.element_identifier))
ln -s $file input_dir/${cleaned}.dat &&
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ln -s $file input_dir/${cleaned}.dat &&
ln -s '$file' input_dir/${cleaned}.dat &&

#The <version> column indicates the checkm2 version that generated the database

#
#diamond_db_1.0.2 Diamond database /mnt/galaxyIndices/Checkm2_database/uniref100.KO.1.dmnd 1.0.2
Copy link
Member

Choose a reason for hiding this comment

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

maybe the version before the path? I guess this is what we do in other location files.

<collection name="protein_files" label="${tool.name} on ${on_string}: protein files" type="list">
<discover_datasets pattern="__name__" format="fasta" directory="output/protein_files"/>
</collection>
<collection name="diamond_files" label="${tool.name} on ${on_string}: Diamond files" type="list">
Copy link
Member

Choose a reason for hiding this comment

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

Should we add here that this is of type tabular

<outputs>
<data name="quality" label="${tool.name} on ${on_string}: Quality report" format="tabular" from_work_dir="output/quality_report.tsv"/>
<collection name="protein_files" label="${tool.name} on ${on_string}: protein files" type="list">
<discover_datasets pattern="__name__" format="fasta" directory="output/protein_files"/>
Copy link
Member

Choose a reason for hiding this comment

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

is there a difference between ext and format (see below)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants