elsasserlab / labcode

Utils to perform frequent data analyses in the lab.
GNU General Public License v3.0
0 stars 1 forks source link

bw_bed refactor #72

Closed cnluzon closed 4 years ago

cnluzon commented 4 years ago

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.