diff gmap/gmap_build.xml @ 2:52da588232b0

Add datatypes for maps and snpindex, add iit_store and snpindex tools, update GMAP and GSNAP to use these.
author Jim Johnson <jj@umn.edu>
date Fri, 21 Oct 2011 11:38:55 -0500
parents d58d272914e7
children
line wrap: on
line diff
--- a/gmap/gmap_build.xml	Tue Oct 18 11:51:15 2011 -0500
+++ b/gmap/gmap_build.xml	Fri Oct 21 11:38:55 2011 -0500
@@ -1,16 +1,23 @@
 <tool id="gmap_build" name="GMAP Build" version="2.0.0">
-  <description>a GMAP DB Index</description>
+  <description>a database genome index for GMAP and GSNAP</description>
   <requirements>
       <requirement type="binary">gmap_build</requirement>
+      <!-- proposed tag for added datatype dependencies -->
+      <requirement type="datatype">gmapdb</requirement>
+      <requirement type="datatype">gmap_snps</requirement>
   </requirements>
   <version_string>gmap --version</version_string>
   <command interpreter="command"> /bin/bash $shscript 2>1 1> $output </command>
   <inputs>
-    <!-- Input data -->
-    <param name="input" type="data" format="fasta" label="reference sequence fasta" />
-    <param name="refname" type="text" label="reference name" help="">
+    <!-- Name for this gmapdb -->
+    <param name="refname" type="text" label="Name you want to give this gmap database" help="">
       <validator type="empty_field" message="A database name is required."/>
     </param>
+    <!-- Input data -->
+    <repeat name="inputs" title="Reference Sequence" min="1">
+      <param name="input" type="data" format="fasta" label="reference sequence fasta" />
+    </repeat>
+
     <param name="kmer" type="select" multiple="true" force_select="true" label="kmer size" help="">
       <option value="12">12</option>
       <option value="13">13</option>
@@ -79,7 +86,6 @@
     <!--
     <data format="txt" name="log" label="${tool.name} on ${on_string}: log"/>
     -->
-    <!-- this should have its own datatype: gmapdb -->
     <data format="gmapdb" name="output" label="${tool.name} on ${on_string} gmapdb ${refname}" />
   </outputs>
   <configfiles>
@@ -89,6 +95,11 @@
 #set $gt = chr(62)
 #set $lt = chr(60)
 #set $ad = chr(38)
+## #set $ref_files = ''
+## #for $i in $inputs:
+  ## #set $ref_files = $ref_files $i.input
+## #end for
+## echo $ref_files
 #import os.path
 #set $gmapdb = $output.extra_files_path
 #set $mapsdir = $os.path.join($os.path.join($gmapdb,str($refname)), str($refname) + '.maps')
@@ -96,7 +107,7 @@
 ## export GMAPDB required for cmetindex  and atoiindex
 export GMAPDB=$gmapdb
 #for $k in $kmer.__str__.split(','):
-gmap_build -D $gmapdb -d $refname -s numeric-alpha -k $k $input
+gmap_build -D $gmapdb -d $refname -s numeric-alpha -k $k #for i in $inputs# ${i.input}#end for#
 #end for
 get-genome -D $gmapdb -d '?' | sed 's/^Available .*/gmap db: /' 
 echo "kmers: " $kmer 
@@ -116,23 +127,26 @@
 cat $splicesite.gff3Genes | gff3_introns | iit_store -o  $os.path.join($mapsdir,'introns')
 #end if
 #end if
+#if $dbsnp.snp_source != 'none' and $dbsnp.snps.__str__ != 'None':
 #if $dbsnp.snp_source == 'snpTable':
-#if $dbsnp.snps.__str__ != 'None':
 #if $dbsnp.snpsex.__str__ != 'None':
 cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight -e $dbsnp.snpsex | iit_store -o  $os.path.join($mapsdir,'snps')
 #else:
 cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight | iit_store -o  $os.path.join($mapsdir,'snps')
 #end if
+#else:
+cat $dbsnp.snps | iit_store -o  $os.path.join($mapsdir,'snps')
+#end if
 snpindex -d $refname -v snps
-#end if
+echo "snpindex" -d  $refname -v snps
 #end if
 #if $cmetindex.__str__ == 'yes':
 cmetindex -d $refname
-echo "cmetindex" 
+echo "cmetindex" -d $refname
 #end if
 #if $atoiindex.__str__ == 'yes':
 atoiindex -d $refname
-echo "atoiindex" 
+echo "atoiindex" -d $refname
 #end if
 get-genome -D $gmapdb -d $refname -m '?' | sed 's/^Available maps .*/maps: /' 
     </configfile>
@@ -146,7 +160,7 @@
 
 **GMAP Build**
 
-GMAP Build creates an index of a genomic sequence for alignments using GMAP_ (Genomic Mapping and Alignment Program for mRNA and EST sequences) and GSNAP_ (Genomic Short-read Nucleotide Alignment Program).  
+GMAP Build creates an index of a genomic sequence for mapping and alignment using GMAP_ (Genomic Mapping and Alignment Program for mRNA and EST sequences) and GSNAP_ (Genomic Short-read Nucleotide Alignment Program).  (GMAP Build uses GMSP commands: gmap_build, iit_store, psl_splicesites, psl_introns, gtf_splicesites, gtf_introns, gff3_splicesites, gff3_introns, dbsnp_iit, snpindex, cmetindex, and atoiindex.)
 
 You will want to read the README_