#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import os

def path_get():
    parser = argparse.ArgumentParser(description='Find potential inter-chromosome translocations.',
                                     prog='HiST',
                                     formatter_class=argparse.RawTextHelpFormatter,
                                     epilog='''
 HiST: Spectral Translocation detection of HiC matrices.
 Quick start: HiST -t the_hicfile_contains_translocations -c the_hicfile_control_sample -o the_path_of_output -j the_path_juicer_tools -d the_path_deDoc                                     
 Control sample: could be normal cell lines or cancer neighbour tissue and so on, by yourself.                                     
 juicer_tools: recommand use the version which produces the .hic file in your experiment.                                     
 deDoc: please MUST use the version included in the HiST packages.
                                     ''')
    parser.add_argument("--test",'-t',required=True, 
                        help='Please input test hic file.')
    parser.add_argument("--control",'-c',
                        default='./hic_default/GSE63525_IMR90_combined_30.hic', 
                        help='Please input control hic file (default: %(default)s).')
    parser.add_argument("--output",'-o',
                        default='.', 
                        help='Set the output path (default: current work directory).')
    parser.add_argument("--juice",'-j',
                        default='juice/juicer_tools_2.09.00.jar', 
                        help='Set the juicetool.jar path (default:%(default)s).')
    parser.add_argument("--deDoc",'-d',
                        default='deDoc/deDoc.jar', 
                        help='Set the deDoc.jar path (default:%(default)s).')
    parser.add_argument("--no-figure",action='store_true',
                        help='Flag of translocation visualization.')
    parser.add_argument("--baseline",type=float,
                        default=0.4,
                        help='Set the translocation pairs range, the scale is [0,1](default:%(default)s). The smaller baseline, the fewer pairs out.')
    parser.add_argument("--top",type=int,
                        default=0,
                        help='Set the translocation pairs range, output the top n pairs boxes.(default:%(default)s). The smaller top, the fewer pairs out.')
    parser.add_argument("--version",'-v',action='version',version='%(prog)s 1.2',
                        help='Print version.')
    args = parser.parse_args()
    return args

if __name__=="__main__":
    prog_args = path_get()
    from HiSTra.run_main import run_main
    run_main(prog_args)

    #### following part is test ####


    
    
        