changeset 0:94d7100ad5d0 draft default tip

Uploaded
author jasper
date Sat, 22 Apr 2017 23:47:18 -0400
parents
children
files PathoMap.xml tool-data/pathoscope.loc.sample tool_data_table_conf.xml.sample
diffstat 3 files changed, 117 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PathoMap.xml	Sat Apr 22 23:47:18 2017 -0400
@@ -0,0 +1,77 @@
+<tool id="pathoscope_map" name="Pathoscope Map" version="0.1.0">
+  <description> Pathoscope Map </description>
+  <requirements>
+    <requirement type="package" version="2.0.6"> pathoscope </requirement>
+  </requirements>
+  <command> <![CDATA[
+    #from os import listdir
+    #set path=$targetIndexPrefixes.fields.path.split(',')[0]
+    #set prefixes=[f for f in listdir(path) if f.endswith(".3.bt2")]
+    #set targetRefs=str($targetIndexPrefixes)
+    #set targetR=targetRefs.split(',')
+    #set p=[]
+    #for $f in prefixes
+      #for $t in targetR
+        #if $t in f
+          #set p = p + [f[:-6]]
+        #end if
+      #end for
+    #end for
+    #set target=','.join(p)
+    pathoscope MAP
+    #if str($reads.type) == "single"
+      -U $fastqU
+    #elif str($reads.type) == "paired"
+      -1 $fastq1
+      -2 $fastq2
+    #end if
+    -indexDir $path
+    -targetIndexPrefixes $target
+    -filterIndexPrefixes $filterIndexPrefixes 2>&1
+    && mv outalign.sam "$outalign"
+    && mv pathomap-appendAlign.fq "$pathomap_appendAlign"
+    ]]>
+  </command>
+  <inputs>
+    <conditional name="reads">
+      <param name="type" type="select" label="Is this single or paired reads" help="">
+        <option value="single">Single-end</option>
+        <option value="paired">Paired-end</option>
+      </param>
+      <when value="single">
+        <param name="fastqU" format="fastqsanger" type="data" label="FASTQ file" help="Input Read Fastq File (Unpaired/Single-end)" />
+      </when>
+      <when value="paired">
+        <param name="fastq1" format="fastqsanger" type="data" label="FASTQ file" help="Input Read Fastq File (Unpaired/Single-end)" />
+        <param name="fastq2" format="fastqsanger" type="data" label="FASTQ file" help="Input Read Fastq File (Unpaired/Single-end)" />
+      </when>
+    </conditional>
+    <param name="targetIndexPrefixes" multiple="true" type="select" label="targetIndexPrefixes" help="Target Index Prefixes">
+        <options from_data_table="pathoscope_indexes">
+          <filter type="sort_by" column="2"/>
+          <validator type="no_options" message="No indexes are available for the selected input dataset"/>
+        </options>
+    </param>
+    <param name="filterIndexPrefixes" multiple="true" type="select" label="filterIndexPrefixes" help="Filter Index Prefixes">
+      <options from_data_table="pathoscope_indexes">
+        <filter type="sort_by" column="2"/>
+        <validator type="no_options" message="No indexes are available for the selected input dataset"/>
+      </options>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="sam" name="outalign" label="outalign.sam" />
+    <data format="fastqsanger" name="pathomap_appendAlign" label="pathomap_appendAlign.fastq" />
+  </outputs>
+
+  <help>
+  IMPORTANT: The name and the path of the reference database (with bowtie indexed)
+  should be added to the pathoscope.loc entry.
+  </help>
+  <citations>
+    <citation type="doi">10.1101/gr.150151.112</citation>
+    <citation type="doi">10.1186/2049-2618-2-33</citation>
+    <citation type="doi">10.1186/1471-2105-15-262</citation>
+    <citation type="doi">10.4137/CIN.S13890</citation>
+  </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/pathoscope.loc.sample	Sat Apr 22 23:47:18 2017 -0400
@@ -0,0 +1,34 @@
+# pathoscope.loc.sample
+# This is a *.loc.sample file distributed with Galaxy that enables tools
+# to use a directory of indexed data files. This one is for Pathoscope_Map.
+# See the wiki: http://wiki.galaxyproject.org/Admin/NGS%20Local%20Setup
+# First create these data files and save them in your own data directory structure.
+# Then, create a bowtie_indices.loc file to use those indexes with tools.
+#
+# The path points to the "basename" for the set, not a specific file.
+# It has four text columns seperated by TABS.
+# <unique_build_id>	<display_name>	<file_base_path>
+#
+# So, for example, if you had hg18 indexes stored in:
+#
+#    /depot/data2/galaxy/hg19/bowtie2/
+#
+# containing hg19 genome and hg19.*.bt2 files, such as:
+#    -rw-rw-r-- 1 james   james   914M Feb 10 18:56 hg19canon.fa
+#    -rw-rw-r-- 1 james   james   914M Feb 10 18:56 hg19canon.1.bt2
+#    -rw-rw-r-- 1 james   james   683M Feb 10 18:56 hg19canon.2.bt2
+#    -rw-rw-r-- 1 james   james   3.3K Feb 10 16:54 hg19canon.3.bt2
+#    -rw-rw-r-- 1 james   james   683M Feb 10 16:54 hg19canon.4.bt2
+#    -rw-rw-r-- 1 james   james   914M Feb 10 20:45 hg19canon.rev.1.bt2
+#    -rw-rw-r-- 1 james   james   683M Feb 10 20:45 hg19canon.rev.2.bt2
+#
+# then the bowtie2_indices.loc entry could look like this:
+#
+#hg19	hg19	Human (hg19)	/depot/data2/galaxy/hg19/bowtie2/hg19canon
+#
+#Important: put all reference bowtie index into same directory (including both
+#target and filter reference botwie index)
+#
+#More examples:
+#ref_prok_rep_genomes	prok	/depot/data/ref
+#ce11	ce	/depot/data/ref
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Sat Apr 22 23:47:18 2017 -0400
@@ -0,0 +1,6 @@
+<tables>
+  <table comment_char="#" name="pathoscope_indexes">
+        <columns>value, name, path</columns>
+        <file path="tool-data/pathoscope.loc" />
+  </table>
+</tables>