Introduction

This is an example of how to run MACSQuantifyR with combination drug analysis. To know more about the package, have a look at the introduction vignette

In this vignette we will run the MACSQuantifyR package on the example given in the introduction of the previous vignette. More precisely, this experiment corresponds to the screening of the combination effects of two drugs on human cells.

Here is the plate template chosen by the user that represents drugs alone (up part of the well plate) and combinations (low part of the well plate).

Pipeline

Load the packages

## 
## Attaching package: 'latticeExtra'
## The following object is masked from 'package:ggplot2':
## 
##     layer

Create a new object MACSQuant: new_class_MQ()



This function allows the user to create a new object of class MACSQuant.

This will allow the user to set specific options regarding the experiment and the output of some functions before running other functions.



  • Create the MACSQuant object:
  • Define experiment name:
  • Define output path:

slot(MACSQuant,"param.output")$path

Import your data: load_MACSQuant()

Once the excel file has been generated by miltenyi MACSQuantify software. The user can load the data with the following function.

It will generate a variable called my_data, necessary for the next steps of the analysis.

Load the data:

## ok
## --> Done: data loaded
## --> Done: data stored in variable MACSQuant@my_data
## ...You can now run on_plate_selection(MACSQuant,num_replicates,number_of_conditions) with your replicates and conditions numbers...

Sort your replicates: on_plate_selection()



By calling the function on_plate_selection() with the number of conditions in the experiment and the number of replicates by conditions, the user will be asked to select sequentially the replicates for each conditions.

Before running the function, the user can define one of the experiment parameters called c_names in which condition names are stored.



Experiment parameters are:

  • c_names: condition names to plot

slot(MACSQuant,"param.experiment")$c_names

  • doses: colors for the barplots

slot(MACSQuant,"param.experiment")$doses

The function is ready to run:

Once the replicates of all conditions have been identified by the user, the on_plate_selection function will automatically reorder the data stored in the variable my_data into a new variable called my_data_sorted.

During the process of sorting replicates basic statistical analysis for each condition is done (mean and standard deviation of replicates).

This will generate a new variable called statistics necessary for the next part of the pipeline.

2D/3D data representation: barplot_data()



This function allows the user to generate 2D and 3D plots corresponding to two flavours (cell counts, percentages).

Before running the function, the user can define one of the experiment parameters



flavours are:

  • counts: cell count

  • percent: fluorochrome positive cell percentage

Output.parameters are:

are:

  • plt.title: Barplot title

slot(MACSQuant,"param.output")$plt.title this will be used as subtitle for the Word document.

  • plt.labels: Barplot labels

slot(MACSQuant,"param.output")$plt.labels

  • the user can also load specific colors:

The barplot_data() function is ready to run

Save the generated plots else they will not appear in the excel document:

Combination index computation: combination_index()



This function allows the user to compute combination index as computed by Chou TC, Pharmacol Rev. 20061.

Four plots are generated by this function:

  • The dose response plot for drugs alone
  • The median effect plot (log dose vs log(response/1-response))
  • The normalized isobologram with synergism decision
  • The 3D barplot with synergy corresponding color code


## Warning: Use of `dose_rep_df$dataset` is discouraged. Use `dataset` instead.

## Warning: Use of `dose_rep_df$dataset` is discouraged. Use `dataset` instead.

## Warning: Use of `dose_rep_df$dataset` is discouraged. Use `dataset` instead.
## `geom_smooth()` using formula 'y ~ x'

## Warning: Use of `CI_df$Decision` is discouraged. Use `Decision` instead.

Report generation: generate_report()



This function uses all the files saved during the analysis (argument save.files=T).

The save.files option creates a folder called outputMQ in your current directory (default) or at specified path and save:

  • The well plate template image (plate_template.png)
  • The sorted_replicates data table (sorted_table.txt)
  • The statistic table (statistics.txt)
  • Plots barplot_counts, barplot_percent
  • Any other generated plots

Be careful to avoid overriding data, content of existing outputMQ folder could be erased.



You can run generate_report at any steps of the pipeline to generate the Word document named results.docx.

Reference

1. Chou, T.-C. Theoretical basis, experimental design, and computerized simulation of synergism and antagonism in drug combination studies. Pharmacological reviews 58, 621–681 (2006).