-- Computes a residue -> counts map for a column, weighted by sequence weight,
-- e.g. if a sequence has 'A' at that position, and the sequence's weight is 2,
-- then for that sequence 'A' is added twice to the total count of 'A'.

weightedColToCountsMap :: [Int] -> Column -> M.Map Residue Int
weightedColToCountsMap weights col =
    M.fromListWith (+) $ zip (T.unpack col) weights
weightedColToCountsMap :: [Int] -> Column -> M.Map Residue Int
weightedColToCountsMap weights col =
    M.fromListWith (+) $ zip (T.unpack col) weights
weightedColToCountsMap weights col =
    M.fromListWith (+) $ zip (T.unpack col) weights