eds-scikit icon indicating copy to clipboard operation
eds-scikit copied to clipboard

Feature request: Add more flexibility to `ConceptSet`

Open Vincent-Maladiere opened this issue 3 years ago • 1 comments

Description

Currently, adding concept sets is quite hacky:

from eds_scikit.biology import ConceptsSet

protein_blood = ConceptsSet("Protein_Blood_Quantitative")
protein_urine = ConceptsSet("Protein_Urine_Quantitative")
protein = ConceptsSet(
    name="Protein_Quantitative",
    concept_codes=protein_blood.concept_codes + protein_urine.concept_codes,
)

It would be handier to have the following:

protein = protein_blood + protein_urine

The concept_name could be generic like "addition_1" since it doesn't seem to be used except in the bioclean table.

We would need to add to ConceptSet:

  • __add__
  • __sub__
  • __eq__

Vincent-Maladiere avatar Jan 23 '23 17:01 Vincent-Maladiere

Yep good idea !

Thomzoy avatar Feb 03 '23 17:02 Thomzoy