diff correctGCBias.xml @ 30:5231f398d784 draft

planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit 3bc1d1c6f4e28ac7ff8df79fe4e3f00a195938e6-dirty
author bgruening
date Tue, 20 Oct 2015 14:43:12 -0400
parents 3a2aab18a217
children
line wrap: on
line diff
--- a/correctGCBias.xml	Tue Sep 16 13:46:05 2014 -0400
+++ b/correctGCBias.xml	Tue Oct 20 14:43:12 2015 -0400
@@ -1,92 +1,60 @@
 <tool id="deeptools_correctGCBias" name="correctGCBias" version="@WRAPPER_VERSION@.0">
     <description>uses the output from computeGCBias to generate corrected BAM files</description>
-    <expand macro="requirements" />
-    <expand macro="stdio" />
     <macros>
         <token name="@BINARY@">correctGCBias</token>
         <import>deepTools_macros.xml</import>
     </macros>
+    <expand macro="requirements" />
     <command>
-        #import tempfile
-        #set $temp_dir = os.path.abspath(tempfile.mkdtemp())
-
-        #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
-        #set $temp_bam_path = $temp_bam_handle.name + '.bam'
-        #silent $temp_bam_handle.close()
-        #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path))
-        #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path))
-
+<![CDATA[
+        ln -s $bamInput local_bamInput.bam;
+        ln -s $bamInput.metadata.bam_index local_bamInput.bam.bai;
 
         correctGCBias
-
-        @THREADS@
-
-        --bamfile '$temp_bam_path'
-        --GCbiasFrequenciesFile $GCbiasFrequenciesFile
+            @THREADS@
+            --bamfile local_bamInput.bam
+            --GCbiasFrequenciesFile $GCbiasFrequenciesFile
 
-        @reference_genome_source@
-
-
-        #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
-            --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
-        #else:
-            --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
-        #end if
+            @reference_genome_source@
 
-        #if str($region).strip() != '':
-            --region '$region'
-        #end if
+            #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
+                --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
+            #else:
+                --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
+            #end if
 
-        #if $advancedOpt.showAdvancedOpt == "yes":
-            --binSize '$advancedOpt.binSize'  
-        #end if
+            #if str($region).strip() != '':
+                --region '$region'
+            #end if
+            --correctedFile corrected.bam;
 
-        ###set newoutFileName="corrected."+str($outFileFormat)
-        ##--correctedFile $newoutFileName;
-        --correctedFile "corrected.bam";
-
-        ##mv $newoutFileName $outFileName
-        mv "corrected.bam" $outFileName
+        mv corrected.bam $outFileName;
+]]>
     </command>
     <inputs>
         <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" />
-        <param name="bamInput" format="bam" type="data" label="BAM file" help="This should be same file that was used for computeGCbias. The BAM file must be sorted."/>
+        <param name="bamInput" format="bam" type="data"
+            label="BAM file" help="This should be same file that was used for computeGCbias. The BAM file must be sorted. (--bamfile)" />
         <expand macro="reference_genome_source" />
         <expand macro="effectiveGenomeSize" />
-
-        <!--
-        <param name="outFileFormat" type="select" label="File format of the output">
-            <option value="bam">bam</option>
-            <option value="bw">bigwig</option>
-            <option value="bg">bedgraph</option>
-        </param>
-        -->
         <expand macro="region_limit_operation" />
-
-        <conditional name="advancedOpt">
-            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
-                <option value="no" selected="true">no</option>
-                <option value="yes">yes</option>
-            </param>
-            <when value="no" />
-            <when value="yes">
-                <param name="binSize" type="integer" value="50" min="1" 
-                    label="Bin size in bp"
-                    help="Size of the bins in bp for the output of the bigwig/bedgraph file."/>
-            </when>
-        </conditional>
     </inputs>
     <outputs>
-        <data format="bam" name="outFileName">
-            <!--<change_format>
-                <when input="outFileFormat" value="bw" format="bigwig" />
-                <when input="outFileFormat" value="bam" format="bam" />
-                <when input="outFileFormat" value="bg" format="bedgraph" />
-            </change_format>-->
-        </data>
+        <data format="bam" name="outFileName" />
     </outputs>
+    <tests>
+        <test>
+            <param name="GCbiasFrequenciesFile" value="computeGCBias_result1.tabular" ftype="tabular" />
+            <param name="bamInput" value="paired_chr2L.bam" ftype="bam" />
+            <param name="ref_source" value="history" />
+            <param name="input1" value="sequence.2bit" />
+            <param name="effectiveGenomeSize_opt" value="specific" />
+            <param name="effectiveGenomeSize" value="23011544" />
+            <output name="outFileName" file="correctGCBias_result1.bam" ftype="bam" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 This tool requires the output from computeGCBias to correct a given BAM file according to the method proposed by
@@ -103,7 +71,7 @@
 -----
 
 @REFERENCES@
-
+]]>
     </help>
     <expand macro="citations" />
 </tool>