Mercurial > repos > iuc > data_manager_pangolin_data
comparison data_manager/pangolin_data_dm.xml @ 0:40c380ea283f draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_pangolin_data commit 902cce06e30ffe8ccba5dc0c3b704eb39fb4c611
| author | iuc |
|---|---|
| date | Wed, 20 Jul 2022 21:02:02 +0000 |
| parents | |
| children | f0214079e0c7 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:40c380ea283f |
|---|---|
| 1 <tool id="data_manager_pangolin_data" name="pangolin-data data manager" version="0.0.1+galaxy0" tool_type="manage_data" profile="20.01"> | |
| 2 <requirements> | |
| 3 <requirement type="package">python</requirement> | |
| 4 <requirement type="package" version="22.1.2">pip</requirement> | |
| 5 <requirement type="package" version="2.28.1">requests</requirement> | |
| 6 <requirement type="package" version="2.37.1">git</requirement> | |
| 7 <requirement type="package" version="3.2.0">git-lfs</requirement> | |
| 8 <requirement type="package" version="3.1.27">gitpython</requirement> | |
| 9 </requirements> | |
| 10 <macros> | |
| 11 <import>macros.xml</import> | |
| 12 </macros> | |
| 13 <command detect_errors="exit_code"><![CDATA[ | |
| 14 #set $dt_names = [] | |
| 15 #if str($pangolin_data.enable) == "latest" or str($pangolin_data.enable) == "versions" | |
| 16 #set $dt_names = $dt_names + ["pangolin_data"] | |
| 17 #end if | |
| 18 #if str($pangolin_constellations.enable) == "latest" or str($pangolin_constellations.enable) == "versions" | |
| 19 #set $dt_names = $dt_names + ["pangolin_constellations"] | |
| 20 #end if | |
| 21 #if str($pangolin_assignment.enable) == "latest" or str($pangolin_assignment.enable) == "versions" | |
| 22 #set $dt_names = $dt_names + ["pangolin_assignment"] | |
| 23 #end if | |
| 24 #for $dt_name in $dt_names | |
| 25 #set $data_table = $__app__.tool_data_tables.get($dt_name) | |
| 26 #if $data_table is not None and len($data_table.get_fields()) != 0 | |
| 27 #set $known_revisions = '--known_revisions=' + ','.join([row[0] for row in $data_table.get_fields()]) | |
| 28 #else | |
| 29 #set $known_revisions = '' | |
| 30 #end if | |
| 31 python '$__tool_directory__/pangolin_data_dm.py' | |
| 32 $known_revisions | |
| 33 #if $getVar($dt_name).enable == "latest" | |
| 34 --latest | |
| 35 #else if $getVar($dt_name).enable == "versions" | |
| 36 --version_compatibility_file '$getVar($dt_name).compatibility_file' | |
| 37 --versions=$getVar($dt_name).versions | |
| 38 #end if | |
| 39 '$dt_name' | |
| 40 datatable_cache.json | |
| 41 '${output_file}' && | |
| 42 #end for | |
| 43 cp datatable_cache.json '${output_file}' | |
| 44 ]]></command> | |
| 45 <inputs> | |
| 46 <expand macro="download_conditional" dt_name="pangolin_data" database_name="pangolin-data" software_name="pangolin" /> | |
| 47 <expand macro="download_conditional" dt_name="pangolin_constellations" database_name="constellations" software_name="scorpio" /> | |
| 48 <expand macro="download_conditional" dt_name="pangolin_assignment" database_name="pangolin-assignment" software_name="pangolin" /> | |
| 49 </inputs> | |
| 50 <outputs> | |
| 51 <data name="output_file" format="data_manager_json"/> | |
| 52 </outputs> | |
| 53 <tests> | |
| 54 <test expect_num_outputs="1"> | |
| 55 <conditional name="pangolin_data"> | |
| 56 <param name="enable" value="versions" /> | |
| 57 <param name="compatibility_file" ftype="csv" value="data_compatibility.csv" /> | |
| 58 <param name="versions" value="1.12" /> | |
| 59 </conditional> | |
| 60 <conditional name="pangolin_constellations"> | |
| 61 <param name="enable" value="versions" /> | |
| 62 <param name="compatibility_file" ftype="csv" value="data_compatibility.csv" /> | |
| 63 <param name="versions" value="0.1.10" /> | |
| 64 </conditional> | |
| 65 <conditional name="pangolin_assignment"> | |
| 66 <param name="enable" value="no" /> | |
| 67 </conditional> | |
| 68 <output name="output_file"> | |
| 69 <assert_contents> | |
| 70 <has_text text="pangolin-data v1.12" /> | |
| 71 <has_text text='"description": "constellations release v0.1.10"' /> | |
| 72 <has_text text='"min_scorpio_version": "0.3.17"' /> | |
| 73 <not_has_text text='"description": "pangolin-assignment' /> | |
| 74 </assert_contents> | |
| 75 </output> | |
| 76 </test> | |
| 77 <test expect_num_outputs="1"> | |
| 78 <conditional name="pangolin_data"> | |
| 79 <param name="enable" value="no" /> | |
| 80 </conditional> | |
| 81 <conditional name="pangolin_constellations"> | |
| 82 <param name="enable" value="no" /> | |
| 83 </conditional> | |
| 84 <conditional name="pangolin_assignment"> | |
| 85 <param name="enable" value="versions" /> | |
| 86 <param name="compatibility_file" ftype="csv" value="data_compatibility.csv" /> | |
| 87 <param name="versions" value="1.12" /> | |
| 88 </conditional> | |
| 89 <output name="output_file"> | |
| 90 <assert_contents> | |
| 91 <has_text text='"value": "v1.12"' /> | |
| 92 <has_text text='"min_pangolin_version": "4"' /> | |
| 93 <not_has_text text='"description": "constellations' /> | |
| 94 <not_has_text text='"description": "pangolin-data' /> | |
| 95 </assert_contents> | |
| 96 </output> | |
| 97 </test> | |
| 98 <test expect_failure="true"> | |
| 99 <conditional name="pangolin_data"> | |
| 100 <param name="enable" value="no" /> | |
| 101 </conditional> | |
| 102 <conditional name="pangolin_constellations"> | |
| 103 <param name="enable" value="no" /> | |
| 104 <param name="compatibility_file" ftype="csv" value="data_compatibility.csv" /> | |
| 105 <param name="versions" value="0.0.40" /> | |
| 106 </conditional> | |
| 107 <conditional name="pangolin_assignment"> | |
| 108 <param name="enable" value="no" /> | |
| 109 </conditional> | |
| 110 </test> | |
| 111 </tests> | |
| 112 <help><![CDATA[ | |
| 113 This data managers fetches models (from the pangolin-data_, | |
| 114 pangolin-assignment_ and constellations_ repositories) for the | |
| 115 pangolin_ SARS-CoV-2 lineage typing tool and updates the pangolin_data, | |
| 116 pangolin_assignment and pangolin_constellations data tables. | |
| 117 | |
| 118 The default is to fetch the latest version of the databases. If specific versions of databases | |
| 119 need to be installed, a version compatibility matrix needs to be provided to help choose | |
| 120 the versions available. This matrix is stored in a CSV file in the pangolin repository | |
| 121 and can be downloaded at this link_. When loading this file into Galaxy, the csv datatype | |
| 122 needs to be selected, because the automatic format detection code detects this file as type txt. | |
| 123 | |
| 124 **Note** that this data manager will only download database versions mentioned in the above | |
| 125 mentioned file. While effort is taken to ensure that this file is updated with each pangolin | |
| 126 database release, if that has not happened, the user of this data manager will need to provide | |
| 127 their own version compatibility matrix file in order to load the latest database release into Galaxy. | |
| 128 | |
| 129 The data manager will read the existing data tables and not re-download or replace databases | |
| 130 that are already present in those data tables. | |
| 131 | |
| 132 .. _pangolin-data: https://github.com/cov-lineages/pangolin-data | |
| 133 .. _pangolin-assignment: https://github.com/cov-lineages/pangolin-assignment | |
| 134 .. _constellations: https://github.com/cov-lineages/constellations | |
| 135 .. _pangolin: https://github.com/cov-lineages/pangolin | |
| 136 .. _link: https://raw.githubusercontent.com/cov-lineages/pangolin/master/pangolin/data/data_compatibility.csv | |
| 137 ]]></help> | |
| 138 <citations> | |
| 139 <citation type="doi">10.1093/ve/veab064</citation> | |
| 140 </citations> | |
| 141 </tool> |
