papiLine: papiLine generates a line graph of results obtained using...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

papiLine generates a line graph of the average Activity Score (AS) against the predicted metabolic pathways.

Usage

1
2
3
4
5
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)

Arguments

inputData

when inputData is missing, a dialog box will pop up allowing the user to click-and-point to the comma separated value (CSV) file from which the data is to be read.

relative

a logical vector (TRUE or FALSE) used to define if the input data should be scaled and inverted before ploting (See Details).

save

A logical vector (TRUE or FALSE) defining if the results must be saved into a png file.

folder

when save = TRUE and folder is missing, a pop up dialog box will be presented to the user. The user can then select the directory to which the results will be saved. Alternatively, folder can take a character string naming the path where the results must be saved.

output

A character string indicating the name of the file containing the results.

setRef.cond

A logical vector (TRUE or FALSE) indicating wether a specific experimental condition must be set as reference (See Details).

Ref.cond

A character string indicating the experimental condition to be used as reference.

color

color defines the colors used for the lines corresponding to each experimental condition. It can receive the values "auto", "manual" or the names of the colors to be used (See Details).

cex.xlab

A numeric string defining the size of the font used for the x axis.

cex.ylab

A numeric string defining the size of the font used for the y axis.

position.ylab

A numeric vector of length 2, giving the x and y coordinates of the y axis label position.

margins

A numerical vector in the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot.

yscale

A numeric vector of length 2, giving the y coordinates ranges.

dot.size

A numeric vector defining the size of the dots used to indicate pathways detected only in some experimental conditions.

legend.position

The x and y co-ordinates defining the position of the legend. They can be specified by keywords ("bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center") or in any way which is accepted by xy.coords (See Details).

cex.legend

A numeric vector indicating the size of the legend.

graphWidth

A numeric vector indicating the width of the graph.

graphHeight

A numeric vector indicating the heigh of the graph.

graph.bg

The color to be used for the background of the graph region.

graph.res

A numeric vector indicating the resolution of the figure containing the line graph.

Details

The inputData must have the same format as the results generated by 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).

Value

papiLine returns a line graph which can be exported to a png file.

Note

Raphael Aggio (rahael.aggio@gmail.com)

Author(s)

Raphael Aggio

References

Aggio, R.B.M; Ruggiero, K. and Villas-Boas, S.G. (2010) - Pathway Activity Profiling (PAPi): from metabolite profile to metabolic pathway activity. Bioinformatics.

See Also

buildDatabase, papi, papiHtest and addKeggCodes.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
### 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))

PAPi documentation built on Oct. 31, 2019, 3:19 a.m.