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

Cmsearch: added missing args to command #1328

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions tools/rna_tools/infernal/cmalign.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<macros>
<import>macros.xml</import>
</macros>
<expand macro="xrefs"/>
<expand macro="requirements" />
<expand macro="stdio" />
<expand macro="xrefs"/>
<command>
<![CDATA[

Expand Down Expand Up @@ -76,7 +76,7 @@
</param>
<when value="db">
<param name="database" type="select" label="Covariance models">
<options from_file="infernal.loc">
<options from_data_table="infernal.loc">
<column name="value" index="0"/>
<column name="name" index="1"/>
<column name="path" index="2"/>
Expand Down Expand Up @@ -105,8 +105,11 @@
</when>
</conditional>
<conditional name="notrunc_opt">
<param argument="--notrunc" truevalue="" falsevalue="--notrunc" checked="true" type="boolean"
label="Use truncated alignment algorithm" help=""/>
<param argument="--notrunc" truevalue="" falsevalue="--notrunc" type="select"
label="Use truncated alignment algorithm">
<option value="">Yes</option>
<option value="--notrunc">No</option>
</param>
<when value=""></when>
<when value="--notrunc">
<param argument="--sub" type="boolean" truevalue="--sub" falsevalue="" checked="false"
Expand Down Expand Up @@ -143,8 +146,11 @@

<section name="other_opts" title="Other options">
<conditional name="mapali_opt">
<param name="mapali_cond" type="boolean" checked="false"
label="Read the aligment file that used to build the CM" help="The alignment from the file is held fixed. This allows you to align sequences to a model with cmalign and view them in the context of an existing trusted multiple alignment."/>
<param name="mapali_cond" type="select"
label="Read the aligment file that used to build the CM" help="The alignment from the file is held fixed. This allows you to align sequences to a model with cmalign and view them in the context of an existing trusted multiple alignment.">
<option value="false">No</option>
<option value="true">Yes</option>
</param>
<when value="true">
<param argument="--mapali" type="data" format="fasta"
label="The aligment file that used to build the CM" help=""/>
Expand Down
20 changes: 11 additions & 9 deletions tools/rna_tools/infernal/cmbuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<import>macros.xml</import>
</macros>
<!--parallelism method="multi" split_inputs="alignment_infile" split_mode="to_size" split_size="10" merge_outputs="cmfile_outfile"></parallelism-->
<expand macro="xrefs"/>
<expand macro="requirements" />
<expand macro="stdio" />
<expand macro="xrefs"/>
<command>
<![CDATA[
cmbuild
Expand Down Expand Up @@ -196,19 +196,22 @@
<option value="--cyk">align with the CYK algorithm</option>
</param>

<param name="refine_output" truevalue="" falsevalue="" checked="False" type="boolean"
<param name="refine_output" truevalue="--refine" falsevalue="" checked="False" type="boolean"
label="Output the refined alignment file as it is used to build the covariance model" help=""/>

</when>
</conditional>

<param name="is_summery_output" truevalue="" falsevalue="" checked="False" type="boolean"
<param name="is_summery_output" truevalue="-o" falsevalue="" checked="False" type="boolean"
label="Output a summery file?" help=""/>

<!-- calibrate options -->
<conditional name="Calibrate">
<param name="selector" type="boolean" checked="true" label="Calibrate the covariance model"
help="A CM file must be calibrated with cmcalibrate before it can be used in cmsearch or cmscan. cmcalibrate is very slow. It takes a couple of hours to calibrate a single average sized CM on a single CPU"/>
<param name="selector" type="select" label="Calibrate the covariance model"
help="A CM file must be calibrated with cmcalibrate before it can be used in cmsearch or cmscan. cmcalibrate is very slow. It takes a couple of hours to calibrate a single average sized CM on a single CPU">
<option value="true">Yes</option>
<option value="false">No</option>
</param>
<when value="false"/>
<when value="true">
<param argument="-L" type="float" value="1.6" min="0.01" max="160" label="Total length of random sequences to search" help="Set random seq length to search in Mb (megabases)"/>
Expand Down Expand Up @@ -325,7 +328,7 @@
</outputs>

<tests>
<test>
<test expect_num_outputs="1">
<param name="alignment_infile" value="cmbuild_input_tRNA5.sto"/>
<conditional name="Calibrate">
<param name="selector" value="true"/>
Expand All @@ -338,7 +341,7 @@
</output>
</test>
<!-- Test emax seq parameter -->
<test>
<test expect_num_outputs="1">
<param name="alignment_infile" value="cmbuild_input_tRNA5.sto"/>
<conditional name="Calibrate">
<param name="selector" value="true"/>
Expand Down Expand Up @@ -422,8 +425,7 @@ These options control how consensus columns are defined in an alignment.

cmbuild uses an ad hoc sequence weighting algorithm to downweight closely related sequences and upweight distantly related ones. This has the effect of making models less biased by uneven phylogenetic representation. For example, two identical sequences would typically each receive half the weight that one sequence would. These options control which algorithm gets used.

- *--wgb*: Use the Henikoff position-based sequence weighting scheme [Henikoff
and Henikoff, J. Mol. Biol. 243:574, 1994]. This is the default.
- *--wgb*: Use the Henikoff position-based sequence weighting scheme [Henikoff and Henikoff, J. Mol. Biol. 243:574, 1994]. This is the default.
- *--wgsc*: Use the Gerstein/Sonnhammer/Chothia weighting algorithm [Gerstein et al, J. Mol. Biol. 235:1067, 1994].
- *--wnone*: Turn sequence weighting off; e.g. explicitly set all sequence weights to 1.0.
- *--wgiven*: Use sequence weights as given in annotation in the input alignment file. If no weights were given, assume they are all 1.0. The default is to determine new sequence weights by the Gerstein/Sonnhammer/Chothia algorithm, ignoring any annotated weights.
Expand Down
24 changes: 11 additions & 13 deletions tools/rna_tools/infernal/cmpress.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
<tool id="infernal_cmpress" name="cmpress" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
<tool id="infernal_cmpress" name="cmpress" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0">
<description> Prepare a covariance model database for cmscan</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="xrefs"/>
<expand macro="requirements" />
<expand macro="stdio" />
<expand macro="xrefs"/>
<command>
<command detect_errors="aggressive">
<![CDATA[
## CM file from the history or stored as database on disc
mkdir -p ./cm_model &&
#if str($cm_opts.cm_opts_selector) == "db":
cmfile_path='$cm_opts.database.fields.path'
ln -s '$cm_opts.database.fields.path' ./cm_model/
#else:
##'$cm_opts.cmfile'
cmfile_path='$cmfile'
ln -s '$cmfile' ./cm_model/
#end if
&&
cmpress -F "\$cmfile_path" &&
##cmpress creates four files in the same directory of the cm file
cd `dirname "\$cmfile_path"` &&
tar -cvf '$outfile' `basename "\$cmfile_path"`.i1*
cmpress -F ./cm_model/* &&
cd ./cm_model/ &&
tar -cvf '$outfile' *.i1f *.i1i *.i1m *.i1p
]]>
</command>
<inputs>
Expand All @@ -30,7 +28,7 @@
</param>
<when value="db">
<param name="database" type="select" label="Covariance models">
<options from_file="infernal.loc">
<options from_data_table="infernal.loc">
<column name="value" index="0"/>
<column name="name" index="1"/>
<column name="path" index="2"/>
Expand Down Expand Up @@ -86,4 +84,4 @@ For further questions please refere to the Infernal `Userguide <http://eddylab.o
<expand macro="citations" />


</tool>
</tool>
4 changes: 2 additions & 2 deletions tools/rna_tools/infernal/cmscan.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<macros>
<import>macros.xml</import>
</macros>
<expand macro="xrefs"/>
<expand macro="requirements"/>
<expand macro="stdio"/>
<expand macro="xrefs"/>
<command>
<![CDATA[
## a temp file is needed, because the standard tabular output from infernal is not usefull in Galaxy
Expand Down Expand Up @@ -100,7 +100,7 @@
</param>
<when value="db">
<param name="database" type="select" label="Covariance models">
<options from_file="infernal.loc">
<options from_data_table="infernal.loc">
<column name="value" index="0"/>
<column name="name" index="1"/>
<column name="path" index="2"/>
Expand Down
8 changes: 5 additions & 3 deletions tools/rna_tools/infernal/cmsearch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<import>macros.xml</import>
</macros>
<!--parallelism method="multi" split_inputs="seqdb" split_mode="to_size" split_size="500" merge_outputs="outfile,multiple_alignment_output"></parallelism-->
<expand macro="xrefs"/>
<expand macro="requirements"/>
<expand macro="stdio" />
<expand macro="xrefs"/>
<command>
<![CDATA[
## a temp file is needed, because the standard tabular output from infernal is not usefull in Galaxy
Expand Down Expand Up @@ -39,6 +39,8 @@
#if $A:
$A '$multiple_alignment_output'
#end if
$noali
$verbose
#if str($inclusion_thresholds_opts.inclusion_thresholds_selector) == "--incE":
--incE $inclusion_thresholds_opts.incE
#elif str($inclusion_thresholds_opts.inclusion_thresholds_selector) == "--incT":
Expand Down Expand Up @@ -87,7 +89,7 @@
</param>
<when value="db">
<param name="database" type="select" label="Covariance models">
<options from_file="infernal.loc">
<options from_data_table="infernal.loc">
<column name="value" index="0"/>
<column name="name" index="1"/>
<column name="path" index="2"/>
Expand Down Expand Up @@ -241,7 +243,7 @@

</outputs>
<tests>
<test>
<test expect_num_outputs="1">
<conditional name="cm_opts">
<param name="cm_opts_selector" value="histdb"/>
<param name="cmfile" value="cmsearch_input1.cm"/>
Expand Down
4 changes: 2 additions & 2 deletions tools/rna_tools/infernal/cmstat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<macros>
<import>macros.xml</import>
</macros>
<expand macro="xrefs"/>
<expand macro="requirements"/>
<expand macro="stdio" />
<expand macro="xrefs"/>
<command>
<![CDATA[
## a temp file is needed, because the standard tabular output from infernal is not usefull in Galaxy
Expand All @@ -32,7 +32,7 @@
</param>
<when value="db">
<param name="database" type="select" label="Covariance models">
<options from_file="infernal.loc">
<options from_data_table="infernal.loc">
<column name="value" index="0"/>
<column name="name" index="1"/>
<column name="path" index="2"/>
Expand Down
7 changes: 3 additions & 4 deletions tools/rna_tools/infernal/macros.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<macros>
<xml name="requirements">
<requirements>
<requirement type="package">infernal</requirement>
<requirement type="package" version="1.1.4">infernal</requirement>
<requirement type="package" version="8.32">coreutils</requirement>
<requirement type="package" version="@TOOL_VERSION@">infernal</requirement>
<requirement type="package" version="9.5">coreutils</requirement>
</requirements>
</xml>
<token name="@TOOL_VERSION@">1.1.4</token>
<token name="@TOOL_VERSION@">1.1.5</token>
<token name="@VERSION_SUFFIX@">0</token>
<xml name="xrefs">
<xrefs>
Expand Down
10 changes: 5 additions & 5 deletions tools/rna_tools/infernal/test-data/test_cmscan.tabular
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ tRNA5 - AAGA01015927.1 - cm 1 72 314 386 + no 1 0.59 0.0 53.5 6e-16 !
Cobalamin RF00174 AAFY01022046.1 - cm 32 191 934 832 - 5' 2 0.48 0.0 30.0 6.1e-09 ! Cobalamin riboswitch
#
# Program: cmscan
# Version: 1.1.4 (Dec 2020)
# Version: 1.1.5 (Sep 2023)
# Pipeline mode: SCAN
# Query file: /tmp/tmp6jwp47cs/files/a/6/f/dataset_a6fe922b-72aa-4753-b4dd-cd3c716a4ae5.dat
# Query file: /tmp/tmpst0r7qh9/files/7/3/7/dataset_7373cb0d-0d12-49b5-96e0-e1aabaa6db38.dat
# Target file: cmdb.cm
# Option settings: cmscan -o /dev/null --tblout $temp_tabular_output --default --cpu 1 cmdb.cm /tmp/tmp6jwp47cs/files/a/6/f/dataset_a6fe922b-72aa-4753-b4dd-cd3c716a4ae5.dat
# Current dir: /tmp/tmp6jwp47cs/job_working_directory/000/13/working
# Date: Thu Sep 23 15:21:39 2021
# Option settings: cmscan -o /dev/null --tblout $temp_tabular_output --default --cpu 1 cmdb.cm /tmp/tmpst0r7qh9/files/7/3/7/dataset_7373cb0d-0d12-49b5-96e0-e1aabaa6db38.dat
# Current dir: /tmp/tmpst0r7qh9/job_working_directory/000/4/working
# Date: Thu Oct 17 11:28:32 2024
# [ok]
Loading