00001 #ifndef TRAPPER_DNP_TYPES_H
00002 #define TRAPPER_DNP_TYPES_H
00003 #include <iostream>
00004
00005 int dnp_type( char dnp, char cons )
00006 {
00007 if ( cons == '-') {
00008 return 12;
00009 }
00010 else if ( dnp == '-') {
00011 return 13;
00012 }
00013 else if ( dnp == 'a' ) {
00014 if ( cons == 't' ) {
00015 return 0;
00016 }
00017 else if ( cons == 'g' ) {
00018 return 1;
00019 }
00020 else if ( cons == 'c' ) {
00021 return 2;
00022 }
00023 else {
00024 std::cerr<<"Problem in dnp_type(), returning -1"<<endl;
00025 return -1;
00026 }
00027
00028
00029 }
00030 else if ( dnp == 't' ) {
00031 if ( cons == 'a' ) {
00032 return 6;
00033 }
00034 else if ( cons == 'g' ) {
00035 return 3;
00036 }
00037 else if ( cons == 'c' ) {
00038 return 4;
00039 }
00040 else {
00041 std::cerr<<"Problem in dnp_type(), returning -1"<<endl;
00042 return -1;
00043 }
00044
00045 }
00046 else if ( dnp == 'g' ) {
00047 if ( cons == 't' ) {
00048 return 9;
00049 }
00050 else if ( cons == 'a' ) {
00051 return 7;
00052 }
00053 else if ( cons == 'c' ) {
00054 return 5;
00055 }
00056 else {
00057 std::cerr<<"Problem in dnp_type(), returning -1"<<endl;
00058 return -1;
00059 }
00060
00061 }
00062 else if ( dnp == 'c' ) {
00063 if ( cons == 't' ) {
00064 return 10;
00065 }
00066 else if ( cons == 'g' ) {
00067 return 11;
00068 }
00069 else if ( cons == 'a' ) {
00070 return 8;
00071 }
00072 else {
00073 std::cerr<<"Problem in dnp_type(), returning -1"<<endl;
00074 return -1;
00075 }
00076
00077 }
00078 else {
00079 std::cerr<<"Problem in dnp_type(), returning -1"<<endl;
00080 return -1;
00081 }
00082
00083
00084 }
00085
00086
00087 #endif //TRAPPER_DNP_TYPES_H