forked from dzerbino/velvet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobals.h
153 lines (128 loc) · 3.89 KB
/
globals.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/*
Copyright 2007, 2008 Daniel Zerbino ([email protected])
This file is part of Velvet.
Velvet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Velvet is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Velvet; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _GLOBALS_H_
#define _GLOBALS_H_
#ifndef NULL
#define NULL 0
#endif
#ifndef true
#define true 1
#define false 0
#endif
#ifdef __GNUC__
#define ATTRIBUTE_PACKED __attribute__ ((packed))
#else
#define ATTRIBUTE_PACKED
#endif
#define VERSION_NUMBER 1
#define RELEASE_NUMBER 2
#define UPDATE_NUMBER 10
#define MAXLINE 5000
#define LONG (2 * CATEGORIES)
#define LONG_PAIRED (2 * CATEGORIES + 1)
#define REFERENCE (2 * CATEGORIES + 2)
/* NULL value for ArrayIdx */
#define NULL_IDX 0
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
#define inline __inline
extern struct tString_st;
extern struct readSet_st;
extern struct splayTable_st;
extern struct annotation_st;
extern struct roadmap_st;
extern struct insertionMarker_st;
extern struct arc_st;
extern struct node_st;
extern struct graph_st;
extern struct passage_st;
extern struct passageList_st;
extern struct readStart_st;
extern struct preArc_st;
extern struct preNode_st;
extern struct preGraph_st;
extern struct fibheap;
extern struct fibheap_el;
extern struct dfibheap;
extern struct dfibheap_el;
extern struct kmerOccurence_st;
extern struct kmerOccurenceTable_st;
#endif
// Namespace sizes
#include <stdint.h>
typedef int8_t boolean;
typedef int8_t Nucleotide;
typedef uint8_t Descriptor;
#ifdef BIGASSEMBLY
typedef int64_t IDnum;
#else
typedef int32_t IDnum;
#endif
typedef int64_t Coordinate;
#ifdef LONGSEQUENCES
typedef int32_t ShortLength;
#else
typedef int16_t ShortLength;
#endif
typedef double Time;
typedef uint8_t Quality;
typedef double Probability;
typedef int8_t Category;
#ifndef VBIGASSEMBLY
typedef uint32_t ArrayIdx;
#else
typedef uint64_t ArrayIdx;
#endif
// Atomic word
typedef struct kmer_st Kmer;
typedef uint64_t KmerKey;
// Just a sequence string, but with just two bits per character
typedef struct tString_st TightString;
// A simple container when reading files
typedef struct readSet_st ReadSet;
typedef struct sequenceReader_st SequenceReader;
typedef struct sequencesReader_st SequencesReader;
// Hash table structures
typedef struct kmerOccurence_st KmerOccurence;
typedef struct kmerOccurenceTable_st KmerOccurenceTable;
typedef struct splayTable_st SplayTable;
// Graph construction structures
typedef struct annotationList_st AnnotationList;
typedef struct annotation_st Annotation;
typedef struct roadmap_st RoadMap;
typedef struct roadMapArray_st RoadMapArray;
typedef struct insertionMarker_st InsertionMarker;
// Pre-Graph elements
typedef struct preMarker_st PreMarker;
typedef ArrayIdx PreArcI;
typedef struct preNode_st PreNode;
typedef struct preGraph_st PreGraph;
// Graph elements
typedef struct arc_st Arc;
typedef struct node_st Node;
typedef struct graph_st Graph;
typedef struct shortReadMarker_st ShortReadMarker;
typedef ArrayIdx PassageMarkerI;
typedef struct passageList_st PassageMarkerList;
typedef struct readStart_st ReadStart;
typedef struct gapMarker_st GapMarker;
// Fibonacci heaps used mainly in Tour Bus
typedef struct fibheap FibHeap;
typedef struct fibheap_el FibHeapNode;
typedef struct dfibheap DFibHeap;
typedef struct dfibheap_el DFibHeapNode;
typedef struct nodeList_st NodeList;
typedef struct mask_st Mask;
#endif