Skip to content

Add Cleaverna tool#1739

Draft
reyhaneh-tavakoli wants to merge 25 commits intobgruening:masterfrom
reyhaneh-tavakoli:cleaverna
Draft

Add Cleaverna tool#1739
reyhaneh-tavakoli wants to merge 25 commits intobgruening:masterfrom
reyhaneh-tavakoli:cleaverna

Conversation

@reyhaneh-tavakoli
Copy link
Copy Markdown
Contributor

@bgruening
Hi Bjorn, Merry Christmas!

This pull request adds the Cleaverna tool to the Galaxy platform. The tool supports two execution modes: Training and Prediction. In both modes, it requires a parameter CSV file as input. To facilitate proper usage within Galaxy, this XML file is written so that it can generate the required CSV file directly using Galaxy tools, allowing it to be passed seamlessly as input to Cleaverna.

Could you please review my PR and check whether the CSV file generation part is defined correctly?

Copy link
Copy Markdown
Owner

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
Comment thread tools/rna_tools/cleaverna/macros.xml
Comment thread tools/rna_tools/cleaverna/macros.xml Outdated

<xml name="training_prediction_mode">
<param name="prediction_mode" type="select" label="Analysis mode" hidden="true">
<option value="default" selected="true">Default - Standard cleavage site prediction</option>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

is there any other option? Otherwise, we can skip this select box isn't it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

is there any other option? Otherwise, we can skip this select box isn't it?

Yes, in training mode it’s just set to “default,” and we can skip it.

echo "16,8,\"AU,GU\",23,GGCUAGCUACAACGA" >> SARS_default_params.csv && \
cleaverna \
--model_name "${mode_selection.training_source.model_name}" \
--target_files_training '${__tool_directory__}/data/1.fasta' '${__tool_directory__}/data/2.fasta' '${__tool_directory__}/data/3.fasta' '${__tool_directory__}/data/4.fasta' '${__tool_directory__}/data/5.fasta' '${__tool_directory__}/data/6.fasta' '${__tool_directory__}/data/7.fasta' '${__tool_directory__}/data/8.fasta' '${__tool_directory__}/data/9.fasta' '${__tool_directory__}/data/10.fasta' '${__tool_directory__}/data/11.fasta' '${__tool_directory__}/data/12.fasta' '${__tool_directory__}/data/13.fasta' '${__tool_directory__}/data/14.fasta' '${__tool_directory__}/data/15.fasta' '${__tool_directory__}/data/16.fasta' '${__tool_directory__}/data/17.fasta' '${__tool_directory__}/data/18.fasta' '${__tool_directory__}/data/19.fasta' '${__tool_directory__}/data/20.fasta' \
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

would it make sense to put all those files into one FASTA file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

would it make sense to put all those files into one FASTA file?

The tool currently accepts multiple FASTA files, but I can add this option if needed.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think that would make it much easier for us to pass in the database(s) here. One single file

Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated

--output_dir outputs
#end if
&& ls -la outputs/
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

remove at the end when you are finished

Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
</param>
<when value="individual">
<param name="LA" type="integer" min="1" max="50" value="15" label="LA - Left arm length" help="The length of the left binding arm of DNAzyme (1-50 nucleotides)">
<validator type="in_range" min="1" max="50" message="Left arm length must be between 1 and 50"/>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think you can remove the validator since you restirct the main param with min/max

Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
<option value="false">No - Hide file details</option>
</param>
<when value="true">
<param name="training_dataset_info" type="text" value="HPBC_user_merged_num.csv"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

that is strange, this is a text param but you want a file?

Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
</repeat>

<param name="output_info" type="text"
value="📋 Output format: LA,RA,CS,Start_End_Index,Tem,CA (Start_End_Index format: target_file.fasta:start-end)"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

is that value correct? its a bit strange and I don't think a user can manipulate this.

Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
</outputs>
<tests>
<!-- Updated test: Training mode with all required fields -->
<test expect_num_outputs="2">
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

we need many more tests here, for each conditional at least one ... again the galaxy-lanuage server can help here and generate tests.

Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
For detailed instructions and parameter descriptions, please refer to the tool documentation.
</help>
<citations>
<citation type="bibtex">
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

you have this in your macro

@bgruening
Copy link
Copy Markdown
Owner

Something went wrong here in the branch? I think you need to rebase against the latest master-git branch. Or you create a new PR with your tool.

@reyhaneh-tavakoli
Copy link
Copy Markdown
Contributor Author

reyhaneh-tavakoli commented Jan 7, 2026

Something went wrong here in the branch? I think you need to rebase against the latest master-git branch. Or you create a new PR with your tool.

I updated the branch. Is the problem fixed now, or should I create a new branch?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

please remove this file

Copy link
Copy Markdown
Owner

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

please take the PR out of Draft mode, if you think its ready

@reyhaneh-tavakoli
Copy link
Copy Markdown
Contributor Author

please take the PR out of Draft mode, if you think its ready

I want to add more tests and change some header words to be more user-friendly. I will take it out of draft as soon as I am done with these changes.

@bgruening
Copy link
Copy Markdown
Owner

@reyhaneh-tavakoli if this one is ready please take it out of the draft mode.

