5
|
1 <tool id="generate_sliding_windows" name="generate_sliding_windows" version="0.2.0">
|
3
|
2 <description>Split fasta sequence in nucleotide windows</description>
|
0
|
3 <requirements>
|
|
4 <requirement type="package" version="1.65">biopython</requirement>
|
|
5 </requirements>
|
|
6 <stdio>
|
|
7 <exit_code range="1:" />
|
|
8 </stdio>
|
|
9
|
|
10 <command interpreter="python"><![CDATA[
|
5
|
11 generate_sliding_windows.py --input
|
|
12 #if $refFastaSource.fastaSource == "history":
|
|
13 "$input"
|
|
14 #else
|
|
15 "$refFastaSource.pre_installed_fasta.fields.path"
|
|
16 #end if
|
|
17 --output "$output" --window $window --step $step
|
0
|
18 ]]></command>
|
|
19 <inputs>
|
4
|
20 <conditional name="refFastaSource">
|
|
21 <param help="" label="Will you select a fasta sequence from your history or use a pre-installed sequence?" name="fastaSource" type="select">
|
|
22 <option value="history">Use one from the history</option>
|
5
|
23 <option value="pre_installed">Use a pre-installed fasta sequence</option>
|
4
|
24 </param>
|
5
|
25 <when value="pre_installed">
|
|
26 <param help="if you wish to have your fasta sequence listed contact instance administrator" label="Select a fasta sequence" name="pre_installed_fasta" type="select">
|
4
|
27 <options from_data_table="all_fasta">
|
|
28 </options>
|
|
29 </param>
|
|
30 </when>
|
|
31 <when value="history">
|
|
32 <param format="fasta" label="Select a fasta file for which you wish to generate a multi-fasta file in a sliding window fashion" name="input" type="data" />
|
|
33 </when>
|
|
34 </conditional>
|
0
|
35 <param type="integer" name="window" value="21" min="1" label="window size" help="Specifiy the size of the windows that should be generated"/>
|
|
36 <param type="integer" name="step" value="21" min="1" label="step size" help="Specify the distance with which windows should be spaced apart."/>
|
|
37 </inputs>
|
|
38 <outputs>
|
3
|
39 <data name="output" format="fasta" />
|
0
|
40 </outputs>
|
|
41 <tests>
|
|
42 <test>
|
1
|
43 <param name="input" value="EcR_USP_224.fa"/>
|
0
|
44 <param name="window" value="21"/>
|
|
45 <param name="step" value="21"/>
|
3
|
46 <output name="output" file="output.fa"/>
|
0
|
47 </test>
|
|
48 </tests>
|
|
49 <help><![CDATA[
|
|
50
|
|
51 Generate fixed size sliding windows in fasta format from multi-fasta sequence.
|
|
52
|
3
|
53 -----------------------------
|
|
54
|
|
55 Given an input fasta sequence
|
|
56
|
|
57 ::
|
|
58
|
|
59
|
|
60 >input
|
|
61 ATGCATGCATGCATGCATGCATGCATCGATGCATCGATCG
|
|
62
|
|
63 produces the following multi-fasta output with window size 10 and step 5:
|
|
64
|
|
65 ::
|
|
66
|
|
67
|
|
68 >input_start:1_stop:10
|
|
69 ATGCATGCAT
|
|
70 >input_start:6_stop:15
|
|
71 TGCATGCATG
|
|
72 >input_start:11_stop:20
|
|
73 GCATGCATGC
|
|
74 >input_start:16_stop:25
|
|
75 CATGCATGCA
|
|
76 >input_start:21_stop:30
|
|
77 ATGCATCGAT
|
|
78 >input_start:26_stop:35
|
|
79 TCGATGCATC
|
|
80
|
|
81 -------------------------
|
|
82
|
0
|
83 optional arguments:
|
|
84 -h, --help show this help message and exit
|
|
85 --input INPUT supply an input multi-fasta file.
|
|
86 --output OUTPUT supply an output multi-fasta file. If not specified use
|
|
87 stdout.
|
|
88 --window WINDOW Set the size of the generated windows
|
|
89 --step STEP Set distance between the windows
|
|
90
|
|
91 ]]></help>
|
|
92 </tool>
|