48 string getSeqID(
int speciesIdx);
49 Strand getStrand(
int speciesIdx);
50 int getStart(
int speciesIdx){
return starts[speciesIdx]; }
51 int getEnd(
int speciesIdx){
return ends[speciesIdx]; }
52 list<ExonCandidate*>* getExonCands(
int speciesIdx){
return exoncands.at(speciesIdx); }
54 Alignment * getAlignment() {
return alignment;}
55 vector<int> getOffsets() {
return offsets;}
57 map<string,ExonCandidate*>* getECHash(list<ExonCandidate*> *ec);
66 void createExonCands(
int s,
const char *dna, map<int_fast64_t, ExonCandidate*> &ecs, map<int_fast64_t, ExonCandidate*> &addECs);
67 void setExonCands(vector<map<int_fast64_t, ExonCandidate*> > &ecs);
79 void createOrthoExons(list<OrthoExon> &orthoExonsList, map<int_fast64_t, list<pair<int,ExonCandidate*> > > &alignedECs,
Evo *evo,
float consThres = 0.0,
int minAvLen = 0);
81 void printGeneRanges();
82 void printExonCands();
83 void printOrthoExons(list<OrthoExon> &orthoExonsList);
84 void computeOmegas(list<OrthoExon> &orthoExonsList, vector<AnnoSequence*>
const &seqRanges,
PhyloTree *ctree);
85 void computeOmegasEff(list<OrthoExon> &orthoExonsList, vector<AnnoSequence*>
const &seqRanges,
PhyloTree *ctree, ofstream *codonAli);
93 void computeClamsaEff(list<OrthoExon> &orthoExonsList, vector<AnnoSequence*>
const &seqRanges,
PhyloTree *ctree, ofstream *codonAli);
94 void computeClamsa(list<OrthoExon> &orthoExonsList, vector<AnnoSequence*>
const &seqRanges,
PhyloTree *ctree, ofstream *codonAli);
95 vector<string> pruneToBV(vector<string> *cs, bit_vector bv);
96 vector<int> pruneToBV(vector<int> *rfc, bit_vector bv);
97 double omegaForCodonTuple(vector<double> *loglik);
98 void printOmegaForCodon(
string outdir);
100 void comparativeSignalScoring(list<OrthoExon> &orthoExonsList);
105 void calcConsScore(list<OrthoExon> &orthoExonsList, vector<AnnoSequence*>
const &seqRanges,
string outdir);
106 double calcColumnScore(
int a,
int c,
int t,
int g);
107 void consToWig(vector<double> &consScore,
string outdir);
110 static void setTree(
PhyloTree *t){tree = t;}
111 static void setCodonEvo(
CodonEvo *c){ codonevo = c; }
112 static void setCodonEvoDiscr(
CodonEvoDiscr *c){ codonevodiscr = c; }
113 static int numSpecies(){
return tree->numSpecies(); }
114 static void openOutputFiles(
string outdir);
115 static void closeOutputFiles();
119 static int orthoExonID;
120 static int geneRangeID;
121 static vector<int> exonCandID;
122 static unordered_map< bit_vector, PhyloTree*, boost::hash<bit_vector>> topologies;
124 static vector< ofstream* > exonCands_outfiles, orthoExons_outfiles, geneRanges_outfiles_bed, geneRanges_outfiles_gff, omega_outfiles;
126 static map<vector<string>, pair<vector<double>,
int> > computedCumValues;
128 void printSingleOrthoExon(
OrthoExon const &oe,
bool files =
true);
129 void collect_features(
int species, list<OrthoExon> *hects,
SpeciesGraph *speciesgraph);
140 void getAllOEMsas(
int species, list<OrthoExon> *hects, unordered_map<string,int> *ref_class,
141 vector<AnnoSequence*>
const &seqRanges);
173 vector<string> getCodonAlignment(
OrthoExon const &oe, vector<AnnoSequence*>
const &seqRanges,
174 const vector<vector<fragment>::const_iterator > &froms,
175 map<
unsigned, vector<int> > *alignedCodons = NULL,
176 bool generateString =
true,
177 ofstream *codonAli = NULL);
197 vector<string> getCodonAlignment2(
OrthoExon const &oe, vector<AnnoSequence*>
const &seqRanges,
198 const vector<vector<fragment>::const_iterator > &froms);
200 cumValues* findCumValues(bit_vector bv, vector<int> rfc);
205 vector<int> starts, ends;
209 vector< list<ExonCandidate*>* > exoncands;
211 unordered_map<bit_vector, vector<pair<vector<int>,
cumValues> >, boost::hash<bit_vector> > cumOmega;
212 map<bit_vector, map<vector<int>, vector<double> > > codonOmega;
221 friend class boost::serialization::access;
222 template<
class Archive>
223 void serialize(Archive & ar,
const unsigned int version)