danforthcenter / plantcv

Plant phenotyping with image analysis
Mozilla Public License 2.0
646 stars 263 forks source link

Bug in json2csv #1554

Closed kmurphy61 closed 2 weeks ago

kmurphy61 commented 3 months ago

Describe the bug When converting a results.json file to .csv using plantcv-utils json2csv some traits are not in the converted file, i.e. present in json but not in the csv. Namely, center of mass (although there may be others).

To Reproduce Steps to reproduce the behavior (including sample data and code really help):

  1. Starting with the attached config.json file. results_2024-04-12.json

  2. Run function `plantcv-utils json2csv -j /results_2024-04-12.json -c /results_2024-04-12.csv'

  3. See resulting csv, that does not contain all traits, particularly center of mass. results_2024-04-12.csv-single-value-traits.csv

Expected behavior All measurements in json should be in csv.

Local environment (please complete the following information):

annacasto commented 2 months ago

I think we figured out that the center of mass traits are in the multi-value trait file since they have x and y values. Did that solve the issue or were we still having problems with the conversion?

kmurphy61 commented 2 weeks ago

Center of Mass is being left in multi-value traits, since it provides an X,Y coordinate!