hallgrimskirkja_plot: Title

View source: R/snp_utils_plot.R

hallgrimskirkja_plotR Documentation

Title

Description

Title

Usage

hallgrimskirkja_plot(
  df,
  left_slop,
  right_slop,
  left_bins_num = 50,
  centre_bins_num = 50,
  right_bins_num = 25,
  facet_regions = F,
  legend_position = c(0.94, 0.7),
  fill_by = c("region", "event", "bin", "count"),
  x_labels = c("exon", "generic", "bins"),
  event_type = NULL
)

Arguments

df
left_slop

A number defining how much you slopped the bed file upstream (strand aware).

right_slop

A number defining how much you slopped the bed file downstream (strand aware).

left_bins_num

Number of bins you used for binning the upstream region.

centre_bins_num

Number of bins you used for binning the central region(s).

right_bins_num

Number of bins you used for binning the downstream region.

facet_regions

Logical defining whether to slightly separate (facet) the individual regions. Can be either TRUE or FALSE.

legend_position

Where to put the legend. Goes to legend.postion of the ggplot2::theme().

fill_by

How to colour the histogram, one of region, event, bin, count. See details for explanation.

x_labels

How to label the X-axis text, still not perfect.

event_type

Text to put in the title.

Details

The parameter fill_by defines how to colour the plot: region colours by the type of region, meaning upstream, centre or downstream region. event colours by the number of events (i.e. exons) with an SNP in that specific bin. It serves to check that high bars are due to many different event regions and not one single hot spot in few events. bin colours by the bin number in each region and count fills based on how tall is the bar in the histogram.

Value

A ggplot

Note

save the plots with ggsave( device = cairo_pdf) and not with device = 'pdf'.


Ni-Ar/niar documentation built on Feb. 3, 2025, 9:25 a.m.