#!/bin/bash
echo "[" > $2
for f in `ls *$1 | sort -t '_' -k2 -k3 | grep -v counts`; do name=`echo $f | cut -d '.' -f 1`; printf "{\n\ttype:\"bigwig\",\n\turl:\"http://wilsonlab.org/public/cut_and_run/$f\",\n\tname:\"$name\",\n\tmode:\"show\",\n\tcolorpositive:\"#ff33cc\",\n\theight:50,\n},\n"; done >> $2
echo "]" >> $2
