0
|
1 <tool id="download_align" name="Download and align" version="0.0.1">
|
|
2 <description> Downloads fastq.gz, unzips, trims with cutadapt and alignes to reference</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="1.6">cutadapt</requirement>
|
|
5 <requirement type="package" version="2.2.4">bowtie2</requirement>
|
|
6 <requirement type="package" version="0.1.19">samtools</requirement>
|
|
7 </requirements>
|
|
8 <command>
|
|
9 #set index_path = ''
|
|
10 #if str($reference_genome.source) == "history":
|
|
11 echo \${PATH} && bowtie2-build "$reference_genome.own_file" genome &&
|
|
12 ln -s "$reference_genome.own_file" genome.fa &&
|
|
13 #set index_path = 'genome'
|
|
14 #else:
|
|
15 #set index_path = $reference_genome.index.fields.path
|
|
16 #end if
|
|
17 wget -O - $file | gunzip -c | cutadapt -q 20 - | bowtie2 -q
|
|
18 ## index file path
|
|
19 -x $index_path
|
|
20 -U - | samtools view -b - > $output
|
|
21 </command>
|
|
22 <stdio>
|
|
23 <exit_code range="1:" level="fatal" description="Tool exception" />
|
|
24 </stdio>
|
|
25 <inputs>
|
|
26 <param format="text" name="file" type="text" label="URL for fastq.gz"/>
|
|
27 <conditional name="reference_genome">
|
|
28 <param name="source" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below">
|
|
29 <option value="indexed">Use a built-in genome index</option>
|
|
30 <option value="history">Use a genome from the history and build index</option>
|
|
31 </param>
|
|
32 <when value="indexed">
|
|
33 <param name="index" type="select" label="Select reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
|
|
34 <options from_data_table="bowtie2_indexes">
|
|
35 <filter type="sort_by" column="2"/>
|
|
36 <validator type="no_options" message="No indexes are available for the selected input dataset"/>
|
|
37 </options>
|
|
38 </param>
|
|
39 </when>
|
|
40 <when value="history">
|
|
41 <param name="own_file" type="data" format="fasta" metadata_name="dbkey" label="Select reference genome" />
|
|
42 </when>
|
|
43 </conditional>
|
|
44 </inputs>
|
|
45 <outputs>
|
|
46 <data format="bam" name="output" label="${tool.name} on ${on_string}: aligned reads (sorted BAM)" />
|
|
47 </outputs>
|
|
48 <help>
|
|
49 This tool extracts reads from sra, runs cutdapt and bowtie and outputs a bam file.
|
|
50
|
|
51 Contact Eduardo Alves at eduardoalves@abdn.ac.uk for support and bug reports.
|
|
52 </help>
|
|
53 </tool>
|