Mercurial > repos > iuc > data_manager_nextclade
comparison data_manager/nextclade_dm.xml @ 0:6e64cb3d2b1d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_nextclade commit 3d6dabd066dcbe31cfa38fbfac340e253d8a984d
| author | iuc |
|---|---|
| date | Sat, 30 Jul 2022 08:09:07 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:6e64cb3d2b1d |
|---|---|
| 1 <tool id="data_manager_nextclade" name="nextclade data manager" version="0.0.1+galaxy0" tool_type="manage_data" profile="20.01"> | |
| 2 | |
| 3 <requirements> | |
| 4 <requirement type="package" version="3.8">python</requirement> | |
| 5 <requirement type="package" version="2.3.0">nextclade</requirement> | |
| 6 </requirements> | |
| 7 <command detect_errors="exit_code"><![CDATA[ | |
| 8 #set $data_table = $__app__.tool_data_tables.get('nextclade') | |
| 9 #if $data_table is not None and len($data_table.get_fields()) != 0 | |
| 10 #set $known_revisions = '--known_revisions=' + ','.join([row[0] for row in $data_table.get_fields()]) | |
| 11 #else | |
| 12 #set $known_revisions = '' | |
| 13 #end if | |
| 14 #if str($additional_datasets).strip() != '' | |
| 15 #if str($datasets) != '' | |
| 16 #set $dataset_list = $datasets + ',' + str($additional_datasets).strip() | |
| 17 #else | |
| 18 #set $dataset_list = str($additional_datasets) | |
| 19 #end if | |
| 20 #else | |
| 21 #set $dataset_list = str($datasets) | |
| 22 #end if | |
| 23 python '$__tool_directory__/nextclade_dm.py' | |
| 24 $known_revisions | |
| 25 #if $release.which == "latest" | |
| 26 --latest | |
| 27 #else if $release.which == "date_range" | |
| 28 #if str($release.start_date).strip() != "" | |
| 29 --start_date '$release.start_date' | |
| 30 #end if | |
| 31 #if str($release.end_date).strip() != "" | |
| 32 --end_date '$release.end_date' | |
| 33 #end if | |
| 34 #end if | |
| 35 --datasets '$dataset_list' | |
| 36 'nextclade' | |
| 37 '${output_file}' | |
| 38 ]]></command> | |
| 39 <inputs> | |
| 40 <param name="datasets" type="select" label="Select nextclade datasets" multiple="true"> | |
| 41 <option value="sars-cov-2" selected="true">SARS-CoV-2</option> | |
| 42 <option value="MPXV">Monkeypox (All Clades)</option> | |
| 43 <option value="hMPXV">Human Monkeypox (hMPXV)</option> | |
| 44 <option value="hMPXV_B1">Human Monkeypox Clade B.1</option> | |
| 45 <option value="flu_h1n1pdm_ha">Influenza A H1N1pdm HA</option> | |
| 46 <option value="flu_h3n2_ha">Influenza A H3N2 HA</option> | |
| 47 <option value="flu_vic_ha">Influenza B Victoria HA</option> | |
| 48 <option value="flu_yam_ha">Influenza B Yamagata HA</option> | |
| 49 <option value="sars-cov-2-no-recomb">SARS-CoV-2 without recombinants</option> | |
| 50 </param> | |
| 51 <param name="additional_datasets" type="text" label="Additional nextclade dataset names" help="If you want to download datasets that are not in the list above, enter their names here, separated by commas"> | |
| 52 <validator type="regex" message="Dataset names consist of letters, numbers, underscore and hyphens, with multiple names separated by ,">^[-A-Za-z0-9_]?[-A-Za-z0-9_,]*$</validator> | |
| 53 </param> | |
| 54 <conditional name="release"> | |
| 55 <param name="which" type="select" label="Select nextclade dataset(s) release"> | |
| 56 <option value="latest" selected="true">Latest</option> | |
| 57 <option value="date_range">Date range</option> | |
| 58 </param> | |
| 59 <when value="latest"> | |
| 60 </when> | |
| 61 <when value="date_range"> | |
| 62 <param name="start_date" type="text" label="Start date (YYYY-MM-DD)" help="Don't download models older than this date" optional="true"> | |
| 63 <validator type="regex" message="Dates are in YYYY-MM-DD format">\d{4}-\d{2}-\d{2}$</validator> | |
| 64 </param> | |
| 65 <param name="end_date" type="text" label="End date (YYYY-MM-DD)" help="Don't download models newer than this date" optional="true"> | |
| 66 <validator type="regex" message="Dates are in YYYY-MM-DD format">\d{4}-\d{2}-\d{2}$</validator> | |
| 67 </param> | |
| 68 </when> | |
| 69 </conditional> | |
| 70 </inputs> | |
| 71 <outputs> | |
| 72 <data name="output_file" format="data_manager_json"/> | |
| 73 </outputs> | |
| 74 <tests> | |
| 75 <test expect_num_outputs="1"> | |
| 76 <conditional name="release"> | |
| 77 <param name="which" value="date_range" /> | |
| 78 <param name="start_date" value="2022-03-01" /> | |
| 79 <param name="end_date" value="2022-04-01" /> | |
| 80 </conditional> | |
| 81 <output name="output_file"> | |
| 82 <assert_contents> | |
| 83 <has_text text='"database_name": "sars-cov-2"' /> | |
| 84 <has_text text='sars-cov-2_2022-03-31T12-00-00Z' /> | |
| 85 <has_text text='sars-cov-2_2022-03-24T12-00-00Z' /> | |
| 86 <has_text text='sars-cov-2_2022-03-14T12-00-00Z"' /> | |
| 87 <has_text text='"min_nextclade_version": "1.10.0"' /> | |
| 88 </assert_contents> | |
| 89 </output> | |
| 90 </test> | |
| 91 <test expect_num_outputs="1"> | |
| 92 <param name="datasets" value="MPXV,hMPXV" /> | |
| 93 <conditional name="release"> | |
| 94 <param name="which" value="latest" /> | |
| 95 </conditional> | |
| 96 <output name="output_file"> | |
| 97 <assert_contents> | |
| 98 <has_text text='"database_name": "MPXV"' /> | |
| 99 <has_text text='"database_name": "hMPXV"' /> | |
| 100 </assert_contents> | |
| 101 </output> | |
| 102 </test> | |
| 103 </tests> | |
| 104 <help><![CDATA[ | |
| 105 This data managers fetches databases for the nextclade_ viral genome typing tool and | |
| 106 updates the nextclade database. | |
| 107 | |
| 108 The default is to fetch the latest version of the data tables, but ranges of dates | |
| 109 can also be specified to fetch releases that are within those dates. The data manager | |
| 110 has a built-in list of databases that can be fetched and users can specify ones by name | |
| 111 if they want something that is not on the list. | |
| 112 | |
| 113 The data manager will read the existing data tables and not re-download or replace databases | |
| 114 that are already present in those data tables. | |
| 115 | |
| 116 .. _nextclade: https://clades.nextstrain.org/ | |
| 117 ]]></help> | |
| 118 <citations> | |
| 119 <citation type="doi">10.21105/joss.03773</citation> | |
| 120 </citations> | |
| 121 </tool> |
