-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathKStructs.h
859 lines (825 loc) · 20.1 KB
/
KStructs.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
/*
Copyright 2014, Michael R. Hoopmann, Institute for Systems Biology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef _KSTRUCTS_H
#define _KSTRUCTS_H
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <string>
#include <list>
#include <map>
#include <vector>
#include <iostream>
#include <exception>
enum ePSMList{
listSingle=0,
listLoop,
listXL
};
//FASTA database structure
typedef struct kDB{
bool decoy;
std::string name; //FASTA header
std::string short_name;
std::string sequence; //FASTA sequence
} kDB;
typedef struct kFile{
std::string input;
std::string base;
std::string ext;
} kFile;
//structure holds peptide mappings to database
typedef struct kPepMap{
int index; //protein index
unsigned short start; //first aa
unsigned short stop; //last aa
} kPepMap;
//Peptide reference to an entry in pldbDB
typedef struct kPeptide{
bool cTerm;
bool nTerm;
bool n15;
char xlSites;
double mass; //monoisotopic, zero mass
std::vector<kPepMap>* map; //array of mappings where peptides appear in more than one place
kPeptide(){
cTerm=false;
nTerm=false;
n15=false;
xlSites=0;
mass=0;
map = new std::vector<kPepMap>;
}
kPeptide(const kPeptide& m){
cTerm=m.cTerm;
nTerm=m.nTerm;
n15=m.n15;
xlSites=m.xlSites;
mass=m.mass;
map = new std::vector<kPepMap>(*m.map);
}
~kPeptide(){
delete map;
}
kPeptide& operator=(const kPeptide& m){
if(this!=&m){
cTerm = m.cTerm;
nTerm = m.nTerm;
n15=m.n15;
xlSites = m.xlSites;
mass=m.mass;
delete map;
map = new std::vector<kPepMap>(*m.map);
}
return (*this);
}
} kPeptide;
typedef struct kPeptideB{
double mass;
int index;
bool linkable;
} kPeptideB;
//For sorting peptide lists
typedef struct kPepSort{
int index; //peptide array index
std::string sequence; //peptide sequence
bool n15;
} kPepSort;
typedef struct kLinker{
std::string label;
std::string motifA;
std::string motifB;
double mass;
int mono; //0=cross-link, 1=mono-link
int motifAIndex; //for reference to motif list
int motifBIndex; //for reference to motif list
} kLinker;
typedef struct kMass {
bool xl;
int index;
double mass;
} kMass;
typedef struct kSparseMatrix{
int bin;
float fIntensity;
} kSparseMatrix;
typedef struct kEnzymeRules{
bool cutC[128];
bool cutN[128];
bool exceptC[128];
bool exceptN[128];
} kEnzymeRules;
typedef struct kParams {
int decoySize;
int instrument; //0=Orbi, 1=FTICR
int intermediate;
int isotopeError;
int maxMods;
int maxPeaks;
int minPeaks;
int miscleave;
int ms1Centroid;
int ms2Centroid;
int ms1Resolution;
int ms2Resolution;
int preferPrecursor;
int setA;
int setB;
int specProcess;
int threads;
int topCount;
int truncate;
bool buildDecoy;
bool diagHistogram;
bool diffModsOnXL;
bool dimers;
bool dimersXL;
bool exportMzID;
bool exportPepXML;
bool exportPercolator;
bool splitPepXML;
bool ionSeries[6];
bool monoLinksOnXL;
bool precursorRefinement;
bool turbo;
bool xcorr;
double binOffset;
double binSize;
double enrichment;
double maxPepMass;
double minPepMass;
double minPepScore;
double minPepUnique;
double percVersion;
double ppmPrecursor;
double removePrecursor;
char dbFile[256];
char decoy[256];
char enzyme[32];
char enzymeName[64];
char ext[32];
char inFile[1024]; //true input file with full path
char msFile[256]; //input file parameter from confic
char n15Label[256];
char outFile[1024]; //true output file with full path
char resPath[1024];
std::string fullPath;
std::vector<kMass>* aaMass;
std::vector<double>* cleavageProducts;
std::vector<int>* diag;
std::vector<kLinker>* xLink;
std::vector<kLinker>* mLink;
std::vector<kMass>* mods;
std::vector<kMass>* fMods;
kParams(){
decoySize=5000;
instrument=1;
intermediate=0;
isotopeError=2;
maxMods=0;
maxPeaks=0;
minPeaks = 25;
miscleave=2;
ms1Centroid=1;
ms2Centroid=1;
ms1Resolution=60000;
ms2Resolution=15000;
preferPrecursor=1;
setA=0;
setB=0;
specProcess=0;
threads=8;
topCount=10;
truncate=0;
buildDecoy = false;
diagHistogram=false;
diffModsOnXL=false;
dimers=false;
dimersXL=true;
exportMzID=false;
exportPepXML=true;
exportPercolator=false;
splitPepXML=false;
ionSeries[0]=false; //a-ions
ionSeries[1]=true; //b-ions
ionSeries[2]=false; //c-ions
ionSeries[3]=false; //x-ions
ionSeries[4]=true; //y-ions
ionSeries[5]=false; //z-ions
monoLinksOnXL=false;
precursorRefinement=true;
turbo=true;
xcorr=false;
binSize=0.01;
binOffset=0.0;
enrichment=0;
maxPepMass=4000.0;
minPepMass=500.0;
minPepScore=0.1;
minPepUnique=0;
percVersion=3.06;
ppmPrecursor=20.0;
removePrecursor=0;
strcpy(decoy,"DECOY");
dbFile[0]='\0';
strcpy(enzyme,"[KR]|{P}");
strcpy(enzymeName, "Trypsin");
ext[0]='\0';
inFile[0]='\0';
msFile[0]='\0';
n15Label[0]='\0';
outFile[0]='\0';
resPath[0]='\0';
fullPath = "";
aaMass = new std::vector<kMass>;
cleavageProducts = new std::vector<double>;
diag = new std::vector<int>;
xLink = new std::vector<kLinker>;
mLink = new std::vector<kLinker>;
mods = new std::vector<kMass>;
fMods = new std::vector<kMass>;
}
kParams(const kParams& p){
decoySize=p.decoySize;
instrument=p.instrument;
intermediate=p.intermediate;
isotopeError=p.isotopeError;
maxMods=p.maxMods;
maxPeaks=p.maxPeaks;
minPeaks = p.minPeaks;
miscleave=p.miscleave;
ms1Centroid=p.ms1Centroid;
ms2Centroid=p.ms2Centroid;
ms1Resolution=p.ms1Resolution;
ms2Resolution=p.ms2Resolution;
preferPrecursor=p.preferPrecursor;
removePrecursor=p.removePrecursor;
setA=p.setA;
setB=p.setB;
specProcess=p.specProcess;
threads=p.threads;
topCount=p.topCount;
truncate=p.truncate;
buildDecoy = p.buildDecoy;
diagHistogram=p.diagHistogram;
diffModsOnXL=p.diffModsOnXL;
dimers=p.dimers;
dimersXL=p.dimersXL;
exportMzID=p.exportMzID;
exportPepXML=p.exportPepXML;
exportPercolator=p.exportPercolator;
splitPepXML=p.splitPepXML;
monoLinksOnXL=p.monoLinksOnXL;
precursorRefinement=p.precursorRefinement;
turbo=p.turbo;
xcorr=p.xcorr;
binOffset=p.binOffset;
binSize=p.binSize;
enrichment=p.enrichment;
maxPepMass=p.maxPepMass;
minPepMass=p.minPepMass;
minPepScore=p.minPepScore;
minPepUnique=p.minPepUnique;
percVersion=p.percVersion;
ppmPrecursor=p.ppmPrecursor;
strcpy(decoy,p.decoy);
strcpy(dbFile,p.dbFile);
strcpy(enzyme,p.enzyme);
strcpy(enzymeName,p.enzymeName);
strcpy(ext,p.ext);
strcpy(inFile, p.inFile);
strcpy(msFile,p.msFile);
strcpy(n15Label, p.n15Label);
strcpy(outFile,p.outFile);
strcpy(resPath, p.resPath);
fullPath = p.fullPath;
aaMass = new std::vector<kMass>(*p.aaMass);
cleavageProducts = new std::vector<double>(*p.cleavageProducts);
diag = new std::vector<int>(*p.diag);
xLink = new std::vector<kLinker>(*p.xLink);
mLink = new std::vector<kLinker>(*p.mLink);
mods = new std::vector<kMass>(*p.mods);
fMods = new std::vector<kMass>(*p.fMods);
for(unsigned int i=0;i<6;i++) ionSeries[i]=p.ionSeries[i];
}
~kParams(){
delete aaMass;
delete cleavageProducts;
delete diag;
delete xLink;
delete mLink;
delete mods;
delete fMods;
}
kParams& operator=(const kParams& p){
if(this!=&p){
decoySize=p.decoySize;
instrument=p.instrument;
intermediate=p.intermediate;
isotopeError = p.isotopeError;
maxMods=p.maxMods;
maxPeaks=p.maxPeaks;
minPeaks = p.minPeaks;
miscleave=p.miscleave;
ms1Centroid=p.ms1Centroid;
ms2Centroid=p.ms2Centroid;
ms1Resolution=p.ms1Resolution;
ms2Resolution=p.ms2Resolution;
preferPrecursor=p.preferPrecursor;
removePrecursor=p.removePrecursor;
setA=p.setA;
setB=p.setB;
specProcess=p.specProcess;
threads=p.threads;
topCount=p.topCount;
truncate=p.truncate;
buildDecoy = p.buildDecoy;
diffModsOnXL=p.diffModsOnXL;
dimers=p.dimers;
dimersXL=p.dimersXL;
exportMzID = p.exportMzID;
exportPepXML=p.exportPepXML;
exportPercolator=p.exportPercolator;
splitPepXML=p.splitPepXML;
monoLinksOnXL=p.monoLinksOnXL;
precursorRefinement = p.precursorRefinement;
turbo = p.turbo;
xcorr=p.xcorr;
binOffset=p.binOffset;
binSize=p.binSize;
enrichment=p.enrichment;
maxPepMass=p.maxPepMass;
minPepMass=p.minPepMass;
minPepScore=p.minPepScore;
minPepUnique = p.minPepUnique;
percVersion=p.percVersion;
ppmPrecursor=p.ppmPrecursor;
strcpy(decoy,p.decoy);
strcpy(dbFile,p.dbFile);
strcpy(enzyme,p.enzyme);
strcpy(enzymeName, p.enzymeName);
strcpy(ext,p.ext);
strcpy(inFile, p.inFile);
strcpy(msFile,p.msFile);
strcpy(n15Label, p.n15Label);
strcpy(outFile,p.outFile);
strcpy(resPath, p.resPath);
fullPath = p.fullPath;
delete aaMass;
delete cleavageProducts;
delete diag;
delete xLink;
delete mLink;
delete mods;
delete fMods;
aaMass = new std::vector<kMass>(*p.aaMass);
cleavageProducts = new std::vector<double>(*p.cleavageProducts);
diag = new std::vector<int>(*p.diag);
xLink = new std::vector<kLinker>(*p.xLink);
mLink = new std::vector<kLinker>(*p.mLink);
mods = new std::vector<kMass>(*p.mods);
fMods = new std::vector<kMass>(*p.fMods);
for(unsigned int i=0;i<6;i++) ionSeries[i]=p.ionSeries[i];
}
return (*this);
}
} kParams;
typedef struct kSpecPoint{
double mass;
float intensity;
} kSpecPoint;
typedef struct kPreprocessStruct { //adapted from Comet
int iHighestIon;
double dHighestIntensity;
kSpecPoint *pdCorrelationData;
} kPreprocessStruct;
typedef struct kPepMod{
char pos;
double mass;
} kPepMod;
typedef struct kScoreCard{
bool linkable1;
bool linkable2;
char precursor;
char site1;
char site2;
int k1;
int k2;
int link;
int pep1;
int pep2;
int matches1;
int matches2;
int conFrag1;
int conFrag2;
float simpleScore;
double dScore;
double eVal;
double eVal1;
double eVal2;
double mass;
double mass1;
double mass2;
float score1;
float score2;
float cpScore1;
float cpScore2;
float uScore1;
float uScore2;
//std::vector<kPepMod>* mods1;
//std::vector<kPepMod>* mods2;
std::vector<kPepMod> mods1;
std::vector<kPepMod> mods2;
std::vector<kScoreCard> alternate;
kScoreCard(){
linkable1=false;
linkable2=false;
precursor=0;
site1=0;
site2=0;
k1=0;
k2=0;
link=0;
pep1=0;
pep2=0;
simpleScore=0;
dScore=0;
eVal=0;
eVal1=0;
eVal2=0;
mass=0;
mass1=0;
mass2=0;
score1=0;
score2=0;
cpScore1=0;
cpScore2=0;
uScore1=0;
uScore2=0;
matches1=0;
matches2=0;
conFrag1=0;
conFrag2=0;
//mods1 = new std::vector<kPepMod>;
//mods2 = new std::vector<kPepMod>;
}
/*
kScoreCard(const kScoreCard& p){
linkable1=p.linkable1;
linkable2=p.linkable2;
precursor=p.precursor;
site1 = p.site1;
site2 = p.site2;
k1=p.k1;
k2=p.k2;
link=p.link;
pep1=p.pep1;
pep2=p.pep2;
simpleScore=p.simpleScore;
dScore=p.dScore;
eVal=p.eVal;
eVal1=p.eVal1;
eVal2=p.eVal2;
mass=p.mass;
mass1=p.mass1;
mass2=p.mass2;
score1=p.score1;
score2=p.score2;
cpScore1=p.cpScore1;
cpScore2=p.cpScore2;
uScore1=p.uScore1;
uScore2=p.uScore2;
matches1=p.matches1;
matches2=p.matches2;
conFrag1=p.conFrag1;
conFrag2=p.conFrag2;
mods1 = new std::vector<kPepMod>(*p.mods1);
mods2 = new std::vector<kPepMod>(*p.mods2);
}
~kScoreCard(){
delete mods1;
delete mods2;
}
kScoreCard& operator=(const kScoreCard& p){
if(this!=&p){
linkable1=p.linkable1;
linkable2=p.linkable2;
precursor=p.precursor;
site1 = p.site1;
site2 = p.site2;
k1=p.k1;
k2=p.k2;
link=p.link;
pep1=p.pep1;
pep2=p.pep2;
simpleScore=p.simpleScore;
dScore=p.dScore;
eVal=p.eVal;
eVal1 = p.eVal1;
eVal2 = p.eVal2;
mass=p.mass;
mass1=p.mass1;
mass2=p.mass2;
score1=p.score1;
score2=p.score2;
cpScore1 = p.cpScore1;
cpScore2 = p.cpScore2;
uScore1 = p.uScore1;
uScore2 = p.uScore2;
matches1 = p.matches1;
matches2 = p.matches2;
conFrag1 = p.conFrag1;
conFrag2 = p.conFrag2;
delete mods1;
mods1 = new std::vector<kPepMod>(*p.mods1);
delete mods2;
mods2 = new std::vector<kPepMod>(*p.mods2);
}
return *this;
}*/
} kScoreCard;
typedef struct kSingletScoreCard{
char len;
bool linkable;
char k1;
int conFrag; //longest run of consecutive fragment ions
int matches; //total matched fragment ions
int pep1;
char pre;
float simpleScore;
float cpScore;
double mass;
char modLen;
char site;
std::map<std::pair<int,int>,bool> peakMatches;
kPepMod* mods;
kSingletScoreCard(){
len=0;
linkable=false;
k1=0;
pep1=0;
pre=0;
simpleScore=0;
cpScore=0;
mass=0;
modLen=0;
site=0;
matches=0;
conFrag=0;
mods=NULL;
}
kSingletScoreCard(const kSingletScoreCard& k){
len=k.len;
linkable=k.linkable;
k1=k.k1;
pep1=k.pep1;
pre=k.pre;
simpleScore=k.simpleScore;
cpScore=k.cpScore;
mass=k.mass;
modLen=k.modLen;
site=k.site;
matches=k.matches;
conFrag=k.conFrag;
peakMatches=k.peakMatches;
mods=NULL;
if(modLen>0){
mods=new kPepMod[modLen];
for(char i=0;i<modLen;i++) mods[i]=k.mods[i];
}
}
~kSingletScoreCard(){
if(mods!=NULL) delete [] mods;
}
kSingletScoreCard& operator=(const kSingletScoreCard& k){
if(this!=&k){
len=k.len;
linkable=k.linkable;
k1=k.k1;
pep1=k.pep1;
pre=k.pre;
simpleScore=k.simpleScore;
cpScore=k.cpScore;
mass=k.mass;
modLen=k.modLen;
site=k.site;
matches = k.matches;
conFrag = k.conFrag;
peakMatches=k.peakMatches;
if(mods!=NULL) {
delete [] mods;
mods=NULL;
}
if(modLen>0){
mods=new kPepMod[modLen];
for(char i=0;i<modLen;i++) mods[i]=k.mods[i];
}
}
return *this;
}
} kSingletScoreCard;
typedef struct kSingletScoreCardPlus{
char len;
bool linkable;
char k1;
double mass;
char motif[20];
int pep1;
int rank;
float simpleScore;
int target;
} kSingletScoreCardPlus;
typedef struct kPrecursor{
int charge;
double corr;
char label;
double monoMass;
std::list<kScoreCard> topSingle;
std::list<kScoreCard> topLoop;
std::list<kScoreCard> topXL;
kPrecursor(){
charge=0;
corr=0;
label=0;
monoMass=0;
}
} kPrecursor;
typedef struct kResults{
bool decoy;
bool decoy1;
bool decoy2;
bool linkable1;
bool linkable2;
bool cTerm1; //peptide contains protein c-terminus
bool nTerm1; //peptide contains protein n-terminus
bool cTerm2; //peptide contains protein c-terminus
bool nTerm2; //peptide contains protein n-terminus
bool n15Pep1;
bool n15Pep2;
char linkSite1; //actual amino acid that is linked
char linkSite2; //actual amino acid that is linked
int charge;
int link1;
int link2;
int linkerID;
int matches1;
int matches2;
int conFrag1;
int conFrag2;
int pep1;
int pep2;
int rank;
int rankA;
int rankB;
int scanNumber;
int type; //0=single, 1=loop, 2=xl, 3=dimer
float rTime;
double eVal;
double eVal1;
double eVal2;
double hk;
double massA;
double massB;
double obsMass;
double ppm;
double psmMass;
double score;
double scoreA;
double scoreB;
double scoreUniqueA;
double scoreUniqueB;
double scoreDelta;
double scorePepDif;
double xlMass;
std::string baseName;
std::string modPeptide1;
std::string modPeptide2;
std::string peptide1;
std::string peptide2;
std::string protein1;
std::string protein2;
std::string protPos1;
std::string protPos2;
std::string scanID;
std::string xlLabel;
std::vector<kPepMod> mods1;
std::vector<kPepMod> mods2;
} kResults;
typedef struct kDiag{
std::string sequence;
double simpleScore;
double cpScore;
double evalue;
double mass;
double xlMass;
} kDiag;
typedef struct kCKey{
int key;
int pos;
} kCKey;
typedef struct kMatchSet{
int sz;
int charge;
kCKey** a;
kCKey** b;
kCKey** c;
kCKey** x;
kCKey** y;
kCKey** z;
kMatchSet(){
sz=0;
charge=0;
a=NULL;
b=NULL;
c=NULL;
x=NULL;
y=NULL;
z=NULL;
}
~kMatchSet(){
deAllocate();
}
void allocate(int s, int ch){
deAllocate();
sz=s;
charge=ch;
//kCKey k;
//k.key=0;
//k.pos=0;
a = new kCKey*[charge];
b = new kCKey*[charge];
c = new kCKey*[charge];
x = new kCKey*[charge];
y = new kCKey*[charge];
z = new kCKey*[charge];
for(int i=0;i<charge;i++){
a[i] = new kCKey[sz];
b[i] = new kCKey[sz];
c[i] = new kCKey[sz];
x[i] = new kCKey[sz];
y[i] = new kCKey[sz];
z[i] = new kCKey[sz];
//for(int j=0;j<sz;j++){
// a[i][j]=k;
// b[i][j]=k;
// c[i][j]=k;
// x[i][j]=k;
// y[i][j]=k;
// z[i][j]=k;
//}
}
}
void deAllocate(){
int i;
if(a!=NULL){
for(i=0;i<charge;i++) delete [] a[i];
delete [] a;
}
if(b!=NULL){
for(i=0;i<charge;i++) delete [] b[i];
delete [] b;
}
if(c!=NULL){
for(i=0;i<charge;i++) delete [] c[i];
delete [] c;
}
if(x!=NULL){
for(i=0;i<charge;i++) delete [] x[i];
delete [] x;
}
if(y!=NULL){
for(i=0;i<charge;i++) delete [] y[i];
delete [] y;
}
if(z!=NULL){
for(i=0;i<charge;i++) delete [] z[i];
delete [] z;
}
a=NULL;
b=NULL;
c=NULL;
x=NULL;
y=NULL;
z=NULL;
}
} kMatchSet;
typedef struct kXLMotif {
std::string motif;
int xlIndex[10];
int counterMotif[10];
} kXLMotif;
typedef struct kXLTarget{
size_t linkerID;
bool target[128];
} kXLTarget;
#endif