comparison data_manager/install_primer_scheme_bedfiles.xml @ 6:dd451e45681c draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_primer_scheme_bedfiles commit 4880dcfcdddd9ed8415ccde01b2f8e2c28dab5c3"
author iuc
date Tue, 16 Nov 2021 08:22:08 +0000
parents be70da9dc013
children
comparison
equal deleted inserted replaced
5:be70da9dc013 6:dd451e45681c
1 <tool id="data_manager_primer_scheme_bedfiles" name="BED-format primer scheme data manager" version="0.0.12" tool_type="manage_data" profile="19.05"> 1 <tool id="data_manager_primer_scheme_bedfiles" name="BED-format primer scheme data manager" version="0.0.13" tool_type="manage_data" profile="20.09">
2 <requirements> 2 <requirements>
3 <requirement type="package" version="2.24.0">requests</requirement> 3 <requirement type="package" version="2.26.0">requests</requirement>
4 </requirements> 4 </requirements>
5 <!-- fetch all the primers in one go --> 5 <!-- fetch all the primers in one go -->
6 <command detect_errors="exit_code"><![CDATA[ 6 <command detect_errors="exit_code"><![CDATA[
7 python '$__tool_directory__/install_primer_scheme_bedfiles.py' 7 python '$__tool_directory__/install_primer_scheme_bedfiles.py'
8 '${output_file}' 8 '${output_file}'
9 #if $input.input_type == "ARTIC" 9 #if $input.input_type == "network"
10 --artic_primers '${input.primers}' 10 ## this code looks up the existing table and uses it to build a list of known primers which
11 ## is then used to filter the $input.primers variable. some notes:
12 ##
13 ## $__app__.tool_data_tables is a dictionary where the keys are data table names and the values
14 ## are TabularToolDataTable objects (from lib/galaxy/tools/data/__init__.py)
15 ##
16 ## the get_fields() method on the TabularToolDataTable returns a list of lists, with one list
17 ## per line of the tool data table, so row[0] is the first field (i.e. the value column)
18 ##
19 ## $input.primers is a string ('val1,val2') when interpreted outside of #set but a list inside of #set
20 ##
21 ## known_primers is the $known_primers variable but because it is in a list comprehension the $ should
22 ## not be used
23 #set $data_table = $__app__.tool_data_tables.get("primer_scheme_bedfiles")
24 #if $data_table is not None:
25 #set $known_primers = [ row[0] for row in $data_table.get_fields() ]
26 #set $primer_list = ','.join([ primer_name for primer_name in $input.primers if primer_name not in known_primers ])
27 #else
28 #set $primer_list = $input.primers
29 #end if
30 --artic_primers '$primer_list'
11 #else 31 #else
12 --primer_file '${input.primer_input}' 32 --primer_file '${input.primer_input}'
13 --primer_name '${input.primer_name}' 33 --primer_name '${input.primer_name}'
14 --primer_description '${input.primer_description}' 34 --primer_description '${input.primer_description}'
15 #end if 35 #end if
16 ]]></command> 36 ]]></command>
17 <inputs> 37 <inputs>
18 <conditional name="input"> 38 <conditional name="input">
19 <param name="input_type" label="Choose the source for primer schemes" type="select"> 39 <param name="input_type" label="Choose the source for primer schemes" type="select">
20 <option value="ARTIC" selected="true">ARTIC SARS-CoV-2 Github page</option> 40 <option value="network" selected="true">ARTIC SARS-CoV-2, VarSkip and Midnight web pages</option>
21 <option value="history">History</option> 41 <option value="history">History</option>
22 </param> 42 </param>
23 <when value="ARTIC"> 43 <when value="network">
24 <param name="primers" type="select" multiple="true" label="SARS-CoV-2 Primers to fetch"> 44 <param name="primers" type="select" multiple="true" label="SARS-CoV-2 Primers to fetch">
25 <option value="SARS-CoV-2-ARTICv1" selected="true">SARS-CoV-2 ARTIC v1</option> 45 <option value="SARS-CoV-2-ARTICv1" selected="true">SARS-CoV-2 ARTIC v1</option>
26 <option value="SARS-CoV-2-ARTICv2" selected="true">SARS-CoV-2 ARTIC v2</option> 46 <option value="SARS-CoV-2-ARTICv2" selected="true">SARS-CoV-2 ARTIC v2</option>
27 <option value="SARS-CoV-2-ARTICv3" selected="true">SARS-CoV-2 ARTIC v3</option> 47 <option value="SARS-CoV-2-ARTICv3" selected="true">SARS-CoV-2 ARTIC v3</option>
48 <option value="SARS-CoV-2-ARTICv4" selected="true">SARS-CoV-2 ARTIC v4</option>
49 <option value="VarSkip-V1a" selected="true">NEB VarSkip-V1a</option>
50 <option value="Midnight-v1" selected="true">RAPID/Midnight v1</option>
28 </param> 51 </param>
29 </when> 52 </when>
30 <when value="history"> 53 <when value="history">
31 <param name="primer_input" label="Select history item" type="data" format="bed" /> 54 <param name="primer_input" label="Select history item" type="data" format="bed" />
32 <param name="primer_name" label="Name for this primer scheme" type="text" 55 <param name="primer_name" label="Name for this primer scheme" type="text"
33 help="Non-word characters will be removed from primer scheme name and spaces replaced with underscore (_)" /> 56 help="Characters that are not word characters or - will be removed from primer scheme name and spaces replaced with underscore (_)" />
34 <param name="primer_description" label="Description for primer scheme" type="text" /> 57 <param name="primer_description" label="Description for primer scheme" type="text" />
35 </when> 58 </when>
36 </conditional> 59 </conditional>
37 </inputs> 60 </inputs>
38 <outputs> 61 <outputs>
39 <data name="output_file" format="data_manager_json"/> 62 <data name="output_file" format="data_manager_json"/>
40 </outputs> 63 </outputs>
41 <tests> 64 <tests>
42 <test> 65 <test>
43 <param name="input_type" value="ARTIC" /> 66 <param name="input_type" value="network" />
44 <param name="primers" value="SARS-CoV-2-ARTICv1,SARS-CoV-2-ARTICv2,SARS-CoV-2-ARTICv3"/> 67 <param name="primers" value="SARS-CoV-2-ARTICv1,SARS-CoV-2-ARTICv2,SARS-CoV-2-ARTICv3,SARS-CoV-2-ARTICv4,VarSkip-V1a,Midnight-v1"/>
45 <output name="output_file"> 68 <output name="output_file" value="data_manager_primer_scheme_bedfiles.json.template" compare="re_match" />
46 <assert_contents>
47 <has_text text="ARTIC"/>
48 </assert_contents>
49 </output>
50 </test> 69 </test>
51 <test> 70 <test>
52 <param name="input_type" value="history" /> 71 <param name="input_type" value="history" />
53 <param name="primer_input" ftype="bed" value="sample1.bed" /> 72 <param name="primer_input" ftype="bed" value="sample1.bed" />
54 <param name="primer_name" value="sample_primer" /> 73 <param name="primer_name" value="sample_primer" />
57 <assert_contents> 76 <assert_contents>
58 <has_text text="sample_primer"/> 77 <has_text text="sample_primer"/>
59 </assert_contents> 78 </assert_contents>
60 </output> 79 </output>
61 </test> 80 </test>
81 <test>
82 <param name="input_type" value="history" />
83 <param name="primer_input" ftype="bed" value="sample1.bed" />
84 <param name="primer_name" value="sample^primer" />
85 <param name="primer_description" value="sample primer scheme" />
86 <output name="output_file">
87 <assert_contents>
88 <has_text text="sampleprimer"/>
89 </assert_contents>
90 </output>
91 </test>
62 </tests> 92 </tests>
63 <help><![CDATA[ 93 <help><![CDATA[
64 Amplicon sequencing for viral pathogens using the ARTIC_ pipeline or `PrimalSeq and iVar`_ relies on 94 Amplicon sequencing for viral pathogens using the ARTIC_ pipeline or `PrimalSeq and iVar`_ relies on
65 identifying primer locations in a reference sequence using BED format files. This 95 identifying primer locations in a reference sequence using BED format files. This
66 data manager populates a Galaxy tool data table, either from files provided via 96 data manager populates a Galaxy tool data table, either from files provided via
67 a history or via the ARTIC_ network Github repository. 97 a history or via the ARTIC_, the New England Biolabs VarSkip_ and the Massey
98 University Midnight_ web pages.
99
100 If the data manager fails with an error message about downloading some of the primer data files,
101 try and visit the corresponding website to see if it is functioning correctly. As with anything
102 network-dependent, problems can sometimes happen. A simple solution is to wait some time and
103 run the data manager again.
104
105 Finally, the data manager is designed to not duplicate primer files, so primers schemes that have
106 already been downloaded will be skipped when the install from network download mode is used.
68 107
69 .. _PrimalSeq and iVar: https://genomebiology.biomedcentral.com/articles/10.1186/s13059-018-1618-7 108 .. _PrimalSeq and iVar: https://genomebiology.biomedcentral.com/articles/10.1186/s13059-018-1618-7
70 .. _ARTIC: https://artic.network/ 109 .. _ARTIC: https://artic.network/
110 .. _VarSkip: https://github.com/nebiolabs/VarSkip/
111 .. _Midnight: https://zenodo.org/record/3897530#.XwM3ApMzZ0v
112 .. here_: https://gist.github.com/pvanheus/8403813b77e44cbd18e3fb1b3ca1b624
71 ]]></help> 113 ]]></help>
72 <citations> 114 <citations>
73 <citation type="doi">10.1186/s13059-018-1618-7</citation> 115 <citation type="doi">10.1186/s13059-018-1618-7</citation>
74 </citations> 116 </citations>
75 </tool> 117 </tool>