first previous next last contents


#include <tagUtils.h>

int tag2values(
        char   *tag,
        char   *type,
        int    *start,
        int    *end,
        int    *strand,
        char   *comment);

This function converts a tag in string format to a tag represented by a series of separate integer/string values. It performs the opposite task to the values2tag function.

The tag string format is as used in the experiment file TG lines. The format is "TYPE<space>S<space>start..end" followed by zero or more comment lines, each starting with a newline character. TYPE is the tag type, which must be 4 characters, and S is the strand; one of "+", "-" or "b" (both).

The tag string is passed as the tag argument. This is then expanded into the type, start, end, strand and comment values. The comment must have been allocated before hand (strlen(tag) will always be large enough). If no comment was found then comment is set to be an empty string. type should be allocated to be 5 bytes long.

The function returns 0 for success, -1 for failure.

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