#include <stdio.h>
#include "types.h"
Defines | |
#define | CARNAC_ENERGY_REGEX "energy -?[0-9]+.[0-9]+e(-|[+])[0-9]+" |
Define the regular expression matching energy in carnac results. | |
#define | ARNICA_SELECTED_STEMS_REGEX "([0-9]?[0-9]* stems)" |
Define the regular expression matching the number of stems in arnica results. | |
#define | CARNAC_SELECTED_STEMS_REGEX "[0-9]?[0-9]* selected stems" |
Define the regular expression matching the number of stems in carnac results. | |
Functions | |
int | call_carnac (const p_sequence *seqs, const int nb_seqs) |
Function used to execute carnac on all sequences provided and get the results. | |
char * | read_line (FILE *fd, int *nb) |
Function used to read a file and returns the string read and the number of char read. | |
int | init_carnac () |
Function used to initialize the call of carnac. | |
int | carnac_individual_energy (const char *output) |
Function used to read the results of carnac. | |
int | write_raw (FILE *output, const p_sequence *seqs, const int nb) |
Function used to write sequences in a file. | |
int | write_fasta_seq (FILE *output, const p_sequence *seqs, const int nb) |
Function used to write sequences in a file in fasta format. | |
int | file_exists (const char *file) |
Function used to test if a file exists. | |
void | destroy_regex () |
Function used to destroy the regular expression selected. |
Header file for the carnac management.
int call_carnac | ( | const p_sequence * | seqs, | |
const int | nb_seqs | |||
) |
Function used to execute carnac on all sequences provided and get the results.
[in] | seqs | : the array of sequences |
[in] | nb_seqs | : the number of sequences to compare |
[in] | seqs | : the array of sequences |
[in] | nb_seqs | : the number of sequences to compare |
int carnac_individual_energy | ( | const char * | output | ) |
Function used to read the results of carnac.
[in] | output | : the location of the carnac result |
References _ERROR, DESTROY, ERROR_, NEW, read_file(), and RENEW.
void destroy_regex | ( | ) |
Function used to destroy the regular expression selected.
Function that will destroy the regular expression
References DESTROY.
int file_exists | ( | const char * | file | ) |
Function used to test if a file exists.
[in] | file | : the file to test |
int init_carnac | ( | ) |
Function used to initialize the call of carnac.
References _ERROR, ARNICA_SELECTED_STEMS_REGEX, CARNAC_SELECTED_STEMS_REGEX, ERROR_, and NEW.
char* read_line | ( | FILE * | fd, | |
int * | nb | |||
) |
Function used to read a file and returns the string read and the number of char read.
[in] | fd | : the file descriptor |
[in] | nb | : the number of char read |
int write_fasta_seq | ( | FILE * | output, | |
const p_sequence * | seqs, | |||
const int | nb | |||
) |
Function used to write sequences in a file in fasta format.
[in] | output | : the file where to write |
[in] | seqs | : the sequences to write |
[in] | nb | : the number of sequences to write |
int write_raw | ( | FILE * | output, | |
const p_sequence * | seqs, | |||
const int | nb | |||
) |
Function used to write sequences in a file.
[in] | output | : the file where to write |
[in] | seqs | : the sequences to write |
[in] | nb | : the number of sequences to write |