# HG changeset patch
# User g2cmnty@test-web1.g2.bx.psu.edu
# Date 1308338725 14400
# Node ID bc71417f212cf73dd0a38d7eea1c072c28160604
Uploaded
diff -r 000000000000 -r bc71417f212c bam_to_bigwig/README.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bam_to_bigwig/README.txt Fri Jun 17 15:25:25 2011 -0400
@@ -0,0 +1,18 @@
+Convert a BAM file into a BigWig coverage file. This can be used directly from
+Galaxy for display at UCSC. The advantage over standard Wiggle format is that
+the data is stored in a compressed format and can be retrieved by genome
+region. This allows you to view regions of arbitrarily large Wiggle file data
+at UCSC while avoiding the upload costs.
+
+The latest version of the bam_to_wiggle.py script is available at:
+
+https://github.com/chapmanb/bcbb/blob/master/nextgen/scripts/bam_to_wiggle.py
+
+Place the script in the same directory as the XML configuration file, or
+provide a soft link to it.
+
+This requires:
+
+Python2, version 2.6 or better
+pysam (http://code.google.com/p/pysam/)
+wigToBigWig from UCSC (http://hgdownload.cse.ucsc.edu/admin/exe/)
diff -r 000000000000 -r bc71417f212c bam_to_bigwig/bam_to_bigwig.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bam_to_bigwig/bam_to_bigwig.xml Fri Jun 17 15:25:25 2011 -0400
@@ -0,0 +1,25 @@
+
+ Calculates coverage from a BAM alignment file
+ bam_to_wiggle.py $align --outfile=$out
+
+
+
+
+
+
+
+
+**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.
+
+**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.
+
+
+
diff -r 000000000000 -r bc71417f212c bam_to_bigwig/bam_to_wiggle.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bam_to_bigwig/bam_to_wiggle.py Fri Jun 17 15:25:25 2011 -0400
@@ -0,0 +1,123 @@
+#!/usr/bin/env python
+"""Convert BAM files to BigWig file format in a specified region.
+
+Usage:
+ bam_to_wiggle.py []
+ [--outfile=