@reyhaneh-tavakoli
Copy link
Copy Markdown
Contributor Author

@bgruening
Hi Björn, I hope you are doing well. I have updated the files, but the test still failed. I don't know what the problem is, and I also have some questions regarding the parameter definitions. Would you please help me with this?

@reyhaneh-tavakoli
Copy link
Copy Markdown
Contributor Author

@bgruening

Hi Björn,
I sincerely appreciate all your support throughout the tool-wrapping process.
To run this tool, I need to configure several files (in FASTA and CSV formats) that the Galaxy server should automatically use when users select specific options. Some of these files also need to be available as downloadable templates for users.
However, some of the files are larger than 1 MB, and we are encountering errors when handling them. Could you please advise me on how best to proceed? Should I upload them using a data manager?

Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
<include path="data/BCL-3.fasta"/>
<include path="data/BCL-4.fasta"/>
<include path="data/BCL-5.fasta"/>
<include path="data/HPBC_generated_train_dataset.csv"/>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is one of the large files, but where is it used?

Can you check if all files are actually used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is one of the large files, but where is it used?

Can you check if all files are actually used?

I have reviewed and updated them. However, we still have files exceeding 1MB that are necessary as inputs for the prediction step.

@reyhaneh-tavakoli
Copy link
Copy Markdown
Contributor Author

@bgruening
I also have some questions regarding a command in the tool that requires a parameter file in CSV format (--params). This file contains multiple columns that define the DNAzyme parameters, and the column headers and rows may vary depending on the mode. It would be more professional if Galaxy could generate this CSV file based on user-defined values.
Is this possible in Galaxy? Are these parameters correctly defined in my XML file? Is there a more professional or standard way to define them in Galaxy? How should I define them in the test to ensure they work correctly?

Thank you very much for your guidance.

@bgruening
Copy link
Copy Markdown
Owner

@bgruening
Copy link
Copy Markdown
Owner

Forget about the file-size we can merge it with that if you like.

But planemo test is also failing, you see the error messages here; https://github.com/bgruening/galaxytools/actions/runs/22135865788

@nilchia nilchia self-requested a review February 18, 2026 10:47
Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
--model_name "${mode_selection.training_source.model_name}" \
--target_files_training '${__tool_directory__}/data/HPV.fasta' '${__tool_directory__}/data/BCL-1.fasta' '${__tool_directory__}/data/BCL-2.fasta' '${__tool_directory__}/data/BCL-3.fasta' '${__tool_directory__}/data/BCL-4.fasta' '${__tool_directory__}/data/BCL-5.fasta' \
--params HPBC_default_params.csv \
--prediction_mode default \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should be selected from prediction_prediction_mode

Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
--model_name "${mode_selection.training_source.model_name}" \
--target_files_training '${__tool_directory__}/data/1.fasta' '${__tool_directory__}/data/2.fasta' '${__tool_directory__}/data/3.fasta' '${__tool_directory__}/data/4.fasta' '${__tool_directory__}/data/5.fasta' '${__tool_directory__}/data/6.fasta' '${__tool_directory__}/data/7.fasta' '${__tool_directory__}/data/8.fasta' '${__tool_directory__}/data/9.fasta' '${__tool_directory__}/data/10.fasta' '${__tool_directory__}/data/11.fasta' '${__tool_directory__}/data/12.fasta' '${__tool_directory__}/data/13.fasta' '${__tool_directory__}/data/14.fasta' '${__tool_directory__}/data/15.fasta' '${__tool_directory__}/data/16.fasta' '${__tool_directory__}/data/17.fasta' '${__tool_directory__}/data/18.fasta' '${__tool_directory__}/data/19.fasta' '${__tool_directory__}/data/20.fasta' \
--params SARS_default_params.csv \
--prediction_mode default \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should be selected from prediction_prediction_mode

#else:
#if $mode_selection.training_source.advanced_dnazyme_params.param_source.param_mode == "manual":
echo "LA,RA,CS,Tem,CA" > temp_params.csv &&
#set $cs_list = ','.join($mode_selection.training_source.advanced_dnazyme_params.param_source.CS)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is CS defined in param_source

Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
Comment thread tools/rna_tools/cleaverna/cleaverna.xml Outdated
@nilchia
Copy link
Copy Markdown
Collaborator

nilchia commented Feb 28, 2026

Thanks @reyhaneh-tavakoli. It looks like that you have used too much nested macros and sections. Is it possible to somehow reduce that?

It makes it much easier to review and help.

cheers

@reyhaneh-tavakoli
Copy link
Copy Markdown
Contributor Author

Thanks @reyhaneh-tavakoli. It looks like that you have used too much nested macros and sections. Is it possible to somehow reduce that?

It makes it much easier to review and help.

cheers

Hi Amir,

Thank you for reviewing my PR and for your comments and suggestions. I’ve updated the branch based on your commits. Some parts are still pending, as I need more time to focus on them after this long gap.

I’d like to reduce nested macros and sections, but I need some help with this, as well as a stable internet connection to work on it. Unfortunately, I currently have limited internet access. I’m working on it whenever I can and would really appreciate any guidance or support.

Thanks again!

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