order_chromosomes: Order chromosome column by chromosome length

Description Usage Arguments Value Examples

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

1
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

1
2
3
4
5
6
## Not run: 
ordered_df <- order_chromosomes(chrCov_df, 'seqname')

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

## End(Not run)

luisvalesilva/hwglabr documentation built on May 21, 2019, 8:56 a.m.