saezlab / plugy

Flexible processing and analysis of plug microfluidics data
GNU General Public License v3.0
0 stars 0 forks source link

Config: exclude conditions / drugs #10

Closed deeenes closed 1 year ago

deeenes commented 1 year ago

Give option to exclude certain drug treatments after the QC step

deeenes commented 1 year ago

Since bf28e7b a list of sample or compound labels can be provided to the new config option exclude, and these samples will be discarded before running the quality control and analysis steps. If exclude = ["Irinotecan", "Sorafenib"], all samples with either of these compounds will be discarded. If `exclude = "Irinotecan + Sorafenib", only the "Irinotecan + Sorafenib" combination is to be discarded. A full example:

import plugy

exp = plugy.PlugExperiment(
    heatmap_second_scale = 'pos_ctrl',
    figure_titles = False,
    exclude = "Irinotecan + Sorafenib",
)

exp.main()

Here is how it works.

The samples are discarded right after creating the sample_df data frame, before calculating the z-scores. If you decide about the samples after QC, you should initiate a new run or at least re-run the samples and qc steps of the workflow with the exclude option set.

NgocHien-Du commented 1 year ago

I guess the names of the drugs should match the ones in the channel file.

deeenes commented 1 year ago

Yes, it only works with the drug names used in the channel map. Does this solution cover all your use cases?

NgocHien-Du commented 1 year ago

Yes, it is. Just a confirmation: when we exclude a drug treatment in the analysis, the z-score calculation will be done without that sample. Correct?

deeenes commented 1 year ago

Yes, it is the first step after creating the samples data frame, just before calculating z-scores

NgocHien-Du commented 1 year ago

thank you