Skip to content

Commit

Permalink
standardize labels and extend tests
Browse files Browse the repository at this point in the history
- add expect_num_outputs
- standardize output labels
  • Loading branch information
bernt-matthias committed Nov 16, 2022
1 parent 13fb031 commit 256b02d
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 59 deletions.
24 changes: 15 additions & 9 deletions tools/rna_tools/locarna/locarna_exparnap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,45 +203,51 @@
<outputs>
<expand macro="standard_outupt" />
<data format="ps" name="ps_fileA"
label="${tool.name} chain in RNA 1 (postscript) on ${on_string}">
label="${tool.name} on ${on_string}: chain in RNA 1 (postscript)">
<filter>'postscript' in outputs</filter>
</data>
<data format="ps" name="ps_fileB"
label="${tool.name} chain in RNA 2 (postscript) on ${on_string}">
label="${tool.name} on ${on_string}: chain in RNA 2 (postscript)">
<filter>'postscript' in outputs</filter>
</data>
<data format="txt" name="anchors_fasta"
label="${tool.name} anchor constraints from chain (fasta) on ${on_string}">
label="${tool.name} on ${on_string}: anchor constraints from chain (fasta)">
<filter>'anchors-fasta' in outputs</filter>
</data>
<data format="txt" name="anchors_ppA"
label="${tool.name} anchors for RNA 1 (pp) on ${on_string}">
label="${tool.name} on ${on_string}: anchors for RNA 1 (pp)">
<filter>'anchors-pp' in outputs</filter>
</data>
<data format="txt" name="anchors_ppB"
label="${tool.name} anchors for RNA 2 (pp) on ${on_string}">
label="${tool.name} on ${on_string}: anchors for RNA 2 (pp)">
<filter>'anchors-pp' in outputs</filter>
</data>
<data format="clustal" name="clustal"
label="${tool.name} chain as alignment (clustal) on ${on_string}">
label="${tool.name} on ${on_string}: chain as alignment (clustal)">
<filter>'clustal' in outputs</filter>
</data>
<data format="tabular" name="epm_list"
label="${tool.name} list of epms on ${on_string}">
label="${tool.name} on ${on_string}: list of epms">
<filter>'epm_list' in outputs</filter>
</data>
<data format="tabular" name="chained_epm_list"
label="${tool.name} list of epms in chain on ${on_string}">
label="${tool.name} on ${on_string}: list of epms in chain">
<filter>'chained_epm_list' in outputs</filter>
</data>
</outputs>

<tests>
<test>
<test expect_num_outputs="2">
<param name="inputA" value="tRNA_2-1.fa" />
<param name="inputB" value="tRNA_2-2.fa" />
<param name="outputs" value="epm_list" />
<output name="epm_list" file="tRNA_2.epms" />
<output name="stdout">
<assert_contents>
<has_text text="LCSEPM preprocessing..."/>
<has_text text="#EPMs:"/>
</assert_contents>
</output>
</test>
</tests>

Expand Down
36 changes: 31 additions & 5 deletions tools/rna_tools/locarna/locarna_multiple.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#if 'clustal_strict' in str($outputs).split(",")
&& grep -v '^#' mlocarna_results/results/result.aln > mlocarna_results/results/result.strict-aln
#end if
&& echo $outputs
]]></command>

<inputs>
Expand Down Expand Up @@ -181,32 +181,58 @@
</outputs>

