-
Notifications
You must be signed in to change notification settings - Fork 0
/
deriv.h
57 lines (49 loc) · 2.21 KB
/
deriv.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
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
#ifndef DERIV_H
#define DERIV_H
#include "ped.h"
/*
Several items related to the shared derived allele test are defined within
ped.h, where the data is read into the pedl_t **pedk struct. The flags one can
set in the file defining the individuals participating in the test are
repeated here:
flags for shared derived test: 1 to define individual as ancestral
2 to define individual as a test sample
3 to define individual as a query sample
*/
/*! @function
@abstract Count informative and shared derived sites.
@param peda Struct of array with saved PED lines to test (against).
@param i ID number of site being investigated.
@param s Base sampled, which is being tested.
@param infor Array of informative site counts per test combination.
@param share Array of shared derived site counts per test combination.
@return Status indicator.
*/
int count_deriv(peda_t *peda, int i, char s, int *infor, int *share);
/*! @function
@abstract Print the header of the shared derived output file.
@param cdc Number of combinations to be tested.
@param peda Struct of array with saved PED lines.
@param adout File handle of the adstat output file.
@return Status indicator.
*/
int print_deriv_header(int cdc, peda_t *peda, FILE *adout);
/*! @function
@abstract Print the final shared and informative counts.
@param cdc Number of combinations which were tested.
@param name Name of the sample which was tested.
@param infor Array of informative site counts per test combination.
@param share Array of shared derived site counts per test combination.
@param adout File handle of the adstat output file.
@return Status indicator.
*/
int print_deriv(int cdc, char *name, int *infor, int *share, FILE *adout);
/*! @function
@abstract Print header and test PED lines, if applicable.
@param peda Struct of array with saved PED lines.
@param l Number of positions (from map file).
@param adout File handle of the adstat output file.
@return Status indicator.
*/
int ped_deriv(peda_t *peda, int l, FILE *adout);
#endif