diff PSM2SAM.xml @ 3:ce09f1a1bbad draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/psm_to_sam commit 141369f97aa2804d2bbfd9ed620ea2a5574994c2-dirty
author galaxyp
date Thu, 28 Jan 2016 18:40:54 -0500
parents e1bb35f6ca28
children cd69250e1150
line wrap: on
line diff
--- a/PSM2SAM.xml	Thu Jan 14 18:13:18 2016 -0500
+++ b/PSM2SAM.xml	Thu Jan 28 18:40:54 2016 -0500
@@ -4,26 +4,21 @@
     <exit_code range="1:" level="fatal" description="Job Failed" />
   </stdio>
   <command interpreter="Rscript --vanilla">PSM2SAM.R
-       #if str($input).strip() != "":
-          --passedPSM="$input"
-       #end if
-       #if str($scoreColumn).strip() != "":
-          --XScolumn="$scoreColumn"
-       #end if
-       #if str($optionalUserInput.exonAnno).strip() != "None":
-          --exon_anno="$optionalUserInput.exonAnno"
-       #end if
-       #if str($optionalUserInput.proteinSeq).strip() != "None":
-          --proteinseq="$optionalUserInput.proteinSeq"
-       #end if
-       #if str($optionalUserInput.proCodingSeq).strip() != "None":
-          --procodingseq="$optionalUserInput.proCodingSeq"
-       #end if
-       #if str($optionalUserInput.header).strip() != "None":
-          --header="$optionalUserInput.header"
-       #end if
-       #if str($output).strip() != "":
-          --OutputFile="$output"
+
+       --passedPSM="$input"
+       --XScolumn="$scoreColumn"
+       --header="$samHeaders"
+       --OutputFile="$output"
+
+       #if str($genome_annotation.source) == "history":
+            --exon_anno="$genome_annotation.exonAnno"
+            --proteinseq="$genome_annotation.proteinSeq"
+            --procodingseq="$genome_annotation.proCodingSeq"
+       #else:
+            #set index_path = $genome_annotation.builtin.fields.path
+            --exon_anno="$index_path/exon_anno.RData"
+            --proteinseq="$index_path/proseq.RData"
+            --procodingseq="$index_path/procodingseq.RData"
        #end if
 
 2&gt;&amp;1</command>
@@ -34,33 +29,55 @@
     <param name="scoreColumn" type="text" help="The name of a PSM score to include in the SAM output (e.g. &quot;MyriMatch:mvh&quot;)" size="60" label="Score Name">
       <validator type="empty_field" message="This field is required."/>
     </param>
-    <conditional name="optionalUserInput">
-      <param name="optionalUserInputCondition" type="boolean" label="Override Default Exon Annotation and Coding Sequences" />
-      <when value="true">
-        <param name="exonAnno" type="data" format="RData" help="A dataframe of exon annotations in an RData file" label="Exon Annotations" optional="true" />
-        <param name="proteinSeq" type="data" format="RData" help="A dataframe containing protein ids and protein sequences in an RData file" label="Protein Sequences" optional="true" />
-        <param name="proCodingSeq" type="data" format="RData" help="A dataframe cotaining coding sequences for each protein in an RData file" label="Protein Coding Sequences" optional="true" />
-        <param name="header" type="data" format="txt" help="A text file of SAM headers to include in the output file, usually corresponding to the exon and coding sequences used." label="SAM Headers" optional="true" />
+    
+    <conditional name="genome_annotation">
+      <param name="source" type="select" label="Will you select a genome annotation from your history or use a built-in annotation?" help="See `Annotations` section of help below">
+        <option value="builtin">Use a built-in genome annotation</option>
+        <option value="history">Use annotation from your history</option>
+      </param>
+      <when value="builtin">
+        <param name="builtin" type="select" label="Select genome annotation" help="If your genome of interest is not listed, contact the Galaxy team">
+          <options from_data_table="customProDB">
+            <filter type="sort_by" column="2"/>
+            <validator type="no_options" message="No annotations are available for the selected input dataset"/>
+          </options>
+        </param>
       </when>
-      <when value="false">
+      <when value="history">
+        <param name="exonAnno" type="data" format="RData" metadata_name="dbkey" help="A dataframe of exon annotations in an RData file" label="Exon Annotations" />
+        <param name="proteinSeq" type="data" format="RData" metadata_name="dbkey" help="A dataframe containing protein ids and protein sequences in an RData file" label="Protein Sequences" />
+        <param name="proCodingSeq" type="data" format="RData" metadata_name="dbkey" help="A dataframe cotaining coding sequences for each protein in an RData file" label="Protein Coding Sequences" />
       </when>
     </conditional>
+    <param name="samHeaders" type="data" format="txt" help="A text file of SAM headers extracted from the original SAM/BAM file or reference genome" label="SAM/BAM Headers">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
   </inputs>
   <outputs>
     <data format="sam" name="output" label="${input.name.rsplit('.',1)[0]}.sam"/>
   </outputs>
-  <!--<tests>
+  <tests>
     <test>
-      <param name="input" value="dbo_z_20101126_JK_Res_Sens_Set2_H1819_A_07-subset.idpDB.gz" />
+      <param name="input" value="dbo_z_20101126_JK_Res_Sens_Set2_H1819_A_07-subset.idpDB" />
       <param name="scoreColumn" value="Myrimatch:MVH" />
+      <param name="source" value="history" />
+      <param name="exonAnno" value="exon_anno.RData" />
+      <param name="proteinSeq" value="proseq.RData" />
+      <param name="proCodingSeq" value="procodingseq.RData" />
+      <param name="samHeaders" value="header_refseq_hg19.txt" />
       <output name="output" file="dbo_z_20101126_JK_Res_Sens_Set2_H1819_A_07-subset.sam" />
     </test>
     <test>
-      <param name="input" value="Ellis_033_2700_261_07-unrefined-subset.idpDB.gz" />
+      <param name="input" value="Ellis_033_2700_261_07-unrefined-subset.idpDB" />
       <param name="scoreColumn" value="Myrimatch:MVH" />
+      <param name="source" value="history" />
+      <param name="exonAnno" value="exon_anno.RData" />
+      <param name="proteinSeq" value="proseq.RData" />
+      <param name="proCodingSeq" value="procodingseq.RData" />
+      <param name="samHeaders" value="header_refseq_hg19.txt" />
       <output name="output" file="Ellis_033_2700_261_07-unrefined-subset.sam" />
     </test>
-  </tests>-->
+  </tests>
   <help>
 **Description**