comparison freyja_demix.xml @ 0:fc6252e78d5b draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/freyja commit 2036e233d159a5c4b3b06ce6a681531259098f73
author iuc
date Thu, 28 Jul 2022 09:26:02 +0000
parents
children c0a0e79d7196
comparison
equal deleted inserted replaced
-1:000000000000 0:fc6252e78d5b
1 <tool id="freyja_demix" name="Freyja: Demix" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"
2 profile="@PROFILE@">
3 <description>
4 lineage abundances
5 </description>
6 <macros>
7 <import>macros.xml</import>
8 </macros>
9 <expand macro="biotools"/>
10 <expand macro="requirements">
11 <requirement type="package" version="4.7">sed</requirement>
12 </expand>
13 <expand macro="version"/>
14 <command detect_errors="exit_code"><![CDATA[
15 @RUN_FREYJA_UPDATE_COMMAND@
16 #if str($sample_name.source) == 'auto':
17 #set $sn = $variants_in.element_identifier
18 #else:
19 #set $sn = str($sample_name.name)
20 #end if
21 #set $in_file = $sn.replace(' ', '_') + '.' + $variants_in.ext
22 ln -s '$variants_in' $in_file &&
23 freyja demix
24 '$in_file'
25 '$depth_file'
26 #if $eps
27 --eps $eps
28 #end if
29 #if $meta
30 --meta '$meta'
31 #end if
32 $confirmedonly
33 @CUSTOM_BARCODES_COMMAND@
34 --covcut $depth_cutoff
35 --output abundances_raw.tsv &&
36 sed 's/$in_file/$sn/' abundances_raw.tsv > abundances.tsv
37 ]]></command>
38 <inputs>
39 <param name="variants_in" type="data" format="tabular"
40 label="Dataset with input variant calls"
41 help="This can be a VCF dataset, or the tabular calls output of freayja call or ivar variants."/>
42 <conditional name="sample_name">
43 <param name="source" type="select" label="Set sample name"
44 help="Select autodetect to have the dataset or collection element name used as the sample name, or, for a single input dataset, provide an explicit sample name.">
45 <option value="auto">Autodetect sample name</option>
46 <option value="manual">Specify sample name explicitly</option>
47 </param>
48 <when value="auto"/>
49 <when value="manual">
50 <param name="name" type="text" label="Name of the sample"/>
51 </when>
52 </conditional>
53 <expand macro="demixing_common_options"/>
54 <param name="depth_cutoff" argument="--covcut" type="integer" min="0" value="10"
55 multiple="true"
56 label="Depth cutoff for coverage estimate"
57 help="In the result file the coverage value will provide the 10x coverage estimate (percent of sites with 10 or greater reads- 10 is the default but can be modfied in this field. "/>
58 </inputs>
59 <outputs>
60 <data name="abundances" format="tabular"
61 label="${tool.name} on ${on_string}: Lineages abundances summary"
62 from_work_dir="abundances.tsv"/>
63 </outputs>
64 <tests>
65 <!-- Test 01: manual name sample -->
66 <test expect_num_outputs="1">
67 <param name="variants_in" value="variants.tsv"/>
68 <param name="depth_file" value="depths.tsv"/>
69 <conditional name="usher_update_option">
70 <param name="choice" value="repo"/>
71 </conditional>
72 <conditional name="sample_name">
73 <param name="source" value="manual"/>
74 <param name="name" value="samplename"/>
75 </conditional>
76 <output name="abundances" ftype="tabular">
77 <assert_contents>
78 <has_text text="samplename"/>
79 </assert_contents>
80 </output>
81 </test>
82 <!-- Test 02: autoname sample -->
83 <test expect_num_outputs="1">
84 <param name="variants_in" value="variants.tsv"/>
85 <param name="depth_file" value="depths.tsv"/>
86 <conditional name="usher_update_option">
87 <param name="choice" value="repo"/>
88 </conditional>
89 <conditional name="sample_name">
90 <param name="source" value="auto"/>
91 </conditional>
92 <output name="abundances" ftype="tabular">
93 <assert_contents>
94 <has_text text="summarized"/>
95 </assert_contents>
96 </output>
97 </test>
98 </tests>
99 <help><![CDATA[
100 @HELP_HEADER@
101
102 **Freyja demix** estimates lineage abundances in a potentially multi-lineage input sample.
103
104 Inputs
105 ======
106
107 The tool requires as input a dataset with called variants and a dataset with genome-wide sequencing depth information.
108 Both types of data can be produced with *Freyja call*, but the tool accepts variant calls also in VCF format.
109
110 Note
111 ----
112
113 For single samples it is recommended to select "Specify sample name explicitly"
114 under "Set sample name".
115
116 To use this tool on multiple samples in parallel, please provide two
117 collections in the same sample sort order - one with the variant calls, the
118 other one with the sequencing depths - and select "Autodetect sample name",
119 which will use collection element identifiers as the names of the samples.
120 This will produce a new collection of demixing reports that can be passed to
121 *Freyja: Aggregate and visualize* with sample names preserved.
122
123 Selection of multiple regular called variants and depth datasets is discouraged
124 since proper dataset pairing cannot be guaranteed!
125
126 Outputs
127 =======
128
129 The tool produces tabular output that includes the lineages detected in the sample, their corresponding abundances, and a lineage summary by constellation.
130
131 Example output:
132
133 ========== ===================================================
134 filename
135 summarized [('Delta', 0.65), ('Other', 0.25), ('Alpha', 0.1')]
136 lineages ['B.1.617.2' 'B.1.2' 'AY.6' 'Q.3']
137 abundances "[0.5 0.25 0.15 0.1]"
138 resid 3.14159
139 coverage 95.8
140 ========== ===================================================
141
142
143 Where *summarized* denotes a sum of all lineage abundances in a particular WHO designation (i.e. B.1.617.2 and AY.6 abundances are summed in the above example), otherwise they are grouped into "Other". The *lineage* array lists the identified lineages in descending order, and *abundances* contains the corresponding abundances estimates. The value of *resid* corresponds to the residual of the weighted least absolute devation problem used to estimate lineage abundances. The *coverage* value provides the 10x coverage estimate (percent of sites with 10 or greater reads- 10 is the default but can be modfied using the *--covcut* option).
144 ]]></help>
145 <expand macro="citations"/>
146 </tool>