Mercurial > repos > fabio > btman
comparison btman-1.0.0/create.xml @ 18:be864d79c9c7 draft
Uploaded 20190304
author | fabio |
---|---|
date | Mon, 04 Mar 2019 08:30:03 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
17:f02c2c58a6f9 | 18:be864d79c9c7 |
---|---|
1 <?xml version="1.0"?> | |
2 <tool name="BloomTree Manager - Create" id="btman_create" version="1.0.0"> | |
3 <description>a Sequence Bloom Tree</description> | |
4 <macros> | |
5 <import>macros.xml</import> | |
6 </macros> | |
7 <expand macro="requirements" /> | |
8 <command detect_errors="exit_code"> | |
9 <![CDATA[ | |
10 python '$__tool_directory__/create.py' | |
11 | |
12 #set formats = '' | |
13 #set filepaths = '' | |
14 #set filenames = '' | |
15 #set compressed = '' | |
16 #set minab = '' | |
17 #set qthres = '' | |
18 #for $i, $exp in enumerate( $experiments ): | |
19 #set formats += str( $exp.conditional_format.format ) + '|' | |
20 #if $exp.conditional_format.format == 'accessions': | |
21 #set filepaths += str( $exp.conditional_format.accession_numbers ) + '|' | |
22 #set filenames += str( $exp.conditional_format.accession_numbers.name ) + '|' | |
23 #set compressed += '0|' | |
24 #else: | |
25 #if $exp.conditional_format.format == 'fasta': | |
26 #set compressed += str( $exp.conditional_format.conditional_fasta_compressed.fasta_compressed ) + '|' | |
27 #if $exp.conditional_format.conditional_fasta_compressed.fasta_compressed == 0: | |
28 #set filepaths += ','.join( [ str( $f ) for $f in $exp.conditional_format.conditional_fasta_compressed.fastafiles ] ) + '|' | |
29 #set filenames += ','.join( [ str( $f.name ) for $f in $exp.conditional_format.conditional_fasta_compressed.fastafiles ] ) + '|' | |
30 #else: | |
31 #set filepaths += ','.join( [ str( $f ) for $f in $exp.conditional_format.conditional_fasta_compressed.fastagzfiles ] ) + '|' | |
32 #set filenames += ','.join( [ str( $f.name ) for $f in $exp.conditional_format.conditional_fasta_compressed.fastagzfiles ] ) + '|' | |
33 #end if | |
34 #elif $exp.conditional_format.format == 'fastq': | |
35 #set compressed += str( $exp.conditional_format.conditional_fastq_compressed.fastq_compressed ) + '|' | |
36 #if $exp.conditional_format.conditional_fastq_compressed.fastq_compressed == 0: | |
37 #set filepaths += ','.join( [ str( $f ) for $f in $exp.conditional_format.conditional_fastq_compressed.fastqfiles ] ) + '|' | |
38 #set filenames += ','.join( [ str( $f.name ) for $f in $exp.conditional_format.conditional_fastq_compressed.fastqfiles ] ) + '|' | |
39 #else: | |
40 #set filepaths += ','.join( [ str( $f ) for $f in $exp.conditional_format.conditional_fastq_compressed.fastqgzfiles ] ) + '|' | |
41 #set filenames += ','.join( [ str( $f.name ) for $f in $exp.conditional_format.conditional_fastq_compressed.fastqgzfiles ] ) + '|' | |
42 #end if | |
43 #end if | |
44 #end if | |
45 #set minab += str( $exp.min_abundance ) + '|' | |
46 #if $exp.conditional_quality.quality_control == '1': | |
47 #set qthres += str( $exp.conditional_quality.quality_threshold ) + '|' | |
48 #else: | |
49 #set qthres += '-1.0|' | |
50 #end if | |
51 #end for | |
52 #set klen = $kmer_len | |
53 #set bfsize = -1 | |
54 #if $bloomsize_condition.bloomsize_control == '0': | |
55 #set bfsize = $bloomsize_condition.bloom_filter_size | |
56 #end if | |
57 | |
58 --formats '${formats}' | |
59 --filepaths '${filepaths}' | |
60 --filenames '${filenames}' | |
61 --compressed '${compressed}' | |
62 --minabundances '${minab}' | |
63 --qualitythresholds '${qthres}' | |
64 | |
65 --klen ${klen} | |
66 --bfsize ${bfsize} | |
67 | |
68 --outfile '${resulttxt}' | |
69 --outdir 'sbt' | |
70 --tooldir '$__tool_directory__' | |
71 ]]> | |
72 </command> | |
73 <inputs> | |
74 <repeat name="experiments" title="Select a list of experiments" help="Select a set of experiments on which the Sequence Bloom Tree will be built." min="1"> | |
75 <conditional name="conditional_format"> | |
76 <param name="format" type="select" label="Select the experiment format" help="FASTA and FASTQ are the supported formats"> | |
77 <option value="fasta">FASTA Experiments</option> | |
78 <option value="fastq">FASTQ Experiments</option> | |
79 <option value="accessions">SRA Accession Numbers</option> | |
80 </param> | |
81 <when value="fasta"> | |
82 <conditional name="conditional_fasta_compressed"> | |
83 <param name="fasta_compressed" type="boolean" checked="true" truevalue="1" falsevalue="0" label="Are your experiments compressed?" /> | |
84 <when value="0"> | |
85 <param format="fasta" name="fastafiles" multiple="true" type="data" label="Select one or more FASTA experiments" /> | |
86 </when> | |
87 <when value="1"> | |
88 <param format="fastagz" name="fastagzfiles" multiple="true" type="data" label="Select one or more FASTA .gz experiments" /> | |
89 </when> | |
90 </conditional> | |
91 </when> | |
92 <when value="fastq"> | |
93 <conditional name="conditional_fastq_compressed"> | |
94 <param name="fastq_compressed" type="boolean" checked="true" truevalue="1" falsevalue="0" label="Are youe experiments compressed?" /> | |
95 <when value="0"> | |
96 <param format="fastq" name="fastqfiles" multiple="true" type="data" label="Select one or more FASTQ experiments" /> | |
97 </when> | |
98 <when value="1"> | |
99 <param format="fastqgz" name="fastqgzfiles" multiple="true" type="data" label="Select one or more FASTQ .gz experiments" /> | |
100 </when> | |
101 </conditional> | |
102 </when> | |
103 <when value="accessions"> | |
104 <param name="accession_numbers" type="data" format="tabular" label="Select a list of SRA Accession Numbers" help="Select a tabular file with a list of accession numbers in the first column." /> | |
105 </when> | |
106 </conditional> | |
107 | |
108 <param name="min_abundance" type="integer" value="2" min="0" label="Insert a Bloom filter minimum abundance" help="This value is the minimum abundance cutoff for the creation of the Bloom filter." /> | |
109 | |
110 <conditional name="conditional_quality"> | |
111 <param name="quality_control" type="boolean" checked="false" truevalue="1" falsevalue="0" label="Apply a quality control procedure" /> | |
112 <when value="1"> | |
113 <param name="quality_threshold" size="1" type="float" value="0.8" min="0.0" max="1.0" label="Quality threshold" help="If the number of sequences flagged as poor quality on the total number of sequences in a file is less than this threshold, the whole experiment will be excluded." /> | |
114 </when> | |
115 </conditional> | |
116 </repeat> | |
117 | |
118 <param name="kmer_len" type="integer" value="21" min="0" label="K-mer length" /> | |
119 | |
120 <conditional name="bloomsize_condition"> | |
121 <param name="bloomsize_control" type="boolean" checked="true" truevalue="1" falsevalue="0" label="Automatically estimate the Bloom filter size" /> | |
122 <when value="0"> | |
123 <param name="bloom_filter_size" size="1" type="integer" value="1" min="1" label="Bloom Filter size" help="Disable this field to let the tool estimate an appropriate Bloom filter size." /> | |
124 </when> | |
125 </conditional> | |
126 </inputs> | |
127 <outputs> | |
128 <collection name="list_output" type="list" label="${tool.name} SBT Collection"> | |
129 <discover_datasets pattern="(?P<identifier_0>.*(?=\.)).(?P<ext>[^\.]*$)" ext="auto" directory="sbt" /> | |
130 </collection> | |
131 <data format="txt" name="resulttxt" label="${tool.name} SBT: Result" from_work_dir="sbtres.txt" /> | |
132 </outputs> | |
133 | |
134 <help><![CDATA[ | |
135 This tool allows to create Sequence Bloom Trees starting from a set of FASTA or FASTQ files. | |
136 It also allows to control the quality of the input dataset and exclude the files that do not reach a specified quality level. | |
137 | |
138 ----- | |
139 | |
140 **Input file** | |
141 | |
142 The input of this tool is a set of FASTA or FASTQ experiments, additionally to a set of SRA accession numbers. | |
143 For each of the selected experiments, the minimum abundance for the corresponding Bloom filter is required. | |
144 Additionally, a quality control procedure could be applied to guarantee that the quality of every experiment always exceed a | |
145 specified treshold. Otherwise, experiments with low quality level will be discarded. | |
146 | |
147 The k-mer length must also be specified, additionally to the Bloom filter size. This last field is optional and it will be | |
148 automatically estimated if not provided. | |
149 | |
150 ----- | |
151 | |
152 **Output** | |
153 | |
154 This tool returns a collection containing the Sequence Bloom Tree nodes and a file representing the organization of the tree. | |
155 | |
156 Take a look at the Query tool documentation for a detailed description about how | |
157 to query a Sequence Bloom Tree. | |
158 | |
159 ----- | |
160 | |
161 .. class:: infomark | |
162 | |
163 **Notes** | |
164 | |
165 This Galaxy tool has been developed by Fabio Cumbo. | |
166 | |
167 Please visit this GithHub_repository_ for more information about the BloomTree Manager | |
168 | |
169 .. _GithHub_repository: https://github.com/fabio-cumbo/bloomtree-manager | |
170 ]]></help> | |
171 | |
172 <expand macro="citations" /> | |
173 </tool> |