static void xml_show_pgl(GthPGL *pgl, unsigned long pglnum, unsigned long translationtable, GthInput *input, unsigned int indentlevel, GthOutput *out) { unsigned long i; gth_indent(out->outfp, indentlevel); gt_file_xprintf(out->outfp, "<predicted_gene_location>\n"); indentlevel++; gth_indent(out->outfp, indentlevel); gt_file_xprintf(out->outfp, "<PGL_line PGL_serial=\"%lu\" PGL_strand=\"%c\" " "PGL_start=\"%lu\" PGL_stop=\"%lu\"/>\n", pglnum + OUTPUTOFFSET, SHOWSTRAND(gth_pgl_is_forward(pgl)), SHOWGENPOS(gth_pgl_is_forward(pgl), gth_pgl_total_length(pgl), gth_pgl_genomic_offset(pgl), pgl->maxrange.start), SHOWGENPOS(gth_pgl_is_forward(pgl), gth_pgl_total_length(pgl), gth_pgl_genomic_offset(pgl), pgl->maxrange.end)); for (i = 0; i < gth_pgl_num_of_ags(pgl); i++) { xml_show_ags(gth_pgl_get_ags(pgl, i), pglnum, i, translationtable, input, indentlevel, out); } indentlevel--; gth_indent(out->outfp, indentlevel); gt_file_xprintf(out->outfp, "</predicted_gene_location>\n"); }
static void show_pgl(GthPGL *pgl, GtUword pglnum, GtUword translationtable, GthInput *input, unsigned int indentlevel, GthOutput *out) { GtUword i; GtFile *outfp = out->outfp; gt_assert(!out->gff3out); if (out->xmlout) { gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<predicted_gene_location>\n"); indentlevel++; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<PGL_line PGL_serial=\"" GT_WU "\" " "PGL_strand=\"%c\" PGL_start=\"" GT_WU "\" PGL_stop=\"" GT_WU "\"/>\n", pglnum + OUTPUTOFFSET, SHOWSTRAND(gth_pgl_is_forward(pgl)), SHOWGENPOS(gth_pgl_is_forward(pgl), gth_pgl_total_length(pgl), gth_pgl_genomic_offset(pgl), pgl->maxrange.start), SHOWGENPOS(gth_pgl_is_forward(pgl), gth_pgl_total_length(pgl), gth_pgl_genomic_offset(pgl), pgl->maxrange.end)); } else { gt_file_xprintf(outfp, "PGL %3" GT_WUS " (%c strand): " GT_WU " " GT_WU, pglnum + OUTPUTOFFSET, SHOWSTRAND(gth_pgl_is_forward(pgl)), SHOWGENPOS(gth_pgl_is_forward(pgl), gth_pgl_total_length(pgl), gth_pgl_genomic_offset(pgl), pgl->maxrange.start), SHOWGENPOS(gth_pgl_is_forward(pgl), gth_pgl_total_length(pgl), gth_pgl_genomic_offset(pgl), pgl->maxrange.end)); if (out->pglgentemplate) gt_file_xprintf(outfp, " (genomic template '%s')", gth_pgl_gen_id(pgl)); gt_file_xfputc('\n', outfp); } for (i = 0; i < gt_array_size(pgl->assemblies); i++) { show_ags(gth_pgl_get_ags(pgl, i), pglnum, i, translationtable, input, indentlevel, out); } if (out->xmlout) { indentlevel--; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "</predicted_gene_location>\n"); } }
GtUword gth_sa_gen_dp_end_show(const GthSA *sa) { gt_assert(sa); return SHOWGENPOS(sa->gen_strand_forward, sa->gen_total_length, sa->gen_offset, gth_sa_gen_dp_start(sa) + gth_sa_gen_dp_length(sa) - 1); }
GtUword gth_sa_gen_dp_start_show(const GthSA *sa) { gt_assert(sa); return SHOWGENPOS(sa->gen_strand_forward, sa->gen_total_length, sa->gen_offset, gth_backtrace_path_gen_dp_start(sa->backtrace_path)); }
GtUword gth_sa_right_intron_border(const GthSA *sa, GtUword intron) { Exoninfo *exoninfo; gt_assert(sa); exoninfo = gth_sa_get_exon(sa, intron + 1); return SHOWGENPOS(sa->gen_strand_forward, sa->gen_total_length, sa->gen_offset, exoninfo->leftgenomicexonborder - 1); }
static void showoutputlines(char *dotline, char *template_out, char *frame0_out, char *frame1_out, char *frame2_out, unsigned long outlen, bool gen_strand_forward, unsigned long gen_total_length, unsigned long gen_offset, unsigned long *positionmapping, GthOutput *out) { unsigned long i, outcounter = 0, origcounter = 0; while (outcounter < outlen) { OUTPUT_EXONPOSSPACE; OUTPUT_LINE(dotline); /* output exon position */ gt_file_xprintf(out->outfp, "%*lu ", out->widthforgenpos, SHOWGENPOS(gen_strand_forward, gen_total_length, gen_offset, positionmapping[origcounter])); OUTPUT_LINE(template_out); OUTPUT_EXONPOSSPACE; OUTPUT_LINE(frame0_out); OUTPUT_EXONPOSSPACE; OUTPUT_LINE(frame1_out); OUTPUT_EXONPOSSPACE; OUTPUT_LINE(frame2_out); (void) gt_file_xprintf(out->outfp, "\n\n"); outcounter = i + 1; origcounter += TRANSLATIONLINEWIDTH; } }