-
Couldn't load subscription status.
- Fork 79
fix #2839 #3029
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
fix #2839 #3029
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #3029 +/- ##
=======================================
Coverage 94.94% 94.95%
=======================================
Files 74 74
Lines 14275 14291 +16
=======================================
+ Hits 13554 13570 +16
Misses 721 721
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A possible non blocking change for a little further code reduction, and a question about the accessions dict
| add_ebi_accessions : bool, optional | ||
| If this should add the ebi accessions | ||
| """ | ||
| df = self._common_to_dataframe_steps() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about:
accessions = None
if add_ebi_accessions:
accessions = self.ebi_sample_accessions
return self._common_to_dataframe_steps(accessions, 'ebi_sample_accessions')...similar for the prep template to_dataframe, and then add into the common function:
if accessions is not None:
df[f'qiita_{accession_type}'] = df.index.map(lambda sid: accessions[sid])
Would reduce a little of code duplication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not strong feeling about leaving as is or changing ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool cool, then
i think :)
| df = self._common_to_dataframe_steps() | ||
|
|
||
| if add_ebi_accessions: | ||
| accessions = self.ebi_sample_accessions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all samples assured to be represented in this object? If not, would it be safer to have the lambda issue a accessions.get?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, AFAIK all samples in the prep/sample are represented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @wasade
| df = self._common_to_dataframe_steps() | ||
|
|
||
| if add_ebi_accessions: | ||
| accessions = self.ebi_sample_accessions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, AFAIK all samples in the prep/sample are represented.
| add_ebi_accessions : bool, optional | ||
| If this should add the ebi accessions | ||
| """ | ||
| df = self._common_to_dataframe_steps() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not strong feeling about leaving as is or changing ...
No description provided.