phylogenetics/tools/gblocks.py
def _quant_arg(user_value,
               python_arg_name,
               gblock_arg_name,
               min_allowed,
               max_allowed):
    """
    Construct and sanity check a quantitative argument to
    send to gblocks.

    user_value: value to try to send to gblocks
    python_arg_name: name of python argument (for error string)
    gblock_arg_name: name of argument in gblocks
    min_allowed: minimum allowable value
    max_allowed: maximum allowable value
    """

    if user_value < min_allowed or user_value > max_allowed:
        err = "\n\nvalue of {} invalid ('{}').\n".format(python_arg_name,
                                                     user_value)
        err += "must be between {} and {}.\n".format(min_allowed,
                                                     max_allowed)
        raise ValueError(err)

    return "-{}={}".format(gblock_arg_name,int(round(user_value,0)))

    Construct and sanity check a quantitative argument to
    send to gblocks.

    user_value: value to try to send to gblocks
    python_arg_name: name of python argument (for error string)
    gblock_arg_name: name of argument in gblocks
    min_allowed: minimum allowable value
    max_allowed: maximum allowable value
    
Construct and sanity check a quantitative argument to
send to gblocks.

value to try to send to gblocks
python_arg_name: name of python argument (for error string)
gblock_arg_name: name of argument in gblocks
min_allowed: minimum allowable value
max_allowed: maximum allowable value
Construct and sanity check a quantitative argument to send to gblocks . value to try to send to gblocks python_arg_name : name of python argument ( for error string ) gblock_arg_name : name of argument in gblocks min_allowed : minimum allowable value max_allowed : maximum allowable value
def _quant_arg(user_value,
               python_arg_name,
               gblock_arg_name,
               min_allowed,
               max_allowed):
    if user_value < min_allowed or user_value > max_allowed:
        err = "\n\nvalue of {} invalid ('{}').\n".format(python_arg_name,
                                                     user_value)
        err += "must be between {} and {}.\n".format(min_allowed,
                                                     max_allowed)
        raise ValueError(err)
    return "-{}={}".format(gblock_arg_name,int(round(user_value,0)))
def _quant_arg ( user_value , python_arg_name , gblock_arg_name , min_allowed , max_allowed ) : if user_value < min_allowed or user_value > max_allowed : err = "\n\nvalue of {} invalid ('{}').\n" . format ( python_arg_name , user_value ) err += "must be between {} and {}.\n" . format ( min_allowed , max_allowed ) raise ValueError ( err ) return "-{}={}" . format ( gblock_arg_name , int ( round ( user_value , 0 ) ) )
Construct and sanity check a quantitative argument to
send to gblocks.
Construct and sanity check a quantitative argument to send to gblocks .
"""
    Construct and sanity check a quantitative argument to
    send to gblocks.

    user_value: value to try to send to gblocks
    python_arg_name: name of python argument (for error string)
    gblock_arg_name: name of argument in gblocks
    min_allowed: minimum allowable value
    max_allowed: maximum allowable value
    """
user_value
python_arg_name
gblock_arg_name
min_allowed
max_allowed