RNAlib-2.2.0RC0
file_formats.h
Go to the documentation of this file.
1 #ifndef __VIENNA_RNA_PACKAGE_FILE_FORMATS_H__
2 #define __VIENNA_RNA_PACKAGE_FILE_FORMATS_H__
3 
9 #include <stdio.h>
10 
12 
13 #ifdef __GNUC__
14 #define DEPRECATED(func) func __attribute__ ((deprecated))
15 #else
16 #define DEPRECATED(func) func
17 #endif
18 
25 void vrna_structure_print_helix_list(const char *db, FILE *file);
26 
36 void vrna_structure_print_ct( const char *seq,
37  const char *db,
38  float energy,
39  const char *identifier,
40  FILE *file);
41 
49 void vrna_structure_print_bpseq(const char *seq,
50  const char *db,
51  FILE *file);
52 
53 #if WITH_JSON_SUPPORT
54 
55 void vrna_structure_print_json( const char *seq,
56  const char *db,
57  double energy,
58  const char *identifier,
59  FILE *file);
60 
61 #endif
62 
126 unsigned int vrna_read_fasta_record(char **header,
127  char **sequence,
128  char ***rest,
129  FILE *file,
130  unsigned int options);
131 
132 /* \brief Extract a dot-bracket structure string from (multiline)character array
133  *
134  * This function extracts a dot-bracket structure string from the 'rest' array as
135  * returned by vrna_read_fasta_record() and returns it. All occurences of comments within the
136  * 'lines' array will be skipped as long as they do not break the structure string.
137  * If no structure could be read, this function returns NULL.
138  *
139  * \see vrna_read_fasta_record()
140  *
141  * \param lines The (multiline) character array to be parsed
142  * \param length The assumed length of the dot-bracket string (passing a value < 1 results in no length limit)
143  * \param option Some options which may be passed to alter the behavior of the function, use 0 for no options
144  * \return The dot-bracket string read from lines or NULL
145  */
146 char *vrna_extract_record_rest_structure( const char **lines,
147  unsigned int length,
148  unsigned int option);
149 
150 /* \brief Extract a dot-bracket structure string from (multiline)character array
151  *
152  * \deprecated This function is deprecated! Use vrna_extract_record_rest_structure() as a replacment.
153  */
154 DEPRECATED(char *extract_record_rest_structure( const char **lines,
155  unsigned int length,
156  unsigned int option));
157 
164 DEPRECATED(unsigned int read_record(char **header,
165  char **sequence,
166  char ***rest,
167  unsigned int options));
168 
169 
170 DEPRECATED(unsigned int get_multi_input_line(char **string, unsigned int options));
171 
172 #endif
All datastructures and typedefs shared among the Vienna RNA Package can be found here.
unsigned int read_record(char **header, char **sequence, char ***rest, unsigned int options)
Get a data record from stdin.
void vrna_structure_print_helix_list(const char *db, FILE *file)
Print a secondary structure as helix list.
void vrna_structure_print_ct(const char *seq, const char *db, float energy, const char *identifier, FILE *file)
Print a secondary structure as connect table.
unsigned int vrna_read_fasta_record(char **header, char **sequence, char ***rest, FILE *file, unsigned int options)
Get a (fasta) data set from a file or stdin.
void vrna_structure_print_bpseq(const char *seq, const char *db, FILE *file)
Print a secondary structure in bpseq format.