chmod 775 bam2bigwig ./bam2bigwig file.bamCode:
This script will take a bam file mapped to the human genome hg19 and convert it to two strand specific bigwig files that could be loaded to UCSC Genome Browser. It depends on bedtools bamtobed (aka bamToBed), and it will attempt to download and execute three UCSC scripts, bedItemOverlapCount, bedGraphToBigWig and fetchChromSizes, so make sure your connection is working. Converting bam to bigwig and separating according to strand could be useful to visualize nucleosomal or protein binding 'footprints' in ChIP-Seq experiments as at the boundaries of protein-DNA interactions will be marked with reads mapping on different DNA strands.
chmod 775 bamsplit2bigwig ./bamsplit2bigwig file.bamCode: