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

Minor error debugging and some new features #99

Merged
merged 17 commits into from
Oct 12, 2023
Merged

Conversation

AgnesBaud
Copy link
Member

@AgnesBaud AgnesBaud commented Feb 20, 2023

Description

  1. Error when calling plot_one_graph on GroupBoxGraph class object

ValueError:
Invalid value of type 'numpy.int64' received for the 'name' property of box
Received value: 11

The 'name' property is a string and must be specified as:
  - A string
  - A number that will be converted to a string
  1. Error when creating SunbeamKraken2Parser object with excel file (extension = .xlsx). Error not encountered with moonstone tests. Maybe because moonstone tests use an older version of pandas (1.0.1 =/= 1.3.5)

TypeError: read_excel() got an unexpected keyword argument 'sep'`

  1. Metaphlan parser:
  • Check analysis_type -> warn if invalid value and set to default value = 'rel_ab'
  • For Metaphlan3 parse, argument keep_NCBI_tax_col that allows to keep the NCBI tax column in the resulting dataframe
  • Allows to compute a dataframe with less taxonomical level than expected

# Example: To compute a dataframe only up to the genus level
meta2parser = Metaphlan3Parser(input_path, analysis_type='rel_ab', keep_NCBI_tax_col=True)
meta2parser.taxonomical_names = meta2parser.taxonomical_names[:-2] # remove "species" and "sTrain" from taxonomical name
observed_df = meta2parser.dataframe

Changelogs

  • fixing name property error in plot_one_graph method in GroupBaseGraph class
  • fixing unexpected keyword argument when loading excel file in SunbeamKraken2Parser
  • moonstone needs python >= 3.8. Version requirements have been updated for numpy, scikit-bio, scikit-learn, pandas, statsmodels, hdmedians, scipy and plotly

Definition of Done

  • New code is tested with unit tests
  • Documentation has been updated
  • Pull Request has been revised by a maintainer of the project

@AgnesBaud AgnesBaud self-assigned this Feb 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2023

Codecov Report

Base: 64.65% // Head: 64.65% // No change to project coverage 👍

Coverage data is based on head (3c8b8dc) compared to base (56db2cf).
Patch coverage: 100.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #99   +/-   ##
=======================================
  Coverage   64.65%   64.65%           
=======================================
  Files          61       61           
  Lines        2872     2872           
=======================================
  Hits         1857     1857           
  Misses       1015     1015           
Flag Coverage Δ
unittests 64.65% <100.00%> (ø)

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

Impacted Files Coverage Δ
moonstone/parsers/base.py 79.41% <ø> (ø)
moonstone/plot/graphs/base.py 87.23% <ø> (ø)
moonstone/analysis/diversity/base.py 81.21% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@AgnesBaud AgnesBaud changed the title Error name property Minor error debugging and some new features May 12, 2023
@AgnesBaud AgnesBaud merged commit 5946124 into master Oct 12, 2023
6 checks passed
@AgnesBaud AgnesBaud deleted the minor_debugging branch October 12, 2023 12:20
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.

2 participants