RNAlib-2.4.10
alignments.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 VRNA_WARN_DEPRECATED
5 # if defined(__clang__)
6 # define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
7 # elif defined(__GNUC__)
8 # define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
9 # else
10 # define DEPRECATED(func, msg) func
11 # endif
12 #else
13 # define DEPRECATED(func, msg) func
14 #endif
15 
29 typedef struct vrna_pinfo_s vrna_pinfo_t;
30 
31 
35 #define VRNA_ALN_DEFAULT 0U
36 
37 
41 #define VRNA_ALN_RNA 1U
42 
43 
47 #define VRNA_ALN_DNA 2U
48 
49 
53 #define VRNA_ALN_UPPERCASE 4U
54 
55 
59 #define VRNA_ALN_LOWERCASE 8U
60 
66 #define VRNA_MEASURE_SHANNON_ENTROPY 1U
67 
68 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
69 
70 /* the following typedefs are for backward compatibility only */
71 
77 typedef struct vrna_pinfo_s pair_info;
78 
79 #endif
80 
82 
93 struct vrna_pinfo_s {
94  unsigned i;
95  unsigned j;
96  float p;
97  float ent;
98  short bp[8];
99  char comp;
100 };
101 
102 
109 int
110 vrna_aln_mpi(const char **alignment);
111 
112 
126 vrna_pinfo_t *
128  const char *structure,
129  double threshold);
130 
131 
132 int *
133 vrna_aln_pscore(const char **alignment,
134  vrna_md_t *md);
135 
136 
150 char **
151 vrna_aln_slice(const char **alignment,
152  unsigned int i,
153  unsigned int j);
154 
155 
161 void
162 vrna_aln_free(char **alignment);
163 
164 
173 char **
174 vrna_aln_uppercase(const char **alignment);
175 
176 
185 char **
186 vrna_aln_toRNA(const char **alignment);
187 
188 
202 char **
203 vrna_aln_copy(const char **alignment,
204  unsigned int options);
205 
206 
221 float *
222 vrna_aln_conservation_struct(const char **alignment,
223  const char *structure,
224  const vrna_md_t *md);
225 
226 
244 float *
245 vrna_aln_conservation_col(const char **alignment,
246  const vrna_md_t *md_p,
247  unsigned int options);
248 
249 
257 char *
258 vrna_aln_consensus_sequence(const char **alignment,
259  const vrna_md_t *md_p);
260 
272 char *
273 vrna_aln_consensus_mis(const char **alignment,
274  const vrna_md_t *md_p);
275 
276 
277 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
278 
282 DEPRECATED(int read_clustal(FILE *clust,
283  char *AlignedSeqs[],
284  char *names[]),
285  "Use vrna_file_msa_read() and vrna_file_msa_read_record() instead");
286 
287 
291 DEPRECATED(char *consensus(const char *AS[]),
292  "Use vrna_aln_consensus_sequence() instead!");
293 
294 
298 DEPRECATED(char *consens_mis(const char *AS[]),
299  "Use vrna_aln_consensus_mis() instead!");
300 
301 
305 DEPRECATED(char *get_ungapped_sequence(const char *seq),
306  "Use vrna_seq_ungapped() instead!");
307 
308 
320 DEPRECATED(int get_mpi(char *Alseq[],
321  int n_seq,
322  int length,
323  int *mini),
324  "Use vrna_aln_mpi() instead");
325 
326 /*
327  #############################################################
328  # some helper functions that might be useful in the library #
329  #############################################################
330  */
331 
347 DEPRECATED(void encode_ali_sequence(const char *sequence,
348  short *S,
349  short *s5,
350  short *s3,
351  char *ss,
352  unsigned short *as,
353  int circ),
354  "This function is obsolete");
355 
356 
373 DEPRECATED(void alloc_sequence_arrays(const char **sequences,
374  short ***S,
375  short ***S5,
376  short ***S3,
377  unsigned short ***a2s,
378  char ***Ss,
379  int circ),
380  "This function is obsolete");
381 
382 
398 DEPRECATED(void free_sequence_arrays(unsigned int n_seq,
399  short ***S,
400  short ***S5,
401  short ***S3,
402  unsigned short ***a2s,
403  char ***Ss),
404  "This fucntion is obsolete");
405 
406 #endif
407 
413 #endif
int vrna_aln_mpi(const char **alignment)
Get the mean pairwise identity in steps from ?to?(ident)
char ** vrna_aln_toRNA(const char **alignment)
Create a copy of an alignment where DNA alphabet is replaced by RNA alphabet.
char ** vrna_aln_copy(const char **alignment, unsigned int options)
Make a copy of a multiple sequence alignment.
unsigned j
nucleotide position j
Definition: alignments.h:95
A base pair info structure.
Definition: alignments.h:93
int get_mpi(char *Alseq[], int n_seq, int length, int *mini)
Get the mean pairwise identity in steps from ?to?(ident)
The most basic data structure required by many functions throughout the RNAlib.
Definition: fold_compound.h:132
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.
char ** vrna_aln_uppercase(const char **alignment)
Create a copy of an alignment with only uppercase letters in the sequences.
float * vrna_aln_conservation_col(const char **alignment, const vrna_md_t *md_p, unsigned int options)
Compute nucleotide conservation in an alignment.
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:177
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. ...
float * vrna_aln_conservation_struct(const char **alignment, const char *structure, const vrna_md_t *md)
Compute base pair conservation of a consensus structure.
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.
void vrna_aln_free(char **alignment)
Free memory occupied by a set of aligned sequences.
unsigned i
nucleotide position i
Definition: alignments.h:94
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.
char comp
1 iff pair is in mfe structure
Definition: alignments.h:99
float p
Probability.
Definition: alignments.h:96
char ** vrna_aln_slice(const char **alignment, unsigned int i, unsigned int j)
Slice out a subalignment from a larger alignment.
char * vrna_aln_consensus_mis(const char **alignment, const vrna_md_t *md_p)
Compute the Most Informative Sequence (MIS) for a given multiple sequence alignment.
float ent
Pseudo entropy for .
Definition: alignments.h:97
The Basic Fold Compound API.
char * vrna_aln_consensus_sequence(const char **alignment, const vrna_md_t *md_p)
Compute the consensus sequence for a given multiple sequence alignment.
int circ
backward compatibility variable.. this does not effect anything
short bp[8]
Frequencies of pair_types.
Definition: alignments.h:98