Changeset 824
- Timestamp:
- 09/09/07 12:26:23 (3 years ago)
- Location:
- luc/trunk
- Files:
-
- 4 modified
-
calc_prob.cpp (modified) (3 diffs)
-
gen_seq.hpp (modified) (1 diff)
-
main.cpp (modified) (2 diffs)
-
vectorized_gen_seq.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
luc/trunk/calc_prob.cpp
r823 r824 100 100 101 101 for (int loc = 1 ; loc<3 ; loc++) { 102 double rho_app ; //rho applicable dans la situation ; 103 if (loc == 1) rho_app = rhoT ; 104 else rho_app = rho-rhoT ; 105 102 106 if (iter->valeur_item[2*loc+1] != 0) { 103 107 type_after = type_recomb(n_conta, iter->id, loc, family) ; … … 109 113 110 114 construire_Taux(taux_eve, 111 prior_prob*(nj+1)*(nk+1)*rhoT/(an_array[6]*rho*(ncase+ncont)*(n_app+1)), 112 evenement, iter->id, 0, type_after[3], type_after[4]) ; 115 prior_prob*((double) nj+1)*((double) nk+1)*rho_app/(an_array[6]*rho*((double) ncase+ (double) ncont)*((double) n_app+1)), 116 evenement, iter->id, 0, type_after[2], type_after[3]) ; 117 vect.push_back(taux_eve) ; 113 118 } 114 119 } … … 125 130 v = calc_prob_C_intra(v, n_cont, my_prior_array,ncas,ncont) ; 126 131 calc_prob_C_inter(v, n_cont, fam, my_prior_array, ncas, ncont) ; 132 calc_prob_recomb(v, n_cont, my_prior_array, ncas, ncont, 0) ; // Couvre rec_cas ; 133 calc_prob_recomb(v, n_cont, my_prior_array, ncas, ncont, 1) ; // Couvre rec_tem ; 127 134 return(v) ; 128 135 }; -
luc/trunk/gen_seq.hpp
r823 r824 215 215 216 216 int * type_recomb(vector<Count> n_conta, int id, int locus, int dest) ; 217 218 void calc_prob_recomb(vector<Taux> &vect, vector<Count> n_conta, double * an_array, int ncase, int ncont, int family) ; -
luc/trunk/main.cpp
r819 r824 1190 1190 // completer_info(nouv_test) ; 1191 1191 // n_container.push_back(nouv_test) ; 1192 //check_compatibility(compa, n_container, (--n_container.end())->valeur_item) ;1193 //les_taux = calc_prob_eve(n_container, compa, Prob, n_case, n_control) ;1192 check_compatibility(compa, n_container, (--n_container.end())->valeur_item) ; 1193 les_taux = calc_prob_eve(n_container, compa, Prob, n_case, n_control) ; 1194 1194 // 1195 1195 // for (vector<Famille>::iterator iter = compa.begin() ; iter != compa.end() ; ++iter) { … … 1199 1199 // } 1200 1200 // 1201 // for (vector<Count>::iterator ui = n_container.begin(); ui != n_container.end(); ++ui) { 1202 // 1203 // cout << ui->id << ": " << ui->count << endl ; 1204 // 1205 // } ; 1206 // 1207 // for (vector<Taux>::iterator iter = les_taux.begin() ; iter != les_taux.end() ; ++iter) { 1208 // cout << "Type : " << iter->type_eve << " Prob. : " << iter->taux << endl ; 1209 // } 1210 // 1201 for (vector<Count>::iterator ui = n_container.begin(); ui != n_container.end(); ++ui) { 1202 1203 cout << ui->id << ": " << ui->count << endl ; 1204 1205 } ; 1206 1207 int go = 1 ; 1208 for (vector<Taux>::iterator iter = les_taux.begin() ; iter != les_taux.end() ; ++iter) { 1209 cout << go << ": " << "Type : " << iter->type_eve << " Prob. : " << iter->taux << endl ; 1210 cout << "Type enf1 : " << iter->enfant1 << " Type enf2 : " << iter->enfant2 << " Type par1 : " << iter->parent1 << " Type par2 : " << iter->parent2 << endl ; 1211 go++ ; 1212 } 1213 1211 1214 1212 1215 return(0) ; -
luc/trunk/vectorized_gen_seq.cpp
r820 r824 171 171 int * type_recomb(vector<Count> n_conta, int id, int locus, int dest) { //Rend un vecteur des types de séq après recombinaison ; 172 172 173 int * type_after = new int [4] ; // Position 0 : Seq comportant le site anc. sous sel. ; 1:Seq cas ; 2:Seq control;173 int * type_after = new int [4] ; // Position 0 : Indice dans n_conta de seq comportant le site anc. sous sel. ; 1: Indice de l'autre sequence ; 2: Id de la seq en position 0 ; 3: Id de la seq en position 1 ; 174 174 if (locus == 1) { 175 175 int id_div = (id/100000)*100000 ;
