changeset 0:b4f96d5456b3

Uploaded initial version
author lparsons
date Wed, 24 Aug 2011 14:33:52 -0400
parents
children 8018e2acf4e5
files bam_to_bigwig/README bam_to_bigwig/bam_to_bigwig.xml
diffstat 2 files changed, 58 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bam_to_bigwig/README	Wed Aug 24 14:33:52 2011 -0400
@@ -0,0 +1,16 @@
+Galaxy tool wrapper to generate BigWig coverage files from BAM files. BigWig
+files can be displaye at UCSC directly from Galaxy. Allows user to split gapped
+reads (particularly useful for RNA-Seq with large splice regions).
+
+Requirements
+------------
+	genomeCoverageBed - part of BedTools (http://code.google.com/p/bedtools/)
+	bedGraphToBigWig  - from UCSC (http://hgdownload.cse.ucsc.edu/admin/exe/)
+
+Installation
+------------
+
+1 - Install genomeCoverageBed and bedGraphToBigWig and make sure they in the PATH 
+2 - Copy bam_to_bigwig.xml to $GALAXY_HOME/tools/bam_to_bigwig
+3 - Add the tool to the $GALAXY_HOME/tool_conf.xml tool-registry file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bam_to_bigwig/bam_to_bigwig.xml	Wed Aug 24 14:33:52 2011 -0400
@@ -0,0 +1,42 @@
+<tool id="bam_to_bigwig" name="BAM to BigWig" version="0.1">
+	<description>Calculates coverage from a BAM alignment file</description>
+	<requirements>
+		<requirement type="binary">genomeCoverageBed</requirement>
+		<requirement type="binary">bedGraphToBigWig</requirement>
+	</requirements>
+	<command>
+		genomeCoverageBed -ibam $align -bg $split -g 
+		`awk '($0 !~ /^#.*/) &amp;&amp; ($2 == "$align.dbkey") {print $3}' ${GALAXY_DATA_INDEX_DIR}/sam_fa_indices.loc`.fai
+		> tmp.bedgraph;
+		bedGraphToBigWig tmp.bedgraph 
+		`awk '($0 !~ /^#.*/) &amp;&amp; ($2 == "$align.dbkey") {print $3}' ${GALAXY_DATA_INDEX_DIR}/sam_fa_indices.loc`.fai
+	       	$out;
+	</command>
+	<inputs>
+		<param name="align" type="data" format="bam" label="Select the BAM file to generate the pileup file for">
+			<validator type="unspecified_build" />
+			<validator type="dataset_metadata_in_file" filename="sam_fa_indices.loc" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." line_startswith="index" />
+		</param>
+		<param name="split" type="boolean" value="false" label="Separate split reads" help="Do not use gaps when computing coverage. This is recommended for RNA-Seq where reads are mapped across long splice junctions. Uses the CIGAR &quot;N&quot; and &quot;D&quot; operations to infer the blocks for computing coverage." truevalue="-split" falsevalue="" /> 
+	</inputs>
+	<outputs>
+		<data format="bigwig" name="out" />
+	</outputs>
+
+	<help>
+		**What it does**
+
+		Creates a coverage file in BigWig format, given a BAM alignment file. 
+
+		**Input**
+
+		A BAM alignment file. This needs to have the genome database build used in alignment annotated. If your file has '?' for the database build, click on the pencil icon to edit the alignment attributes, and specify the organism used to align against.
+
+		The BAM file must also be sorted. If you generated the BAM file in Galaxy, this will be true, however, if you uploaded the file, you must make sure it was sorted.
+
+		**Output**
+
+		BigWig files can be loaded directly from Galaxy into the UCSC browser. They can be loaded incrementally by UCSC, so a single file can be used to represent the entire genome without having to upload the entire thing as a custom track.
+	</help>
+
+</tool>