<tests>
<test>
<test expect_num_outputs="3">
<param name="input_data" value="archaea.fa" />
<param name="stdout_verbosity" value="" />
<param name="max_diff_mode_selector" value="max-diff" />
<param name="max_diff" value="20" />
<param name="outputs" value="clustal,clustal_strict"/>
<output name="stdout" file="archaea-default.stdout" lines_diff="2" />
<output name="clustal">
<assert_contents>
<has_text text="CLUSTAL W --- LocARNA @TOOL_VERSION@"/>
</assert_contents>
</output>
<output name="clustal_strict">
<assert_contents>
<has_text text="CLUSTAL W --- LocARNA @TOOL_VERSION@"/>
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="2">
<param name="input_data" value="haca.snoRNA.fa" />
<param name="stdout_verbosity" value="" />
<output name="stdout" file="haca.snoRNA-default.stdout" lines_diff="2" />
<output name="clustal_strict">
<assert_contents>
<has_text text="CLUSTAL W --- LocARNA @TOOL_VERSION@"/>
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="2">
<param name="input_data" value="archaea.fa" />
<param name="stdout_verbosity" value="" />
<param name="outputs" value="clustal" />
<param name="alignment_mode_selector" value="probabilistic" />
<output name="stdout">
<assert_contents>
<has_text text="mLocARNA --- multiple Local (and global) Alignment of RNA --- LocARNA @TOOL_VERSION@"/>
</assert_contents>
</output>
<output name="clustal" file="archaea-probabilistic.aln" lines_diff="2"/>
</test>
<test>
<test expect_num_outputs="2">
<param name="input_data" value="archaea.fa" />
<param name="stdout_verbosity" value="" />
<param name="outputs" value="clustal" />
<param name="max_diff_mode_selector" value="max-diff-aln" />
<param name="max_diff_aln" value="archaea-ref.aln" />
<param name="max_diff" value="2" />
<output name="stdout">
<assert_contents>
<has_text text="mLocARNA --- multiple Local (and global) Alignment of RNA --- LocARNA @TOOL_VERSION@"/>
</assert_contents>
</output>
<output name="clustal" file="archaea-ref_result.aln" lines_diff="2"/>
</test>
</tests>
Expand Down
12 changes: 6 additions & 6 deletions tools/rna_tools/locarna/locarna_pairwise.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,31 +182,31 @@
<outputs>
<expand macro="standard_outupt" />
<data format="clustal" name="clustal"
label="${tool.name} alignment (annotated clustal) on ${on_string}">
label="${tool.name} on ${on_string}: alignment (annotated clustal)">
<filter>'clustal' in outputs</filter>
</data>
<data format="clustal" name="clustal_strict"
label="${tool.name} alignment (clustal) on ${on_string}">
label="${tool.name}on ${on_string}: alignment (clustal)">
<filter>'clustal_strict' in outputs</filter>
</data>
<data format="stockholm" name="stockholm"
label="${tool.name} alignment (stockholm) on ${on_string}">
label="${tool.name} on ${on_string}: alignment (stockholm)">
<filter>'stockholm' in outputs</filter>
</data>
<data format="txt" name="pp"
label="${tool.name} alignment (PP 2.0) on ${on_string}">
label="${tool.name} on ${on_string}: alignment (PP 2.0)">
<filter>'pp' in outputs</filter>
</data>
</outputs>

<tests>
<test>
<test expect_num_outputs="1">
<param name="inputA" value="tRNA_2-1.fa" />
<param name="inputB" value="tRNA_2-2.fa" />
<param name="outputs" value="clustal" />
<output name="clustal" file="tRNA_2.aln" lines_diff="2" />
</test>
<test>
<test expect_num_outputs="2">
<param name="inputA" value="haca.snoRNA-1.aln" />
<param name="inputB" value="haca.snoRNA-2.aln" />
<param name="outputs" value="clustal_strict,clustal" />
Expand Down
2 changes: 1 addition & 1 deletion tools/rna_tools/locarna/locarna_pairwise_p.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
</outputs>

<tests>
<test>
<test expect_num_outputs="2">
<param name="inputA" value="tRNA_2-1.fa" />
<param name="inputB" value="tRNA_2-2.fa" />
<param name="outputs" value="arc_match_probs,base_match_probs"/>
Expand Down
22 changes: 17 additions & 5 deletions tools/rna_tools/locarna/locarna_reliability_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,25 +141,37 @@

<outputs>
<data format="pdf" name="pdf_output_plot"
label="${tool.name} reliability plot (pdf) ${on_string}">
label="${tool.name} on ${on_string}: plot">
<filter>output_format == 'pdf'</filter>
</data>
<data format="png" name="png_output_plot"
label="${tool.name} reliability plot (png) ${on_string}">
label="${tool.name} on ${on_string}: plot">
<filter>output_format == 'png'</filter>
</data>
<data format="txt" name="rscript_output"
label="${tool.name} reliability plot (R script) ${on_string}">
label="${tool.name} on ${on_string}: R script ">
<filter> write_rscript is True </filter>
</data>
<data format="txt" name="stdout" label="${tool.name} std out on ${on_string}" />
<data format="txt" name="stdout" label="${tool.name} on ${on_string}: stdout" />
</outputs>

<tests>
<test>
<test expect_num_outputs="3">
<param name="input_archive" value="archaea.tar.gz" />
<param name="write_rscript" value="true" />
<output name="pdf_output_plot">
<assert_contents>
<has_text text="%PDF"/>
<has_size value="5401" delta="100"/>
</assert_contents>
</output>
<output name="rscript_output" file="archaea_relplot.scr" lines_diff="2" />
<output name="stdout">
<assert_contents>
<has_text text="ONOFF"/>
<has_text text="FIT"/>
</assert_contents>
</output>
</test>
</tests>

