mkdir mapping/bigwig

for wigfile in mapping/wiggle/*_Signal.Unique.str1.out.wig.gz
do
	echo "Creating BigWig from ${wigfile}"
	bwfile=$(echo ${wigfile} | sed 's/_Signal.Unique.str1.out.wig.gz/.bw/')
	bwfile=$(echo ${bwfile} | sed 's/wiggle/bigwig/')
	bwfile_UCSC=$(echo ${bwfile}| sed s'/.bw/_UCSC.bw/')
	echo "bwfile = $bwfile"
	wigToBigWig ${wigfile} GRCh38/chrNameLength.txt ${bwfile}
	echo "bwfile_UCSC = $bwfile_UCSC"
	python scripts/convertBigWigChroms.py scripts/CRCH38_ensembl2UCSC.txt ${bwfile} ${bwfile_UCSC}
done

