#include <IO.h> int lget_gel_num( GapIO *io, int listArgc, char **listArgv, int *rargc, int **rargv); int lget_contig_num( GapIO *io, int listArgc, char **listArgv, int *rargc, contig_list_t **rargv);
These functions perform the same task as get_gel_num
and
get_contig_num
except on lists of identifier instead of single
identifiers.
The list of identifiers is passed in listArgv as an array of
listArgc strings. They return arrays of reading or contig numbers by
setting *rargv to point to an array of *rargc elements. The memory
is allocated by these functions and should be deallocated by the caller using
free
.
For lget_gel_num
the return arrays are arrays of integer values.
lget_contig_num
returns arrays of contig_list_t structures. This
structure is defined as follows.
typedef struct contig_list { int contig; int start; int end; } contig_list_t;
If any string within the listArgv argument to lget_contig_num
is
a list, the second and third elements of this list are used to define the
start and end offsets within the contig (which is defined by the
name held in the first element of the list). Otherwise, the start and
end fields are set to 1 and the length of the contig respectively.
For instance, it is legal for pass over "rname
", "rname 100
" and
"rname 100 200
" as contig identifiers.
Both functions return 0 for success and -1 for failure. Note that the returned rargc value may not be the same as listArgc in the case where one or more identifiers could not be translated.