def METHOD_NAME():
    # initiate the parser and handle arguments from command line
    args = parse_args()
    # read required first argument from shell command as path to .seg file to be converted
    input_file = args.input
    # read required second argument from shell command as path to resulting .bed file
    output_file = args.output
    # determine the format of input file to understand which format to convert
    input_format = input_file[-3:]
    # if input is .seg file, convert it to the .bed file and have separate file created with a header
    if input_format == "seg":
        check_arguments(args, input_format)
        chromosome = args.chromColnum-1
        start = args.startColnum-1
        end = args.endColnum-1
        seg_to_bed (input_file, output_file, chromosome, start, end)
    # if input is .bed file, load appropriate header and convert it to the .seg file
    elif input_format == "bed":
        check_arguments(args, input_format)
        column_names_path=args.column_header
        with open(column_names_path) as f:
            column_names=simplejson.load(f)
        bed_to_seg (input_file, column_names, output_file)
    else:
        sys.exit('Please provide input file in either .seg or .bed format')