comparison mrfast-2.1.0.4/Common.h @ 0:7b3dc85dc7fd

Uploaded mrfast source tarball
author calkan
date Tue, 21 Feb 2012 10:29:47 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:7b3dc85dc7fd
1 /*
2 * Copyright (c) <2008 - 2012>, University of Washington, Simon Fraser University
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
7 *
8 * Redistributions of source code must retain the above copyright notice, this list
9 * of conditions and the following disclaimer.
10 * - Redistributions in binary form must reproduce the above copyright notice, this
11 * list of conditions and the following disclaimer in the documentation and/or other
12 * materials provided with the distribution.
13 * - Neither the names of the University of Washington, Simon Fraser University,
14 * nor the names of its contributors may be
15 * used to endorse or promote products derived from this software without specific
16 * prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 /*
32 Authors:
33 Farhad Hormozdiari
34 Faraz Hach
35 Can Alkan
36 Emails:
37 farhadh AT uw DOT edu
38 fhach AT cs DOT sfu DOT ca
39 calkan AT uw DOT edu
40 */
41
42
43
44 #ifndef __COMMON__
45 #define __COMMON__
46
47 #include <zlib.h>
48
49 #define SEQ_MAX_LENGTH 300 // Seq Max Length
50 #define CONTIG_OVERLAP 200 // No. of characters overlapped between contings
51 #define CONTIG_NAME_SIZE 200 // Contig name max size
52 #define FILE_NAME_LENGTH 400 // Filename Max Length
53 #define DISCORDANT_CUT_OFF 800
54 #define MAX_OPEN_FILE 600
55 #define MAX_TRANS_CHROMOSAL_OUTPUT 50
56 #define MAX_OEA_OUT 500
57
58 extern unsigned int CONTIG_SIZE;
59 extern unsigned int CONTIG_MAX_SIZE;
60
61
62 extern unsigned char WINDOW_SIZE ; // WINDOW SIZE for indexing/searching
63 extern unsigned short SEQ_LENGTH; // Sequence(read) length
64
65 extern char *versionNumber;
66 extern char *versionNumberF;
67 extern unsigned char mrFAST;
68
69
70 extern int maxOEAOutput;
71 extern int maxDiscordantOutput;
72 extern int uniqueMode;
73 extern int indexingMode;
74 extern int searchingMode;
75 extern int pairedEndMode;
76 extern int pairedEndDiscordantMode;
77 extern int transChromosal;
78 extern int pairedEndProfilingMode;
79 extern int bestMode;
80 extern int nosamMode;
81 extern int seqCompressed;
82 extern int outCompressed;
83 extern int cropSize;
84 extern int progressRep;
85 extern char *seqFile1;
86 extern char *seqFile2;
87 extern char *seqUnmapped;
88 extern char *mappingOutput;
89 extern char *mappingOutputPath;
90 extern char *unmappedOutput;
91 extern unsigned char seqFastq;
92 extern unsigned char errThreshold;
93 extern unsigned char maxHits;
94 extern int minPairEndedDiscordantDistance;
95 extern int maxPairEndedDiscordantDistance;
96 extern int minPairEndedDistance;
97 extern int maxPairEndedDistance;
98 extern char fileName[1000][2][FILE_NAME_LENGTH];
99 extern int fileCnt;
100 extern long long memUsage;
101
102 FILE * fileOpen(char *fileName, char *mode);
103 gzFile fileOpenGZ(char *fileName, char *mode);
104 double getTime(void);
105 void reverseComplete (char *seq, char *rcSeq , int length);
106 void * getMem(size_t size);
107 void freeMem(void * ptr, size_t size);
108 double getMemUsage();
109 void reverse (char *seq, char *rcSeq , int length);
110 void stripPath(char *full, char **path, char **fileName);
111 #endif