1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
# slow5_get_aux_names
## NAME
slow5_get_aux_names - gets the pointer to the list of auxiliary field names
## SYNOPSYS
`char **slow5_get_aux_names(const slow5_hdr_t *header, uint64_t *len)`
## DESCRIPTION
`slow5_get_aux_names()` gets the list of auxiliary field names from a SLOW5 file header pointed by *header*. The number of fields will be set on the address specified by *len*.
## RETURN VALUE
Upon successful completion, `slow5_get_aux_names()` returns the list of auxiliary fields as a *char*** pointer. If there are no auxiliary fields, NULL is returned.
## ERRORS
## NOTES
`slow5_get_aux_names()` returns the pointer to an internal list. Thus, the retuned pointer must NOT be freed by user.
## EXAMPLES
```
#include <stdio.h>
#include <stdlib.h>
#include <slow5/slow5.h>
#define FILE_PATH "examples/example.slow5"
int main(){
slow5_file_t *sp = slow5_open(FILE_PATH,"r");
if(sp==NULL){
fprintf(stderr,"Error in opening file\n");
exit(EXIT_FAILURE);
}
uint64_t num_aux = 0;
char **aux = slow5_get_aux_names(sp->header, &num_aux);
if(aux==NULL){
fprintf(stderr,"Error in getting list of aux field names\n");
exit(EXIT_FAILURE);
}
for(uint64_t i=0; i<num_aux; i++) {
printf("%s\n",aux[i]);
}
slow5_close(sp);
}
```
## SEE ALSO
[slow5_yy()](slow5_yy.md), [slow5_yy()](slow5_yy.md)
|