inc/rnautil.h

Go to the documentation of this file.
00001 /* rnautil.h - functions for dealing with RNA and RNA secondary structure.  */
00002 #ifndef RNAUTIL_H
00003 #define RNAUTIL_H
00004 
00005 #ifndef COMMON_H
00006 #include "common.h"
00007 #endif
00008 
00009 extern const char *RNA_PAIRS[];
00010 /* Null terminated array of rna pairs */
00011 
00012 void dna2rna(char *s);
00013 /* Replace 't' with 'u' and 'T' with 'U'. */
00014 
00015 bool rnaPair(char a, char b);
00016 /* Returns TRUE if a and b can pair, and false otherwise */
00017 
00018 void reverseFold(char *s);
00019 /* Reverse the order of the parenthesis defining an RNA secondary structure annotation. */
00020 
00021 void fold2pairingList(char *fold, int len, int **p2pairList);
00022 /* take a parenthesis string, allocate and return an array of pairing
00023    positions: pairList[i] = j <=> i pair with j and pairList[i] = -1
00024    <=> i does not pair.*/
00025 
00026 void mkPairPartnerSymbols(int * pairList, char * pairSymbols, int size);
00027 /* Make a symbol string indicating pairing partner */
00028 
00029 char * projectString(char * s, char * ref, char refChar, char insertChar);
00030 /* Insert 'insertChar' in 's' at every positin 'ref' has 'refChar'. */
00031 
00032 char * gapAdjustFold(char * s, char * ref);
00033 /* Insert space in s when there is a gap ('-') in ref. */
00034 
00035 int * projectIntArray(int * in, char * ref, char refChar, int insertInt);
00036 /* Insert 'insertChar' in 's' at every positin 'ref' has 'refChar'. */
00037 
00038 int * gapIntArrayAdjust(int * in, char * ref);
00039 /* Insert space in s when there is a gap ('-') in ref. */
00040 
00041 void markCompensatoryMutations(char *s, char *ref, int * pairList, int *markList);
00042 /* Compares s to ref and pairList and sets values in markList
00043  * according to pairing properties. The value of markList[i] specifies
00044  * the pairing property of the i'th position. The following values are
00045  * used: -1: default; 0: ref[i] = s[i] and both compatible with
00046  * pairList, 1: ref[i] != s[i] and both compatible with pairList; 2:
00047  * s[i] not compatible with pairList;
00048  */
00049 
00050 int assignBin(double val, double minVal, double maxVal, int binCount);
00051 /* Divide range given by minVal and maxVal into maxBin+1 intervals
00052    (bins), and return index of the bin val falls into. */
00053 
00054 #endif /* RNAUTIL_H */
00055 

Generated on Tue Dec 25 18:39:29 2007 for blat by  doxygen 1.5.2