comparison clustering.xml @ 0:59bc96331073 draft default tip

planemo upload for repository https://github.com/geraldinepascal/FROGS-wrappers/tree/v3.1.0 commit 08296fc88e3e938c482c631bd515b3b7a0499647
author frogs
date Thu, 28 Feb 2019 10:14:49 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:59bc96331073
1 <?xml version="1.0"?>
2 <!--
3 # Copyright (C) 2015 INRA
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 -->
18 <tool id="FROGS_clustering" name="FROGS Clustering swarm" version="3.1">
19 <description>Single-linkage clustering on sequences</description>
20 <requirements>
21 <requirement type="package" version="3.1.0">frogs</requirement>
22 </requirements>
23 <stdio>
24 <exit_code range="1:" />
25 <exit_code range=":-1" />
26 </stdio>
27 <command>
28 clustering.py
29 --nb-cpus \${GALAXY_SLOTS:-1}
30 --distance $maximal_distance
31 --input-fasta $sequence_file
32 --input-count $count_file
33 --output-biom $abundance_biom
34 --output-fasta $seed_file
35 --output-compo $swarms_composition
36 $denoising
37 </command>
38 <inputs>
39 <!-- Files -->
40 <param format="fasta" name="sequence_file" type="data" label="Sequences file" help="The sequences file (format: fasta)." optional="false" />
41 <param format="tabular" name="count_file" type="data" label="Count file" help="It contains the count by sample for each sequence (format: TSV)." optional="false" />
42 <!-- Parameters -->
43 <param name="maximal_distance" type="integer" label="Aggregation distance" help="Maximum number of differences between sequences in each aggregation step." value="3" min="1" max="15" optional="false" />
44 <param name="denoising" type="boolean" checked="true" truevalue="--denoising" falsevalue="" label="Performe denoising clustering step?" help="If checked, clustering will be perform in two steps, first with distance = 1 and then with your input distance"/>
45 </inputs>
46 <outputs>
47 <data format="fasta" name="seed_file" label="${tool.name}: seed_sequences.fasta" from_work_dir="seeds.fasta"/>
48 <data format="biom1" name="abundance_biom" label="${tool.name}: abundance.biom" from_work_dir="abundance.biom" />
49 <data format="tabular" name="swarms_composition" label="${tool.name}: swarms_composition.tsv" from_work_dir="swarms.tsv"/>
50 </outputs>
51 <tests>
52 <test>
53 <param name="sequence_file" value="references/01-prepro-vsearch.fasta"/>
54 <param name="count_file" value="references/01-prepro-vsearch.tsv"/>
55 <param name="maximal_distance" value="3"/>
56 <param name="denoising" value="true"/>
57 <output name="seed_file" file="references/02-clustering.fasta" compare="sim_size" delta="0" />
58 <!-- output name="abundance_biom" file="references/02-clustering.biom" -->
59 <!-- Voila deux autres facon de comparer: (Mais ca ne marche pas dans ce cas car les fichiers générés par planemo sont vraiments différents comparé à nos test manuels (cf. /tmp/frogs-test-result-olivier /tmp/frogs-test-result-olivier2) -->
60 <!-- cf. https://docs.galaxyproject.org/en/latest/dev/schema.html#tool-tests-test-output -->
61 <!--output name="abundance_biom" file="references/02-clustering.biom" compare="sim_size" delta="10"/-->
62 <!--output name="abundance_biom" file="references/02-clustering.biom" compare="diff" lines_diff="1"/-->
63 <output name="swarms_composition" file="references/02-clustering_compo.tsv" compare="sim_size" delta="0" />
64 </test>
65 </tests>
66 <help>
67
68 .. image:: static/images/frogs_images/FROGS_logo.png
69 :height: 144
70 :width: 110
71
72
73 .. class:: infomark page-header h2
74
75 What it does
76
77 Single-linkage clustering on sequences.
78
79
80 .. class:: infomark page-header h2
81
82 Inputs/Outputs
83
84 .. class:: h3
85
86 Inputs
87
88 **Sequences file**:
89
90 The sequence file with all samples sequences (format `FASTA &lt;https://en.wikipedia.org/wiki/FASTA_format&gt;`_). These sequences are dereplicated: strictly identical sequence are represented only one and the initial count is kept in count file.
91
92 The sequence ID must be "sequenceID;size=X" with X equal to the total abundance among all samples.
93
94 *It corresponds to one output of FROGS Pre-process tools.*
95
96 **Count file**:
97
98 This file contains the count of all uniq sequences in each sample (format `TSV &lt;https://en.wikipedia.org/wiki/Tab-separated_values&gt;`_).
99
100 Example::
101
102 #id splA splB
103 seq1 1289 2901
104 seq2 3415 0
105
106
107 .. class:: h3
108
109 Outputs
110
111 **Abundance file** (abundance.biom):
112
113 The abundance of each cluster in each sample (format `BIOM &lt;http://biom-format.org/&gt;`_). This format is widely used in metagenomic softwares.
114
115
116 **Clusters seeds** (seed_sequences.fasta):
117
118 The clusters representative sequences (format `FASTA &lt;https://en.wikipedia.org/wiki/FASTA_format&gt;`_).
119
120
121 **Clusters composition** (swarms_composition.tsv):
122
123 A text file representing the read composition of each cluster (format txt). Each line represents one cluster and is composed of read identifier separated by space.
124
125
126 .. class:: infomark page-header h2
127
128 How it works
129
130 .. csv-table::
131 :header: "Steps", "With denoising", "Without denoising"
132 :widths: 5, 150, 150
133 :class: table table-striped
134
135 "1", "Sorting the reads by their abundance", "Sorting the reads by their abundance"
136 "2", "Clusters the reads (`Swarm &lt;https://github.com/torognes/swarm&gt;`_). The distance parameter is 1", "/"
137 "3", "Sorting the pre-clusters by their abundance", "/"
138 "4", "Clusters the pre-clusters (`Swarm &lt;https://github.com/torognes/swarm&gt;`_) with the distance you specify", "Clusters the reads (`Swarm &lt;https://github.com/torognes/swarm&gt;`_) with the distance you specify"
139
140 **Swarm focus**
141
142 Swarm use an iterative growth process and the use of sequence abundance values to delineate OTUs.
143
144 .. image:: static/images/frogs_images/FROGS_cluster_swarm.png
145 :height: 223
146 :width: 666
147
148 In each groth step the sequence of the previous step is used to find the others sequences with a number of differences inferior or equal to the "Aggregation distance".
149
150 After agregation Swarm refines the clusters by looking at the abundancies along the connections. Theoritically the abundances must decrease when you are going away from the seed (which is often the most abundant sequence). If this abundance raises again it means that two different clusters are connected by some poorly abundant sequences, so swarm cut the connection.
151
152
153 .. class:: infomark page-header h2
154
155 Advices
156
157 The denoising step allows to build very fine clusters with minimal differences. In this case, the number of differences is equal at 1 between sequences of each crowns. This first clustering is extremly quick. After the denoising, a second swarm is run with an aggregation distance >1 as you have configured, between seeds from this first clustering.
158
159 To have some metrics on your clusters, you can use the tool **FROGS Clusters Stat**.
160
161
162 ----
163
164 **Contact**
165
166 Contacts: frogs@inra.fr
167
168 Repository: https://github.com/geraldinepascal/FROGS
169 website: http://frogs.toulouse.inra.fr/
170
171 Please cite the **FROGS article**: *Escudie F., et al. Bioinformatics, 2018. FROGS: Find, Rapidly, OTUs with Galaxy Solution.*
172
173 </help>
174 <citations>
175 <citation type="doi">10.1093/bioinformatics/btx791</citation>
176 </citations>
177
178 </tool>