#pragma once #include "Chromosome.h" #include "strategies/ChromosomeRearrangementStrategy.h" #include #include /* */ class ChromosomeRearrangementStrategy; // forward declaration class Genotype; class HaploidGenotype { friend class Genotype; friend class ChromosomeRearrangementStrategy; friend std::ostream& operator << (std::ostream& os, const Genotype& g); friend class Processor; protected: std::vector chromosomes; public: const Chromosome& getChromosome(unsigned int i) const { return this->chromosomes.at(i);} public: HaploidGenotype(const std::vector& _chrom) : chromosomes(_chrom){}; }; class Genotype { friend class ChromosomeRearrangementStrategy; friend std::ostream& operator<< (std::ostream& os, const Genotype& g); friend class Processor; protected: HaploidGenotype fatherGenome; HaploidGenotype motherGenome; public: Genotype(const std::vector& _fGenome, const std::vector& _mGenome) : fatherGenome(HaploidGenotype(_fGenome)), motherGenome(HaploidGenotype(_mGenome)) {}; Genotype(const HaploidGenotype& _fGenome, const HaploidGenotype& _mGenome) : fatherGenome(_fGenome), motherGenome(_mGenome) {}; Genotype(const Genotype& _fDiplGenome, const Genotype& _mDiplGenome); HaploidGenotype recombinantHaploidGenotype(ChromosomeRearrangementStrategy*) const; const HaploidGenotype& getFatherGenome() const { return this->fatherGenome;} const HaploidGenotype& getMotherGenome() const { return this->motherGenome;} std::string toSimpleString() const; std::string toSimpleFasta(bool onlyMother = true) const; std::string toMaxModuleAB() const; std::string getRawGene(unsigned int fatherMother, unsigned int chromoNum, unsigned int geneNum) const; void doRawMutationSequence(unsigned int fatherMother, unsigned int chromoNum, unsigned int geneNum, std::string newSeq); }; //!!!!!!!!!! class PolyploidGenotype { };