qfaFitnessPlot | R Documentation |
This function creates ggplot boxplots visualizing fitness measurements. It is integrated into the makeFitness2 function as well. There are three methods used to define fitness: 1) By multiplying maximal doubling potential (MDP) and maximal doubling rate (MDR) accoring to the original QFA work. 2) By divinding the maximal absolute growth rate (r) of the Gompertz model with the time to reach r (b). 3) By dividing the model-free estimation of r with the model free estimation of b. The user can specify which should be plotted by setting the plotFitness parameters to either "All", "MDR" (1) "Gmp" (2) or "ModelFree" (3). Factor used on the x-axis is defined with plotX. Additionally, coloring and facetting factor names can be specified with plotFill and plotFacet. If filename is specified, the plots will be saved as a pdf with the specified name.
qfaFitnessPlot( results, plotFitness = "no", filename = NA, plotX = "ORF", plotFacet = "ScreenID", plotFill = "Treatment" )
results |
This is the output data.frame of the qfa.fit2 function |
plotFitness |
String. Either set to "All" to plot all three types of fitness measurements if the Gompertz model was used, otherwise only MDR-based and modelfree fitness estimates are plotted. If set to "MDR" only MDR*MDP based fitness estimates are displayed. If set to "Gmp" only Gompertz model based fitness estimates are displayed. If set to "ModelFree" only model free fitness estimates are displayed. |
filename |
If this is anything else than NA, a pdf file will be saved into the current working directory named filename |
plotX |
String. Name of the column of the results data.frame used as a factor seperating boxplots on the x-axis |
plotFill |
String. Name of the column of the results data.frame used as a factor coloring the boxplots |
plotoFacet |
String. Name of the column of the results data.frame used as a factor creaeting facets |
This function plots the ggplot object if not used with an assignment. If it is called as an assignment, the return is a ggplot object which can further be modified by the user if desired.
#qfa.testdata was generated with the call in the Not run section #(these files are not included in the package) data(qfa.testdata) #Strip non-experimental edge cultures qfa.testdata = qfa.testdata[(qfa.testdata$Row!=1) & (qfa.testdata$Col!=1) & (qfa.testdata$Row!=8) & (qfa.testdata$Col!=12),] # Define which measure of cell density to use qfa.testdata$Growth = qfa.testdata$Intensity GmpFit = qfa.fit2(qfa.testdata, inocguess=NULL, detectThresh=0, globalOpt=F, AUCLim=NA, TimeFormat="h", Model="Gmp") # Construct fitness measures GmpFit = makeFitness2(GmpFit, AUCLim=NA, plotFitness="no") qfaFitnessPlot(GmpFit, plotFitness="All", filename="Example_Gmp_fitness.pdf")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.