class SequenceInformationCollector {

    public Map<String, Object> collectInformation() {
        Map<String, Object> result = new HashMap<>();
        Map<String, Integer> countOfGroups = new HashMap<>();
        Map<String, SequenceDescriptor> descriptors = sequenceManager.getDescriptors();
        int sumSequenceCount = 0;
        for (String seqDescriptorKey : descriptors.keySet()) {
            int countOfSequences = descriptors.get(seqDescriptorKey).getSequences().size();
            sumSequenceCount += countOfSequences;
            countOfGroups.put(seqDescriptorKey, countOfSequences);
        }
        result.put(SUM_KEY, sumSequenceCount);
        result.put(GROUPS_KEY, countOfGroups);
        return result;
    }

}