first previous next last contents


#include <IO.h>

int io_insert_seq(
        int2    maxgel,
        int2   *length,
        int2   *start,
        int2   *end,
        char   *seq,
        int1   *conf,
        int2   *opos,
        int2    pos,
        char   *bases,
        int1   *newconf,
        int2   *newopos,
        int2    Nbases);

io_insert_seq inserts one or more bases into the sequence, confidence and original positions arrays specified. No database I/O is performed.

The existing sequence, confidence values, and original positions arrays are passed as seq, conf, and opos arguments. All are mandatory. The length of sequence and hence the number of used elements in these arrays is passed as length, with start and end containing the left and right cutoff positions.

The new sequence, confidence values, and original positions to insert are passed as bases, newconf and newopos. The number of bases to insert is Nbases. Either or both of the newconf and newopos arguments may be NULL. The inserted confidence values will then default to 100 for non pad ("*") bases. For pads, the confidence value defaults to the average of the confidence values of the first two neighbouring bases that are not pads. The inserted original positions default to 0. These bases are to be inserted at the position specified by pos, counting as position 1 being to the left of the first base in the sequence.

As this operation increases the size of the seq, conf, and opos arrays, their allocated size must be passed in maxgel. If the insertion causes data to be shuffle beyond the maxgel, the right end of the sequence is clipped to ensure that no more than maxgel bases are present. The start and end values may be incremented, depending on where the insertion occurs.

This function returns 0 for success.

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