get_rounded_max: Find highest number of reads in a long table

View source: R/get_rounded_max.R

get_rounded_maxR Documentation

Find highest number of reads in a long table

Description

Internal helper which takes a long and tidy data frame containing read or count numbers derived from MultiQC, and finds the largest read or count value, then round it up to the nearest ten million.

Usage

get_rounded_max(x, buffer = 1.1, nearest = 1e+07)

Arguments

x

Data frame of read information

buffer

Multiply the largest value by this factor before rounding. Defaults to 1.1, i.e. adds a 10% buffer to the maximum value.

nearest

Nearest number to round up to. Defaults to 10e6.

Details

Input data frame must contain the columns "sample" and "n_reads".

Value

Numeric; maximum number of total reads or counts

References

None.

See Also

https://www.github.com/travis-m-blimkie/tRavis


travis-m-blimkie/tRavis documentation built on April 9, 2024, 11:45 p.m.