Skip to content

Commit

Permalink
macro cleanup and test improvements
Browse files Browse the repository at this point in the history
- better code reuse for the output flag macro
- unified token for generation of the output arguments
- added macros for the outputs
- output labels changed now TOOL on onstring
  (so I keep the capitalisation but do not use the dataset names
  anymore)
- added content asserions for outputs of all tools
  • Loading branch information
bernt-matthias committed May 15, 2020
1 parent 52b9672 commit a38fc75
Show file tree
Hide file tree
Showing 12 changed files with 220 additions and 167 deletions.
7 changes: 6 additions & 1 deletion tools/hmmer3/alimask.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ alimask
<param name="modelrangestart" value="10" />
<param name="modelrangeend" value="20" />
<expand macro="seed_test" />
<output name="output" file="globins-masked.sto" lines_diff="4"/>
<output name="output" file="globins-masked.sto" lines_diff="4">
<assert_contents>
<has_line_matching expression="# STOCKHOLM.*"/>
<has_line_matching expression="//"/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
Expand Down
18 changes: 16 additions & 2 deletions tools/hmmer3/hmmbuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,27 @@ hmmbuild
<test>
<param name="msafile" value="globins4.sto"/>
<expand macro="seed_test" />
<output name="hmmout" file="globins4.hmm" lines_diff="10"/>
<output name="hmmout" file="globins4.hmm" compare="sim_size">
<assert_contents>
<has_line_matching expression="HMMER3/f.*"/>
<has_line_matching expression="ALPH amino"/>
<has_line_matching expression="NSEQ 4"/>
<has_line_matching expression="//"/>
</assert_contents>
</output>
</test>
<test>
<param name="msafile" value="MADE1.sto"/>
<param name="input_format_select" value="--dna"/>
<expand macro="seed_test" />
<output name="hmmout" file="MADE1.hmm" lines_diff="14"/>
<output name="hmmout" file="MADE1.hmm" compare="sim_size">
<assert_contents>
<has_line_matching expression="HMMER3/f.*"/>
<has_line_matching expression="ALPH DNA"/>
<has_line_matching expression="NSEQ 1997"/>
<has_line_matching expression="//"/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
Expand Down
9 changes: 8 additions & 1 deletion tools/hmmer3/hmmconvert.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ $format
<test>
<param name="hmmfile" value="globins4.hmm"/>
<param name="format" value="-2" ftype="hmm2"/>
<output name="output" file="globins4.hmm2" lines_diff="6"/>
<output name="output" file="globins4.hmm2" compare="sim_size">
<assert_contents>
<has_line_matching expression="HMMER2.*"/>
<has_line_matching expression="ALPH Amino"/>
<has_line_matching expression="NSEQ 4"/>
<has_line_matching expression="//"/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
Expand Down
13 changes: 11 additions & 2 deletions tools/hmmer3/hmmemit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,23 @@ hmmemit
<param name="oformat_select" value="aln"/>
<param name="N_aln" value="10"/>
<expand macro="seed_test" />
<output name="output" file="globins4-emit.sto" ftye="stockholm" compare="sim_size"/>
<output name="output" file="globins4-emit.sto" ftype="stockholm" compare="sim_size">
<assert_contents>
<has_line_matching expression="# STOCKHOLM.*"/>
<has_line_matching expression="//"/>
</assert_contents>
</output>
</test>
<test>
<param name="hmmfile" value="globins4.hmm"/>
<param name="oformat_select" value="fasta"/>
<param name="N_aln" value="10"/>
<expand macro="seed_test" />
<output name="output" file="globins4-emit-1.sto" ftype="fasta" compare="sim_size"/>
<output name="output" file="globins4-emit-1.sto" ftype="fasta" compare="sim_size">
<assert_contents>
<has_line_matching expression=">.*"/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
Expand Down
29 changes: 14 additions & 15 deletions tools/hmmer3/hmmscan.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,15 @@ hmmscan
<expand macro="input_hmm_choice" />
<!-- todo use Galaxy features like data libraries/data tables/??? -->
<param name="seqfile" type="data" format="fasta" label="Sequence file"/>
<expand macro="oformat_with_opts"/>
<expand macro="oformat_with_opts_dom_pfam"/>
<expand macro="thresholds_xml"/>
<expand macro="cut"/>
<expand macro="accel_heur_xml"/>
<expand macro="adv_opts"/>
<expand macro="seed"/>
</inputs>
<outputs>
<data name="output" format="txt" label="HMM matches of $seqfile.name against the profile database"/>
<data name="tblout" format="txt" label="Table of per-sequence hits from HMM matches of $seqfile.name against the profile database">
<filter>oformat and 'tblout' in oformat</filter>
</data>
<data name="domtblout" format="txt" label="Table of per-domain hits from HMM matches of $seqfile.name against the profile database">
<filter>oformat and 'domtblout' in oformat</filter>
</data>
<data name="pfamtblout" format="txt" label="Table of per-sequence/per-domain hits from HMM matches of $seqfile.name against the profile database">
<filter>oformat and 'pfamtblout' in oformat</filter>
</data>
<expand macro="output_dom_pfam" tool="HMMSCAN"/>
</outputs>
<tests>
<test expect_num_outputs="4">
Expand All @@ -52,10 +43,18 @@ hmmscan
<param name="seqfile" value="dna_target.fa"/>
<expand macro="oformat_test" />
<expand macro="seed_test" />
<output name="output" file="MADE1.out" lines_diff="24"/>
<output name="tblout" file="MADE1.out.tblout" lines_diff="14"/>
<output name="domtblout" file="MADE1.out.domtblout" lines_diff="10"/>
<output name="pfamtblout" file="MADE1.out.pfamtblout" lines_diff="10"/>
<output name="output" file="MADE1.out" lines_diff="24">
<expand macro="assert_out" tool="hmmscan"/>
</output>
<output name="tblout" file="MADE1.out.tblout" lines_diff="14">
<expand macro="assert_tblout" tool="hmmscan"/>
</output>
<output name="domtblout" file="MADE1.out.domtblout" lines_diff="10">
<expand macro="assert_tblout" tool="hmmscan"/>
</output>
<output name="pfamtblout" file="MADE1.out.pfamtblout" lines_diff="10">
<expand macro="assert_tblout" tool="hmmscan"/>
</output>
</test>
</tests>
<help><![CDATA[
Expand Down
33 changes: 17 additions & 16 deletions tools/hmmer3/hmmsearch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,44 @@ hmmsearch
<expand macro="input_hmm" />
<!-- todo use Galaxy features like data libraries/data tables/??? -->
<param name="seqdb" type="data" format="fasta" label="Sequence database to search against"/>
<expand macro="oformat_with_opts"/>
<expand macro="oformat_with_opts_dom_pfam"/>
<expand macro="thresholds_xml"/>
<expand macro="cut"/>
<expand macro="accel_heur_xml"/>
<expand macro="adv_opts"/>
<expand macro="seed"/>
</inputs>
<outputs>
<data name="output" format="txt" label="HMM matches of $hmmfile.name in $seqdb.name"/>
<data name="tblout" format="txt" label="Table of per-sequence hits from HMM matches of $hmmfile.name in $seqdb.name">
<filter>oformat and 'tblout' in oformat</filter>
</data>
<data name="domtblout" format="txt" label="Table of per-domain hits from HMM matches of $hmmfile.name in $seqdb.name">
<filter>oformat and 'domtblout' in oformat</filter>
</data>
<data name="pfamtblout" format="txt" label="Table of per-sequence/per-domain hits from HMM matches of $hmmfile.name in $seqdb.name">
<filter>oformat and 'pfamtblout' in oformat</filter>
</data>
<expand macro="output_dom_pfam" tool="PHMMER"/>
</outputs>
<tests>
<test expect_num_outputs="4">
<param name="hmmfile" value="globins4.hmm"/>
<param name="seqdb" value="uniprot_matches.fasta"/>
<expand macro="oformat_test" />
<expand macro="seed_test" />
<output name="output" file="uniprot_globins_match.out" lines_diff="20"/>
<output name="domtblout" file="globins.domtblout" lines_diff="16"/>
<output name="pfamtblout" file="globins.pfamtblout" lines_diff="12"/>
<output name="tblout" file="globins.tblout" lines_diff="16"/>
<output name="output" file="uniprot_globins_match.out" lines_diff="20">
<expand macro="assert_out" tool="hmmsearch"/>
</output>
<output name="domtblout" file="globins.domtblout" lines_diff="16">
<expand macro="assert_tblout" tool="hmmsearch"/>
</output>
<output name="pfamtblout" file="globins.pfamtblout" lines_diff="12">
<expand macro="assert_tblout" tool="hmmsearch"/>
</output>
<output name="tblout" file="globins.tblout" lines_diff="16">
<expand macro="assert_tblout" tool="hmmsearch"/>
</output>
</test>
<test expect_num_outputs="1">
<param name="hmmfile" value="globins4.hmm"/>
<param name="seqdb" value="uniprot_matches.fasta"/>
<expand macro="oformat_test" />
<param name="oformat" value=""/>
<expand macro="seed_test" />
<output name="output" file="uniprot_globins_match.out" lines_diff="20"/>
<output name="output" file="uniprot_globins_match.out" lines_diff="20">
<expand macro="assert_out" tool="hmmsearch"/>
</output>
</test>
</tests>
<help><![CDATA[
Expand Down
28 changes: 15 additions & 13 deletions tools/hmmer3/jackhmmer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<command><![CDATA[
jackhmmer
-N $N
@OFORMAT_WITH_OPTS_NOPFAM@
@OFORMAT_WITH_OPTS@
@HSSI@
@THRESHOLDS@
@ACCEL_HEUR@
Expand All @@ -31,7 +31,7 @@ jackhmmer
<!-- todo use Galaxy features like data libraries/data tables/??? -->
<param name="N" type="integer" value="5" min="1" label="Maximum number of iterations" help="(-N)"/>
<param name="seqdb" type="data" format="fasta" label="Sequence Database"/>
<expand macro="oformat_with_opts_nopfam"/>
<expand macro="oformat_with_opts_dom"/>
<expand macro="hssi"/>
<expand macro="thresholds_xml"/>
<expand macro="accel_heur_xml"/>
Expand All @@ -43,31 +43,33 @@ jackhmmer
<expand macro="seed"/>
</inputs>
<outputs>
<data name="output" format="txt" label="JACKHMMER search of $seqfile.name in $seqdb.name"/>
<data name="tblout" format="txt" label="Table of per-sequence hits from HMM matches of $seqfile.name in $seqdb.name">
<filter>oformat and 'tblout' in oformat</filter>
</data>
<data name="domtblout" format="txt" label="Table of per-domain hits from HMM matches of $seqfile.name in $seqdb.name">
<filter>oformat and 'domtblout' in oformat</filter>
</data>
<expand macro="output_dom_pfam" tool="JACKHMMER"/>
</outputs>
<tests>
<test expect_num_outputs="3">
<param name="seqfile" value="uniprot_matches.fasta"/>
<param name="seqdb" value="globins45.fa"/>
<expand macro="oformat_test" />
<expand macro="seed_test" />
<output name="output" file="jackhmmer.out" lines_diff="180"/>
<output name="domtblout" file="jackhmmer.domtblout" lines_diff="10"/>
<output name="tblout" file="jackhmmer.tblout" lines_diff="10"/>
<output name="output" file="jackhmmer.out" lines_diff="180">
<expand macro="assert_out" tool="jackhmmer"/>
</output>
<output name="domtblout" file="jackhmmer.domtblout" lines_diff="10">
<expand macro="assert_tblout" tool="jackhmmer"/>
</output>
<output name="tblout" file="jackhmmer.tblout" lines_diff="10">
<expand macro="assert_tblout" tool="jackhmmer"/>
</output>
</test>
<test expect_num_outputs="1">
<param name="seqfile" value="uniprot_matches.fasta"/>
<param name="seqdb" value="globins45.fa"/>
<expand macro="oformat_test" />
<param name="oformat" value=""/>
<expand macro="seed_test" />
<output name="output" file="jackhmmer.out" lines_diff="180"/>
<output name="output" file="jackhmmer.out" lines_diff="180">
<expand macro="assert_out" tool="jackhmmer"/>
</output>
</test>
</tests>
<help><![CDATA[
Expand Down
Loading

0 comments on commit a38fc75

Please sign in to comment.