datarail / gr_metrics

15 stars 12 forks source link

python2 compute_gr_metrics.py leads to KeyError: 'timepoint' #42

Open elmbeech opened 4 years ago

elmbeech commented 4 years ago

I think the standard how you label the columns has changed over the years. These error even occurs with your toy_example_input1.tsv as input.

python2 add_gr_column.py ./gr50_tools/INPUT/toy_example_input1.tsv > output1.tsv
python2 compute_gr_metrics.py output1.tsv

Traceback (most recent call last):
  File "./gr50_tools/SRC/python/scripts/compute_gr_metrics.py", line 42, in <module>
    main()
  File "./gr50_tools/SRC/python/scripts/compute_gr_metrics.py", line 38, in main
    metrics = gr50.gr_metrics(data)
 [...]
 KeyError: 'timepoint'

The problem is that the toy_example_input1.tsv has column name time and not column name timepoint If you change this, then the code works.

PS: please consider a Python3 implementation. I think this is long overdue! (Issue #32)