Usage
plot_profile(gene_expr, pathway_name, result_name = paste(pathway_name, "_profile_", type, ".png", sep = ""), KEGG_database, groups, bg_col = "white", text_col = "black", line_col, border_col = "grey", text_cex = 0.25, magnify = 1, type = c("lines", "bg"), pathway_min = 5, genes_kept = c("foldchange", "first", "random", "var", "abs"), species = "hsa", database_dir = getwd(), max_dist, lwd = 1.2, speciesRefMap = TRUE)
Arguments
gene_expr
the matrix for gene expression, row.names should be NCBI gene ID, such as 67040, 93683
pathway_name
the species id and KEGG pathway id, such as 'hsa00010'
result_name
the name of figure file generated by KEGGprofile. The default name is pathway_name+'_profile_'+type+'.png', such as 'hsa04110_profile_lines.png'
KEGG_database
the matrix returned by function parse_XMLfile, which contains genes in this pathway, and their names, locations etc
groups
a character used to indicate expression values from different types of samples
bg_col
background color for gene rectangles in the pathway map
text_col
the colors for text in the pathway map. A color matrix generated by function col_by_value
can be used here line_col
line color for expression in different samples in the pathway map, valid when type='lines'
border_col
border color for gene rectangles in the pathway map. A color matrix generated by function col_by_value
can be used here text_cex
cex for text in the pathway map. A color matrix generated by function col_by_value
can be used here magnify
the coefficient used to magnify the gene rectangles
type
the type of pathway map visulization, could be 'bg' or 'lines'. Default is 'bg'. See also 'Details'
pathway_min
The pathways with number of annotated genes less than pathway_min would be ignored
genes_kept
methods used for choosing genes when several genes corresponding to one location in pathway map. Default is 'foldchange', which kept the gene with largest fold changes. 'first' kept the first gene. 'random' chosed gene random. 'var' kept the gene with largest variation. 'abs' kept the gene with largest absolute value
species
the species id in KEGG database, 'hsa' means human, 'mmu' means mouse, 'rno' means rat, etc
database_dir
the directory where the XML files and png files are located
max_dist
The expression changes that represented by the distance from the bottom to the top of gene rectangle, valid when type='lines'. This param is used to ensure the dynamic changes of lines in different gene polygon represent equal variation. It would be calculated from the maximum changes of genes in this pathway by default. If max_dist=NA, then the lines would be plotted from top to bottom in each gene rectangle
lwd
The line width when type='lines'
speciesRefMap
Logical, use the species specific figure as reference map. if set as FALSE, the reference pathway figure without species information will be used