Ejemplo n.º 1
0
static void xml_outputAGSline(const GthAGS *ags, unsigned long agsnum,
                              unsigned int indentlevel, GtFile *outfp)
{
  GthExonAGS *exon;
  unsigned long i;

  gth_indent(outfp, indentlevel);
  gt_file_xprintf(outfp, "<AGS_line AGS_serial=\"%lu\">\n",
                  agsnum + OUTPUTOFFSET);
  indentlevel++;
  gth_indent(outfp, indentlevel);
  gt_file_xprintf(outfp, "<exon_coordinates>\n");
  indentlevel++;

  for (i = 0; i < gth_ags_num_of_exons(ags); i++) {
    exon = gth_ags_get_exon(ags, i);
    gth_indent(outfp, indentlevel);
    gt_file_xprintf(outfp, "<exon e_start=\"%lu\" e_stop=\"%lu\"/>\n",
                    SHOWGENPOSAGS(exon->range.start),
                    SHOWGENPOSAGS(exon->range.end));
  }

  indentlevel--;
  gth_indent(outfp, indentlevel);
  gt_file_xprintf(outfp, "</exon_coordinates>\n");
  indentlevel--;
  gth_indent(outfp, indentlevel);
  gt_file_xprintf(outfp, "</AGS_line>\n");
}
Ejemplo n.º 2
0
static void outputAGSline(const GthAGS *ags, GtUword agsnum,
                          GtFile *outfp)
{
  GthExonAGS *exon;
  GtUword i;

  gt_file_xprintf(outfp, "AGS-" GT_WU " (",  agsnum + OUTPUTOFFSET);
  for (i = 0; i < gth_ags_num_of_exons(ags); i++) {
    exon = gth_ags_get_exon(ags, i);
    if (i > 0)
      gt_file_xfputc(',', outfp);
    gt_file_xprintf(outfp, GT_WU "  " GT_WU, SHOWGENPOSAGS(exon->range.start),
                    SHOWGENPOSAGS(exon->range.end));
  }
  gt_file_xprintf(outfp, ")\n");
}