changeset 13:1a837f49fdc9

cleanup
author Eduardo <eduardoalves@abdn.ac.uk>
date Mon, 03 Aug 2015 11:31:51 +0100
parents 65f85eae1776
children d4d02c4b2756
files download_align.xml
diffstat 1 files changed, 53 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/download_align.xml	Mon Aug 03 11:31:51 2015 +0100
@@ -0,0 +1,53 @@
+<tool id="download_align" name="Download and align" version="0.0.1">
+  <description> Downloads fastq.gz, unzips, trims with cutadapt and alignes to reference</description>
+  <requirements>
+      <requirement type="package" version="1.6">cutadapt</requirement>
+      <requirement type="package" version="2.2.4">bowtie2</requirement>
+      <requirement type="package" version="0.1.19">samtools</requirement>
+  </requirements>
+  <command>
+  #set index_path = ''
+  #if str($reference_genome.source) == "history":
+    echo \${PATH} &amp;&amp; bowtie2-build "$reference_genome.own_file" genome &amp;&amp;
+    ln -s "$reference_genome.own_file" genome.fa &amp;&amp;
+    #set index_path = 'genome'
+  #else:
+    #set index_path = $reference_genome.index.fields.path
+  #end if
+  wget -O - $file | gunzip -c | cutadapt   -q 20 - | bowtie2  -q 
+  ## index file path
+  -x $index_path 
+  -U - | samtools view -b - > $output
+  </command>
+  <stdio>
+    <exit_code range="1:" level="fatal" description="Tool exception" />
+  </stdio>
+  <inputs>
+    <param format="text" name="file" type="text" label="URL for fastq.gz"/>
+    <conditional name="reference_genome">
+          <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">
+            <option value="indexed">Use a built-in genome index</option>
+            <option value="history">Use a genome from the history and build index</option>
+          </param>
+          <when value="indexed">
+            <param name="index" type="select" label="Select reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
+              <options from_data_table="bowtie2_indexes">
+                <filter type="sort_by" column="2"/>
+                <validator type="no_options" message="No indexes are available for the selected input dataset"/>
+              </options>
+            </param>
+          </when>
+          <when value="history">
+            <param name="own_file" type="data" format="fasta" metadata_name="dbkey" label="Select reference genome" />
+          </when>
+    </conditional>
+  </inputs> 
+  <outputs> 
+      <data format="bam" name="output" label="${tool.name} on ${on_string}: aligned reads (sorted BAM)" />
+  </outputs>
+  <help>
+    This tool extracts reads from sra, runs cutdapt and bowtie and outputs a bam file. 
+
+    Contact Eduardo Alves at eduardoalves@abdn.ac.uk for support and bug reports.
+  </help>
+</tool>