Remove writing sample id to summary files#81
Merged
berndbohmeier merged 2 commits intomainfrom Mar 24, 2026
Merged
Conversation
JasonAHendry
approved these changes
Mar 23, 2026
| # for backwards compatibility to be able to show old experiments where this column was not in the data | ||
| df = df.join(self.metadata.required_metadata, on="barcode") | ||
| if "sample_id" in df.columns: | ||
| # We used to safe it, but this is not a good idea as it might be outdated if the metadata file is changed |
| # We used to safe it, but this is not a good idea as it might be outdated if the metadata file is changed | ||
| df.drop(columns=["sample_id"], inplace=True) | ||
|
|
||
| df = df.join(self.metadata.required_metadata, on="barcode") |
Owner
There was a problem hiding this comment.
I was briefly considering whether we want to do any validation here, e.g. with the validate= flag, but maybe not?
The barcodes in the metadata file we know will be unique from MetadataTableParser. Maybe if people just wanted to look at a few barcodes, they could delete lines from the metadata file. But if we validate we would prevent that.
Collaborator
Author
There was a problem hiding this comment.
Afaik validate checks only uniqueness of keys, not completeness, so we can use validate here as the barcodes should be unique.
I will add it.
This was not a good idea, as people make mistakes in the sample ids and then fixing it just in the metadata file wasn't working.
3e69a8f to
50ae28f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was not a good idea, as people make mistakes in the sample ids and then fixing it just in the metadata file wasn't working.