#ifndef DEDUP_UMI_HPP #define DEDUP_UMI_HPP #include "Graph.hpp" #include "GZipWriter.hpp" #include "AlevinUtils.hpp" struct SalmonEqClass { std::vector labels; uint32_t count; }; using UGroupT = spp::sparse_hash_map; using TGroupT = std::vector; // takem from https://stackoverflow.com/questions/896155/tr1unordered-set-union-and-intersection/896440 template OutIt unordered_set_intersection(InIt1 b1, InIt1 e1, InIt2 b2, InIt2 e2, OutIt out) { while (!(b1 == e1)) { if (!(std::find(b2, e2, *b1) == e2)) { *out = *b1; ++out; } ++b1; } return out; } bool dedupClasses(std::vector& geneAlphas, double& totalUMICount, std::vector& txpGroups, std::vector& umiGroups, std::vector& salmonEqclasses, uint32_t umiLength, spp::sparse_hash_map& txpToGeneMap, std::vector& tiers, GZipWriter& gzw, uint32_t umiEditDistance, bool dumpUmiGraph, std::string& trueBarcodeStr, std::vector>& arboEqClassCount, bool dumpArborescences, std::atomic& totalUniEdgesCounts, std::atomic& totalBiEdgesCounts); #endif // DEDUP_UMI_HPP