annotate mrsfast-2.3.0.2/baseFAST.c @ 0:ec628ba33878 default tip

Uploaded source code for mrsFAST
author calkan
date Tue, 21 Feb 2012 10:39:28 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
1 /*
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
2 * Copyright (c) <2008 - 2009>, University of Washington, Simon Fraser University
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
3 * All rights reserved.
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
4 *
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
5 * Redistribution and use in source and binary forms, with or without modification,
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
6 * are permitted provided that the following conditions are met:
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
7 *
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
8 * Redistributions of source code must retain the above copyright notice, this list
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
9 * of conditions and the following disclaimer.
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
10 * - Redistributions in binary form must reproduce the above copyright notice, this
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
11 * list of conditions and the following disclaimer in the documentation and/or other
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
12 * materials provided with the distribution.
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
13 * - Neither the name of the <ORGANIZATION> nor the names of its contributors may be
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
14 * used to endorse or promote products derived from this software without specific
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
15 * prior written permission.
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
16 *
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
18 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
20 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
25 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
26 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
28 */
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
29
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
30 /*
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
31 * Author : Faraz Hach
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
32 * Email : fhach AT cs DOT sfu
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
33 * Last Update : 2009-02-01
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
34 */
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
35
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
36
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
37 #include <stdio.h>
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
38 #include <stdlib.h>
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
39 #include <string.h>
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
40 #include <math.h>
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
41 #include "Common.h"
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
42 #include "CommandLineParser.h"
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
43 #include "Reads.h"
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
44 #include "Output.h"
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
45 #include "HashTable.h"
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
46 #include "MrsFAST.h"
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
47
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
48 char *versionNumber = "2.3"; // Current Version
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
49 unsigned char seqFastq;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
50
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
51 int main(int argc, char *argv[])
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
52 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
53 if (!parseCommandLine(argc, argv))
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
54 return 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
55
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
56 configHashTable();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
57 /****************************************************
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
58 * INDEXING
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
59 ***************************************************/
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
60 if (indexingMode)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
61 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
62 int i;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
63 /********************************
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
64 * Regulard Mode
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
65 ********************************/
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
66 if (!bisulfiteMode)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
67 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
68 configHashTable();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
69 for (i = 0; i < fileCnt; i++)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
70 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
71 generateHashTable(fileName[i][0], fileName[i][1]);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
72 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
73 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
74 else
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
75 /********************************
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
76 * Bisulfite Mode
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
77 ********************************/
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
78 { // TODO
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
79 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
80 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
81 /****************************************************
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
82 * SEARCHING
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
83 ***************************************************/
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
84 else
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
85 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
86 Read *seqList;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
87 unsigned int seqListSize;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
88 int fc;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
89 int samplingLocsSize;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
90 int *samplingLocs;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
91 double totalLoadingTime = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
92 double totalMappingTime = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
93 double startTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
94 double loadingTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
95 double mappingTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
96 double lstartTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
97 double ppTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
98 double tmpTime;;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
99 char *prevGen = getMem(CONTIG_NAME_SIZE);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
100 prevGen[0]='\0';
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
101 char *curGen;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
102 int flag;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
103 double maxMem=0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
104 char fname1[FILE_NAME_LENGTH];
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
105 char fname2[FILE_NAME_LENGTH];
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
106 char fname3[FILE_NAME_LENGTH];
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
107 char fname4[FILE_NAME_LENGTH];
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
108 char fname5[FILE_NAME_LENGTH];
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
109 // Loading Sequences & Sampling Locations
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
110 startTime = getTime();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
111 if (bisulfiteMode && !pairedEndMode && seqFile1 == NULL)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
112 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
113 //TODO
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
114 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
115 else
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
116 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
117 if (!readAllReads(seqFile1, seqFile2, seqCompressed, &seqFastq, pairedEndMode, &seqList, &seqListSize))
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
118 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
119 return 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
120 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
121 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
122
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
123 //loadSamplingLocations(&samplingLocs, &samplingLocsSize);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
124 totalLoadingTime += getTime()-startTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
125
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
126
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
127
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
128
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
129 if (pairedEndMode)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
130 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
131 //Switching to Inferred Size
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
132 minPairEndedDistance = minPairEndedDistance - SEQ_LENGTH + 2;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
133 maxPairEndedDistance = maxPairEndedDistance - SEQ_LENGTH + 2;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
134 if (pairedEndDiscordantMode)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
135 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
136 maxPairEndedDiscordantDistance = maxPairEndedDiscordantDistance - SEQ_LENGTH + 2;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
137 minPairEndedDiscordantDistance = minPairEndedDiscordantDistance - SEQ_LENGTH + 2;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
138 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
139
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
140 /* The size between the ends;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
141 minPairEndedDistance = minPairEndedDistance + SEQ_LENGTH + 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
142 maxPairEndedDistance = maxPairEndedDistance + SEQ_LENGTH + 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
143 if (pairedEndDiscordantMode)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
144 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
145 maxPairEndedDiscordantDistance = maxPairEndedDiscordantDistance + SEQ_LENGTH + 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
146 minPairEndedDiscordantDistance = minPairEndedDiscordantDistance + SEQ_LENGTH + 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
147 }*/
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
148 sprintf(fname1, "%s__%s__1", mappingOutputPath, mappingOutput);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
149 sprintf(fname2, "%s__%s__2", mappingOutputPath, mappingOutput);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
150 sprintf(fname3, "%s__%s__disc", mappingOutputPath, mappingOutput);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
151 sprintf(fname4, "%s__%s__oea1", mappingOutputPath, mappingOutput);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
152 sprintf(fname5, "%s__%s__oea2", mappingOutputPath, mappingOutput);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
153 unlink(fname1);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
154 unlink(fname2);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
155 unlink(fname3);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
156 unlink(fname4);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
157 unlink(fname5);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
158 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
159
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
160 // Preparing output
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
161 initOutput(mappingOutput, outCompressed);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
162
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
163 fprintf(stdout, "-----------------------------------------------------------------------------------------------------------\n");
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
164 fprintf(stdout, "| %15s | %15s | %15s | %15s | %15s %15s |\n","Genome Name","Loading Time", "Mapping Time", "Memory Usage(M)","Total Mappings","Mapped reads");
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
165 fprintf(stdout, "-----------------------------------------------------------------------------------------------------------\n");
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
166
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
167 /********************************
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
168 * Regular Mode
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
169 ********************************/
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
170 if (!bisulfiteMode)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
171 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
172 if (!pairedEndMode)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
173 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
174 for (fc = 0; fc <fileCnt; fc++)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
175 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
176 if (!initLoadingHashTable(fileName[fc][1]))
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
177 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
178 return 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
179 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
180
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
181 loadSamplingLocations(&samplingLocs, &samplingLocsSize);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
182
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
183 mappingTime = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
184 loadingTime = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
185 prevGen[0] = '\0';
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
186 flag = 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
187
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
188 do
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
189 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
190 flag = loadHashTable ( &tmpTime ); // Reading a fragment
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
191 curGen = getRefGenomeName();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
192
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
193 // First Time
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
194 if (flag && prevGen[0]== '\0')
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
195 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
196 sprintf(prevGen, "%s", curGen);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
197 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
198
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
199 if ( !flag || strcmp(prevGen, curGen)!=0)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
200 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
201
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
202 fprintf(stdout, "| %15s | %15.2f | %15.2f | %15.2f | %15lld %15lld |\n",
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
203 prevGen,loadingTime, mappingTime, maxMem, mappingCnt , mappedSeqCnt);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
204 fflush(stdout);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
205
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
206 totalMappingTime += mappingTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
207 totalLoadingTime += loadingTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
208
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
209 loadingTime = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
210 mappingTime = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
211 maxMem = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
212
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
213 if (!flag)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
214 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
215 break;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
216 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
217 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
218 else if (progressRep && mappingTime != 0)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
219 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
220 fprintf(stdout, "| %15s | %15.2f | %15.2f | %15.2f | %15lld %15lld |\n",
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
221 prevGen,loadingTime, mappingTime, maxMem, mappingCnt , mappedSeqCnt);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
222 fflush(stdout);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
223 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
224
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
225 sprintf(prevGen, "%s", curGen);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
226
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
227 loadingTime += tmpTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
228 lstartTime = getTime();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
229
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
230 initFAST(seqList, seqListSize, samplingLocs, samplingLocsSize, fileName[fc][0]);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
231
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
232 mapSingleEndSeq();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
233
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
234 mappingTime += getTime() - lstartTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
235 if (maxMem < getMemUsage())
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
236 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
237 maxMem = getMemUsage();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
238 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
239 } while (flag);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
240
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
241 } // end for;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
242 finalizeFAST();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
243 finalizeLoadingHashTable();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
244
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
245 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
246 // Pairedend Mapping Mode
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
247 else
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
248 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
249
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
250 for (fc = 0; fc <fileCnt; fc++)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
251 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
252 if (!initLoadingHashTable(fileName[fc][1]))
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
253 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
254 return 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
255 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
256
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
257
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
258 loadSamplingLocations(&samplingLocs, &samplingLocsSize);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
259
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
260 mappingTime = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
261 loadingTime = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
262 prevGen[0] = '\0';
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
263 flag = 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
264
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
265 do
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
266 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
267 flag = loadHashTable ( &tmpTime ); // Reading a fragment
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
268 curGen = getRefGenomeName();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
269
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
270 // First Time
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
271 if (flag && prevGen[0]== '\0')
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
272 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
273 sprintf(prevGen, "%s", curGen);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
274 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
275
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
276 if ( !flag || strcmp(prevGen, curGen)!=0)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
277 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
278
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
279 // DISCORDANT
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
280 lstartTime = getTime();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
281 outputPairedEnd();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
282 mappingTime += getTime() - lstartTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
283 //DISCORDANT
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
284
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
285 fprintf(stdout, "| %15s | %15.2f | %15.2f | %15.2f | %15lld %15lld |\n",
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
286 prevGen,loadingTime, mappingTime, maxMem, mappingCnt , mappedSeqCnt);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
287 fflush(stdout);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
288
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
289 totalMappingTime += mappingTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
290 totalLoadingTime += loadingTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
291
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
292 loadingTime = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
293 mappingTime = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
294 maxMem = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
295
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
296 if (!flag)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
297 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
298 break;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
299 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
300 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
301 else if (progressRep && mappingTime != 0)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
302 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
303 fprintf(stdout, "| %15s | %15.2f | %15.2f | %15.2f | %15lld %15lld |\n",
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
304 prevGen,loadingTime, mappingTime, maxMem, mappingCnt , mappedSeqCnt);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
305 fflush(stdout);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
306 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
307
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
308 sprintf(prevGen, "%s", curGen);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
309
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
310 loadingTime += tmpTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
311 lstartTime = getTime();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
312
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
313 initFAST(seqList, seqListSize, samplingLocs, samplingLocsSize, fileName[fc][0]);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
314
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
315 mapPairedEndSeq();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
316
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
317 mappingTime += getTime() - lstartTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
318 if (maxMem < getMemUsage())
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
319 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
320 maxMem = getMemUsage();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
321 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
322 } while (flag);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
323
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
324 } // end for;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
325
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
326 finalizeLoadingHashTable();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
327 if (pairedEndDiscordantMode)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
328 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
329 lstartTime = getTime();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
330 outputPairedEndDiscPP();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
331 ppTime = getTime() - lstartTime;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
332 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
333 finalizeFAST();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
334 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
335 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
336 /********************************
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
337 * Bisulfite Mode
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
338 ********************************/
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
339 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
340 //TODO
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
341 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
342
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
343
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
344 finalizeOutput();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
345
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
346 fprintf(stdout, "-----------------------------------------------------------------------------------------------------------\n");
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
347 fprintf(stdout, "%19s%16.2f%18.2f\n\n", "Total:",totalLoadingTime, totalMappingTime);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
348 if (pairedEndDiscordantMode)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
349 fprintf(stdout, "Post Processing Time: %18.2f \n", ppTime);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
350 fprintf(stdout, "%-30s%10.2f\n","Total Time:", totalMappingTime+totalLoadingTime);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
351 fprintf(stdout, "%-30s%10d\n","Total No. of Reads:", seqListSize);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
352 fprintf(stdout, "%-30s%10lld\n","Total No. of Mappings:", mappingCnt);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
353 fprintf(stdout, "%-30s%10.0f\n\n","Avg No. of locations verified:", ceil((float)verificationCnt/seqListSize));
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
354
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
355 int cof = (pairedEndMode)?2:1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
356
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
357 if (progressRep && maxHits != 0)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
358 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
359 int frequency[maxHits+1];
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
360 int i;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
361 for ( i=0 ; i <= maxHits; i++)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
362 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
363 frequency[i] = 0;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
364 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
365
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
366
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
367 for (fc = 0; fc < seqListSize; fc++)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
368 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
369 frequency[*(seqList[fc*cof].hits)]++;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
370 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
371 frequency[maxHits] = completedSeqCnt;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
372 for ( i=0 ; i <= maxHits; i++)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
373 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
374 fprintf(stdout, "%-30s%10d%10d%10.2f%%\n","Reads Mapped to ", i, frequency[i], 100*(float)frequency[i]/(float)seqListSize);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
375 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
376 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
377
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
378
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
379 if (strcmp(unmappedOutput, "") == 0)
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
380 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
381 char fn[strlen(mappingOutputPath) + strlen(mappingOutput) + 6 ];
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
382 sprintf(fn, "%s%s.nohit", mappingOutputPath, mappingOutput );
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
383 finalizeReads(fn);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
384 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
385 else
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
386 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
387 finalizeReads(unmappedOutput);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
388 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
389
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
390
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
391
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
392 freeMem(prevGen, CONTIG_NAME_SIZE);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
393 }
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
394
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
395
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
396
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
397 return 1;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
398 }