void gth_run_header_show(GthCallInfo *call_info, GthInput *input, const char *gth_version, unsigned int indentlevel, const char **args) { char *timestring; GtFile *outfp = call_info->out->outfp; /* determine time */ timestring = gth_get_time(); /* output XML header */ if (call_info->out->xmlout) { show_xml_run_header(call_info, input, timestring, gth_version, indentlevel, args); } else if (!call_info->out->gff3out) { gt_file_xprintf(outfp, "%c GenomeThreader %s (%s)\n", COMMENTCHAR, gth_version, GT_BUILT); gt_file_xprintf(outfp, "%c Date run: %s\n", COMMENTCHAR, timestring); gt_file_xprintf(outfp, "%c Arguments: ", COMMENTCHAR); gt_cstr_array_show_genfile(args, outfp); } /* free */ gt_free(timestring); }
void gth_stat_show(GthStat *stat, bool show_full_stats, bool xmlout, GtFile *outfp) { char *timestring; gt_assert(stat); /* begin XML comment */ if (xmlout) gt_file_xprintf(outfp, "<!--\n"); /* output exon length distribution */ if (stat->exondistri) { gt_file_xprintf(outfp, "%c length distribution of all exons:\n", COMMENTCHAR); gt_disc_distri_show(stat->exondistribution, outfp); } /* output intron length distribution */ if (stat->introndistri) { if (stat->exondistri) gt_file_xprintf(outfp, "%c\n", COMMENTCHAR); gt_file_xprintf(outfp, "%c length distribution of all introns:\n", COMMENTCHAR); gt_disc_distri_show(stat->introndistribution, outfp); } /* output match number distribution */ if (stat->matchnumdistri) { if (stat->exondistri || stat->introndistri) gt_file_xprintf(outfp, "%c\n", COMMENTCHAR); gt_file_xprintf(outfp, "%c distribution of match numbers (per genomic " "file, per reference sequence:\n", COMMENTCHAR); gt_disc_distri_show(stat->matchnumdistribution, outfp); } /* output reference sequence coverage distribution */ if (stat->refseqcovdistri) { if (stat->exondistri || stat->introndistri || stat->matchnumdistri) gt_file_xprintf(outfp, "%c\n", COMMENTCHAR); gt_file_xprintf(outfp, "%c reference sequence coverage distribution (of " "global chains):\n", COMMENTCHAR); gt_disc_distri_show(stat->refseqcoveragedistribution, outfp); } /* output spliced alignment statistics */ if (stat->sa_stats) { if (stat->exondistri || stat->introndistri || stat->matchnumdistri || stat->refseqcovdistri) { gt_file_xprintf(outfp, "%c\n", COMMENTCHAR); } INFOCHAR; gt_file_xprintf(outfp, "spliced alignment alignment score distribution:\n"); gt_disc_distri_show(stat->sa_alignment_score_distribution, outfp); INFOCHAR; gt_file_xfputc('\n', outfp); INFOCHAR; gt_file_xprintf(outfp, "spliced alignment coverage distribution:\n"); gt_disc_distri_show(stat->sa_coverage_distribution, outfp); } /* output general statistics */ outputgeneralstatistics(stat, show_full_stats, outfp); INFOCHAR; gt_file_xfputc('\n', outfp); /* output the memory statistics */ outputmemorystatistics(stat, show_full_stats, outfp); /* output time */ INFOCHAR; gt_file_xfputc('\n', outfp); INFOCHAR; timestring = gth_get_time(); gt_file_xprintf(outfp, "date finished: %s\n", timestring); gt_free(timestring); /* output important messages */ if (stat->numofremovedzerobaseexons || stat->numofautointroncutoutcalls || stat->numofunsuccessfulintroncutoutDPs || stat->numoffailedDPparameterallocations || stat->numoffailedmatrixallocations || stat->numofundeterminedSAs || stat->numoffilteredpolyAtailmatches) { gt_file_xprintf(outfp, "%c\n", COMMENTCHAR); gt_file_xprintf(outfp, "%c important messages:\n", COMMENTCHAR); if (stat->numofremovedzerobaseexons > 0) { gt_file_xprintf(outfp, "%c %lu removed zero base exons\n", COMMENTCHAR, stat->numofremovedzerobaseexons); } if (stat->numofautointroncutoutcalls > 0) { gt_file_xprintf(outfp, "%c %lu times the intron cutout technique was " "used automatically\n", COMMENTCHAR, stat->numofautointroncutoutcalls); } if (stat->numofunsuccessfulintroncutoutDPs > 0) { gt_file_xprintf(outfp, "%c %lu unsuccessful DP calls using intron " "cutout technique\n", COMMENTCHAR, stat->numofunsuccessfulintroncutoutDPs); } if (stat->numoffailedDPparameterallocations > 0) { gt_file_xprintf(outfp, "%c %lu DP parameter allocations failed\n", COMMENTCHAR, stat->numoffailedDPparameterallocations); } if (stat->numoffailedmatrixallocations > 0) { gt_file_xprintf(outfp, "%c %lu matrix allocations failed\n", COMMENTCHAR, stat->numoffailedmatrixallocations); } if (stat->numofundeterminedSAs > 0) { gt_file_xprintf(outfp, "%c %lu undetermined spliced alignments\n", COMMENTCHAR, stat->numofundeterminedSAs); } if (stat->numoffilteredpolyAtailmatches > 0) { gt_file_xprintf(outfp, "%c %lu matches containing a poly(A) tail filtered\n", COMMENTCHAR, stat->numoffilteredpolyAtailmatches); } } /* end XML comment */ if (xmlout) gt_file_xprintf(outfp, "-->\n"); }