+ fixed some issues with the splice site scores and ugly code fragments
[qpalma.git] / tools / data_tools / datastructures.h
1 #ifndef __DATA_STRUCTURES_H__
2 #define __DATA_STRUCTURES_H__
3
4 typedef struct read {
5 int chr;
6 int pos;
7 char* seq;
8 unsigned long id;
9 char strand;
10 int mismatch;
11 int occurrence;
12 int size;
13 int cut;
14 char* prb;
15 char* cal_prb;
16 char* chastity;
17 } Read;
18
19 Read* read_alloc(int _size);
20 void free_read(Read* oldRead);
21
22 Read* create_read(int chr, int pos, char* seq, unsigned long id, char strand, int mismatch,
23 int occurrence, int size, int cut, char* prb, char* cal_prb, char* chastity);
24
25 struct gene {
26 int start;
27 int stop;
28 int* exon_starts;
29 int* exon_stops;
30 int num_exons;
31 int max_exons;
32 char strand;
33 char* id;
34 };
35
36 struct gene* gene_alloc(void);
37 void free_gene(struct gene* oldGene);
38 void add_exon(struct gene* currentGene,int start, int stop);
39
40 #endif // __DATA_STRUCTURES_H__