Given a data frame with 16 rows and a column with chromosome number, this function returns the data frame with rows ordered by chromosome length.

order_chromosomes(inputData, chrColumn, decreasing = FALSE)

Arguments

inputData

Data frame with chromosome column and 16 rows (for example the output of chr_coverage). No default.

chrColumn

String name of chromosome column to order by. No default.

decreasing

Logical indicating whether to order in decreasing order, from longest to shortest chromosome. Defaults to FALSE.

Value

Input data frame with rows ordered by chromosome length.

Examples

# NOT RUN {
ordered_df <- order_chromosomes(chrCov_df, 'seqname')

ordered_df <- order_chromosomes(chrCov_df, 'chr', decreasing=TRUE)
# }