-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplit_on_Primer.xml
More file actions
executable file
·81 lines (80 loc) · 3.74 KB
/
Split_on_Primer.xml
File metadata and controls
executable file
·81 lines (80 loc) · 3.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<tool id="Split_on_Primer" name="Split on primer" version="1.1" force_history_refresh="True">
<!--description>Demultiplex a sequence file based on the used primers.</description-->
<requirements>
<requirement type="package" version="3.8.2">python</requirement>
</requirements>
<!-- collect the parameters and provide these to the wrapper script -->
<command>
<![CDATA[
bash '$__tool_directory__/Split_on_Primer.sh'
"$input_select.input_type"
"$input_select.input_reads"
"$input_select.input_reads.display_name"
"$primer_select.primer_type"
"$primer_select.primers"
"$mis"
"$shift"
#if $trim.value == True
"--trim"
#else
" "
#end if
#if $input_select.input_type != "zip"
"$output"
"$output.id"
#elif $input_select.input_type == "zip"
"$primer_zip"
#end if
]]>
</command>
<inputs>
<!-- get the input file (fasta, fastq or zip) -->
<conditional name="input_select">
<param name="input_type" type="select" label="Input type">
<option value="fasta">FASTA</option>
<option value="fastq" selected="true">FASTQ</option>
<option value="zip">ZIP</option>
</param>
<when value="fasta">
<param format="fasta" name="input_reads" type="data" label="Sequence file in FASTA format" />
</when>
<when value="fastq">
<param format="fastq" name="input_reads" type="data" label="Sequence file in FASTQ format" />
</when>
<when value="zip">
<param format="zip" name="input_reads" type="data" label="ZIP file containing sequence files" />
</when>
</conditional>
<!-- primer select, either through file or text form -->
<conditional name="primer_select">
<param name="primer_type" type="select" label="Primer type">
<option value="file">CSV file</option>
<option value="text">Text form</option>
</param>
<when value="file">
<param name="primers" format="csv" type="data" label="Primer file in CSV format ("Primer,Sequence")" />
</when>
<when value="text">
<param name="primers" type="text" area="True" size="4x40" label="Primers and sequences" help="Provide the primer names and sequences in the following format: "[Primer],[Sequence]" (without the brackets or quotes). One primer - sequence combination per line." />
</when>
</conditional>
<!-- additional arguments -->
<param name="mis" type="integer" label="Maximum number of mismatches allowed" value="1" min="0" />
<param name="shift" type="integer" label="Maximum sequence shift allowed, each frameshift count towards the maximum number of mismatces" value="1" min="0" />
<param name="trim" type="boolean" checked="true" label="Trim the primers" />
</inputs>
<outputs>
<!-- set the output file format based on the selected input type -->
<data format="tabular" name="output" label="$input_select.input_reads.display_name Demultiplexed">
<filter>input_select['input_type'] != "zip"</filter>
</data>
<data format="zip" name="primer_zip" label="$input_select.input_reads.display_name Demultiplexed">
<filter>input_select['input_type'] == "zip"</filter>
</data>
</outputs>
<tests>
</tests>
<help>
Demultiplex a sequence file based on a set of user provided primer sequences or sequence labels. The tool will create an output file for each primer or label the user provided, even if none of the input sequences match. Additionally, an "unmatched" file will be created that contains all the sequences that do not match with any of the primers. If there are multiple primers with the same name (regardless of the sequence) the results will be placed in the same output file. The demultiplex tool can handle ambiguous nucleotides, if a primer contains these ambiguous nucleotides it will match all the potential bases with the sequences, without counting towards the mismatch limit.
</help>
</tool>