-
Notifications
You must be signed in to change notification settings - Fork 146
/
Copy pathkmer_mapper_logger.hpp
45 lines (35 loc) · 1.27 KB
/
kmer_mapper_logger.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//***************************************************************************
//* Copyright (c) 2023-2024 SPAdes team
//* Copyright (c) 2015-2022 Saint Petersburg State University
//* Copyright (c) 2011-2014 Saint Petersburg Academic University
//* All Rights Reserved
//* See file LICENSE for details.
//***************************************************************************
/*
* sequencem_mapping_logger.h
*
* Created on: Nov 27, 2012
* Author: alex
*/
#ifndef KMER_MAPPER_LOGGER_H_
#define KMER_MAPPER_LOGGER_H_
#include "assembly_graph/core/action_handlers.hpp"
#include "sequence/sequence.hpp"
namespace debruijn {
template<class Graph>
class KmerMapperLogger : public omnigraph::GraphActionHandler<Graph> {
public:
typedef pair<Sequence, Sequence> MappedSeq;
typedef typename Graph::EdgeId EdgeId;
KmerMapperLogger(Graph& graph) : GraphActionHandler<Graph>(graph, "KmerMapperLogger") {}
virtual ~KmerMapperLogger() {}
virtual void HandleGlue(EdgeId new_edge, EdgeId edge1, EdgeId edge2) {
log_.push_back(MappedSeq(this->g().EdgeNucls(edge1), this->g().EdgeNucls(edge2)));
}
const vector<MappedSeq>& log() const {
return log_;
}
vector<MappedSeq> log_;
};
} /* namespace debruijn */
#endif /* KMER_MAPPER_LOGGER_H_ */