diff bam_to_bigwig.xml @ 0:61f39c77b13d draft

planemo upload commit 250051c3d660df43da92c76913552767ce142a45
author yating-l
date Wed, 12 Apr 2017 17:52:09 -0400
parents
children 2e812b4f91ce
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bam_to_bigwig.xml	Wed Apr 12 17:52:09 2017 -0400
@@ -0,0 +1,30 @@
+<tool id="bam_to_bigwig" name="Convert Bam to BigWig" version="0.1.0">
+    <requirements>
+        <requirement type="package" version="1.0">ucsc_tools_340</requirement>
+        <requirement type="package" version="2.24">bedtools</requirement>
+    </requirements>
+    <stdio>
+        <exit_code range="1:" />
+    </stdio>
+    <command><![CDATA[
+        faToTwoBit $input_reference_fasta two_bit.2bit;
+        twoBitInfo two_bit.2bit stdout | sort -k2nr > chrom.sizes;
+        bedtools genomecov -bg -split -ibam $input_bam -g chrom.sizes > temp.bg;
+        bedGraphToBigWig temp.bg chrom.sizes $output_bigwig;
+    ]]></command>
+    <inputs>
+        <param format="bam" name="input_bam" type="data" label="Choose BAM file" />
+        <param format="fasta" name="input_reference_fasta"
+               type="data" label="Choose Reference Genome (Fasta)" />
+    </inputs>
+    <outputs>
+        <data format="bigwig" name="output_bigwig" />
+    </outputs>
+    <help>
+        This tool converts a Bam file to a BigWig file.
+
+        It needs:
+            - A Bam file
+            - The reference genome as a Fasta file
+    </help>
+</tool>
\ No newline at end of file