diff picard_BedToIntervalList.xml @ 3:52fdfc45590a draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/picard commit 00a7926c285bc4a339bd7deebf40b28f39c7d947-dirty
author devteam
date Thu, 16 Jul 2015 15:32:31 -0400
parents
children 08f69add4d06
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/picard_BedToIntervalList.xml	Thu Jul 16 15:32:31 2015 -0400
@@ -0,0 +1,115 @@
+<tool name="BedToIntervalList" id="picard_BedToIntervalList" version="@TOOL_VERSION@.0">
+  <description>convert coordinate data into picard interval list format</description>
+  <macros>
+    <import>picard_macros.xml</import>
+  </macros>
+  <expand macro="requirements" />
+  <command>
+    @java_options@
+    
+    #set $picard_dict = "localref.dict"
+    #set $ref_fasta = "localref.fa"     ## This is done because picards "likes" .fa extension
+    
+    ln -s "${reference_source.ref_file}" "${ref_fasta}" &amp;&amp;
+       
+    #if str( $reference_source.reference_source_selector ) == "history":
+        
+      java -jar \$JAVA_JAR_PATH/picard.jar CreateSequenceDictionary REFERENCE="${ref_fasta}" OUTPUT="${picard_dict}"
+      QUIET=true
+      VERBOSITY=ERROR
+      
+      &amp;&amp;
+      
+    #else:
+    
+      #set $ref_fasta = str( $reference_source.ref_file.fields.path ) ## getting path of reference fasta file (must end with .fa)
+      #set $picard_dict=$ref_fasta[:-2]+"dict"                        ## replacing .fa with .dict
+    
+    #end if 
+    
+    java -jar \$JAVA_JAR_PATH/picard.jar
+      BedToIntervalList
+      INPUT="${inputFile}"
+      OUTPUT="${outFile}"
+      
+      SEQUENCE_DICTIONARY="${picard_dict}"
+      QUIET=true
+      VERBOSITY=ERROR
+      
+  </command>
+  
+  <inputs>
+    
+     <conditional name="reference_source">
+      <param name="reference_source_selector" type="select" label="Load picard dictionary file from">
+        <option value="cached">Local cache</option>
+        <option value="history">History</option>
+      </param>
+      <when value="cached">
+        <param name="ref_file" type="select" label="Use dictionary from the list" help="Select genome from the list">
+          <options from_data_table="picard_indexes">
+            <filter type="sort_by" column="2" />
+            <validator type="no_options" message="No indexes are available" />
+          </options>
+          <validator type="no_options" message="A built-in dictionary is not available for the build associated with the selected input file"/>
+        </param>
+      </when>
+      <when value="history"> 
+        <param name="ref_file" type="data" format="fasta" label="Use the following dataset to create dictionary" help="You can upload a FASTA sequence to the history from which Picard will automatically generate dictionary using CreateSequenceDictionary command" />
+      </when>
+    </conditional>
+    
+    <param format="bed" name="inputFile" type="data" label="Select coordinate dataset or dataset collection" help="This can be a bed or interval dataset" />
+
+  </inputs>
+  <outputs>
+    <data name="outFile" format="picard_interval_list" label="${tool.name} on ${on_string}: Picard interval list">
+    </data>
+  </outputs>
+  <tests>
+    <test>
+      <param name="reference_source_selector" value="history" />
+      <param name="ref_file" value="picard_BedToIntervalList_ref.fa" ftype="fasta" />
+      <param name="inputFile" value="picard_BedToIntervalList.bed" ftype="bed"/>
+      <output name="outFile" file="picard_BedToIntervalList_test1.pif" ftype="picard_interval_list" lines_diff="2" />
+    </test>
+  </tests>
+  
+  <stdio>
+    <exit_code range="1:"  level="fatal"/>
+  </stdio>
+  
+  <help>
+
+.. class:: infomark
+
+**Purpose**
+
+Convert coordinate data (such as BED or Galaxy Interval) into Picard Interval Format.
+
+@dataset_collections@
+
+@description@
+
+  SEQUENCE_DICTIONARY=File
+  SD=File                       The sequence dictionary. You can either use dictionary pre-cached
+                                on this instance of Galaxy, or create one on teh fly from a FASTA
+                                file uploaded to history (right pane of the interface).
+
+
+@more_info@
+  </help>
+</tool>
+
+
+
+
+
+
+
+
+
+
+
+
+