forked from samtools/bcftools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilter.h
27 lines (20 loc) · 782 Bytes
/
filter.h
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
#ifndef __FILTER_H__
#define __FILTER_H__
#include <htslib/vcf.h>
typedef struct _filter_t filter_t;
/**
* @hdr: BCF header file
* @str: see the bcftools filter command help for description
*/
filter_t *filter_init(bcf_hdr_t *hdr, const char *str);
void filter_destroy(filter_t *filter);
/**
* filter_test() - test whether the BCF record passes the test
* @samples: if not NULL, a pointer to an array with samples statuses is
* stored in the location referenced by @samples. The pointer
* will be set to NULL if the FORMAT fields were not queried.
* Returns 1 if the expression is true and 0 if false.
*/
int filter_test(filter_t *filter, bcf1_t *rec, const uint8_t **samples);
void filter_expression_info(FILE *fp);
#endif