Description Usage Arguments Value Examples
View source: R/millefy-lastplot.R
Adjust the last Millefy plot
1 2 3 4 5 | millefy_adjust(max_value = NA_real_, heights = NA,
sc_type = NA_character_, title = NA_character_, axis = NA,
axis_height = NA_real_, sc_avg = NA, sc_avg_height = NA_real_,
sc_avg_scale = NA_real_, sc_avg_log = NA_real_,
sc_average_mode = NA, sc_sort_destiny = NA)
|
max_value |
A number. The maximum value of heatmap color scaling. |
heights |
A list of track heights. Or, you can use a unit (e.g., 'unit(c(1,1,12,2,1), c("null", "cm", "null", "null", "null")'). |
sc_type |
A string. "heatmap" (default) or "coverage". |
title |
A string. Title. |
axis |
A logical. If TRUE (default), axis for genomic coordinate is shown. |
axis_height |
A number. The height of the axis track. |
sc_avg |
A logical. If TRUE (defalut), a track for averaged read coverage for every group is generated. |
sc_avg_height |
A number. The height of the averaged read coverage track. |
sc_avg_scale |
A number. Maximum value of the averaged read coverage track. |
sc_avg_log |
A logical. If TRUE (default is FALSE), the values in the averaged read coverage track is log-transformed. |
sc_average_mode |
A string. "mean" (default) or "median". How to summarise single-cell read coverage across samples in every group. |
sc_sort_destiny |
'none' (default) or 'all' or 'group'. |
Description of return values
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | # Path to bigWig files
bwfiles = Sys.glob(file.path(system.file("extdata", package="millefy"), "*.bw"))
# Group labels for bigWig files (same length as \\code{bwfiles})
groups = c("00h", "00h", "00h", "12h", "12h", "12h")
# Color labels for bigWig files (A named vector with the same length as the number of kinds of \\code{groups})
color_labels <- colorRampPalette(c("yellow", "red"))(length(unique(groups))+1)[1:length(unique(groups))]
names(color_labels) <- unique(groups)
# Parameters
max_value = 7873
# Single cell track
scTrackBw <- list(path_bam_files = bwfiles, groups = groups, group_colors = color_labels, max_value = max_value, isBw=TRUE)
# Gene annotation track (For faster performance, try to use \\code{dt_gtf} paramter)
path_gtf <- system.file("extdata", "example.gtf", package="millefy")
dt_gtf_exon <- gtfToDtExon(path_gtf)
geneTrack1 <- list(path_gtf = path_gtf, dt_gtf = dt_gtf_exon, label = "GENCODE")
# Prepare arguments for \\code{millefyPlot()}
tdlist <- list(scTrackBw, geneTrack1)
tt <- c("sc", "gene")
heights = c(12, 2)
text_main = "My plot"
# Location to visualize
chr = "chr19" # character
start = 5824708 # integer
end = 5845478 # integer
# Plot
l <- millefyPlot(track_data=tdlist, track_type=tt, heights=heights,
sc_type = "heatmap",
chr = chr, start = start, end = end,
sc_avg = TRUE, sc_avg_height = 1,
title = text_main)
# Replot ajusting max value of the heatmap
millefy_adjust(max_value = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.