annotate mrfast-2.1.0.5/Common.h @ 1:d4054b05b015 default tip

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