@@ -308,7 +308,8 @@ p7_pipeline_Create(const ESL_GETOPTS *go, int M_hint, int L_hint, int long_targe
308308 * | --max | turn all heuristic filters off | FALSE |
309309 * | --F1 | Stage 1 (MSV) thresh: promote hits P <= F1 | 0.02 |
310310 * | --F2 | Stage 2 (Vit) thresh: promote hits P <= F2 | 1e-3 |
311- * | --F3 | Stage 2 (Fwd) thresh: promote hits P <= F3 | 1e-5 |
311+ * | --F3 | Stage 3 (Fwd) thresh: promote hits P <= F3 | 1e-5 |
312+ * | --F4 | Stage 3 (FS-Fwd) thresh: promote hits P <= F4 | 5e-4 |
312313 * | --nobias | turn OFF composition bias filter HMM | FALSE |
313314 * | --nonull2 | turn OFF biased comp score correction | FALSE |
314315 * | --seed | RNG seed (0=use arbitrary seed) | 42 |
@@ -426,6 +427,7 @@ p7_pipeline_fs_Create(ESL_GETOPTS *go, int M_hint, int L_hint, enum p7_pipemodes
426427 pli -> F1 = ((go && esl_opt_IsOn (go , "--F1" )) ? ESL_MIN (1.0 , esl_opt_GetReal (go , "--F1" )) : 0.02 );
427428 pli -> F2 = (go ? ESL_MIN (1.0 , esl_opt_GetReal (go , "--F2" )) : 1e-3 );
428429 pli -> F3 = (go ? ESL_MIN (1.0 , esl_opt_GetReal (go , "--F3" )) : 1e-5 );
430+ pli -> F4 = (go ? ESL_MIN (1.0 , esl_opt_GetReal (go , "--F4" )) : 5e-4 );
429431 pli -> B1 = (go ? esl_opt_GetInteger (go , "--B1" ) : 100 );
430432 pli -> B2 = (go ? esl_opt_GetInteger (go , "--B2" ) : 240 );
431433 pli -> B3 = (go ? esl_opt_GetInteger (go , "--B3" ) : 1000 );
@@ -435,7 +437,7 @@ p7_pipeline_fs_Create(ESL_GETOPTS *go, int M_hint, int L_hint, enum p7_pipemodes
435437 pli -> do_max = TRUE;
436438 pli -> do_biasfilter = FALSE;
437439
438- pli -> F2 = pli -> F3 = 1 .0 ;
440+ pli -> F2 = pli -> F3 = pli -> F4 = .0 ;
439441 pli -> F1 = 1.0 ; // need to set some threshold for F1 even on long targets. Should this be tighter?
440442 }
441443 if (go && esl_opt_GetBoolean (go , "--nonull2" )) pli -> do_null2 = FALSE;
@@ -2606,25 +2608,6 @@ p7_pli_postViterbi_BATH(P7_PIPELINE *pli, P7_OPROFILE *om, P7_PROFILE *gm, P7_FS
26062608 pli_tmp -> tmpseq -> end = dna_window -> n + dna_window -> length - 1 ;
26072609 pli_tmp -> tmpseq -> dsq = subseq ;
26082610
2609- P_fs = eslINFINITY ;
2610- P_fs_nobias = eslINFINITY ;
2611-
2612- /*If this search is using the frameshift aware pipeline
2613- * (user did not specify --nofs) than run Frameshift
2614- * Forward on full Window and save score and P value.*/
2615- if (pli -> fs_pipe ) {
2616- p7_bg_fs_FilterScore (bg , pli_tmp -> tmpseq , wrk , gcode , pli -> do_biasfilter , & filtersc_fs );
2617-
2618- p7_gmx_fs_GrowTo (pli -> gxf , gm_fs -> M , 4 , dna_window -> length , 0 );
2619- p7_fs_ReconfigLength (gm_fs , dna_window -> length );
2620-
2621- p7_ForwardParser_Frameshift (subseq , gcode , dna_window -> length , gm_fs , pli -> gxf , & fwdsc_fs );
2622-
2623- seqscore_fs = (fwdsc_fs - filtersc_fs ) / eslCONST_LOG2 ;
2624- P_fs = esl_exp_surv (seqscore_fs , gm_fs -> evparam [p7_FTAUFS ], gm_fs -> evparam [p7_FLAMBDA ]);
2625- P_fs_nobias = esl_exp_surv (fwdsc_fs /eslCONST_LOG2 , gm_fs -> evparam [p7_FTAUFS ], gm_fs -> evparam [p7_FLAMBDA ]);
2626- }
2627-
26282611 tot_orf_sc = eslINFINITY ;
26292612 tot_orf_P = eslINFINITY ;
26302613 min_P_orf = eslINFINITY ;
@@ -2694,7 +2677,27 @@ p7_pli_postViterbi_BATH(P7_PIPELINE *pli, P7_OPROFILE *om, P7_PROFILE *gm, P7_FS
26942677 tot_orf_P = esl_exp_surv (tot_orf_sc / eslCONST_LOG2 , om -> evparam [p7_FTAU ], om -> evparam [p7_FLAMBDA ]);
26952678 }
26962679
2697- /* Compare Pvalues to select either the standard or the frameshift pipeline
2680+
2681+ P_fs = eslINFINITY ;
2682+ P_fs_nobias = eslINFINITY ;
2683+
2684+ /*If this search is using the frameshift aware pipeline
2685+ * (user did not specify --nofs) than run Frameshift
2686+ * Forward on full Window and save score and P value.*/
2687+ if (pli -> fs_pipe && (!pli -> std_pipe || min_P_orf <= pli -> F4 )) {
2688+ p7_bg_fs_FilterScore (bg , pli_tmp -> tmpseq , wrk , gcode , pli -> do_biasfilter , & filtersc_fs );
2689+
2690+ p7_gmx_fs_GrowTo (pli -> gxf , gm_fs -> M , 4 , dna_window -> length , 0 );
2691+ p7_fs_ReconfigLength (gm_fs , dna_window -> length );
2692+
2693+ p7_ForwardParser_Frameshift (subseq , gcode , dna_window -> length , gm_fs , pli -> gxf , & fwdsc_fs );
2694+
2695+ seqscore_fs = (fwdsc_fs - filtersc_fs ) / eslCONST_LOG2 ;
2696+ P_fs = esl_exp_surv (seqscore_fs , gm_fs -> evparam [p7_FTAUFS ], gm_fs -> evparam [p7_FLAMBDA ]);
2697+ P_fs_nobias = esl_exp_surv (fwdsc_fs /eslCONST_LOG2 , gm_fs -> evparam [p7_FTAUFS ], gm_fs -> evparam [p7_FLAMBDA ]);
2698+ }
2699+
2700+ /* Compare Pvalues to select either the standard or the frameshift pipeline
26982701 * If the DNA window passed frameshift forward AND produced a lower P-value
26992702 * than the sumed Forward score of the orfs used to costruct that window
27002703 * then we proceed with the frameshift pipeline
0 commit comments