NEFFy
NEFF Calculator and MSA File Converter
Loading...
Searching...
No Matches
msaWriter.h
Go to the documentation of this file.
1
12#ifndef MSAWRITER_H
13#define MSAWRITER_H
14
15#include <vector>
16#include <string>
17#include <iostream>
18#include <set>
19#include "common.h"
20
22{
23 protected:
24 std::string file;
25 std::string fileName;
26 std::string format;
27 std::vector<Sequence> Sequences;
28 int IDspace; // the max space needed to write ID, in order to all sequences be aligned in output file
29
30 virtual void writeFile(std::ofstream& file) = 0;
31
34
35 public:
36
40 MSAWriter(std::vector<Sequence> sequences, std::string file);
41
46 void write();
47};
48
49// Derived class for writing in a2m format
51{
52 public:
54 private:
55 void writeFile(std::ofstream& file) override;
56};
57
58// Derived class for writing in a3m format
60{
61 public:
63 private:
64 void writeFile(std::ofstream& file) override;
65};
66
67// Derived class for writing in stockholm format
69{
70 public:
72 private:
73 void writeFile(std::ofstream& file) override;
74};
75
76// Derived class for writing in fasta format
78{
79 public:
81 private:
82 void writeFile(std::ofstream& file) override;
83};
84
85// Derived class for writing in clustal format
87{
88 public:
90 private:
91 void writeFile(std::ofstream& file) override;
92};
93
94// Derived class for writing in aln format
96{
97 public:
99 private:
100 void writeFile(std::ofstream& file) override;
101};
102
103// Derived class for writing in pfam format
105{
106 public:
108 private:
109 void writeFile(std::ofstream& file) override;
110};
111
112#endif
Definition msaWriter.h:51
void writeFile(std::ofstream &file) override
Definition msaWriter.cpp:57
Definition msaWriter.h:60
void writeFile(std::ofstream &file) override
Definition msaWriter.cpp:93
Definition msaWriter.h:96
void writeFile(std::ofstream &file) override
Definition msaWriter.cpp:182
Definition msaWriter.h:87
void writeFile(std::ofstream &file) override
Definition msaWriter.cpp:169
Definition msaWriter.h:78
void writeFile(std::ofstream &file) override
Definition msaWriter.cpp:160
Definition msaWriter.h:105
void writeFile(std::ofstream &file) override
Definition msaWriter.cpp:192
Definition msaWriter.h:69
void writeFile(std::ofstream &file) override
Definition msaWriter.cpp:129
Definition msaWriter.h:22
int IDspace
Definition msaWriter.h:28
std::string fileName
Definition msaWriter.h:25
std::string file
Definition msaWriter.h:24
virtual void writeFile(std::ofstream &file)=0
std::vector< Sequence > Sequences
Definition msaWriter.h:27
MSAWriter(std::vector< Sequence > sequences, std::string file)
Constructor.
Definition msaWriter.cpp:21
void write()
Write sequences in the MSA file, based on the format of the output file.
Definition msaWriter.cpp:33
std::string format
Definition msaWriter.h:26
void generateIdForSequences()
Generate IDs for sequences that do not have any ID.
Definition msaWriter.cpp:24
This file contains declaration of common utility functions used in the MSA project.
Footer