| 1 | // This file is part of A2Amapper. |
| 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 | #ifndef OVERLAP_ANNOLIST_H |
| 20 | #define OVERLAP_ANNOLIST_H |
| 21 | |
| 22 | #include "overlap.H" |
| 23 | |
| 24 | |
| 25 | // List of the annotation. Used for classifying each piece of the |
| 26 | // annotation, e.g., U followed by 1 followed by U means that |
| 27 | // somebody really did map something uniquely, where Y followed by 1 |
| 28 | // is probably just an extension. |
| 29 | // |
| 30 | // This only works if assemblyA is the reference! |
| 31 | // |
| 32 | class annoList { |
| 33 | public: |
| 34 | char type; |
| 35 | uint32 iid1, pos1, len1; // The position on the reference axis |
| 36 | uint32 iid2a, pos2a, len2a; // The position on mapping 1 |
| 37 | uint32 iid2b, pos2b, len2b; // The position on mapping 2 |
| 38 | |
| 39 | void add(char type_, |
| 40 | uint32 iid1_, uint32 pos1_, uint32 len1_, |
| 41 | uint32 match1, atacMatch *m1, |
| 42 | uint32 match2, atacMatch *m2) { |
| 43 | type = type_; |
| 44 | iid1 = iid1_; |
| 45 | pos1 = pos1_; |
| 46 | len1 = len1_; |
| 47 | |
| 48 | iid2a = match1; |
| 49 | pos2a = 0; |
| 50 | len2a = 0; |
| 51 | if (m1) { |
| 52 | pos2a = m1->pos2; |
| 53 | len2a = m1->len2; |
| 54 | } |
| 55 | |
| 56 | iid2b = match2; |
| 57 | pos2b = 0; |
| 58 | len2b = 0; |
| 59 | if (m2) { |
| 60 | pos2b = m2->pos2; |
| 61 | len2b = m2->len2; |
| 62 | } |
| 63 | } |
| 64 | }; |
| 65 | |
| 66 | #endif // OVERLAP_ANNOLIST_H |