forked from Helmholtz-UFZ/galaxy-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Helmholtz-UFZ#30 from Helmholtz-UFZ/virsorter
Add virsorter
- Loading branch information
Showing
13 changed files
with
383 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
categories: | ||
- Data Managers | ||
- Metagenomics | ||
description: Data managers for virsorter reference data | ||
homepage_url: https://github.com/jiarong/VirSorter2 | ||
long_description: Data managers for virsorter reference data | ||
name: virsorter_build_database | ||
owner: ufz | ||
remote_repository_url: https://github.com/Helmholtz-UFZ/ufz-galaxy-tools/blob/main/data_managers/data_manager_virsorter | ||
type: unrestricted |
60 changes: 60 additions & 0 deletions
60
data_managers/data_manager_virsorter/data_manager/virsorter_datamanager.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?xml version="1.0"?> | ||
<tool id="virsorter_build_database" name="virsorter" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | ||
<description>database builder</description> | ||
<macros> | ||
<token name="@TOOL_VERSION@">2.2.4</token> <!-- when updating make sure to double check the db version --> | ||
<token name="@VERSION_SUFFIX@">0</token> | ||
<token name="@PROFILE@">22.01</token> | ||
<!-- zenodo ID and therebut the version of the reference data is hardcoded in the current version virsorter: | ||
https://github.com/jiarong/VirSorter2/blob/c0dcac53f3373244bf1bd552a7c2104d53802df7/virsorter/rules/setup.smk#L13 | ||
check and update the DB version when updating the VS version | ||
might also change/improve in the future https://github.com/jiarong/VirSorter2/issues/205#issuecomment-2184184977 | ||
--> | ||
<token name="@VIRSORTER_DB_VERSION@">0.4</token> | ||
</macros> | ||
<requirements> | ||
<requirement type="package" version="@TOOL_VERSION@">virsorter</requirement> | ||
<requirement type="package" version="1.21.4">wget</requirement> | ||
<requirement type="package" version="2.7.0">pulp</requirement> <!-- needs to be pinned, because the old-ish snakemake used in vs2 struggles with https://github.com/snakemake/snakemake/issues/2607 --> | ||
</requirements> | ||
<command detect_errors="exit_code"><![CDATA[ | ||
virsorter setup -d db -j \${GALAXY_SLOTS:-1} --skip-deps-install && | ||
cp '$dmjson' '$out_file' | ||
]]></command> | ||
<configfiles> | ||
<configfile name="dmjson"><![CDATA[ | ||
{ | ||
"data_tables":{ | ||
"virsorter":[ | ||
{ | ||
"path":"db", | ||
"name":"Version @VIRSORTER_DB_VERSION@", | ||
"virsorter_version":"@TOOL_VERSION@", | ||
"value":"@VIRSORTER_DB_VERSION@" | ||
} | ||
] | ||
} | ||
}]]> | ||
</configfile> | ||
</configfiles> | ||
<inputs/> | ||
<outputs> | ||
<data name="out_file" format="data_manager_json" /> | ||
</outputs> | ||
<tests> | ||
<test expect_num_outputs="1"> | ||
<output name="out_file"> | ||
<assert_contents> | ||
<has_text text='"value":"@VIRSORTER_DB_VERSION@"'/> | ||
<has_text text='"name":"Version @VIRSORTER_DB_VERSION@"'/> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
</tests> | ||
<help><![CDATA[ | ||
Download and extract virsorter database version @VIRSORTER_DB_VERSION@ from zenodo (https://zenodo.org/records/10594875) | ||
]]></help> | ||
<citations> | ||
<citation type="doi">10.1186/s40168-020-00990-y</citation> | ||
</citations> | ||
</tool> |
19 changes: 19 additions & 0 deletions
19
data_managers/data_manager_virsorter/data_manager_conf.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<data_managers> | ||
<data_manager tool_file="data_manager/virsorter_datamanager.xml" id="virsorter_build_database"> | ||
<data_table name="virsorter"> | ||
<output> | ||
<column name="value"/> | ||
<column name="name"/> | ||
<column name="virsorter_version"/> | ||
<column name="path" output_ref="out_file"> | ||
<move type="directory"> | ||
<source>${path}</source> | ||
<target base="${GALAXY_DATA_MANAGER_DATA_PATH}">virsorter/${path}</target> | ||
</move> | ||
<value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/virsorter/${path}</value_translation> | ||
<value_translation type="function">abspath</value_translation> | ||
</column> | ||
</output> | ||
</data_table> | ||
</data_manager> | ||
</data_managers> |
3 changes: 3 additions & 0 deletions
3
data_managers/data_manager_virsorter/tool-data/virsorter.loc.sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Format: | ||
# value name virsorter_version path | ||
# value must be the version of the database, e.g. 0.4, needs to be a number |
8 changes: 8 additions & 0 deletions
8
data_managers/data_manager_virsorter/tool_data_table_conf.xml.sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<tables> | ||
<!-- virsorter reference data --> | ||
<table name="virsorter" comment_char="#"> | ||
<!-- value should be the version (https://zenodo.org/records/4297575) --> | ||
<columns>value, name, virsorter_version, path</columns> | ||
<file path="tool-data/virsorter.loc" /> | ||
</table> | ||
</tables> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
categories: | ||
- Metagenomics | ||
description: VirSorter2 applies a multi-classifier, expert-guided approach to detect diverse DNA and RNA virus genomes. | ||
long_description: | | ||
VirSorter2 applies a multi-classifier, expert-guided approach to detect diverse DNA and RNA virus genomes. | ||
name: virsorter | ||
owner: ufz | ||
homepage_url: https://github.com/jiarong/VirSorter2/ | ||
remote_repository_url: https://github.com/Helmholtz-UFZ/ufz-galaxy-tools/blob/main/tools/virsorter | ||
type: unrestricted | ||
auto_tool_repositories: | ||
name_template: "{{ tool_id }}" | ||
description_template: "Wrapper for virsorter function: {{ tool_name }}." | ||
suite: | ||
name: "suite_virsorter" | ||
description: "A suite of tools that brings the virsorter project into Galaxy." | ||
long_description: | | ||
VirSorter2 applies a multi-classifier, expert-guided approach to detect diverse DNA and RNA virus genomes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
cd test-data/ | ||
wget -O - https://osf.io/v46sc/download | tar -xvz |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# value name path | ||
# value must be the version of the database, e.g. 0.4, needs to be a number | ||
0.4 virsorter 0.4 2.2.4 ${__HERE__}/db/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Your virsorter.loc file should include an entry per line | ||
# value should be db version, i.e. a number | ||
#value name virsorter_version path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0"?> | ||
<tables> | ||
<!-- Locations of indexes for virsorter, since reference data seems not to be versioned we use the download date as version --> | ||
<table name="virsorter" comment_char="#"> | ||
<columns>value, name, virsorter_version, path</columns> | ||
<file path="tool-data/virsorter.loc" /> | ||
</table> | ||
</tables> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<tables> | ||
<table name="virsorter" comment_char="#"> | ||
<columns>value, name, virsorter_version, path</columns> | ||
<file path="${__HERE__}/test-data/virsorter.loc" /> | ||
</table> | ||
</tables> |
Oops, something went wrong.