Maximum Acyclic Subgraph - Multiple Sequence Alignment
MaximumAcyclicSubgraph
Graph.h
1 #pragma once
2 #include<string>
3 #include<vector>
4 #include<array>
5 #include<iostream>
6 #include<fstream>
7 #include "Node.h"
8 #include "Edge.h"
9 #include<utility>
10 #include<algorithm>
11 #include<set>
12 
13 using std::vector;
14 using std::string;
15 using std::pair;
16 
17 class Graph {
18  private:
19 
20  unsigned int k;
21 
28  vector<Node> nodes;
29 
30  vector<Edge> edges;
31 
32  void calcNodeList(vector<string>& stringListSequence);
33  public:
34 
35  Graph();
36 
37  vector<Node>& getNodes();
38 
39  unsigned int getNumberOfSequences();
40 
46  unsigned int getNumberOfNodes(unsigned int sequence);
47 
48  vector<Edge>& getEdges();
49 
56  void readFastaFiles(string nameFile, unsigned int k);
57 
63  void resetGraph();
64 };
vector< Edge > & getEdges()
get vector of edges for all sequences
Definition: Graph.cc:28
vector< Node > & getNodes()
get vector of nodes with matches in other sequences
Definition: Graph.cc:13
Definition: Graph.h:17
void resetGraph()
reset the Graph clears nodes and edges and sets k to zero
Definition: Graph.cc:171
unsigned int getNumberOfSequences()
return the number of sequences for an ascending sorted nodes with respect to the rows ...
Definition: Graph.cc:9
void readFastaFiles(string nameFile, unsigned int k)
read a fasta file
Definition: Graph.cc:33
unsigned int getNumberOfNodes(unsigned int sequence)
get number of nodes for a sequence
Definition: Graph.cc:18