Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added sample column to case without variables #882

Merged
merged 1 commit into from
Apr 2, 2022

Conversation

stiphyMT
Copy link
Contributor

@stiphyMT stiphyMT commented Apr 2, 2022

Describe your changes
When converting JSON file to csv, the multi-trait lines that do no have values (i.e. NA) are missing the 'sample' column/value (line 76) as compared to the normal case (line 73).
csv.write(",".join(map(str, meta_row + [var, "NA", "NA"])) + "\n")
The 'sample' value was added to the list on line 73.
csv.write(",".join(map(str, meta_row + [sample, var, "NA", "NA"])) + "\n")

Type of update
Is this a:

  • Bug fix

Associated issues
This change closes issue #881.

Additional context
Before this modification the resulting csv file could result with some rows having one too few columns, resulting in errors during import (at least this was the case using fread of the data.table library from R). With this change everything appears normal.

@codecov
Copy link

codecov bot commented Apr 2, 2022

Codecov Report

Merging #882 (e8e0ed5) into master (0e11c7f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #882   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          141       141           
  Lines         5997      5997           
=========================================
  Hits          5997      5997           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
plantcv/utils/converters.py 100.00% <100.00%> (ø)

@nfahlgren nfahlgren added this to In progress in PlantCV3 via automation Apr 2, 2022
@nfahlgren nfahlgren added this to the PlantCV v3.14.0 milestone Apr 2, 2022
Copy link
Member

@nfahlgren nfahlgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks @stiphyMT!

@nfahlgren nfahlgren merged commit 12957d9 into danforthcenter:master Apr 2, 2022
PlantCV3 automation moved this from In progress to Done Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
PlantCV3
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants