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)
inputData | Data frame with chromosome column and 16 rows (for example the
output of |
---|---|
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 |
Input data frame with rows ordered by chromosome length.
# NOT RUN { ordered_df <- order_chromosomes(chrCov_df, 'seqname') ordered_df <- order_chromosomes(chrCov_df, 'chr', decreasing=TRUE) # }