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

fix: stable column ordering in count-matrix.py #60

Merged

Conversation

cbp44
Copy link
Contributor

@cbp44 cbp44 commented Feb 24, 2023

Fix for issue #32.

Some analyses fail because the count-matrix.py script inconsistently sorts output columns, especially when there are lots of units in the units.tsv file that span multiple sequencing lanes.

The default behavior of the pandas.matrix.groupby function is to sort the grouping keys, but the sorting is not stable and causes the workflow to fail sometimes in the deseq2_init rule of the analysis if the sorting happened to change the column ordering.


Originally from PR #49. Please close that PR without merging @dlaehnemann

Copy link
Contributor

@dlaehnemann dlaehnemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for following up and rebasing!

@dlaehnemann dlaehnemann merged commit e2fb42f into snakemake-workflows:master Feb 24, 2023
@cbp44 cbp44 deleted the fix/count-matrix-groupby branch February 24, 2023 08:50
@cbp44 cbp44 mentioned this pull request Feb 24, 2023
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