Description Usage Arguments Author(s) See Also Examples
[* PARAMETERS IN MAP_CONFIG *]
======= HEATMAP ========
[param] raw_data TRUE or FALSE, determines whether to change the raw data to row z-data to illustrate the heatmap.
[param] kmer_col number, split the col data by kmer. ATTENTION: only heatmap_1 has this parameter
[param] kmer_row number, split the row data by kmer.
[param] split_row_name vector, the specific row name to split, eg. ["name1", "name2", "name3"]
[param] percentage number, between 0 and 1, the total heatmap percentage of the whole canvas.
[param] kmer_col_color character. Col data color theme of dendrogram.
[param] kmer_row_color character. Row data color them of dendrogram.
[param] dendrogram "both", "col", "row", "none". SEE heatmap.2
[param] color_theme character heatmap gradient colot theme.
[param] Rowv TRUE or FALSE, determines if and how the row dendrogram should be reordered. By default, it is TRUE, which implies dendrogram is computed and reordered based on row means. If NULL or FALSE, then no dendrogram is computed and no reordering is done. If a dendrogram, then it is used "as-is", ie without any reordering. If a vector of integers, then dendrogram is computed and reordered based on the order of the vector. SEE heatmap.2
[param] Colv TRUE or FALSE, determines if and how the column dendrogram should be reordered. Has the options as the Rowv argument above and additionally when x is a square matrix, Colv = "Rowv" means that columns should be treated identically to the rows. SEE heatmap.2
[param] distfun character, function used to compute the distance (dissimilarity) between both rows and columns. Defaults to dist. Also, there are other several parameters in distfun, such as "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". You can also have a user-defined function by inputing a function parameter through gvmapModAttr. SEE heatmap.2
[param] hclustfun character, function used to compute the hierarchical clustering when Rowv or Colv are not dendrograms. Defaults to hclust. Also, there are other several parameters in hclustfun, such as ward.D, ward.D2, single, complete, average, mcquitty, median, centroid. You can also have a user-defined function by inputing a function parameter through gvmapModAttr. SEE heatmap.2
======= LEGEND ========
the legend data config format is simple
eg:
["Gender","binary_gender_col", 3]
["ETV6-RUNX1", "tag_col", 4]
["KRAS", "mutation_col", 7]
The first element in the vector is legend data. It dose not the same as the colnames in legend data. The second element in the vector is the color theme, you can choose the color from color config list. The third element in the vector is the column number.
======= OTHER ========
[param] heatmap_num the total heatmap number
[param] legend_num the total legend number
[param] map_order the order of all plot element
[param] split_sample split sample name
[* PARAMETERS IN COLOR_CONFIG *]
[param] bg_col background color theme, other user-define color theme must start with 'bg_'.
[param] tag_col target color theme, other user-define color theme must start with 'tag_'.
gvmap package
1 2 3 4 5 6 | gvmap(legend_data, heatmap_data, config_file, output_svg_name,
convert_pdf = FALSE, convert_jpg = FALSE, output_group_info = FALSE,
plot_width = 1200, plot_height = 1600, stroke_width = 1,
dend_stroke_width = 2, group_span = 10, sample_span = 0,
heatmap_row_span = 0, frame = TRUE, frame_stroke_width = 2,
sample_font_size = NULL, legend_font_size = NULL, font_family = "Arial")
|
legend_data |
data frame. The basic legend data of the plot. It will contain all the sample information. Attention: the row name of the legend data must be the sample name, or this funciton will NOT run. |
heatmap_data |
list, the heatmap data of the sample. The list name of heatmap data must like this form: heatmap_1, heatmap_2 ... And each heatmap subset must be a martrix, with sample name being the col name and gene set being the row name. |
config_file |
character, the path of your config file. see gvmap-config |
output_svg_name |
character, the output svg file name |
convert_pdf |
bool, whether to convert svg file into pdf. Attention: If your svg file is over 10M, it's better not convert it into pdf. This bug is still being repaired. |
convert_jpg |
bool, whether to convert svg file into png. |
output_group_info |
bool, output group information of each heatmap and legend |
plot_width |
number, the canvas width of your figure. Default: 1200 |
plot_height |
number, the canvas height of your figure. Default: 1600 |
stroke_width |
number, the stroke width of your legend figure. Default: 1 |
dend_stroke_width |
number, the dendrogram stroke width. Default: 2 |
group_span |
number, the distance between two groups, such as heatmap_1 and legend_1. Default: 10 |
sample_span |
number, the distance between sample. Default: 0 |
heatmap_row_span |
number, the distance between two specific colnames on heatmap. Default: 0 |
frame |
bool, if TRUE, the legend data has black outline. Otherwise there is no outline. Default: TRUE |
frame_stroke_width |
number, the stroke width of the legend frame |
sample_font_size |
number, the sample font size |
legend_font_size |
number, the legend font size |
font_family |
character, the font family of the plot. Default: "Arial" |
Dai Yuting forlynna@sjtu.edu.cn
Useful links:
https://github.com/ytdai/gvmap
Report bugs at https://github.com/ytdai/gvmap/issues
heatmap, heatmap.2
1 | browseVignettes("gvmap")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.