papi
or papiHtest
.
papiLine(inputData, relative = TRUE, save=FALSE, folder, output = "papi_graph",
setRef.cond = FALSE, Ref.cond, color = "auto", cex.xlab, cex.ylab = 1,
position.ylab, margins = c(25, 8, 2, 2), yscale, dot.size = 1.5,
legend.position, cex.legend = 1, graphWidth=3000, graphHeight=2000,
graph.bg="transparent", graph.res = 300)
papi
or papiHtest
(See data(papiResults)). The first row of the inputData MAY be used to define to which experimental conditions each sample belongs. For this, the first column of the first row must receive the word "Replicates" and the following columns must receive a character string indicating the experimental condition to which each sample belongs. If there is no information about replicates in the inputData, a pop up dialog box will let the user indicate the number of experimental conditions under study and which sample belongs to each condition.
The pathway Activity Score (AS) generated by PAPi is inversely proportional to the metabolic pathway activity, which means that the higher the AS the lower is the potential pathway activity. Thus, when relative = TRUE, the y axis is inverted and rescaled to an experimental condition set as reference. The AS of the reference condition is set to 0 and the AS of the remaining conditions are recalculated in relation to the reference condition. When setRef.cond = FALSE, the experimental condition defined in the second column of the inputData will be used as reference. When setRef.cond = TRUE, Ref.cond must receive the name of the experimental condition to be used as reference. If setRef.cond = TRUE and Ref.cond is missing, a pop up dialog box is presented to the user in order to select the experimental condition to be used as reference.
color is used to define the color of the lines representing the average AS of each experimental condition. It may receive the values "auto", "manual" or the name of the colors to be used (e.g. c("blue", "green")). If color = "auto", the colors are automatically defined according to colors()[30*c(1:nlevels(reps))], where nlevel(reps) indicates the number of experimental conditions under study. If color = "manual", a pop up dialog box presents to the user a list of colors to be used.
legend.position indicates the position of the legend in the graph. It may receive the values "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center". Alternatively, it may receive the exact numerical coordinates, such as c(2,0).
buildDatabase
, papi
, papiHtest
and addKeggCodes
.
### Building input data ####
Names <- c("Replicates", "Galactose metabolism", "Glycerolipid metabolism",
"Carbon fixation in photosynthetic organisms", "Fatty acid biosynthesis",
"D-Alanine metabolism")
Sample1 <- c("cond1", 200, 77, 99, 42, 29)
Sample2 <- c("cond1", 236, 72, 80, 39, 14)
Sample3 <- c("cond1", 269, 83, 89, 45, 31)
Sample4 <- c("cond2", 68, 12, NA, 6, 0.006)
Sample5 <- c("cond2", 57, 10, NA, 7, 0.1)
Sample6 <- c("cond2", 58, 13, NA, 8, 0.05)
dataInput <- data.frame(cbind(Names, Sample1, Sample2, Sample3, Sample4,
Sample5, Sample6), stringsAsFactors = FALSE)
# papiLine(dataInput, relative = TRUE, setRef.cond = TRUE, Ref.cond = "cond1",
# save = FALSE, position.ylab = c(2.2, 0.5))
Run the code above in your browser using DataLab