-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebaser.xml
96 lines (95 loc) · 4.55 KB
/
debaser.xml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<tool id="debaser" name="DeBaser" version="0.1.0">
<requirements>
<requirement type="package">bowtie2</requirement>
<requirement type="package" version="1.2">samtools</requirement>
<requirement type="package">angsd</requirement>
<requirement type="package" version="1.2.1">htslib</requirement>
</requirements>
<!-- A note on conditionals: their names are used in the code block but not test block -->
<!-- this means that you can't have the same parameter names in both sides of the conditional -->
<!-- because this would mess up the testing. As a result the code block ends up with unavoidable -->
<!-- duplications. -->
<command detect_errors="exit_code"><![CDATA[
mkdir variety_dir &&
#set $input_filename = '.'.join(str($infile.element_identifier).split('.')[:-1]) + '.fasta'
ln -s '$infile' '${input_filename}' &&
#if str($read_mode.paired_read_mode) == "paired":
#if $read_mode.variety_paired.forward.metadata.is_gzipped
#set $extension = 'fastq.gz'
#else
#set $extension = 'fastq'
#end if
ln -s '$read_mode.variety_paired.forward' 'variety_dir/${read_mode.variety_paired.name}_1.$extension' &&
ln -s '$read_mode.variety_paired.reverse' 'variety_dir/${read_mode.variety_paired.name}_2.$extension' &&
#else
#if $read_mode.variety_single.metadata.is_gzipped
#set $extension = 'fastq.gz'
#else
#set $extension = 'fastq'
#end if
#set $read_filename = '.'.join(str($read_mode.variety_single.name).split('.')[:-1])
ln -s '$read_mode.variety_single' 'variety_dir/${read_filename}_1.$extension' &&
#end if
python $__tool_directory__/debaser.py
--infile './$input_filename'
--reference '$reference'
--variety variety_dir
--output output &&
mv output/*.fa $output1
]]></command>
<inputs>
<param type="data" format="fasta" name="infile" label="input file"></param>
<param type="data" format="fasta" name="reference" label="reference genome"></param>
<conditional name="read_mode">
<param name="paired_read_mode" checked="True" truevalue="paired" falsevalue="single" type="boolean" label="Reads are in read pairs" />
<when value="paired">
<param type="data_collection" collection_type="paired" format="fastqsanger,fastqsanger.gz" name="variety_paired"></param>
</when>
<when value="single">
<param type="data" format="fastqsanger,fastqsanger.gz" name="variety_single"></param>
</when>
</conditional>
</inputs>
<outputs>
<data name="output1" format="fasta" />
<!-- <collection name="consensus" type="list" label="consensus of varieties from ${on_string}"> -->
<!-- <discover_datasets pattern="(?P<name>.*)\.fa" ext="fasta" directory="output"/> -->
<!-- </collection> -->
</outputs>
<tests>
<test>
<param name="infile" value="small.fasta"/>
<param name="reference" value="Mesculenta_305_v6.1.cds.fa"/>
<param name="paired_read_mode" value="paired" />
<param name="variety_paired">
<collection type="paired" name="small">
<element name="forward" value="small_reads_1.fastq"/>
<element name="reverse" value="small_reads_2.fastq"/>
</collection>
</param>
<output name="output1" value="small_paired_output.fasta" ftype="fasta" />
</test>
<test>
<param name="infile" value="small.fasta"/>
<param name="reference" value="Mesculenta_305_v6.1.cds.fa"/>
<param name="paired_read_mode" value="single" />
<param name="variety_single" value="small_reads_1.fastq" />
<output name="output1" value="small_single_output.fasta" ftype="fasta" />
</test>
</tests>
<help><![CDATA[
Find polymorphisms in plant varieties
]]></help>
<citations>
<citation type="bibtex">
@misc{debaser,
author = {Juma, John; Eyles, Rodney; Shah, Trushar },
year = {2017},
title = {DeBaser: An integrated tool for fast NGS data assembly, multi-sequence alignment and sequence variation detection in plants},
publisher = {GitHub},
journal = {GitHub Repository},
url = {https://github.com/ajodeh-juma/debaser-galaxy/},
}
</citation>
</citations>
</tool>