Debian Codegraph @

atac-driver/alignOverlap/overlap-printAnno.C

raw symbols SCIP
1 // This file is part of A2Amapper.cxx . . $ `<file>/atac-driver/alignOverlap/overlap-printAnno.C`/
2 // Copyright (c) 2005 J. Craig Venter Institute
3 // Author: Brian Walenz
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received (LICENSE.txt) a copy of the GNU General Public
16 // License along with this program; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 #include "overlap.H"cxx . . $ `<file>/atac-driver/alignOverlap/overlap.H`/
20
21 void
22 printAnnocxx . . $ printAnno(4e44564240303cc3).(FILE *F, annoListcxx . . $ annoList# *AL, uint32cxx . . $ uint32# &ALlen,
23 char label,
24 uint32cxx . . $ uint32# axis,
25 span_tcxx . . $ span_t# *span,
26 uint32cxx . . $ uint32# match1, atacMatchcxx . . $ atacMatch# *m1,
27 uint32cxx . . $ uint32# match2, atacMatchcxx . . $ atacMatch# *m2) {
28
29 // If we're just given match1, make it match2 if it is the second mapping
30 //
31 if ((match1 >> COLORSHIFTcxx . . $ `atac-driver/alignOverlap/overlap-span.H:24:9`!) && (match2 == uint32ZEROcxx . . $ `libutil/util.h:60:10`!)) {
32 match2 = match1; m2 = m1;
33 match1 = 0; m1 = 0;
34 }
35
36 uint32cxx . . $ uint32# len = span->_endcxx . . $ span_t#_end. - span->_begcxx . . $ span_t#_beg.;
37
38 // axis is 1 or 2; if we're the first axis (B35 centric) make a
39 // list of the matches for later processing
40
41 if (axis == 1)
42 AL[ALlen++].addcxx . . $ annoList#add(cefbc5ad3030235f).(label, span->_iidcxx . . $ span_t#_iid., span->_begcxx . . $ span_t#_beg., len,
43 match1 & COLORMASKcxx . . $ `atac-driver/alignOverlap/overlap-span.H:25:9`!, m1,
44 match2 & COLORMASKcxx . . $ `atac-driver/alignOverlap/overlap-span.H:25:9`!, m2);
45
46 fprintf(F, "%c "uint32FMTWcxx . . $ `libutil/util.h:64:10`!(4)":"uint32FMTWcxx . . $ `libutil/util.h:64:10`!(09)"-"uint32FMTWcxx . . $ `libutil/util.h:64:10`!(09)"["uint32FMTWcxx . . $ `libutil/util.h:64:10`!(6)"] ",
47 label,
48 span->_iidcxx . . $ span_t#_iid., span->_begcxx . . $ span_t#_beg., span->_endcxx . . $ span_t#_end., len);
49
50 if (m1) {
51 fprintf(F, "%s ", m1->matchuidcxx . . $ atacMatch#matchuid.);
52 uint32cxx . . $ uint32# off1 = span->_begcxx . . $ span_t#_beg. - m1->pos1cxx . . $ atacMatch#pos1.;
53
54 if (axis == 1) {
55 uint32cxx . . $ uint32# sta = m1->pos2cxx . . $ atacMatch#pos2. + off1;
56 uint32cxx . . $ uint32# end = m1->pos2cxx . . $ atacMatch#pos2. + off1 + len;
57
58 if (m1->fwd2cxx . . $ atacMatch#fwd2. == 0) {
59 sta = m1->pos2cxx . . $ atacMatch#pos2. + m1->len2cxx . . $ atacMatch#len2. - off1;
60 end = m1->pos2cxx . . $ atacMatch#pos2. + m1->len2cxx . . $ atacMatch#len2. - off1 - len;
61 }
62
63 fprintf(F, "("uint32FMTWcxx . . $ `libutil/util.h:64:10`!(8)": "uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)"-"uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)") ", m1->iid2cxx . . $ atacMatch#iid2., sta, end);
64 } else {
65 fprintf(F, "("uint32FMTWcxx . . $ `libutil/util.h:64:10`!(8)": "uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)"-"uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)") ", m1->iid1cxx . . $ atacMatch#iid1., m1->pos1cxx . . $ atacMatch#pos1. + off1, m1->pos1cxx . . $ atacMatch#pos1. + off1 + len);
66 }
67 } else {
68 fprintf(F, uint32FMTWcxx . . $ `libutil/util.h:64:10`!(07)" ", uint32ZEROcxx . . $ `libutil/util.h:60:10`!);
69 fprintf(F, "("uint32FMTWcxx . . $ `libutil/util.h:64:10`!(8)": "uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)"-"uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)") ", uint32ZEROcxx . . $ `libutil/util.h:60:10`!, uint32ZEROcxx . . $ `libutil/util.h:60:10`!, uint32ZEROcxx . . $ `libutil/util.h:60:10`!);
70 }
71
72 if (m2) {
73 fprintf(F, "%s ", m2->matchuidcxx . . $ atacMatch#matchuid.);
74 uint32cxx . . $ uint32# off2 = span->_begcxx . . $ span_t#_beg. - m2->pos1cxx . . $ atacMatch#pos1.;
75
76 if (axis == 1) {
77 uint32cxx . . $ uint32# sta = m2->pos2cxx . . $ atacMatch#pos2. + off2;
78 uint32cxx . . $ uint32# end = m2->pos2cxx . . $ atacMatch#pos2. + off2 + len;
79
80 if (m2->fwd2cxx . . $ atacMatch#fwd2. == 0) {
81 sta = m2->pos2cxx . . $ atacMatch#pos2. + m2->len2cxx . . $ atacMatch#len2. - off2;
82 end = m2->pos2cxx . . $ atacMatch#pos2. + m2->len2cxx . . $ atacMatch#len2. - off2 - len;
83 }
84
85 fprintf(F, "("uint32FMTWcxx . . $ `libutil/util.h:64:10`!(8)": "uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)"-"uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)") ", m2->iid2cxx . . $ atacMatch#iid2., sta, end);
86 } else {
87 fprintf(F, "("uint32FMTWcxx . . $ `libutil/util.h:64:10`!(8)": "uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)"-"uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)") ", m2->iid1cxx . . $ atacMatch#iid1., m2->pos1cxx . . $ atacMatch#pos1. + off2, m2->pos1cxx . . $ atacMatch#pos1. + off2 + len);
88 }
89 } else {
90 fprintf(F, uint32FMTWcxx . . $ `libutil/util.h:64:10`!(07)" ", uint32ZEROcxx . . $ `libutil/util.h:60:10`!);
91 fprintf(F, "("uint32FMTWcxx . . $ `libutil/util.h:64:10`!(8)": "uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)"-"uint32FMTWcxx . . $ `libutil/util.h:64:10`!(9)") ", uint32ZEROcxx . . $ `libutil/util.h:60:10`!, uint32ZEROcxx . . $ `libutil/util.h:60:10`!, uint32ZEROcxx . . $ `libutil/util.h:60:10`!);
92 }
93
94 fprintf(F, "\n");
95 }