plantcv
plantcv copied to clipboard
Json to CSV conversion
Hi,
I'm having some issues with my csv observation output. On my csv file, the sample ID is printed on a line different from the measurement values. The line where this sample ID is printed contains NAs.
Hi @Uzezi93, could you upload the JSON and CSV files here? You may need to upload them as a zip file for compatibility with GitHub
Sure, here's the link to the JSON and CSV file. https://github.com/Uzezi93/Files/blob/main/Uzezi_ZIP.zip.
I think one thing going on is that there are repeated measurements for each image. By default when you run plantcv-workflow.py
more than once with the same output file it appends results to the existing data. This is configurable with the setting append = True/False
.
What might have happened is you ran plantcv-workflow.py
more than once to troubleshoot and get things working, so there are multiple outputs stored for each image?
If that's the case you could either delete the JSON file and rerun once or set append to false and force it to overwrite the result file.
Sorry for my late response. I applied the 'append = False' setting but it still produced an extra line for my output. I'm not sure if the line is in the right position in my script. I added the append command after the pcv.outputs.clear() command. I've also added a link to my script; https://github.com/Uzezi93/Files/blob/main/seedSize_multiplJSON_files_xRice_editFeb14_20.py
Hi @Uzezi93, am I correct in thinking you have an image with multiple seeds and you want to store measurements for them individually?
Yes, that's what I'm trying to do.
It's possible to save all the seed measurements into one results file, per input image. We have an example of doing that here (https://plantcv.readthedocs.io/en/stable/tutorials/seed_analysis_tutorial/) using the label
feature of the PlantCV analyze functions.