RNAlib-2.4.14
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 #include <ViennaRNA/model.h>
83 
94 struct vrna_pinfo_s {
95  unsigned i;
96  unsigned j;
97  float p;
98  float ent;
99  short bp[8];
100  char comp;
101 };
102 
103 
110 int
111 vrna_aln_mpi(const char **alignment);
112 
113 
127 vrna_pinfo_t *
129  const char *structure,
130  double threshold);
131 
132 
133 int *
134 vrna_aln_pscore(const char **alignment,
135  vrna_md_t *md);
136 
137 
151 char **
152 vrna_aln_slice(const char **alignment,
153  unsigned int i,
154  unsigned int j);
155 
156 
162 void
163 vrna_aln_free(char **alignment);
164 
165 
174 char **
175 vrna_aln_uppercase(const char **alignment);
176 
177 
186 char **
187 vrna_aln_toRNA(const char **alignment);
188 
189 
203 char **
204 vrna_aln_copy(const char **alignment,
205  unsigned int options);
206 
207 
222 float *
223 vrna_aln_conservation_struct(const char **alignment,
224  const char *structure,
225  const vrna_md_t *md);
226 
227 
245 float *
246 vrna_aln_conservation_col(const char **alignment,
247  const vrna_md_t *md_p,
248  unsigned int options);
249 
250 
258 char *
259 vrna_aln_consensus_sequence(const char **alignment,
260  const vrna_md_t *md_p);
261 
273 char *
274 vrna_aln_consensus_mis(const char **alignment,
275  const vrna_md_t *md_p);
276 
277 
278 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
279 
280 #include <stdio.h>
284 DEPRECATED(int read_clustal(FILE *clust,
285  char *AlignedSeqs[],
286  char *names[]),
287  "Use vrna_file_msa_read() and vrna_file_msa_read_record() instead");
288 
289 
293 DEPRECATED(char *consensus(const char *AS[]),
294  "Use vrna_aln_consensus_sequence() instead!");
295 
296 
300 DEPRECATED(char *consens_mis(const char *AS[]),
301  "Use vrna_aln_consensus_mis() instead!");
302 
303 
307 DEPRECATED(char *get_ungapped_sequence(const char *seq),
308  "Use vrna_seq_ungapped() instead!");
309 
310 
322 DEPRECATED(int get_mpi(char *Alseq[],
323  int n_seq,
324  int length,
325  int *mini),
326  "Use vrna_aln_mpi() instead");
327 
328 /*
329  #############################################################
330  # some helper functions that might be useful in the library #
331  #############################################################
332  */
333 
349 DEPRECATED(void encode_ali_sequence(const char *sequence,
350  short *S,
351  short *s5,
352  short *s3,
353  char *ss,
354  unsigned short *as,
355  int circ),
356  "This function is obsolete");
357 
358 
375 DEPRECATED(void alloc_sequence_arrays(const char **sequences,
376  short ***S,
377  short ***S5,
378  short ***S3,
379  unsigned short ***a2s,
380  char ***Ss,
381  int circ),
382  "This function is obsolete");
383 
384 
400 DEPRECATED(void free_sequence_arrays(unsigned int n_seq,
401  short ***S,
402  short ***S5,
403  short ***S3,
404  unsigned short ***a2s,
405  char ***Ss),
406  "This fucntion is obsolete");
407 
408 #endif
409 
415 #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:96
A base pair info structure.
Definition: alignments.h:94
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
The model details data structure and its corresponding modifiers.
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:180
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:95
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:100
float p
Probability.
Definition: alignments.h:97
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:98
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:99