Expand Down
12 changes: 6 additions & 6 deletions tools/rna_tools/locarna/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -291,33 +291,33 @@
</xml>

<xml name="standard_outupt">
<data format="txt" name="stdout" label="${tool.name} std out on ${on_string}">
<data format="txt" name="stdout" label="${tool.name} on ${on_string}: stdout">
<filter>stdout_verbosity != '--quiet'</filter>
</data>
</xml>

<xml name="mlocarna_outputs">
<expand macro="standard_outupt" />
<data format="clustal" name="clustal" from_work_dir="mlocarna_results/results/result.aln"
label="${tool.name} alignment (annotated clustal) on ${on_string}">
label="${tool.name} on ${on_string}: alignment (annotated clustal)">
<filter>'clustal' in outputs</filter>
</data>
<data format="clustal" name="clustal_strict"
from_work_dir="mlocarna_results/results/result.strict-aln"
label="${tool.name} alignment (clustal) on ${on_string}">
label="${tool.name} on ${on_string}: alignment (clustal)">
<filter>'clustal_strict' in outputs</filter>
</data>
<data format="stockholm" name="stockholm" from_work_dir="mlocarna_results/results/result.stk"
label="${tool.name} alignment (stockholm) on ${on_string}">
label="${tool.name} on ${on_string}: alignment (stockholm)">
<filter>'stockholm' in outputs</filter>
</data>
<data format="txt" name="pp"
from_work_dir="mlocarna_results/results/result.pp"
label="${tool.name} alignment (PP 2.0) on ${on_string}">
label="${tool.name} on ${on_string}: alignment (PP 2.0)">
<filter>'pp' in outputs</filter>
</data>
<data format="tar.gz" name="mlocarna_results_tgz"
label="${tool.name} results archive on ${on_string}">
label="${tool.name} on ${on_string}: results archive">
<filter>'mlocarna_results' in outputs</filter>
</data>
</xml>
Expand Down
19 changes: 6 additions & 13 deletions tools/rna_tools/locarna/test-data/haca.snoRNA-c.aln
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
CLUSTAL W --- LocARNA 1.9.0

ACA7 ACCUCCUGGGAUCGCAUCUGG-AGAGUGC---CUAGUAUUCUGCCAGCUU-CGGAAAGGG
ACA30 UGGCACUUU--CACAGUUCCU-UCCCCAG---GCAGUGGGGCCAGGAUUUGGUAGCUGGU
ACA5 UGCAGCCGUGUCAAAUUCAGUACCUGUCCUAUGCAUGGUAGGCACUGGC--CCAGAAGGC
ACA59 GCCCAGGGUAUGUUCACGGGGCGAUGCUGCCCUCCCAGCUGG-CCCAUG--GGUGACCCU
#A1 ............................................................
#A2 ............................................................

ACA7 AGGGAAAGCAAGCCUGGCAGAG-GCACCCAUUCCAUUCCCAGCUUGCUCCGUAGCUGGCG
ACA30 GCUGAGAGAAAAC---CC-UUG---AUUGUAUUCUUGCCCUGGG---AUUAUACCAGUGG
ACA5 UGCCACAGAAACAC--UGUGAC-UCAUGG-----GCCCUGUUCCUGUGUCCCAGGCUCAG
ACA59 GGGAACAUUAACUGCCUCACAACGUUUGUGCCUCAGUUACCCGUAGAUGUAGUGAGGGUA
#A1 ....AAAAAA..................................................
#A2 ....123456..................................................
ACA7 ACCUCCUGGGAUCGCAUCUGG-AGAGUGC---CUAGUAUUCUGCCAGCUU-CGGAAAGGGAGGGAAAGCAAGCCUGGCAGAG-GCACCCAUUCCAUUCCCAGCUUGCUCCGUAGCUGGCG
ACA30 UGGCACUUU--CACAGUUCCU-UCCCCAG---GCAGUGGGGCCAGGAUUUGGUAGCUGGUGCUGAGAGAAAAC---CC-UUG---AUUGUAUUCUUGCCCUGGG---AUUAUACCAGUGG
ACA5 UGCAGCCGUGUCAAAUUCAGUACCUGUCCUAUGCAUGGUAGGCACUGGC--CCAGAAGGCUGCCACAGAAACAC--UGUGAC-UCAUGG-----GCCCUGUUCCUGUGUCCCAGGCUCAG
ACA59 GCCCAGGGUAUGUUCACGGGGCGAUGCUGCCCUCCCAGCUGG-CCCAUG--GGUGACCCUGGGAACAUUAACUGCCUCACAACGUUUGUGCCUCAGUUACCCGUAGAUGUAGUGAGGGUA
#A1 ................................................................AAAAAA..................................................
#A2 ................................................................123456..................................................

