plot_heatmap: plot_heatmap

Description Usage Arguments Details Value Examples

Description

Plots tidy dataframe from a deeptools matrix file to a ggplot2 object.

Usage

1
plot_heatmap(df, sort_y = "sum", facets = NULL)

Arguments

df

the df to load.

sort_y

how to sort y axis of the heatmap ('region_len', 'sum', 'mean', 'max' )

facets

a string for facetting of the plot.

Details

Plots a df from a deeptools matrix tibble.

Value

An ggplot2 plot object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 fname <- "/Users/schmidm/Documents/other_people_to_and_from/ClaudiaI/pA_seq/deeptools_out/Evgenia_PASseq_all_snRNA_joined.gz"
 df <- load_deeptoolsmatrix(fname)
 head(df)
 plot_heatmap(df, sort_y='sum', facets='.~sample_name')

 #can be further modified
 p <- plot_heatmap(df, sort_y='sum', facets='.~sample_name')
 p + ylab('')
 p + scale_fill_gradient2(low='white', high='darkred')
 p <- p + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
 p + scale_fill_gradient2(low='white', high='darkred', name ='log10(norm. reads)')

manschmi/RMetaTools documentation built on Dec. 14, 2021, 4:33 a.m.