RNAlib-2.2.7
aln_util.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_ALN_UTIL_H
2 #define VIENNA_RNA_PACKAGE_ALN_UTIL_H
3 
4 #ifdef DEPRECATION_WARNINGS
5 # ifdef __GNUC__
6 # define DEPRECATED(func) func __attribute__ ((deprecated))
7 # else
8 # define DEPRECATED(func) func
9 # endif
10 #else
11 # define DEPRECATED(func) func
12 #endif
13 
24 typedef struct vrna_pinfo_s vrna_pinfo_t;
25 
26 /* make this interface backward compatible with RNAlib < 2.2.0 */
27 #define VRNA_BACKWARD_COMPAT
28 
29 
30 #ifdef VRNA_BACKWARD_COMPAT
31 
32 /* the following typedefs are for backward compatibility only */
33 
38 typedef struct vrna_pinfo_s pair_info;
39 
40 #endif
41 
52 struct vrna_pinfo_s {
53  unsigned i;
54  unsigned j;
55  float p;
56  float ent;
57  short bp[8];
58  char comp;
59 };
60 
61 int read_clustal( FILE *clust,
62  char *AlignedSeqs[],
63  char *names[]);
64 /*@only@*/ /*@notnull@*/ char *consensus(const char *AS[]);
65 /*@only@*/ /*@notnull@*/ char *consens_mis(const char *AS[]);
66 
67 char *
68 get_ungapped_sequence(const char *seq);
69 
81 int vrna_aln_mpi( char *Alseq[],
82  int n_seq,
83  int length,
84  int *mini);
85 
100  const char *structure,
101  double threshold);
102 
116 DEPRECATED(int get_mpi(char *Alseq[], int n_seq, int length, int *mini));
117 
118 /*
119 #############################################################
120 # some helper functions that might be useful in the library #
121 #############################################################
122 */
123 
140 void encode_ali_sequence( const char *sequence,
141  short *S,
142  short *s5,
143  short *s3,
144  char *ss,
145  unsigned short *as,
146  int circ);
147 
165 void alloc_sequence_arrays(const char **sequences,
166  short ***S,
167  short ***S5,
168  short ***S3,
169  unsigned short ***a2s,
170  char ***Ss,
171  int circ);
172 
189 void free_sequence_arrays( unsigned int n_seq,
190  short ***S,
191  short ***S5,
192  short ***S3,
193  unsigned short ***a2s,
194  char ***Ss);
195 
196 
202 #endif
unsigned j
nucleotide position j
Definition: aln_util.h:54
A base pair info structure.
Definition: aln_util.h:52
void alloc_sequence_arrays(const char **sequences, short ***S, short ***S5, short ***S3, unsigned short ***a2s, char ***Ss, int circ)
Allocate memory for sequence array used to deal with aligned sequences.
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:390
int vrna_aln_mpi(char *Alseq[], int n_seq, int length, int *mini)
Get the mean pairwise identity in steps from ?to?(ident)
vrna_pinfo_t * vrna_aln_pinfo(vrna_fold_compound_t *vc, const char *structure, double threshold)
Retrieve an array of vrna_pinfo_t structures from precomputed pair probabilities. ...
unsigned i
nucleotide position i
Definition: aln_util.h:53
char comp
1 iff pair is in mfe structure
Definition: aln_util.h:58
float p
Probability.
Definition: aln_util.h:55
void encode_ali_sequence(const char *sequence, short *S, short *s5, short *s3, char *ss, unsigned short *as, int circ)
Get arrays with encoded sequence of the alignment.
int get_mpi(char *Alseq[], int n_seq, int length, int *mini)
Get the mean pairwise identity in steps from ?to?(ident)
float ent
Pseudo entropy for .
Definition: aln_util.h:56
void free_sequence_arrays(unsigned int n_seq, short ***S, short ***S5, short ***S3, unsigned short ***a2s, char ***Ss)
Free the memory of the sequence arrays used to deal with aligned sequences.
int circ
backward compatibility variable.. this does not effect anything
short bp[8]
Frequencies of pair_types.
Definition: aln_util.h:57