ACA7 AUUGGA--AGA---CACU-CUGCG-----ACA
ACA30 CAACUG--UCA---CUCA-AUGGG-----ACA
Expand Down
13 changes: 4 additions & 9 deletions tools/rna_tools/locarna/test-data/haca.snoRNA.aln
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
CLUSTAL W --- LocARNA 1.9.0

ACA7 ACCUCCUGGGAUCGCAUCUGG-AGAGUGC---CUAGUAUUCUGCCAGCUU-CGGAAAGGG
ACA30 UGGCACUUU--CACAGUUCCU-UCCCCAG---GCAGUGGGGCCAGGAUUUGGUAGCUGGU
ACA5 UGCAGCCGUGUCAAAUUCAGUACCUGUCCUAUGCAUGGUAGGCACUGGC--CCAGAAGGC
ACA59 GCCCAGGGUAUGUUCACGGGGCGAUGCUGCCCUCCCAGCUGG-CCCAUG--GGUGACCCU

ACA7 AGGGAAAGCAAGCCUGGCAGAG-GCACCCAUUCCAUUCCCAGCUUGCUCCGUAGCUGGCG
ACA30 GCUGAGAGAAAAC---CC-UUG---AUUGUAUUCUUGCCCUGGG---AUUAUACCAGUGG
ACA5 UGCCACAGAAACAC--UGUGAC-UCAUGG-----GCCCUGUUCCUGUGUCCCAGGCUCAG
ACA59 GGGAACAUUAACUGCCUCACAACGUUUGUGCCUCAGUUACCCGUAGAUGUAGUGAGGGUA
ACA7 ACCUCCUGGGAUCGCAUCUGG-AGAGUGC---CUAGUAUUCUGCCAGCUU-CGGAAAGGGAGGGAAAGCAAGCCUGGCAGAG-GCACCCAUUCCAUUCCCAGCUUGCUCCGUAGCUGGCG
ACA30 UGGCACUUU--CACAGUUCCU-UCCCCAG---GCAGUGGGGCCAGGAUUUGGUAGCUGGUGCUGAGAGAAAAC---CC-UUG---AUUGUAUUCUUGCCCUGGG---AUUAUACCAGUGG
ACA5 UGCAGCCGUGUCAAAUUCAGUACCUGUCCUAUGCAUGGUAGGCACUGGC--CCAGAAGGCUGCCACAGAAACAC--UGUGAC-UCAUGG-----GCCCUGUUCCUGUGUCCCAGGCUCAG
ACA59 GCCCAGGGUAUGUUCACGGGGCGAUGCUGCCCUCCCAGCUGG-CCCAUG--GGUGACCCUGGGAACAUUAACUGCCUCACAACGUUUGUGCCUCAGUUACCCGUAGAUGUAGUGAGGGUA

ACA7 AUUGGA--AGA---CACU-CUGCG-----ACA
ACA30 CAACUG--UCA---CUCA-AUGGG-----ACA
Expand Down
7 changes: 2 additions & 5 deletions tools/rna_tools/locarna/test-data/tRNA_2.aln
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
CLUSTAL W --- LocARNA 1.9.0 --- Score: 2875

D10744 GGAAAAUU-GAUCAUCGGCAAGAUAAGUUAUUUACUAAAUAAUAGGAUUUAAUAACCUGG
AF008220 GGAGGAUUAGCUCAGCUGGGAGAGCAUCUGCCUUACAAGCAGAGGG-----------UCG

D10744 UGAGUUCGAAUCUCACAUUUUCCG
AF008220 GCGGUUCGAGCCCGUCAUCCUCCA
D10744 GGAAAAUU-GAUCAUCGGCAAGAUAAGUUAUUUACUAAAUAAUAGGAUUUAAUAACCUGGUGAGUUCGAAUCUCACAUUUUCCG
AF008220 GGAGGAUUAGCUCAGCUGGGAGAGCAUCUGCCUUACAAGCAGAGGG-----------UCGGCGGUUCGAGCCCGUCAUCCUCCA

0 comments on commit 256b02d

Please sign in to comment.