Esempio n. 1
0
static void
print_all_explain(const p3_global_settings *pa,
                  const seq_args *sa, 
                  const p3retval *retval,
                  int io_version)
{
  if (pa->pick_left_primer == 1
      && !(pa->pick_anyway && sa->left_input))
    printf("PRIMER_LEFT_EXPLAIN=%s\n",
           p3_get_oligo_array_explain_string(p3_get_rv_fwd(retval)));

  if (pa->pick_right_primer == 1
      && !(pa->pick_anyway && sa->right_input))
    printf("PRIMER_RIGHT_EXPLAIN=%s\n",
           p3_get_oligo_array_explain_string(p3_get_rv_rev(retval)));

  if ( pa->pick_internal_oligo == 1
      && !(pa->pick_anyway && sa->internal_input)) 
    printf("PRIMER_INTERNAL_%sEXPLAIN=%s\n",
           (io_version == 3 ? "OLIGO_" : ""),
           p3_get_oligo_array_explain_string(p3_get_rv_intl(retval)));

  if (pa->pick_right_primer == 1 
      && pa->pick_left_primer == 1) {
    printf("PRIMER_PAIR_EXPLAIN=%s\n", 
           p3_get_pair_array_explain_string(p3_get_rv_best_pairs(retval)));
  }
}
Esempio n. 2
0
/* This function does _not_ print out the no_orf statistic. */
static void
print_explain(FILE *f,
              const p3_global_settings *pa,
              const seq_args *sa,
              const p3retval *retval,
              int print_lib_sim,
              const char *pr_release)
{


    const char *format;  /* Format string for the table headers */
    if(pa->thermodynamic_alignment==0)
        format    = "%6s%6s%6s%6s%6s%6s%6s%6s%6s%6s%6s%6s";
    else format = "%6s%6s%6s%6s%6s%6s%6s%6s%6s%6s%7s%6s";

    fprintf(f, "\nStatistics\n");

    if (!pa->pick_anyway || !(
                (pa->pick_left_primer == 1 && pa->pick_internal_oligo == 0
                 && pa->pick_right_primer == 1
                 && sa->left_input && sa->right_input)
                || (pa->pick_left_primer == 1 && pa->pick_internal_oligo == 1
                    && pa->pick_right_primer == 1
                    && sa->left_input && sa->right_input && sa->internal_input)
                || (pa->pick_left_primer == 1 && pa->pick_internal_oligo == 0
                    && pa->pick_right_primer == 0
                    && sa->left_input)
                || (pa->pick_left_primer == 0 && pa->pick_internal_oligo == 0
                    && pa->pick_right_primer == 1
                    && sa->right_input)
                || (pa->pick_left_primer == 0 && pa->pick_internal_oligo == 1
                    && pa->pick_right_primer == 0
                    && sa->internal_input))) {
        /* print first row of header */
        if(pa->thermodynamic_alignment==0)
            fprintf(f, format, "", "con", "too",  "in",  "in",  "not", "", "no", "tm",  "tm",  "   high", "high");
        else
            fprintf(f, format, "", "con", "too",  "in",  "in",  "not", "", "no", "tm",  "tm",  "   high", "high");
//      if(pa->thermodynamic_alignment==1)
        fprintf(f, "%6s", "high");
        if(print_lib_sim)
            fprintf(f, "%6s", "high");
        fprintf(f, "%6s%6s", "", "high");
        if(pa->lowercase_masking)
            fprintf(f, "%6s", "lower");
        fprintf(f, "%6s\n", "");

        /* print second row of header */
        if(pa->thermodynamic_alignment==0) {
            fprintf(f, format, "", "sid", "many", "tar", "excl", "ok", "bad","GC", "too", "too", "    any",  "3'");
            fprintf(f, "%6s", "hair-");
        } else {
            fprintf(f, format, "", "sid", "many", "tar", "excl", "ok", "bad","GC", "too", "too", " any_th",  "3'_th");
            fprintf(f, "%6s", "hair-");
        }

        if(print_lib_sim)
            fprintf(f, "%6s", "lib");
        fprintf(f, "%6s%6s", "poly", "end");
        if(pa->lowercase_masking)
            fprintf(f, "%6s", " case");
        fprintf(f, "%6s\n", "");

        /* print third row of header */
        if(pa->thermodynamic_alignment==0)
            fprintf(f, format, "", "ered","Ns",   "get", "reg",  "reg", "GC%", "clamp", "low", "high","  compl", "compl");
        else
            fprintf(f, format, "", "ered","Ns",   "get", "reg",  "reg", "GC%", "clamp", "low", "high","  compl", "compl");
//      if(pa->thermodynamic_alignment==1)
        fprintf(f, "%6s", " pin");
        if(print_lib_sim)
            fprintf(f, "%6s", "sim");
        fprintf(f, "%6s%6s", "X", "stab");
        if(pa->lowercase_masking)
            fprintf(f, "%6s", " end");
        if(pa->lowercase_masking)
            fprintf(f, "%6s\n", "ok  ");
        else
            fprintf(f, "%6s\n", "ok");
    }
    if (pa->pick_left_primer == 1
            && !(pa->pick_anyway && sa->left_input))
        print_stat_line(f, "Left", retval->fwd.expl,
                        print_lib_sim, pa->lowercase_masking, pa->thermodynamic_alignment);

    if (pa->pick_right_primer == 1
            && !(pa->pick_anyway && sa->right_input))
        print_stat_line(f, "Right", retval->rev.expl,
                        print_lib_sim, pa->lowercase_masking, pa->thermodynamic_alignment);

    if (pa->pick_internal_oligo == 1
            && !(pa->pick_anyway && sa->internal_input))
        print_stat_line(f, "Intl", retval->intl.expl,
                        print_lib_sim, pa->lowercase_masking, pa->thermodynamic_alignment);

    if (pa->pick_left_primer == 1 && pa->pick_right_primer == 1) {
        fprintf(f, "Pair Stats:\n%s\n",
                p3_get_pair_array_explain_string(p3_get_rv_best_pairs(retval)));
    }
}