BradnerLab / pipeline

bradner lab computation pipeline scripts
Other
53 stars 47 forks source link

enhance reporting of parsing errors #35

Open jdimatteo opened 10 years ago

jdimatteo commented 10 years ago

e.g. if a region file has a bad start/stop column an error like the following will be generated, which isn't very clear.

we should ideally report the region line and the column that couldn't be parsed. other possible parsing errors could occur on the python to C++ interface as well. any fix applied to region liquidation should also be applied to bin liquidation.

jd-mba:pipeline jdimatteo$ ./bamliquidator_batch.py -r test.gff -o test.liquid test.bam
Liquidating test.bam (file 1 of 1)
ERROR   Unhandled exception: bad lexical cast: source type value could not be interpreted as target
Liquidation completed: 0.012737 seconds
Traceback (most recent call last):
  File "./bamliquidator_batch.py", line 508, in <module>
    main()
  File "./bamliquidator_batch.py", line 488, in main
    not args.quiet)
  File "./bamliquidator_batch.py", line 312, in __init__
    self.batch(extension, sense)
  File "./bamliquidator_batch.py", line 203, in batch
    raise Exception("%s failed with exit code %d" % (self.executable_path, return_code))
Exception: /Users/jdimatteo/DanaFarber/pipeline/bamliquidator_internal/bamliquidator_regions failed with exit code 4
jd-mba:pipeline jdimatteo$