knitr::opts_chunk$set( fig.width = 8, fig.height = 8 )
library(png) library(grid) path_intro <- system.file("extdata", "auto.png", package = "MACSQuantifyR") intro <- readPNG(path_intro) grid.raster(intro)
Four columns MACSQuantify miltenyi Excel output file with P1 and P1//P2 gates namely
Full path
WID
%-#
Count/mL
Up to date version of R is recommended
This function will sequentially:
library(MACSQuantifyR) library(knitr) library(grid) library(gridExtra) library(png) suppressMessages(library(R.utils))
This is an example file loaded with the package:
file <- system.file("extdata", "drugs.xlsx", package = "MACSQuantifyR")
print(basename(file))
This is what the beginning of the file looks like:
MACSQuant <- load_MACSQuant(file) my_data <- slot(MACSQuant, "my_data")
kable(head(my_data), digits = 4)
This line will generate a plot on which the user has to manually select the replicates.
Once the replicates of all conditions have been identified by the user, the on_plate_selection function will automatically reorder the data and process them.
In the following example, the user is screening for the effect of two drugs on human cell lines at different concentrations.
Each of the 8 conditions contain 3 replicates.
(number_of_replicates = 3
, number_of_conditions = 8
)
(i.e: Drug1_c1 is the concentration for drug1 at concentration c1 and the replicates are B2, C2 ,D2).
One can specify control=T
if a control condition needs to be processed.
MACSQuant <- pipeline(filepath = file, sheet_name = NULL, # optional number_of_replicates = 3, number_of_conditions = 8, control = T)
example_path <- system.file("extdata/", "plate_template_pipeline.png", package = "MACSQuantifyR") example_image <- readPNG(example_path) grid.raster(example_image)
The user is notified as the function goes along its tasks.
printf(paste("...To quit press ESC...\n", "...You can now select your conditions", "replicates (without control condition replicates)...\n", " --> 18 conditions:...1...2...3...4...5...6...7...8...OK\n", " --> Done: replicates identified\n", " --> Done: statistics on each condition replicates\n", "...You can now select your control replicates...\n", " --> 1 control: ...OK...\n", " --> Done: statistics on each control replicates\n", "--> Done: replicates stored in variable my_replicates_sorted\n", sep = " "))
The user may encounter warnings:
warning(paste("In order_data(sorted_matrix_final, my_data, save.files =", "save.files) : \n !!! A2 not selected and will be ignored", sep = " "))
This warning tells the user that there were some conditions that were not selected. Here A2 stands for the calibration well and should not be used in this analysis.
The function will create a folder called outputMQ in your current directory and save:
Be careful to avoid overriding data, content of existing outputMQ folder could be erased.
The results presented below can be found in the generated report file (results.docx)
During the process of sorting replicates basic statistical analysis for each condition is done (mean and standard deviation of replicates). A statistic table will be generated.
This is the statistic table for this example:
drugs_R_image <- system.file("extdata", "drugs.RDS", package = "MACSQuantifyR") MACSQuant <- readRDS(drugs_R_image) kable(slot(MACSQuant, "statistics"), digits = 4)
In this table the user will find for each conditions:
After computing the statistics table, the function starts to generate graphical representations and provides the user with two plots
example_res1 <- system.file("extdata/", "barplot_counts_pipeline.png", package = "MACSQuantifyR") example_res2 <- system.file("extdata/", "barplot_percent_pipeline.png", package = "MACSQuantifyR") img4 <- rasterGrob(as.raster(readPNG(example_res1)), interpolate = FALSE) img5 <- rasterGrob(as.raster(readPNG(example_res2)), interpolate = FALSE) grid.arrange(img4, img5, ncol = 2)
In order to define more parameters and to have more exhaustive graphical representations such as:
please have a look to the step-by-step analysis vignette
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.