order_chromosomes: Order chromosome column by chromosome length

View source: R/order_chromosomes.R

order_chromosomesR Documentation

Order chromosome column by chromosome length

Description

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.

Usage

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)

## End(Not run)

hochwagenlab/hwglabr documentation built on Feb. 25, 2025, 5:41 a.m.