#include <IO.h> int io_init_reading( GapIO *io, int N); int io_init_contig( GapIO *io, int N); int io_init_annotations( GapIO *io, int N);
These functions create new reading, contig and annotations structures. Each
takes two arguments; the first being the GapIO pointer, and the second
being the new reading, contig or annotation number to create. This is not the
number of new structures, but rather the highest allowed number for this
For instance, if we have 10 readings, "
io_init_reading(io, 12)" will
create two more, numbered 11 and 12.
For readings, the records are recovered (by increasing the GDatabase NumReadings field to NReadings) if available. The new GReadings structure are not guaranteed to be clear.
For contigs, the records are recovered if available. The contig_order array is also updated with the new contigs being added at the rightmost position. The new contigs are added to the registration scheme with blank registration lists. The new GContigs structures are not guaranteed to be clear.
For annotations, new records are always allocated from disk. It is up to the caller to first check that there are no free annotations in the free_annotations list. The new GAnnotations structures are not guaranteed to be clear.
All functions returns return 0 for success, and -1 for failure.