diff preProcess.xml @ 50:7b5a48b972e9 draft

Uploaded
author big-tiandm
date Fri, 05 Dec 2014 00:11:02 -0500
parents c75593f79aa9
children 8b8c356e6db5
line wrap: on
line diff
--- a/preProcess.xml	Wed Dec 03 02:03:27 2014 -0500
+++ b/preProcess.xml	Fri Dec 05 00:11:02 2014 -0500
@@ -12,7 +12,7 @@
 
   <!--command interpreter="perl">miPlant.pl -i $input -format $format -gfa $gfa -idx $index -pre $pre -mat $mat -rfam $rfam -idx2 $idx2 -D $D -a $a -M $M -min $min -max $max -mis $mis -e $e -f $f -v $v -r $r -dis $dis -flank $flank -mfe $mfe -t $t -o $output</command-->
 
-  <command interpreter="perl">miRPlant.pl 
+  <command interpreter="perl">preProcess.pl 
    ## Change this to accommodate the number of threads you have available.
         -t \${GALAXY_SLOTS:-4}
 	-path \$SCRIPT_PATH
@@ -25,7 +25,16 @@
 
    ## Do or not annotate rfam non-miRNA RNAs
     #if $params.annotate_rfam == "yes":
-	-rfam $rfam 
+		  ## prepare Rfam bowtie index
+		  #set rfam_index_path = ''
+		  #if str($params.annotate_rfam.reference_rfam.source) == "history":
+			  bowtie-build "$params.annotate_rfam.reference_rfam.own_file" rfam; ln -s "$params.annotate_rfam.reference_rfam.own_file" rfam.fa;
+			  #set rfam_index_path = 'rfam'
+		  #else:
+			  #set rfam_index_path = $params.annotate_rfam.reference_rfam.index.fields.path
+		  #end if
+
+		-rfam ${rfam_index_path}.fa -idx2 $rfam_index_path -v $v 
 	#end if
 
         ## prepare bowtie index
@@ -37,7 +46,7 @@
             #set index_path = $reference_genome.index.fields.path
 		#end if
 
-    -format $format -gfa ${index_path}.fa -idx $index_path -a $a -M $mapnt -min $min -max $max -mis $mismatch -v $v > run.log
+    -format $format -gfa ${index_path}.fa -idx $index_path -phred $phred -a $a -M $mapnt -min $min -max $max -mis $mismatch  > run.log
   </command>
 
   <inputs>
@@ -75,6 +84,10 @@
 
 	<!--param name="gfa"  type="data" label="genome sequence fasta file"/-->
 	<!--param type="data" name="index" label="genome sequence bowtie index"/-->
+	<param name="phred" type="select" lable="input quals are Phred+64 or Phred+33" multiple="false">
+	  <option value="64">Phred+64</option>
+	  <option value="33" selected="true">Phred+33</option>
+	</param>
 	<param name="a" type="text" value="ATCTCGTATG" label="3' adapter sequence" />
 	<param name="mapnt" type="integer" value="8" label="minimum adapter map nts" />
 	<param name="min" type="integer" value="19" label="minimum microRNA length" />
@@ -87,8 +100,27 @@
 		  <option value="no">no</option>
 		 </param>
 		 <when value="yes">
-			<param name="rfam" type="data" label="rfam sequence file" />
-			<!--param type="data" name="idx2" label="rfam sequence bowtie index " -->
+			<!--param name="rfam" type="data" label="rfam sequence file" /-->
+		 <when value="yes">
+			<!--param name="rfam" type="data" label="rfam sequence file" /-->
+			<conditional name="reference_rfam">
+			  <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">
+				<option value="indexed">Use a built-in index</option>
+				<option value="history">Use one from the history</option>
+			  </param>
+			  <when value="indexed">
+				<param name="index" type="select" label="Select a reference" help="If your reference of interest is not listed, contact the Galaxy team">
+				  <options from_data_table="rfam_bowtie_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 the reference" />
+			  </when>
+			</conditional>
+
 			<param name="v" type="integer" value="0" label="report end-to-end hits less than v mismatches for rfam mapping"/>
 		 </when>
     </conditional> <!-- params -->
@@ -112,6 +144,8 @@
    <data format="txt" name="Rfam not mapped FASTA file" from_work_dir="preProcess/rfam_match/rfam_not_mapped.fa" label="${tool.name} on ${on_string}: Rfam not mapped FASTA file">
    <filter>(params['annotate_rfam'] == 'Yes')</filter>
    </data>
+   <data format="html" name="input config" from_work_dir="preProcess/input_config" label="${tool.name} on ${on_string}: input config"/>
+
   </outputs>
 
  <help>