Mercurial > repos > iuc > cooc_mutbamscan
comparison cooc_mutbamscan.xml @ 0:90d4dfb2d266 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cojac commit 38ed91999d4bbe3bedc294197926ea332eb6cd5e
author | iuc |
---|---|
date | Thu, 11 Aug 2022 13:48:28 +0000 |
parents | |
children | df723877bcd8 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:90d4dfb2d266 |
---|---|
1 <tool id="cooc_mutbamscan" name="Cojac: mutbamscan" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" | |
2 profile="@PROFILE@"> | |
3 <description> | |
4 scan an alignment file for mutation co-occurrences | |
5 </description> | |
6 <macros> | |
7 <import>macros.xml</import> | |
8 </macros> | |
9 <expand macro="biotools"/> | |
10 <expand macro="requirements"/> | |
11 <expand macro="version"/> | |
12 <command detect_errors="exit_code"><![CDATA[ | |
13 ln -s '$bed_file' 'bed_file' && | |
14 @VOCDIR_COMMAND@ | |
15 #import re | |
16 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($bam_file.element_identifier)) | |
17 ln -s '$bam_file' ${identifier}.bam && | |
18 ln -s '${bam_file.metadata.bam_index}' ${identifier}.bai && | |
19 cooc-mutbamscan | |
20 -a '${identifier}.bam' | |
21 -b 'bed_file' | |
22 -m '$vocdir' | |
23 -y cooc.yaml | |
24 -j cooc.json | |
25 #if $amplicons_file.choice == 'build' | |
26 -A amplicons.yaml | |
27 #else | |
28 -Q '$amplicons_file.in_amp' | |
29 #end if | |
30 -t cooc.tsv | |
31 --cooc $cooc | |
32 ]]></command> | |
33 <inputs> | |
34 <expand macro="vocdir_input"/> | |
35 <param name="bed_file" type="data" format="bed" | |
36 label="BED file defining the amplicons"/> | |
37 <param name="bam_file" type="data" format="bam,cram,sam" | |
38 label="Alignment BAM/CRAM/SAM file"/> | |
39 <param argument="--cooc" type="integer" min="1" value="2" | |
40 label="Minimum number of cooccurence mutations on the same amplicon"/> | |
41 <conditional name="amplicons_file"> | |
42 <param name="choice" type="select" label="Source of amplicons YAML file"> | |
43 <option value="build">Build from BED + set of YAMLs for variants of concern</option> | |
44 <option value="custom">From history</option> | |
45 </param> | |
46 <when value="build"/> | |
47 <when value="custom"> | |
48 <param name="in_amp" type="data" format="yaml" | |
49 label="YAML file to query amplicons"/> | |
50 </when> | |
51 </conditional> | |
52 <param name="output_files" type="select" display="checkboxes" | |
53 multiple="true" label="Output files"> | |
54 <option value="yaml" selected="true">YAML</option> | |
55 <option value="json">JSON</option> | |
56 <option value="tabular">tabular</option> | |
57 </param> | |
58 </inputs> | |
59 <outputs> | |
60 <data name="cooc_yaml" format="yaml" | |
61 label="${tool.name} on ${on_string}: Mutation cooccurrence (yaml)" | |
62 from_work_dir="cooc.yaml"> | |
63 <filter>'yaml' in output_files</filter> | |
64 </data> | |
65 <data name="cooc_json" format="json" | |
66 label="${tool.name} on ${on_string}: Mutation cooccurrence (json)" | |
67 from_work_dir="cooc.json"> | |
68 <filter>'json' in output_files</filter> | |
69 </data> | |
70 <data name="cooc_tsv" format="tabular" | |
71 label="${tool.name} on ${on_string}: Mutation cooccurrence (tabular)" | |
72 from_work_dir="cooc.tsv"> | |
73 <filter>'tabular' in output_files</filter> | |
74 </data> | |
75 <data name="amplicons" format="yaml" | |
76 label="${tool.name} on ${on_string}: Amplicons (yaml)" | |
77 from_work_dir="amplicons.yaml"> | |
78 <filter>amplicons_file['choice'] == 'build'</filter> | |
79 </data> | |
80 </outputs> | |
81 <tests> | |
82 <!-- Test 1: build yaml for amplicons from bed and voc/ --> | |
83 <test expect_num_outputs="4"> | |
84 <conditional name="vocdir_option"> | |
85 <param name="choice" value="custom"/> | |
86 <param name="voc_file" value="omicron_ba1_mutations.yaml"/> | |
87 </conditional> | |
88 <param name="bam_file" value="tbam11.bam"/> | |
89 <param name="bed_file" value="nCoV-2019.insert.V3.bed"/> | |
90 <conditional name="amplicons_file"> | |
91 <param name="choice" value="build"/> | |
92 </conditional> | |
93 <param name="output_files" value="yaml,json,tabular"/> | |
94 <output name="cooc_yaml" ftype="yaml"> | |
95 <assert_contents> | |
96 <has_text text="76_om1"/> | |
97 <has_text text="81_om1"/> | |
98 </assert_contents> | |
99 </output> | |
100 <output name="cooc_json" ftype="json"> | |
101 <assert_contents> | |
102 <has_text text="76_om1"/> | |
103 <has_text text="81_om1"/> | |
104 </assert_contents> | |
105 </output> | |
106 <output name="cooc_tsv" ftype="tabular"> | |
107 <assert_contents> | |
108 <has_text text="76_om1"/> | |
109 <has_text text="81_om1"/> | |
110 </assert_contents> | |
111 </output> | |
112 <output name="amplicons" ftype="yaml"> | |
113 <assert_contents> | |
114 <has_text text="76_om1"/> | |
115 <has_text text="81_om1"/> | |
116 </assert_contents> | |
117 </output> | |
118 </test> | |
119 <!-- Test 2: supply yaml for amplicons and voc/ from cache --> | |
120 <test expect_num_outputs="2"> | |
121 <conditional name="vocdir_option"> | |
122 <param name="choice" value="cache"/> | |
123 </conditional> | |
124 <param name="bam_file" value="tbam11.bam"/> | |
125 <param name="bed_file" value="nCoV-2019.insert.V3.bed"/> | |
126 <conditional name="amplicons_file"> | |
127 <param name="choice" value="custom"/> | |
128 <param name="in_amp" value="amplicons111.yaml"/> | |
129 </conditional> | |
130 <param name="output_files" value="yaml,tabular"/> | |
131 <output name="cooc_yaml" ftype="yaml"> | |
132 <assert_contents> | |
133 <has_text text="76_om1"/> | |
134 <has_text text="81_om1"/> | |
135 </assert_contents> | |
136 </output> | |
137 <output name="cooc_tsv" ftype="tabular"> | |
138 <assert_contents> | |
139 <has_text text="76_om1"/> | |
140 <has_text text="81_om1"/> | |
141 </assert_contents> | |
142 </output> | |
143 </test> | |
144 </tests> | |
145 <help><![CDATA[ | |
146 @HELP_HEADER@ | |
147 | |
148 Information about **cooc-mutbamscan** method | |
149 ============================================ | |
150 | |
151 The method scans an alignment BAM/CRAM/SAM file for mutation co-occurrences and output a JSON or YAML file. | |
152 | |
153 ]]></help> | |
154 <expand macro="citations"/> | |
155 </tool> |