File: dosimple.c

package info (click to toggle)
ncbi-tools6 6.1.20120620-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 241,628 kB
  • ctags: 101,236
  • sloc: ansic: 1,431,713; cpp: 6,248; pascal: 3,949; xml: 3,390; sh: 3,090; perl: 1,077; csh: 488; makefile: 449; ruby: 93; lisp: 81
file content (34 lines) | stat: -rw-r--r-- 675 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*****************************************************************************
*
*   dosimple.c
*       test program for simple sequence (fasta format)
*
*****************************************************************************/
#include <simple.h>

Int2 Main(void)
{
	AsnIoPtr aip;
    SimpleSeqPtr ssp;
    FILE * fp;

	if ((aip = AsnIoOpen("bioseq.ent", "r")) == NULL)
		return 1;

    ssp = SimpleSeqAsnRead(aip);

	aip = AsnIoClose(aip);

    fp = FileOpen("simple.out", "w");

    fprintf(fp, "fasta format:\n\n");
    SimpleSeqPrint(ssp, fp, TRUE);

    fprintf(fp, "\n\nreport format:\n\n");
    SimpleSeqPrint(ssp, fp, FALSE);

    FileClose(fp);

	return 0;
}