src/options.c File Reference

File that defines the software options. More...

#include <getopt.h>
#include "options.h"
#include "macros.h"
#include "io.h"

Include dependency graph for options.c:


Functions

void usage ()
 Function that defines the software options.
int parse_params (int argc, char **argv)
 Function used to parse user parameters.
int check_parameters_validity ()
 Function used to check parameters entered by the user.
void destroy_options ()
 Function used to destroyed allocated options.

Variables

char * OPTS_ref_file = NULL
char * OPTS_file
char_arrayOPTS_file_array = NULL
char * OPTS_output_dir = "./"
int OPTS_output_format = 1
int OPTS_verbose = 0
int OPTS_lambda = 1
char_arrayOPTS_alignments = NULL
int OPTS_min_length_region = 30
int OPTS_max_length_region = 500
int OPTS_filter_species = 0
int OPTS_min_id = 50
int OPTS_max_id = 100
int OPTS_nb_seqs_set = -1
int OPTS_selecting_mode = 0
int OPTS_max_species_repet = -1
int OPTS_carnac = 0

Detailed Description

File that defines the software options.

Author:
Benjamin Grenier-Boley <benjamin.grenier-boley@inria.fr>
Version:
1.02
Date:
September 2008
This file will define all options that can be used in the software

Function Documentation

int check_parameters_validity (  ) 

Function used to check parameters entered by the user.

Returns:
an integer representing the validity :
1 -> exit success
0 -> an error occured
This function will check parameters validity and returns the result of the checking

References _ERROR, char_array::chars, DESTROY, ERROR_, char_array::nb_chars, NEW, OPTS_carnac, OPTS_file, OPTS_max_id, OPTS_max_length_region, OPTS_min_id, OPTS_min_length_region, OPTS_output_dir, OPTS_ref_file, and RENEW.

Referenced by main().

void destroy_options (  ) 

Function used to destroyed allocated options.

This function will destroy the allocated options : the reference name, the array of alignments files and the location of the file in fasta or in GFF3 format

References char_array::chars, DESTROY, char_array::nb_chars, OPTS_file, OPTS_output_dir, and OPTS_ref_file.

Referenced by main().

int parse_params ( int  argc,
char **  argv 
)

Function used to parse user parameters.

Parameters:
[in] argc : number of parameters
[in] argv : the parameters
Returns:
an integer representing the status :
1 -> exit success
0 -> an error occured
This function will parse all user parameters and will check for their validity

References _ERROR, char_array::chars, ERROR_, char_array::nb_chars, NEW, OPTS_carnac, OPTS_file, OPTS_filter_species, OPTS_lambda, OPTS_max_id, OPTS_max_length_region, OPTS_max_species_repet, OPTS_min_id, OPTS_min_length_region, OPTS_nb_seqs_set, OPTS_output_dir, OPTS_output_format, OPTS_ref_file, OPTS_selecting_mode, OPTS_verbose, and RENEW.

Referenced by main().

void usage (  ) 

Function that defines the software options.

This function will be printed on the screen to help users deal with options. It will be printed also when user's options are not correct

References DISPLAY_ERR.

Referenced by main().


Variable Documentation

Array of alignments file

Referenced by print_verbose_start_alignments(), and read_alignments_files().

int OPTS_carnac = 0

char* OPTS_file

Other species file(s)

Referenced by check_parameters_validity(), destroy_options(), get_sequences(), and parse_params().

Array of file(s) containing sequences

Referenced by get_sequences().

Filter on species

Referenced by calculate_nb_al_function(), and parse_params().

int OPTS_lambda = 1

int OPTS_max_id = 100

Maximum number of repetitions by species

Referenced by check_species_repetitions(), main(), parse_params(), and print_verbose_start_check_repetitions().

int OPTS_min_id = 50

int OPTS_nb_seqs_set = -1

char* OPTS_output_dir = "./"

Output format

Referenced by main(), and parse_params().

char* OPTS_ref_file = NULL

Selecting mode

Referenced by main(), parse_params(), write_GFF3(), and write_multifasta().

int OPTS_verbose = 0


Generated on Mon Sep 22 16:34:10 2008 for matt_ygraph by  doxygen 1.5.5