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

plant traits save as scalars #37

Merged
merged 8 commits into from
Jul 5, 2023
Merged

plant traits save as scalars #37

merged 8 commits into from
Jul 5, 2023

Conversation

linwang9926
Copy link
Collaborator

@linwang9926 linwang9926 commented Jun 27, 2023

  • Update function get_base_length_ratio: return base_length_ratio results as scalar and return Nan if length=0
  • convert the data in scalar column to the value without [].
  • Modify stem width and base-related functions for rice traits (fixes Modify traits for monocots (rice) #38).
    • Modify function get_bases with an argument of 'lateral_only',
    • Modify functions get_base_xs, get_base_ys, get_base_ct_density, if no bases just return np.nan.
    • Modify function get_root_pair_widths_projections with an argument of 'lateral_only'.
    • Modify function get_traits_value_frame add the argument 'lateral_only' in trait_map dictionary.
  • change the argument name of 'lateral_only' to 'monocots' in modules bases, graphpipeline, networklength, points, and scanline, as well as test modules test_graphpipeline, test_points, test_scanline, test_convhull, test_ellipse, and test_networklength. (fixes Modify traits for monocots (rice) #38 ).
  • Added an if condition in function get_traits_value_plant_summary: not trait.isna().all() to filter out the all nan non-scalar traits. Those summarized traits are all nans (fixes get_traits_value_plant_summary takes length of float object #39 ).
  • Add monocots=False for more base-related traits, so there won't be values calculated for rice (fixes get_traits_value_plant_summary takes length of float object #39).

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #37 (052144f) into main (db93e0d) will decrease coverage by 2.01%.
The diff coverage is 83.50%.

@@            Coverage Diff             @@
##             main      #37      +/-   ##
==========================================
- Coverage   82.59%   80.59%   -2.01%     
==========================================
  Files          13       13              
  Lines         678      706      +28     
==========================================
+ Hits          560      569       +9     
- Misses        118      137      +19     
Impacted Files Coverage Δ
sleap_roots/graphpipeline.py 87.41% <56.52%> (-7.98%) ⬇️
sleap_roots/bases.py 91.58% <90.90%> (-6.24%) ⬇️
sleap_roots/networklength.py 92.53% <100.00%> (ø)
sleap_roots/points.py 97.05% <100.00%> (ø)
sleap_roots/scanline.py 97.36% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@linwang9926 linwang9926 requested a review from talmo June 27, 2023 20:50
@talmo talmo merged commit 78e5116 into main Jul 5, 2023
@talmo talmo deleted the lin/traits_as_scalars branch July 5, 2023 16:36
eberrigan pushed a commit that referenced this pull request Mar 14, 2024
* Update base_length_ratio results to scalar and return nan if length=0.

* convert the data in scalar column to the value without [].

* Modify stem width and base-related functions for rice traits.

* change the argument name of 'lateral_only' to 'monocots'.

* change the argument name of 'lateral_only' to 'monocots' (cont.).

* modify functions to set nan values for base-related traits for rice.

* Modify `get_base_median_ratio` function for all nans.

* Modify `get_traits_value_plant_summary` for traits with no value [].

---------

Co-authored-by: Lin Wang <linwang9926@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_traits_value_plant_summary takes length of float object Modify traits for monocots (rice)
2 participants