#!/bin/bash -e
# Run bash with -e exit on first error, -x add +command stream to sterr.

# Check command line and provide usage and version information
if [ $# -ne 4 ];
then echo "usage v2:  eap_narrowPeak_to_bigBed chromsizes narrowPeak.as in.narrowPeak  out.narrowPeak.bigBed"
echo target is ucsc database ID - hg19 or hg38 or mm10 most commonly at time of writing.
echo Makes temp files so should be run in a freshly created directory .
exit -1; fi

# Convert bed narrowPeak in $2 to bigBed narrowPeak format in $3, checking chromosome coords vs $1
bedToBigBed -as=$2 -type=bed6+4 $3 $1 $4
