-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaStart.h
executable file
·105 lines (97 loc) · 3.23 KB
/
haStart.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*########################################################
# Name: haStart
# Use:
# - Holds the function to get the HA2 starting position
# from a feature table or read
########################################################*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
' SOF: Start Of File
' - Functions for getting the HA2 start position and HA
' sequence from a fasta file.
' o Header:
' - guards and foward declerations
' o fun01 get_haStart:
' - Find the first H2 base in the feature table
' o fun02 getSeq_haStart:
' - Get the HA sequence from a fasta file
' o fun02 find_haStart:
' - Finds the starting position of the HA2 gene in a
' sequence (this assumes it is an HA sequence)
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*-------------------------------------------------------\
| Header:
| - guards and foward declerations
\-------------------------------------------------------*/
#ifndef HA_START_H
#define HA_START_H
typedef struct seqStruct seqStruct;
typedef struct alnSet alnSet;
/*-------------------------------------------------------\
| Fun01: get_haStart
| Use:
| - Gets the starting position of the HA2 gene
| Input:
| - tblPathStr:
| o Path to the feature table to get HA2 gene from
| (idealy from NCBI flu).
| o https://www.ncbi.nlm.nih.gov/genomes/FLU/annotation/
| Output:
| - Returns:
| o The starting position (index 0) of the feature
| o 0 if no feature was found
\-------------------------------------------------------*/
unsigned long
get_haStart(
char *tblPathStr /*Path to the feature table*/
);
/*-------------------------------------------------------\
| Fun02: getSeq_haStart
| Use:
| - Finds the HA sequence in a fasta file
| Input:
| - faStr:
| o Fasta file to search for the HA sequence in
| Output:
| - Returns:
| o seqStruct with the fasta sequence (seqST->seqCStr)
| o 0 if no HA sequence was found
\-------------------------------------------------------*/
seqStruct *
getSeq_haStart(
char *faStr /*Path to fasta with HA sequence*/
);
/*-------------------------------------------------------\
| Fun03: find_haStart
| Use:
| - Finds the starting position of the HA2 gene in a
| sequence (this assumes it is an HA sequence)
| Input:
| - seqSTPtr:
| o pointer to a seqStruct with the sequence to search
| - alnSTPtr:
| o pointer to alnSet structure with alignment settings
| - retStartUL:
| o this will hold the start position of the HA gene
| in seqStr (index 0)
| - retConStartUL:
| o This will report the frist mapped base in the
| consensus (index 0; first three bases are P1)
| Output:
| - Modifies:
| o retStartUL to hold the found HA2 position in
| seqStr (index 0)
| o retConStartUL to hold the first mapped base in the
| consensus (index 0)
| - Returns:
| o Score for the alignment
| o 0 if the alignment is beneath the min score
| o -1 if had a memory error
\-------------------------------------------------------*/
long
find_haStart(
struct seqStruct *seqSTPtr, /*has sequence to search*/
struct alnSet *alnSTPtr, /*alignment settings*/
unsigned long *retStartUL, /*gets sequence HA2 start*/
unsigned long *retConStartUL /*1st mapped base in con*/
);
#endif