Previous changeset 8:c9e29ac5d099 (2021-09-23) Next changeset 10:3711f654044e (2024-11-20) |
Commit message:
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/infernal commit 09c1d4ab75f5cd057ed57bf694217f0e355f785e |
modified:
cmalign.xml cmbuild.xml cmpress.xml cmscan.xml cmsearch.xml cmstat.xml macros.xml test-data/test_cmscan.tabular |
added:
test-data/infernal.loc tool_data_table_conf.xml.sample tool_data_table_conf.xml.test |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 cmalign.xml --- a/cmalign.xml Thu Sep 23 19:38:58 2021 +0000 +++ b/cmalign.xml Mon Nov 11 10:27:19 2024 +0000 |
[ |
@@ -3,9 +3,9 @@ <macros> <import>macros.xml</import> </macros> + <expand macro="xrefs"/> <expand macro="requirements" /> <expand macro="stdio" /> - <expand macro="xrefs"/> <command> <![CDATA[ @@ -33,7 +33,7 @@ --mxsize $speed_memory_cont.hmm_banding.mxsize #end if - #if $other_opts.mapali_opt.mapali_cond + #if $other_opts.mapali_opt.mapali_cond=="true" --mapali '$other_opts.mapali_opt.mapali' $other_opts.mapali_opt.mapstr #end if @@ -68,26 +68,7 @@ <inputs> <param name="seqdb" type="data" format="fasta" label="Sequence database"/> - - <conditional name="cm_opts"> - <param name="cm_opts_selector" type="select" label="Subject covariance models"> - <option value="db" selected="True">Locally installed covariance models</option> - <option value="histdb">Covariance model from your history</option> - </param> - <when value="db"> - <param name="database" type="select" label="Covariance models"> - <options from_file="infernal.loc"> - <column name="value" index="0"/> - <column name="name" index="1"/> - <column name="path" index="2"/> - </options> - </param> - </when> - <when value="histdb"> - <param name="cmfile" type="data" format="cm" label="Covariance models file from the history."/> - </when> - </conditional> - + <expand macro="DB" /> <param argument="-g" truevalue="-g" falsevalue="" checked="False" type="boolean" label="Turn on the glocal alignment algorithm" help="... global with respect to the query model and local with respect to the target database."/> @@ -105,8 +86,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" 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" @@ -143,8 +127,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=""/> @@ -189,6 +176,18 @@ </assert_contents> </output> </test> + <test> + <conditional name="cm_opts"> + <param name="cm_opts_selector" value="db"/> + <param name="database" value="cmalign_input2_tRNA5.c.cm"/> + </conditional> + <param name="seqdb" value="cmalign_input_mrum_tRNAs10.fa"/> + <output name="outfile"> + <assert_contents> + <has_text text="GGAGCUAUAGCUCAAU..GGC"/> + </assert_contents> + </output> + </test> </tests> <help> <![CDATA[ |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 cmbuild.xml --- a/cmbuild.xml Thu Sep 23 19:38:58 2021 +0000 +++ b/cmbuild.xml Mon Nov 11 10:27:19 2024 +0000 |
[ |
@@ -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 @@ -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)"/> @@ -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"/> @@ -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"/> @@ -422,8 +425,7 @@ 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. |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 cmpress.xml --- a/cmpress.xml Thu Sep 23 19:38:58 2021 +0000 +++ b/cmpress.xml Mon Nov 11 10:27:19 2024 +0000 |
[ |
@@ -1,47 +1,27 @@ -<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> - <conditional name="cm_opts"> - <param name="cm_opts_selector" type="select" label="Subject covariance models <cmdb> "> - <option value="db" >Locally installed covariance models</option> - <option value="histdb" selected="True">Covariance model from your history</option> - </param> - <when value="db"> - <param name="database" type="select" label="Covariance models"> - <options from_file="infernal.loc"> - <column name="value" index="0"/> - <column name="name" index="1"/> - <column name="path" index="2"/> - </options> - </param> - </when> - <when value="histdb"> - <param name="cmfile" type="data" format="cm" label="Covariance models file from the history."/> - </when> - </conditional> - + <expand macro="DB" /> </inputs> <outputs> <data format="tar" name="outfile" label="cmpress on ${on_string}"/> @@ -58,7 +38,16 @@ </assert_stdout> </test> + <test> + <conditional name="cm_opts"> + <param name="cm_opts_selector" value="db"/> + <param name="database" value="cmpress_input_minifam.cm"/> + </conditional> + <assert_stdout> + <has_text text="Working... done."/> + </assert_stdout> + </test> </tests> <help> <![CDATA[ @@ -86,4 +75,4 @@ <expand macro="citations" /> -</tool> +</tool> \ No newline at end of file |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 cmscan.xml --- a/cmscan.xml Thu Sep 23 19:38:58 2021 +0000 +++ b/cmscan.xml Mon Nov 11 10:27:19 2024 +0000 |
[ |
@@ -3,19 +3,21 @@ <macros> <import>macros.xml</import> </macros> + <expand macro="xrefs"/> <expand macro="requirements"/> <expand macro="stdio"/> - <expand macro="xrefs"/> - <command> + <command detect_errors="aggressive"> <![CDATA[ ## a temp file is needed, because the standard tabular output from infernal is not usefull in Galaxy ## it will be converted to a tab delimited file and piped to Galaxy temp_tabular_output=\$(mktemp) && #if str($cm_opts.cm_opts_selector) == "histdb": - ln -s '$cm_opts.cmfile' cmdb.cm && + ln -s '$cm_opts.cmfile' cmdb.cm + #else: + ln -s '$cm_opts.database.fields.path' cmdb.cm #end if - + && tar xvf '$aux_files' && ln -s `find *.i1f` cmdb.cm.i1f && ln -s `find *.i1i` cmdb.cm.i1i && @@ -66,12 +68,7 @@ #end if #end if ## CM file from the history or stored as database on disc - #if str($cm_opts.cm_opts_selector) == "db": - '$cm_opts.database.fields.path' - #else: - ##'$cm_opts.cmfile' - cmdb.cm - #end if + cmdb.cm ## sequence file '$seqdb' ######### Parse the output file in order to fix a problem reported in https://help.galaxyproject.org/t/messy-infernal-cmscan-output/5984 @@ -92,25 +89,7 @@ </command> <inputs> <param name="seqdb" type="data" format="fasta" label="Sequence database <seqfile>"/> - - <conditional name="cm_opts"> - <param name="cm_opts_selector" type="select" label="Subject covariance models <cmdb> "> - <option value="db" >Locally installed covariance models</option> - <option value="histdb" selected="True">Covariance model from your history</option> - </param> - <when value="db"> - <param name="database" type="select" label="Covariance models"> - <options from_file="infernal.loc"> - <column name="value" index="0"/> - <column name="name" index="1"/> - <column name="path" index="2"/> - </options> - </param> - </when> - <when value="histdb"> - <param name="cmfile" type="data" format="cm" label="Covariance models file from the history."/> - </when> - </conditional> + <expand macro="DB" /> <param name="aux_files" type="data" format="tar" label="Auxillury files" help="A tar file contains the four auxillury files suffixed .i1{fimp}. These files are generated after pressing the cm files using cmpress"/> <param argument="-g" truevalue="-g" falsevalue="" checked="False" type="boolean" @@ -258,6 +237,20 @@ </assert_contents> </output> </test> + <test> + <conditional name="cm_opts"> + <param name="cm_opts_selector" value="db"/> + <param name="database" value="minifam.cm" /> + </conditional> + <param name="aux_files" value="minifam.tar" ftype="tar"/> + <param name="seqdb" value="metag-example.fa"/> + <output name="outfile" file="test_cmscan.tabular" ftype="tabular" lines_diff="8"> + <assert_contents> + <has_n_lines n="15"/> + <has_text text="AAGA01015927.1"/> + </assert_contents> + </output> + </test> </tests> <help> |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 cmsearch.xml --- a/cmsearch.xml Thu Sep 23 19:38:58 2021 +0000 +++ b/cmsearch.xml Mon Nov 11 10:27:19 2024 +0000 |
[ |
@@ -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 @@ -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": @@ -79,25 +81,7 @@ <inputs> <param name="seqdb" type="data" format="fasta" label="Sequence database"/> - - <conditional name="cm_opts"> - <param name="cm_opts_selector" type="select" label="Subject covariance models"> - <option value="db" selected="True">Locally installed covariance models</option> - <option value="histdb">Covariance model from your history</option> - </param> - <when value="db"> - <param name="database" type="select" label="Covariance models"> - <options from_file="infernal.loc"> - <column name="value" index="0"/> - <column name="name" index="1"/> - <column name="path" index="2"/> - </options> - </param> - </when> - <when value="histdb"> - <param name="cmfile" type="data" format="cm" label="Covariance models file from the history."/> - </when> - </conditional> + <expand macro="DB" /> <param argument="-g" truevalue="-g" falsevalue="" checked="False" type="boolean" label="Turn on the glocal alignment algorithm" help="... global with respect to the query model and local with respect to the target database."/> @@ -241,7 +225,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"/> @@ -249,6 +233,14 @@ <param name="seqdb" value="cmsearch_input2.fa"/> <output name="outfile" file="cmsearch_result.tabular"/> </test> + <test expect_num_outputs="1"> + <conditional name="cm_opts"> + <param name="cm_opts_selector" value="db"/> + <param name="database" value="cmsearch_input1.cm"/> + </conditional> + <param name="seqdb" value="cmsearch_input2.fa"/> + <output name="outfile" file="cmsearch_result.tabular"/> + </test> </tests> <help> |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 cmstat.xml --- a/cmstat.xml Thu Sep 23 19:38:58 2021 +0000 +++ b/cmstat.xml Mon Nov 11 10:27:19 2024 +0000 |
[ |
@@ -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 @@ -25,24 +25,7 @@ ]]> </command> <inputs> - <conditional name="cm_opts"> - <param name="cm_opts_selector" type="select" label="Subject covariance models"> - <option value="db" selected="True">Locally installed covariance models</option> - <option value="histdb">Covariance model from your history</option> - </param> - <when value="db"> - <param name="database" type="select" label="Covariance models"> - <options from_file="infernal.loc"> - <column name="value" index="0"/> - <column name="name" index="1"/> - <column name="path" index="2"/> - </options> - </param> - </when> - <when value="histdb"> - <param name="cmfile" type="data" format="cm" label="Covariance models file from the history."/> - </when> - </conditional> + <expand macro="DB" /> </inputs> <outputs> <data format="tabular" name="outfile" label="cmstat on ${on_string}"/> @@ -61,6 +44,19 @@ </assert_contents> </output> </test> + <test> + <conditional name="cm_opts"> + <param name="cm_opts_selector" value="db"/> + <param name="database" value="cmstat_input.cm"/> + </conditional> + <output name="outfile" > + <assert_contents> + <has_text text="idx"/> + <has_text text="accession"/> + <has_text text="nseq"/> + </assert_contents> + </output> + </test> </tests> <help> <![CDATA[ |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 macros.xml --- a/macros.xml Thu Sep 23 19:38:58 2021 +0000 +++ b/macros.xml Mon Nov 11 10:27:19 2024 +0000 |
b |
@@ -1,18 +1,37 @@ <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> <xref type="bio.tools">infernal</xref> </xrefs> </xml> + <xml name="DB"> + <conditional name="cm_opts"> + <param name="cm_opts_selector" type="select" label="Subject covariance models"> + <option value="db" selected="True">Locally installed covariance models</option> + <option value="histdb">Covariance model from your history</option> + </param> + <when value="db"> + <param name="database" type="select" label="Covariance models"> + <options from_data_table="infernal"> + <column name="value" index="0"/> + <column name="name" index="1"/> + <column name="path" index="2"/> + </options> + </param> + </when> + <when value="histdb"> + <param name="cmfile" type="data" format="cm" label="Covariance models file from the history."/> + </when> + </conditional> + </xml> <xml name="stdio"> <stdio> <exit_code range="1:" /> |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 test-data/infernal.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/infernal.loc Mon Nov 11 10:27:19 2024 +0000 |
b |
@@ -0,0 +1,21 @@ +#This is a sample file distributed with Galaxy that is used to define a +#list of infernal covariance models, using three columns tab separated +#(longer whitespace are TAB characters): +# +#The entries are as follows: +# +#<unique_id> <covariance model name> <path> +# +#Your infernal.loc file should include an entry per line for each "base name" +#you have stored. For example: +# +#rfam01 RFAM 4.2 08 Aug 2013 /data/0/galaxy_data/infernal/08_08_2013/rfam.cm +# +#...etc... +# + +cmstat_input.cm Test case: cmstat_input ${__HERE__}/cmstat_input.cm +cmsearch_input1.cm Test case: cmsearch_input1 ${__HERE__}/cmsearch_input1.cm +minifam.cm Test case: minifam.cm ${__HERE__}/minifam.cm +cmpress_input_minifam.cm Test case: cmpress_input_minifam.cm ${__HERE__}/cmpress_input_minifam.cm +cmalign_input2_tRNA5.c.cm Test case: cmalign_input2_tRNA5.c.cm ${__HERE__}/cmalign_input2_tRNA5.c.cm |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 test-data/test_cmscan.tabular --- a/test-data/test_cmscan.tabular Thu Sep 23 19:38:58 2021 +0000 +++ b/test-data/test_cmscan.tabular Mon Nov 11 10:27:19 2024 +0000 |
[ |
@@ -5,11 +5,11 @@ 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] |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 tool_data_table_conf.xml.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.sample Mon Nov 11 10:27:19 2024 +0000 |
b |
@@ -0,0 +1,7 @@ +<tables> + <!-- Location of infernal database files --> + <table name="infernal" comment_char="#"> + <columns>value, name, path</columns> + <file path="tool-data/infernal.loc" /> + </table> +</tables> \ No newline at end of file |
b |
diff -r c9e29ac5d099 -r 1d74ed49cf41 tool_data_table_conf.xml.test --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.test Mon Nov 11 10:27:19 2024 +0000 |
b |
@@ -0,0 +1,7 @@ +<tables> + <!-- Location of infernal database files --> + <table name="infernal" comment_char="#"> + <columns>value, name, path</columns> + <file path="${__HERE__}/test-data/infernal.loc" /> + </table> +</tables> \ No newline at end of file |