static void xml_showgthgenomicinformation(GthSA *sa, GthInput *input, unsigned int indentlevel, GtFile *outfp) { gt_assert(gth_sa_gen_file_num(sa) != GT_UNDEF_ULONG); gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<gDNA_segment>\n"); indentlevel++; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<template temp_file=\"%s\" temp_id=\"%s\" " "temp_strand=\"%c\" temp_description=\"", gth_input_get_genomic_filename(input, gth_sa_gen_file_num(sa)), gth_sa_gen_id(sa), gth_sa_gen_strand_char(sa)); gth_input_echo_genomic_description(input, gth_sa_gen_file_num(sa), gth_sa_gen_seq_num(sa), outfp); gt_file_xprintf(outfp, "\">\n"); indentlevel++; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<position start=\"%lu\" stop=\"%lu\"/>\n", gth_sa_gen_dp_start_show(sa), gth_sa_gen_dp_end_show(sa)); indentlevel--; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "</template>\n"); indentlevel--; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "</gDNA_segment>\n"); }
static void showgthgenomicinformation(GthSA *sa, GthInput *input, bool showseqnums, GtFile *outfp) { gt_assert(gth_sa_gen_file_num(sa) != GT_UNDEF_UWORD); gt_file_xprintf(outfp, "Genomic Template: file=%s, strand=%c, from="GT_WU", " "to="GT_WU", description=", gth_input_get_genomic_filename(input, gth_sa_gen_file_num(sa)), gth_sa_gen_strand_char(sa), gth_sa_gen_dp_start_show(sa), gth_sa_gen_dp_end_show(sa)); gth_sa_echo_genomic_description(sa, input, outfp); if (showseqnums) gt_file_xprintf(outfp, ", seqnum="GT_WU"", gth_sa_gen_seq_num(sa)); gt_file_xfputc('\n', outfp); gt_file_xfputc('\n', outfp); }
static void showalignmentheader(GthSA *sa, bool gs2out, int widthforgenpos, GtUword minintronlength, GtFile *outfp) { GtUword i, leftreferenceexonborder, rightreferenceexonborder, referenceexonlength; GthDbl exonscore, donorsitescore, acceptorsitescore; GthFlt donorsiteprobability, acceptorsiteprobability; Exoninfo *exoninfo; Introninfo *introninfo; gt_file_xprintf(outfp, "Predicted gene structure"); if (gs2out) { gt_file_xprintf(outfp, " (within gDNA segment "GT_WU" to "GT_WU"):\n", gth_sa_gen_dp_start_show(sa), gth_sa_gen_dp_end_show(sa)); } else gt_file_xprintf(outfp, ":\n"); gt_file_xfputc('\n', outfp); for (i = 0; i < gth_sa_num_of_exons(sa); i++) { exoninfo = gth_sa_get_exon(sa, i); leftreferenceexonborder = exoninfo->leftreferenceexonborder; rightreferenceexonborder = exoninfo->rightreferenceexonborder; referenceexonlength = rightreferenceexonborder - leftreferenceexonborder + 1; exonscore = exoninfo->exonscore; if (i > 0) { introninfo = gth_sa_get_intron(sa, i-1); donorsiteprobability = introninfo->donorsiteprobability; donorsitescore = introninfo->donorsitescore; acceptorsiteprobability = introninfo->acceptorsiteprobability; acceptorsitescore = introninfo->acceptorsitescore; gt_file_xprintf(outfp, " Intron %2" GT_WUS " %*" GT_WUS " %*" GT_WUS " (%4" GT_WUS " n); ", i - 1 + OUTPUTOFFSET, widthforgenpos, gth_sa_left_intron_border(sa, i-1), widthforgenpos, gth_sa_right_intron_border(sa, i-1), gth_sa_intron_length(sa, i-1)); gt_file_xprintf(outfp, "Pd: %5.3f ", donorsiteprobability); if (gth_sa_alphatype(sa) == DNA_ALPHA) { if (donorsitescore == 0.0) gt_file_xprintf(outfp, "(s: 0), "); else gt_file_xprintf(outfp, "(s: %4.2f), ", donorsitescore); } else gt_file_xprintf(outfp, " "); gt_file_xprintf(outfp, "Pa: %5.3f ", acceptorsiteprobability); if (gth_sa_alphatype(sa) == DNA_ALPHA) { if (acceptorsitescore == 0.0) gt_file_xprintf(outfp, "(s: 0)"); else gt_file_xprintf(outfp, "(s: %4.2f)", acceptorsitescore); } /* if the intron is shorter or equal than the minimum intron length two question marks are shown at the end of the line */ if (gth_sa_intron_length(sa, i-1) <= minintronlength) gt_file_xprintf(outfp, " ??"); gt_file_xfputc('\n', outfp); } gt_file_xprintf(outfp, " Exon %2" GT_WUS " %*" GT_WUS " %*" GT_WUS " (%4" GT_WUS " n); %s %6" GT_WUS " %6" GT_WUS " (%4" GT_WUS " %s); " "score: %5.3f\n", i + OUTPUTOFFSET, widthforgenpos, gth_sa_left_genomic_exon_border(sa, i), widthforgenpos, gth_sa_right_genomic_exon_border(sa, i), gth_sa_genomic_exon_length(sa, i), gth_sa_alphastring(sa), leftreferenceexonborder + OUTPUTOFFSET, rightreferenceexonborder + OUTPUTOFFSET, referenceexonlength, gth_sa_alphatype(sa) == DNA_ALPHA ? "n" : "aa", exonscore); } /* showing PPA line (if an poly-A tail was determined) */ if (gth_sa_alphatype(sa) == DNA_ALPHA) showppaline(sa, outfp); gt_file_xfputc('\n', outfp); /* showing MATCH line */ showmatchline(sa, outfp); /* showing PGS line */ showpgsline(sa, outfp); }