# Convert SAMTOOLS pileup to wiggle file of read coverage per base # Copyright (c) 2011, Lance Parsons # All rights reserved. # # This script is licensed by the Simplified BSD License # See LICENSE.TXT and BEGIN { chrom = ""; } { if ($1 != chrom) { chrom = $1; printf ("track type=wiggle_0 name=%s description=%s ", name, desc); printf ("visibility=2 graphType=bar\n"); printf ("variableStep chrom=%s span=1\n", chrom); } if ($8 > 0) print $2, $8 }