-
Notifications
You must be signed in to change notification settings - Fork 0
/
locus.cpp
73 lines (57 loc) · 1.14 KB
/
locus.cpp
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* File: locus.cpp
* Author: Steve
*
* Created on July 15, 2015, 7:38 AM
*/
#include "locus.h"
#include <string>
#include <vector>
locus::locus()
{
species;
sequences;
}
void locus::AddData(std::string name, std::string sequence, int allele)
{
if(allele == 0)
{
species.push_back(name);
}
//put the sequence onto the vector
sequences.push_back(sequence);
}
void locus::AddData(std::string name, std::string allele1, std::string allele2)
{
species.push_back(name);
sequences.push_back(allele1);
sequences.push_back(allele2);
}
int locus::GetSize()
{
int length = species.size();
return length;
}
int locus::GetSeqSize()
{
int length = sequences.size();
return length;
}
std::string locus::GetName(int i)
{
std::string name = species.at(i);
return name;
}
std::string locus::GetSeq(int i)
{
std::string seq = sequences.at(i);
return seq;
}
void locus::SetSeq(std::string seq, int i)
{
sequences.at(i) = seq;
}
locus::locus(const locus& orig) {
}
locus::~locus() {
}