-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -332,3 +332,20 @@ def biosample_accessions(self, value): | |
| If a sample in `value` already has an accession number | ||
| """ | ||
| self._update_accession_numbers('biosample_accession', value) | ||
|
|
||
| def to_dataframe(self, add_ebi_accessions=False): | ||
| """Returns the metadata template as a dataframe | ||
|
|
||
| Parameters | ||
| ---------- | ||
| add_ebi_accessions : bool, optional | ||
| If this should add the ebi accessions | ||
| """ | ||
| 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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, AFAIK all samples in the prep/sample are represented. |
||
| df['qiita_ebi_sample_accessions'] = df.index.map( | ||
| lambda sid: accessions[sid]) | ||
|
|
||
| return df | ||
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:
...similar for the prep template
to_dataframe, and then add into the common function: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 :)