|
14
|
1 <tool id="bwameth" name="bwameth" version="0.20">
|
|
|
2 <description>Fast and accurate aligner of BS-Seq reads.</description>
|
|
|
3 <requirements>
|
|
|
4 <requirement type="package" version="0.4.6">toolshed</requirement>
|
|
|
5 <requirement type="package" version="1.2">samtools</requirement>
|
|
|
6 <requirement type="package" version="0.7.12">bwa</requirement>
|
|
17
|
7 <requirement type="package" version="0.20">bwameth</requirement>
|
|
14
|
8 </requirements>
|
|
|
9 <stdio>
|
|
|
10 <exit_code range="1:" />
|
|
|
11 <exit_code range=":-1" />
|
|
|
12 <regex match="Error:" />
|
|
|
13 <regex match="Exception:" />
|
|
|
14 <regex match="Exception :" />
|
|
|
15 </stdio>
|
|
17
|
16 <version_command>bwameth.py --version</version_command>
|
|
|
17 <command>
|
|
14
|
18 <![CDATA[
|
|
|
19 #if $referenceSource.source != "indexed":
|
|
17
|
20 mkdir index_dir &&
|
|
|
21 ln -s '$referenceSource.reference' index_dir/genome.fa &&
|
|
|
22 bwameth.py index index_dir/genome.fa &&
|
|
|
23 #set index="index_dir/genome.fa"
|
|
14
|
24 #else
|
|
17
|
25 #set index=$referenceSource.index.fields.path
|
|
14
|
26 #end if
|
|
|
27
|
|
17
|
28 bwameth.py
|
|
|
29 -t "\${GALAXY_SLOTS:-4}"
|
|
|
30 --reference ${index}
|
|
|
31
|
|
14
|
32 #if str($readGroup).strip() != "":
|
|
17
|
33 --read-group "${readGroup}"
|
|
14
|
34 #end if
|
|
|
35
|
|
|
36 #if $single_or_paired.single_or_paired_opts == 'single':
|
|
|
37 $single_or_paired.input_singles
|
|
|
38 #else:
|
|
|
39 $single_or_paired.input_mate1 $single_or_paired.input_mate2
|
|
|
40 #end if
|
|
17
|
41 | samtools view -u - | samtools sort -@ "\${GALAXY_SLOTS:-4}" output
|
|
14
|
42 ]]>
|
|
|
43 </command>
|
|
|
44 <inputs>
|
|
|
45 <conditional name="referenceSource">
|
|
|
46 <param name="source" type="select" label="Select a genome reference from your history or a built-in index?">
|
|
|
47 <option value="history" selected="True">Use one from the history</option>
|
|
|
48 <option value="indexed">Use a built-in index</option>
|
|
|
49 </param>
|
|
|
50 <when value="history">
|
|
|
51 <param name="reference" type="data" format="fasta" metadata_name="dbkey" label="Select a genome" help="in FASTA format" />
|
|
|
52 </when>
|
|
|
53 <when value="indexed">
|
|
|
54 <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact your Galaxy admin">
|
|
|
55 <options from_data_table="bwameth_indexes">
|
|
|
56 <filter type="sort_by" column="2"/>
|
|
|
57 <validator type="no_options" message="No indexes are available for the selected input dataset"/>
|
|
|
58 </options>
|
|
|
59 </param>
|
|
|
60 </when>
|
|
|
61 </conditional>
|
|
|
62
|
|
|
63 <conditional name="single_or_paired">
|
|
|
64 <param name="single_or_paired_opts" type="select" label="Is this library mate-paired?">
|
|
|
65 <option value="single">Single-end</option>
|
|
|
66 <option value="paired">Paired-end</option>
|
|
|
67 </param>
|
|
|
68 <when value="single">
|
|
|
69 <param name="input_singles" type="data" format="fastq" label="FASTQ" help="FASTQ file." />
|
|
|
70 </when>
|
|
|
71 <when value="paired">
|
|
|
72 <param name="input_mate1" type="data" format="fastq" label="First read in pair" help="FASTQ file." />
|
|
|
73 <param name="input_mate2" type="data" format="fastq" label="Second read in pair" help="FASTQ file." />
|
|
|
74 </when>
|
|
|
75 </conditional>
|
|
15
|
76 <param name="readGroup" type="text" value="" label="Read group" help="If desired, you can manually add read group information to the resulting BAM file. To do so, you MUST manually specify the entire string, such as '@RG\tID:foo\tSM:bar'">
|
|
|
77 <sanitizer sanitize="False"/>
|
|
|
78 </param>
|
|
14
|
79 </inputs>
|
|
|
80 <outputs>
|
|
|
81 <data name="output" format="bam" from_work_dir="output.bam" label="${tool.name} on ${on_string}" />
|
|
|
82 </outputs>
|
|
|
83 <tests>
|
|
|
84 <test>
|
|
|
85 <param name="referenceSource" value="history" />
|
|
|
86 <param name="reference" value="ref.fa" />
|
|
|
87 <param name="single_or_paired_opts" value="paired" />
|
|
|
88 <param name="input_mate1" value="t_R1.fastq.gz" />
|
|
|
89 <param name="input_mate2" value="t_R2.fastq.gz" />
|
|
|
90 <output file="output.bam" ftype="bam" name="output" compare="sim_size" delta="10000"/>
|
|
|
91 </test>
|
|
|
92 </tests>
|
|
|
93 <help>
|
|
|
94 <![CDATA[
|
|
|
95
|
|
|
96 **What it does**
|
|
|
97
|
|
|
98 BWA-meth performs alignment of reads in a bisulfite-sequencing experiment (e.g., RRBS or WGBS) to a genome. The methodology employed for this is similar to bismark, where both the reads and the reference genome are *in silico* converted prior to alignment. Methylation extraction on the resulting BAM file can be done with the PileOMeth tool.
|
|
|
99 ]]>
|
|
|
100 </help>
|
|
|
101 </tool>
|