Skip to content

Commit

Permalink
sarscv2formatter: fix tests
Browse files Browse the repository at this point in the history
- use sim_size for meta. online meta data seems subject to (small)
changes
- make tool version = program version
- also prepare a 2nd test
- fix quoting of input
  • Loading branch information
bernt-matthias committed Nov 18, 2020
1 parent 568d99c commit 44d4e78
Show file tree
Hide file tree
Showing 6 changed files with 572 additions and 8 deletions.
1 change: 0 additions & 1 deletion .tt_skip
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ tools/meme/meme.xml
tools/migmap/
tools/ncbi_entrez_eutils/einfo.xml
tools/raven/
tools/sarscov2formatter/sarscov2formatter.xml
tools/trinotate
tools/unicycler
tools/valet
Expand Down
26 changes: 21 additions & 5 deletions tools/sarscov2formatter/sarscov2formatter.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<tool id="sarscov2formatter" name="sarscov2formatter" version="0.1" profile="18.01">
<tool id="sarscov2formatter" name="sarscov2formatter" version="0.5.3+galaxy1" profile="18.01">
<requirements>
<requirement type="package" version="0.5.2">sarscov2formatter</requirement>
<requirement type="package" version="0.5.3">sarscov2formatter</requirement>
</requirements>
<command><![CDATA[
sarscov2formatter
-a $align
-a '$align'
#if $source.source_choice == 'ncbi':
-m ncbi
#else:
Expand All @@ -20,7 +20,7 @@ sarscov2formatter
</param>
<when value="ncbi" />
<when value="other" >
<param name="meta" type="data" format='tabular' label="Metadata source" help="Tabular file with metadata with the correct columns (see below)" />
<param name="meta" type="data" format="tabular" label="Metadata source" help="Tabular file with metadata with the correct columns (see below)" />
</when>
</conditional>
</inputs>
Expand All @@ -30,13 +30,29 @@ sarscov2formatter
<data name="outmeta" format="json" from_work_dir="meta.json" label="${tool.name}: Metadata" />
</outputs>
<tests>
<!-- note: test with ncbi yields unstable results for meta -> sim_size.
also needs a surprising amount memory (1.7G) which might
become impractival in the future -->
<test>
<param name="align" ftype="fasta" value="align.fasta" />
<param name="source_choice" value="ncbi" />
<output name="msa" ftype="fasta" compare="diff" value="msa.fasta" />
<output name="dups" ftype="json" compare="diff" value="dups.json" />
<output name="outmeta" ftype="json" compare="diff" value="meta.json" />
<output name="outmeta" ftype="json" compare="sim_size" value="meta.json" />
</test>
<!-- TODO test with tabular input, does not work yet
test.tsv has been generated with test.py
https://github.com/nickeener/sarscov2formatter/issues/2 -->
<!-- <test>-->
<!-- <param name="align" ftype="fasta" value="align.fasta" />-->
<!-- <conditional name="source" >-->
<!-- <param name="source_choice" value="other" />-->
<!-- <param name="meta" ftype="tabular" value="test.tsv" />-->
<!-- </conditional>-->
<!-- <output name="msa" ftype="fasta" compare="diff" value="msa-other.fasta" />-->
<!-- <output name="dups" ftype="json" compare="diff" value="dups-other.json" />-->
<!-- <output name="outmeta" ftype="json" compare="diff" value="meta-other.json" />-->
<!-- </test>-->
</tests>
<help><![CDATA[
Expand Down
69 changes: 68 additions & 1 deletion tools/sarscov2formatter/test-data/dups.json
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
{"MultiSeq0_24": {"1": "MT019530", "2": "MT027062", "3": "MT159705", "4": "MT159710", "5": "MT192773", "6": "MT240479", "7": "MT246472", "8": "MT253699", "9": "MT259275", "10": "MT262910", "11": "MT262912", "12": "MT263399", "13": "MT263435", "14": "MT263451", "15": "MT304482", "16": "MT304483", "17": "MT326151", "18": "MT325578", "19": "MT325609", "20": "MT334533", "21": "MT334534", "22": "MT350276"}, "MultiSeq1_15": {"1": "MT276327", "2": "MT293173", "3": "MT293195", "4": "MT326113", "5": "MT326162", "6": "MT326189", "7": "MT325626", "8": "MT345825", "9": "MT345827", "10": "MT345834", "11": "MT345835", "12": "MT345857", "13": "MT344957"}, "MT350282": {"0": "MT350282"}, "MT345866": {"0": "MT345866"}, "MT293207": {"0": "MT293207"}, "MT292573": {"0": "MT292573"}, "MT292570": {"0": "MT292570"}, "MT263469": {"0": "MT263469"}, "MT263450": {"0": "MT263450"}, "MT263436": {"0": "MT263436"}, "MN988713": {"0": "MN988713"}}
{
"MN988713": {
"0": "MN988713"
},
"MT263436": {
"0": "MT263436"
},
"MT263450": {
"0": "MT263450"
},
"MT263469": {
"0": "MT263469"
},
"MT292570": {
"0": "MT292570"
},
"MT292573": {
"0": "MT292573"
},
"MT293207": {
"0": "MT293207"
},
"MT345866": {
"0": "MT345866"
},
"MT350282": {
"0": "MT350282"
},
"MultiSeq0_24": {
"1": "MT019530",
"10": "MT262910",
"11": "MT262912",
"12": "MT263399",
"13": "MT263435",
"14": "MT263451",
"15": "MT304482",
"16": "MT304483",
"17": "MT326151",
"18": "MT325578",
"19": "MT325609",
"2": "MT027062",
"20": "MT334533",
"21": "MT334534",
"22": "MT350276",
"3": "MT159705",
"4": "MT159710",
"5": "MT192773",
"6": "MT240479",
"7": "MT246472",
"8": "MT253699",
"9": "MT259275"
},
"MultiSeq1_15": {
"1": "MT276327",
"10": "MT345834",
"11": "MT345835",
"12": "MT345857",
"13": "MT344957",
"2": "MT293173",
"3": "MT293195",
"4": "MT326113",
"5": "MT326162",
"6": "MT326189",
"7": "MT325626",
"8": "MT345825",
"9": "MT345827"
}
}
Loading

0 comments on commit 44d4e78

Please sign in to comment.