#!/oak/stanford/groups/akundaje/marinovg/programs/Anaconda2/bin/python
"""
Script to run pyatac command line utilies.
Various functions designed for working with paired-end ATAC-Seq data.

Copyright (c) 2015, Stanford University

This code is free software; you can redistribute it and/or modify it under the terms
of the MIT License (see the file COPYING included with the distribution).

@author: Alicia Schep
@contact: aschep@stanford.edu
"""

###-----------Import modules---------------####

import sys
import matplotlib as mpl
mpl.use('PS')
from pyatac import __version__
import time
from pyatac.cli import pyatac_parser, pyatac_main


if __name__ == '__main__':
    print "Command run:  "+ ' '.join(map(str,sys.argv))
    print "pyatac version "+__version__
    print "start run at: " + time.strftime("%Y-%m-%d %H:%M")
    try:
        parser = pyatac_parser()
        args = parser.parse_args()
        pyatac_main(args)
        print "end run at: " + time.strftime("%Y-%m-%d %H:%M")
    except KeyboardInterrupt:
        sys.stderr.write("User interrupted pyatac.")
        sys.exit(0)


