Skip to content

Commit

Permalink
make suite, finish tools
Browse files Browse the repository at this point in the history
- add assumptions of meryldb zip files
- output names
  • Loading branch information
bernt-matthias committed Apr 11, 2024
1 parent bbffa09 commit 8d228cd
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 30 deletions.
16 changes: 12 additions & 4 deletions tools/meryl/.shed.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
categories:
- Assembly
name: meryl
owner: iuc
description: Meryl a k-mer counter.
long_description: |
Meryl a k-mer counter. It is built into the Celera assembler and is also available as a stand-alone application. Meryl uses a sorting-based approach that sorts k-mers in lexicographical order.
name: meryl
owner: iuc
remote_repository_url: https://github.com/galaxyproject/tools-iuc/tree/master/tools/meryl
homepage_url: https://github.com/marbl/meryl
type: unrestricted
categories:
- Assembly
auto_tool_repositories:
name_template: "{{ tool_id }}"
description_template: "Wrapper for Meryl function: {{ tool_name }}."
suite:
name: "suite_meryl"
description: "A suite of tools that brings the Meryl project into Galaxy."
long_description: |
Meryl a k-mer counter. It is built into the Celera assembler and is also available as a stand-alone application. Meryl uses a sorting-based approach that sorts k-mers in lexicographical order.
11 changes: 8 additions & 3 deletions tools/meryl/arithmetic-kmers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@
<option value="decrease">Decrease: subtract x from the count of each k-mer</option>
<option value="multiply">Multiply: multiply the count of each k-mer by x</option>
<option value="divide">Divide: divide the count of each k-mer by x</option>
<option value="divide-round">Divide-round: divide the count of each k-mer by x and round th results</option>
<option value="divide-round">Divide-round: divide the count of each k-mer by x and round the results</option>
<option value="modulo">Modulo: set the count of each k-mer to the remainder of the count divided by x</option>
</param>
<param name="input_meryldb_02" type="data" format="meryldb" label="Input meryldb" help="Select a meryldb dataset"/>
<param name="X" type="integer" min="1" max="1000000" value="" optional="true" label="Operand"/>
</inputs>
<outputs>
<data name="read_db" format="meryldb" from_work_dir="read-db.meryldb" label="${tool.name} on ${on_string}: read-db.meryldb">
</data>
<data name="read_db" format="meryldb" from_work_dir="read-db.meryldb"/>
</outputs>
<tests>
<test expect_num_outputs="1">
Expand All @@ -45,6 +44,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="59500" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -55,6 +55,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="42313" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -65,6 +66,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="60530" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -75,6 +77,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="56200" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -85,6 +88,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="56100" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -95,6 +99,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="37501" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand Down
6 changes: 4 additions & 2 deletions tools/meryl/count-kmers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
</conditional>
</inputs>
<outputs>
<data name="read_db" format="meryldb" from_work_dir="read-db.meryldb" label="${tool.name} on ${on_string}: read-db.meryldb">
</data>
<data name="read_db" format="meryldb" from_work_dir="read-db.meryldb"/>
</outputs>
<tests>
<test expect_num_outputs="1">
Expand All @@ -65,6 +64,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="22152" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
<assert_stdout>
Expand All @@ -81,6 +81,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="22200" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
<assert_stdout>
Expand All @@ -97,6 +98,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="22200" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
<assert_stdout>
Expand Down
8 changes: 6 additions & 2 deletions tools/meryl/filter-kmers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
</conditional>
</inputs>
<outputs>
<data name="read_db" format="meryldb" from_work_dir="read-db.meryldb" label="${tool.name} on ${on_string}: read-db.meryldb">
</data>
<data name="read_db" format="meryldb" from_work_dir="read-db.meryldb"/>
</outputs>
<tests>
<test expect_num_outputs="1">
Expand All @@ -60,6 +59,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="32077" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -72,6 +72,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="49643" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -84,6 +85,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="1634" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -96,6 +98,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="2621" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -108,6 +111,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="59100" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand Down
14 changes: 12 additions & 2 deletions tools/meryl/groups-kmers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
<param name="input_meryldb_02" type="data" multiple="true" format="meryldb" label="Input meryldb"/>
</inputs>
<outputs>
<data name="read_db" format="meryldb" from_work_dir="read-db.meryldb" label="${tool.name} on ${on_string}: read-db.meryldb">
</data>
<data name="read_db" format="meryldb" from_work_dir="read-db.meryldb"/>
</outputs>
<tests>
<test expect_num_outputs="1">
Expand All @@ -46,6 +45,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="36100" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -55,6 +55,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="58925" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -64,6 +65,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="58930" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -73,6 +75,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="58600" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -82,6 +85,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="14951" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -91,6 +95,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="14957" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -100,6 +105,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="14956" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -109,6 +115,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="14953" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -118,6 +125,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="23999" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -127,6 +135,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="24016" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand All @@ -136,6 +145,7 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="57455" delta="1000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
Expand Down
9 changes: 6 additions & 3 deletions tools/meryl/histogram-kmers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@
<param name="input_meryldb_02" type="data" format="meryldb" label="Input meryldb"/>
</inputs>
<outputs>
<data name="read_db_hist" format="tabular" from_work_dir="read-db.hist" label="${tool.name} on ${on_string}: read-db histogram">
</data>
<data name="read_db_hist" format="tabular" from_work_dir="read-db.hist"/>
</outputs>
<tests>
<test expect_num_outputs="1">
<param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb"/>
<output name="read_db_hist" file="output_24.read-db.hist"/>
<output name="read_db_hist" file="output_24.read-db.hist">
<assert_contents>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
</test>
</tests>
<help>
Expand Down
13 changes: 13 additions & 0 deletions tools/meryl/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@
<requirement type="package" version="1.34">tar</requirement>
</requirements>
</xml>
<xml name="meryldb_archive_assumptions">
<has_archive_member path="^[^/]+.meryl$" n="1"/> <!-- folder also counts -->
<has_archive_member path="[^/]+.meryl/merylIndex" n="1" all="true">
<has_size min="1"/>
</has_archive_member>
<has_archive_member path="[^/]+.meryl/.*\.merylIndex" n="64" all="true">
<has_size min="1"/>
</has_archive_member>
<has_archive_member path="[^/]+.meryl/.*\.merylData" n="64" all="true">
<!-- <has_size min="1"/> seems to be 0 sometimes -->
</has_archive_member>
<has_archive_member path=".*" n="130"/>
</xml>
<xml name="citations">
<citations>
<citation type="bibtex">
Expand Down
3 changes: 1 addition & 2 deletions tools/meryl/print.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
<param name="input_meryldb_02" type="data" format="meryldb" label="Input meryldb"/>
</inputs>
<outputs>
<data name="read_db_print" format="tabular" from_work_dir="read-db.tabular" label="${tool.name} on ${on_string}: kmer counts">
</data>
<data name="read_db_print" format="tabular" from_work_dir="read-db.tabular"/>
</outputs>
<tests>
<test expect_num_outputs="1">
Expand Down
21 changes: 9 additions & 12 deletions tools/meryl/trio-mode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,12 @@
</conditional>
</inputs>
<outputs>
<data name="read_db" format="meryldb" from_work_dir="read-db.meryldb" label="${tool.name} on ${on_string}: read-db.meryldb">
</data>
<data name="read_db_hist" format="tabular" from_work_dir="read-db.hist" label="${tool.name} on ${on_string}: read-db histogram">
</data>
<data name="pat_db" format="meryldb" from_work_dir="pat.meryldb" label="${tool.name} on ${on_string}: pat.meryldb">
</data>
<data name="pat_db_hist" format="tabular" from_work_dir="pat.inherited.hist" label="${tool.name} on ${on_string}: paternal inherited histogram">
</data>
<data name="mat_db" format="meryldb" from_work_dir="mat.meryldb" label="${tool.name} on ${on_string}: mat.meryldb">
</data>
<data name="mat_db_hist" format="tabular" from_work_dir="mat.inherited.hist" label="${tool.name} on ${on_string}: maternal inherited histogram">
</data>
<data name="read_db" format="meryldb" from_work_dir="read-db.meryldb" label="${tool.name} on ${on_string}: read-db.meryldb"/>
<data name="read_db_hist" format="tabular" from_work_dir="read-db.hist" label="${tool.name} on ${on_string}: read-db histogram"/>
<data name="pat_db" format="meryldb" from_work_dir="pat.meryldb" label="${tool.name} on ${on_string}: pat.meryldb"/>
<data name="pat_db_hist" format="tabular" from_work_dir="pat.inherited.hist" label="${tool.name} on ${on_string}: paternal inherited histogram"/>
<data name="mat_db" format="meryldb" from_work_dir="mat.meryldb" label="${tool.name} on ${on_string}: mat.meryldb"/>
<data name="mat_db_hist" format="tabular" from_work_dir="mat.inherited.hist" label="${tool.name} on ${on_string}: maternal inherited histogram"/>
</outputs>
<tests>
<test expect_num_outputs="6">
Expand All @@ -118,18 +112,21 @@
<output name="read_db" ftype="meryldb">
<assert_contents>
<has_size value="3362942" delta="2000"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
<output name="read_db_hist" file="output_23.read-db.hist"/>
<output name="pat_db" ftype="meryldb">
<assert_contents>
<has_size value="120610" delta="400"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
<output name="pat_db_hist" file="output_23.pat.hist"/>
<output name="mat_db" ftype="meryldb">
<assert_contents>
<has_size value="67883" delta="300"/>
<expand macro="meryldb_archive_assumptions"/>
</assert_contents>
</output>
<output name="mat_db_hist" file="output_23.mat.hist"/>
Expand Down

0 comments on commit 8d228cd

Please sign in to comment.