Skip to content

pca's cohorts argument does not work the way it is expected to #1328

Description

@jonbrenas

A cohorts parameter was added to pca but it is a bit confusing.

Most functions using a cohorts parameter, such as the diversity_stats which only works at the cohort level or snp_allele_frequencies which needs to split the data into cohorts, have a different use for cohorts than pca which uses it to downsample the data. Arguably, because the 2 parameters are semantically different, they should have different definitions and the current cohorts parameter works fine if it is set to a column name and only really fails if given a dictionary (or any other mapping, I would guess).

There are two options:

  • change the cohorts parameter to be more restrictive
  • change the code to cope with the more general definition of cohorts

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions