rescale_fixed_width_position: Tripartite linear rescaling

Description Usage Arguments

View source: R/transcript_shape_profile-class.R

Description

Given a length, a fixed bin width, and head/tail lengths this function generates a sequence [0, 1] that is composed of three linear sub-scales for the head, mid, and tail region. These scales are created such that positions <= linear_head_length are converted to a uniform sequence between [0, head_percent] and values [bin_size * length_out - linear_tail_length, bin_size] are converted to a uniform sequence [tail_percent, 1] with the mid values falling in the remaining range.

Usage

1
2
3
4
5
6
7
8
9
rescale_fixed_width_position(
  bin_size,
  length_out,
  linear_head_length,
  linear_tail_length,
  head_percent = 0.2,
  tail_percent = 0.2,
  short_heuristic = TRUE
)

Arguments

bin_size

width of each position range that is being converted

length_out

length of position vector to be created

linear_head_length

total width of head region (# of bins * width)

linear_tail_length

total width of tail region (# of bins * width)

head_percent

fraction of [0, 1] to be occupied by head region

tail_percent

fraction of [0, 1] to be occupied by tail region

short_heuristic

whether sequences shorter than the sum of the head and tail length should be accommodated by proportionally rescaling the head and tail lengths. Otherwise an error will be thrown.


CshlSiepelLab/tuSelecter2 documentation built on July 18, 2021, 5:09 p.m.