#!/usr/bin/env python

import os, sys
import click

from pyleup.coverage import process_bam
from pyleup.visualize import gen_scatter


@click.group()
def cli():
    pass


@cli.command()
@click.argument('bam')
@click.option('--output_dp', '-o', help='string to output directory', default='.')
@click.option('--verbose/--no-verbose', default=False)
def visualize(bam, output_dp, verbose):
    """ Generate bam pileup visualization

    Arguments:
    bam -- String path to bam file
    """
    coverage_fp, reads_fp = process_bam(bam, output_dp)
    gen_scatter(coverage_fp, reads_fp, output_dp)
    

if __name__ == "__main__":
    cli()
