/* The following function prints the "classic" GeneSeqer2 MATCH line */ static void xml_showmatchline(GthSA *sa, unsigned int indentlevel, GtFile *outfp) { gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<MATCH_line gen_id=\"%s\" gen_strand=\"%c\" ", gth_sa_gen_id(sa), gth_sa_gen_strand_char(sa)); if (gth_sa_alphatype(sa) == DNA_ALPHA) { gt_file_xprintf(outfp, "ref_id=\"%s\" ref_strand=\"%c\">\n", gth_sa_ref_id(sa), gth_sa_ref_strand_char(sa)); } else gt_file_xprintf(outfp, "ref_id=\"%s\">\n", gth_sa_ref_id(sa)); indentlevel++; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<total_alignment_score>%.3f</total_alignment_score>\n", gth_sa_score(sa)); gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<cumulative_length_of_scored_exons>%lu" "</cumulative_length_of_scored_exons>\n", gth_sa_cumlen_scored_exons(sa)); gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<coverage percentage=\"%.3f\" high_type=\"", gth_sa_coverage(sa)); gt_file_xfputc(gth_sa_coverage_char(sa), outfp); gt_file_xprintf(outfp, "\"/>\n"); indentlevel--; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "</MATCH_line>\n"); }
/* The following function prints the "classic" GeneSeqer2 MATCH line */ static void showmatchline(GthSA *sa, GtFile *outfp) { gt_file_xprintf(outfp, "MATCH\t%s%c\t%s%c\t%5.3f\t"GT_WU"\t%5.3f\t%c\n", gth_sa_gen_id(sa), gth_sa_gen_strand_char(sa), gth_sa_ref_id(sa), gth_sa_ref_strand_char(sa), gth_sa_score(sa), gth_sa_cumlen_scored_exons(sa), gth_sa_coverage(sa), gth_sa_coverage_char(sa)); }
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); }
/* The following function prints the "classic" GeneSeqer2 PGS line */ static void showpgsline(GthSA *sa, GtFile *outfp) { GtUword i, numofexons; gt_assert(sa); numofexons = gth_sa_num_of_exons(sa); gt_file_xprintf(outfp, "PGS_%s%c_%s%c\t(", gth_sa_gen_id(sa), gth_sa_gen_strand_char(sa), gth_sa_ref_id(sa), gth_sa_ref_strand_char(sa)); for (i = 0; i < numofexons; i++) { gt_file_xprintf(outfp, ""GT_WU" "GT_WU"", gth_sa_left_genomic_exon_border(sa, i), gth_sa_right_genomic_exon_border(sa, i)); if (i == numofexons - 1) gt_file_xprintf(outfp, ")\n\n"); else gt_file_xfputc(',', outfp); } }
/* The following function prints the "classic" GeneSeqer2 PGS line */ static void xml_showpgsline(GthSA *sa, unsigned int indentlevel, GtFile *outfp) { unsigned long i, numofexons; gt_assert(sa); numofexons = gth_sa_num_of_exons(sa); gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<PGS_line>\n"); indentlevel++; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<gDNA gen_id=\"%s\" gen_strand=\"%c\"/>\n", gth_sa_gen_id(sa), gth_sa_gen_strand_char(sa)); gth_indent(outfp, indentlevel); if (gth_sa_alphatype(sa) == DNA_ALPHA) { gt_file_xprintf(outfp, "<rDNA rDNA_id=\"%s\" rDNA_strand=\"%c\"/>\n", gth_sa_ref_id(sa), gth_sa_ref_strand_char(sa)); } else { gt_file_xprintf(outfp, "<rProt rProt_id=\"%s\"/>\n", gth_sa_ref_id(sa)); } gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<gDNA_exon_coordinates>\n"); indentlevel++; for (i = 0; i < numofexons; i++) { gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<exon e_start=\"%lu\" e_stop=\"%lu\"/>\n", gth_sa_left_genomic_exon_border(sa, i), gth_sa_right_genomic_exon_border(sa, i)); } indentlevel--; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "</gDNA_exon_coordinates>\n"); indentlevel--; gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "</PGS_line>\n"); }