Skip to content

Conversation

DriesSchaumont
Copy link
Member

@DriesSchaumont DriesSchaumont commented Dec 12, 2023

Changelog

This PR fixes TypeErrors when trying to concatenate three or more samples using --mode move. The error occurs when one of the samples does not contain the column that does trigger a conflict in the other samples. In mode move, the conflicting metadata columns are gathered across the samples and moved to the multidimensional annotation data slot (obsm or varm). The problem is that the sample names are used as the column namnes for the dataframe, but because one or more columns is missing, the number of input samples is differs from the number of columns.

Issue ticket number and link

Closes #xxxx (Replace xxxx with the GitHub issue number)

Checklist before requesting a review

  • I have performed a self-review of my code

  • Conforms to the Contributor's guide

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Documentation
    • Bug fixes
  • Proposed changes are described in the CHANGELOG.md

  • CI tests succeed!

This commit fixes `TypeError`s when trying to concatenate three or more
samples using `--mode move`. The error occurs when one of the samples
does not contain the column that does trigger a conflict in the other
samples. In mode `move`, the conflicting metadata columns are gathered
across the samples and moved to the multidimensional annotation data slot
(obsm or varm). The problem is that the sample names are used as the
column namnes for the dataframe, but because one or more columns is
missing, the number of input samples is differs from the number of
columns.
@DriesSchaumont DriesSchaumont marked this pull request as ready for review December 12, 2023 08:49
@rcannood rcannood merged commit 107a445 into main Dec 15, 2023
@rcannood rcannood deleted the fix_concat_missing_columns_in_conflict branch December 15, 2023 08:18
DriesSchaumont added a commit that referenced this pull request Jan 25, 2024
…631)

* Concat: fix using 'move' with a missing conflicting metadata column.

This commit fixes `TypeError`s when trying to concatenate three or more
samples using `--mode move`. The error occurs when one of the samples
does not contain the column that does trigger a conflict in the other
samples. In mode `move`, the conflicting metadata columns are gathered
across the samples and moved to the multidimensional annotation data slot
(obsm or varm). The problem is that the sample names are used as the
column namnes for the dataframe, but because one or more columns is
missing, the number of input samples is differs from the number of
columns.

* Update CHANGELOG with PR number

* Fix test looking at wrong attribute

* Revert changing attribute in tests
@DriesSchaumont DriesSchaumont mentioned this pull request Jan 25, 2024
10 tasks
DriesSchaumont added a commit that referenced this pull request Jan 25, 2024
VladimirShitov pushed a commit that referenced this pull request Mar 12, 2024
…631)

* Concat: fix using 'move' with a missing conflicting metadata column.

This commit fixes `TypeError`s when trying to concatenate three or more
samples using `--mode move`. The error occurs when one of the samples
does not contain the column that does trigger a conflict in the other
samples. In mode `move`, the conflicting metadata columns are gathered
across the samples and moved to the multidimensional annotation data slot
(obsm or varm). The problem is that the sample names are used as the
column namnes for the dataframe, but because one or more columns is
missing, the number of input samples is differs from the number of
columns.

* Update CHANGELOG with PR number

* Fix test looking at wrong attribute

* Revert changing attribute in tests
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