Refactored bw_bed function creating a multi_bw_ranges_aggregated function that encapsulates the aggregating by name field in GRanges object. Now the function is more readable and less error prone.
A test was added to include testing for BED files that do not contain name field. These will crash when aggregate_by is used with them.
This collaterally fixes a data type inconsistency when normalizing. Now always mcols are of type after computation, regardless of operations dimentions.
Refactored
bw_bed
function creating amulti_bw_ranges_aggregated
function that encapsulates the aggregating byname
field in GRanges object. Now the function is more readable and less error prone.A test was added to include testing for BED files that do not contain name field. These will crash when
aggregate_by
is used with them.This collaterally fixes a data type inconsistency when normalizing. Now always mcols are of type after computation, regardless of operations dimentions.