1 /* $Id: intron.h 204388 2017-03-18 00:03:34Z twu $ */
2 #ifndef INTRON_INCLUDED
3 #define INTRON_INCLUDED
4 
5 #include "bool.h"
6 #include "genomicpos.h"
7 #include "iit-read.h"
8 #include "chrnum.h"
9 
10 /* Pieces for logical AND */
11 #define LEFT_GT  0x21		/* 100001 */
12 #define LEFT_GC	 0x10		/* 010000 */
13 #define LEFT_AT  0x08		/* 001000 */
14 #ifndef PMAP
15 #define LEFT_CT  0x06		/* 000110 */
16 #endif
17 
18 #define RIGHT_AG 0x30		/* 110000 */
19 #define RIGHT_AC 0x0C		/* 001100 */
20 #ifndef PMAP
21 #define RIGHT_GC 0x02		/* 000010 */
22 #define RIGHT_AT 0x01		/* 000001 */
23 #endif
24 
25 /* Intron types.  Results of logical AND of dinucleotide pairs.  Note
26    that forward is > 0x04 and reverse is <= 0x04 */
27 #define GTAG_FWD 0x20		/* 100000 GT-AG */
28 #define GCAG_FWD 0x10		/* 010000 GC-AG */
29 #define ATAC_FWD 0x08		/* 001000 AT-AC */
30 #ifndef PMAP
31 #define GTAG_REV 0x04		/* 000100 CT-AC */
32 #define GCAG_REV 0x02		/* 000010 CT-GC */
33 #define ATAC_REV 0x01		/* 000001 GT-AT */
34 #endif
35 #define NONINTRON 0x00
36 
37 
38 extern int
39 Intron_type (char left1, char left2, char right2, char right1,
40 	     char left1_alt, char left2_alt, char right2_alt, char right1_alt,
41 	     int cdna_direction
42 #ifdef INTRON_HELP
43 	     , IIT_T splicesites_iit, int *splicesites_divint_crosstable,
44 	     int donor_typeint, int acceptor_typeint, Chrnum_T chrnum,
45 	     Chrpos_T leftgenomepos, Chrpos_T rightgenomepos,
46 	     Univcoord_T chroffset, Univcoord_T chrhigh, bool watsonp,
47 #endif
48 );
49 
50 extern int
51 Intron_sensedir (int introntype);
52 extern int
53 Intron_canonical_sensedir (int introntype);
54 extern int
55 Intron_level (int introntype);
56 
57 extern char *
58 Intron_type_string (int introntype);
59 
60 extern char *
61 Intron_left_dinucl_string (int dinucl);
62 extern char *
63 Intron_right_dinucl_string (int dinucl);
64 
65 extern bool
66 Intron_canonical_fwd_p (char donor1, char donor2, char acceptor2, char acceptor1);
67 extern bool
68 Intron_canonical_rev_p (char donor1, char donor2, char acceptor2, char acceptor1);
69 extern bool
70 Intron_gcag_fwd_p (char donor1, char donor2, char acceptor2, char acceptor1);
71 extern bool
72 Intron_gcag_rev_p (char donor1, char donor2, char acceptor2, char acceptor1);
73 extern bool
74 Intron_atac_fwd_p (char donor1, char donor2, char acceptor2, char acceptor1);
75 extern bool
76 Intron_atac_rev_p (char donor1, char donor2, char acceptor2, char acceptor1);
77 
78 #endif
79