Skip to content

Improve error reporting #14

@smirarab

Description

@smirarab

When there is an error, give some indication to users what the error may be.

For example, if -b is forgotten, we get this. It is not informative

Warning: few calibration points were given. Set min_nleaf to 1 to maximize the number of possible initials
Traceback (most recent call last):
  File "/Users/smirarab/workspace/galaxy/.venv/bin/launch_wLogDate.py", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/Users/smirarab/Research/projects/ongoing/logdate/wLogDate/launch_wLogDate.py", line 97, in <module>
    main()
  File "/Users/smirarab/Research/projects/ongoing/logdate/wLogDate/launch_wLogDate.py", line 91, in main
    mu,f,x,s_tree,t_tree = logDate_with_random_init(tree,f_obj,sampling_time,bw_time=bw_time,root_time=tR,leaf_time=tL,nrep=nrep,min_nleaf=10,maxIter=maxIter,seed=randseed,pseudo=pseudo,seqLen=seqLen,verbose=verbose)
  File "/Users/smirarab/Research/projects/ongoing/logdate/wLogDate/logdate/logD_lib.py", line 194, in logDate_with_random_init
    X,seed,T0 = random_date_init(tree,smpl_times,nrep,min_nleaf=min_nleaf,seed=seed)
  File "/Users/smirarab/Research/projects/ongoing/logdate/wLogDate/logdate/fixed_init_lib.py", line 271, in random_date_init
    x0,t0 = get_random_initial(tree,random_subset,sampling_time)
  File "/Users/smirarab/Research/projects/ongoing/logdate/wLogDate/logdate/fixed_init_lib.py", line 224, in get_random_initial
    t0 = calibrate_set(tree,random_subset)
  File "/Users/smirarab/Research/projects/ongoing/logdate/wLogDate/logdate/fixed_init_lib.py", line 104, in calibrate_set
    date_from_root_and_leaves(node)
  File "/Users/smirarab/Research/projects/ongoing/logdate/wLogDate/logdate/fixed_init_lib.py", line 194, in date_from_root_and_leaves
    assert v.time < u.time
AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions