first previous next last contents

Deleting a contig

As contig numbers must always be from 1 to N, where N is the number of contigs, if we remove a particular contig, we need to ensure we still have contigs 1 to N-1. In thise case, deleting contig x, where x != N, will mean that we have a hole (at x) which can be filled by moving N down to x.

To illustrate in an algorithm we have the following; Given N contigs and a request to delete contig x.

  1. Delete contig x. This is a NULL operation as far as the io_delete_contig operation goes as we're already assuming the data on this contig has gone elsewhere.
  2. Move contig N to contig x (if x != N). This includes updating the disk images as well as the fortran arrays and the contig order, but not the registration lists -- yet.
  3. Decrement the number of contigs. (N--)
  4. Notify contig x of the delete using REG_DELETE.
  5. Notify contig N of the renumber to contig x using REG_NUMBER_CHANGE. (if appropriate)
  6. Update registration list information.

Hence it is important to remember that after an io_delete_contig the contig numbers may not be the same as before the call.

first previous next last contents
This page is maintained by staden-package. Last generated on 1 March 2001.