src/io.c File Reference

File that defines the IN/OUT definitions and functions. More...

#include "io.h"
#include "macros.h"
#include "options.h"

Include dependency graph for io.c:


Functions

void read_file (FILE *fd, char **content)
 Function used to read a file and get its content.
void get_size_number (int num, int *size)
 Function used to get the number of chars taken to represent an integer into a string.
int write_GFF3 (p_matt_ygraph m)
 Function used to write GFF3 files.
int write_multifasta (p_matt_ygraph m)
 Function used to write multifasta files.
void print_verbose_start_process ()
 Function used to print starting message on screen.
void print_verbose_start_sequences ()
 Function used to print the starting message on screen concerning the parsing of the sequences.
void print_verbose_end_sequences (sequence_array *array_of_seqs)
 Function used to print the ending message on screen concerning the parsing of the sequences.
void print_verbose_start_alignments ()
 Function used to print the starting message on screen concerning the parsing of the alignments.
void print_verbose_start_alignments_file (char *filename)
 Function used to print the starting message on screen concerning the parsing of the alignments in the current file.
void print_verbose_end_alignments_file (int nb_al)
 Function used to print the starting message on screen concerning the parsing of the alignments in the current file.
void print_verbose_end_alignments (int nb_al)
 Function used to print the ending message on screen concerning the parsing of the alignments.
void print_verbose_start_score ()
 Function used to print the starting message on screen concerning the score calculation.
void print_verbose_end_score (float mean)
 Function used to print the ending message on screen concerning the score calculation.
void print_verbose_start_conserved_regions ()
 Function used to print the starting message on screen concerning the searching for conserved regions.
void print_verbose_end_conserved_regions (int nb_sets)
 Function used to print the ending message on screen concerning the searching for conserved regions.
void print_verbose_start_build_sets ()
 Function used to print the starting message on screen concerning the building sets step.
void print_verbose_end_build_sets (int nb_sets)
 Function used to print the ending message on screen concerning the building sets step.
void print_verbose_start_compare_ref ()
 Function used to print the starting message on screen concerning the comparison step of all queries against the reference.
void print_verbose_start_compare_ref_set (int nb_set, int nb_seqs)
 Function used to print the starting message on screen concerning the comparison step of all queries against the reference for the current set.
void print_verbose_end_compare_ref_set (int nb_seqs)
 Function used to print the ending message on screen concerning the comparison step of all queries against the reference for the current set.
void print_verbose_sort_identity_ref ()
 Function used to print the message on screen concerning the sorting of queries by identities.
void print_verbose_end_compare_ref ()
 Function used to print the ending message on screen concerning the comparison step of all queries against the reference.
void print_verbose_start_check_repetitions ()
 Function used to print the message on screen concerning the checking of species repetitions.
void print_verbose_start_checking_repetitions_set (int nb_set, int nb_seqs)
 Function used to print the starting message on screen concerning the species repetitions for the current set.
void print_verbose_end_checking_repetitions_set (int nb_seqs)
 Function used to print the ending message on screen concerning the species repetitions for the current set.
void print_verbose_end_check_repetitions ()
 Function used to print the ending message on screen concerning the checking of species repetitions.
void print_verbose_start_search_naive_clique ()
 Function used to print the starting message on screen concerning the comparison step of the naive clique search.
void print_verbose_start_naive_clique_set (int nb_set, int nb_seqs)
 Function used to print the starting message on screen concerning the comparison step of searching the naive clique for the current set.
void print_verbose_end_naive_clique_set (int nb_seqs)
 Function used to print the ending message on screen concerning the comparison step of searching the naive clique for the current set.
void print_verbose_end_search_naive_clique ()
 Function used to print the ending message on screen concerning the comparison step of the naive clique search.
void print_verbose_no_connect (int nb)
 Function used to print the the message when a set of sequences has no connected sequence.
void print_verbose_start_maxi_clique_set (int nb_set, int nb_seqs)
 Function used to print the starting message on screen concerning the comparison step of searching the maxi clique for the current set.
void print_verbose_end_maxi_clique_set (int nb_seqs)
 Function used to print the ending message on screen concerning the comparison step of searching the maxi clique for the current set.
void print_verbose_start_write_GFF3 ()
 Function used to print the starting message on screen concerning the writing of result GFF3 files.
void print_verbose_end_write_GFF3 (int nb_files)
 Function used to print the ending message on screen concerning the writing of result GFF3 files.
void print_verbose_start_write_multifasta ()
 Function used to print the starting message on screen concerning the writing of result multifasta files.
void print_verbose_end_write_multifasta (int nb_files)
 Function used to print the ending message on screen concerning the writing of result multifasta files.
void print_verbose_end_process (long execution_time)
 Function used to print the ending message.

Detailed Description

File that defines the IN/OUT definitions and functions.

Author:
Benjamin Grenier-Boley <benjamin.grenier-boley@inria.fr>
Version:
1.02
Date:
September 2008
This file will define all I/O functions used in the software

Function Documentation

void get_size_number ( int  num,
int *  size 
)

Function used to get the number of chars taken to represent an integer into a string.

Parameters:
[in] num : the number to consider
[in,out] size : the calculated size
This function will be used to get the number of chars taken to represent a integer into a string

Referenced by write_GFF3(), and write_multifasta().

void print_verbose_end_alignments ( int  nb_al  ) 

Function used to print the ending message on screen concerning the parsing of the alignments.

Parameters:
[in] nb_al : the number of alignments found
This function will print the ending message on screen concerning the parsing of the alignments (number of alignments found)

References _PRINT, LINE, and PRINT_.

Referenced by main().

void print_verbose_end_alignments_file ( int  nb_al  ) 

Function used to print the starting message on screen concerning the parsing of the alignments in the current file.

Parameters:
[in] nb_al : number of alignment found in the current file
This function will print the ending message on screen concerning the parsing of the alignments in the current file (number of alignments found)

References _PRINT, and PRINT_.

Referenced by read_alignments_files().

void print_verbose_end_build_sets ( int  nb_sets  ) 

Function used to print the ending message on screen concerning the building sets step.

Parameters:
[in] nb_sets : the number of sets built
This function will print the ending message on screen concerning the building sets step (number of sets built)

References _PRINT, LINE, and PRINT_.

Referenced by main().

void print_verbose_end_check_repetitions (  ) 

Function used to print the ending message on screen concerning the checking of species repetitions.

This function will print the ending message on screen concerning the checking of species repetitions

References _PRINT, and PRINT_.

Referenced by main().

void print_verbose_end_checking_repetitions_set ( int  nb_seqs  ) 

Function used to print the ending message on screen concerning the species repetitions for the current set.

Parameters:
[in] nb_seqs : the number of sequences in the set (ref + queries)
This function will print the ending message on screen concerning the species repetitions for the current set by printing the number of sequences in the set

References _PRINT, and PRINT_.

Referenced by check_species_repetitions().

void print_verbose_end_compare_ref (  ) 

Function used to print the ending message on screen concerning the comparison step of all queries against the reference.

This function will print the ending message on screen concerning the comparison step of all queries against the reference

References _PRINT, LINE, and PRINT_.

Referenced by main().

void print_verbose_end_compare_ref_set ( int  nb_seqs  ) 

Function used to print the ending message on screen concerning the comparison step of all queries against the reference for the current set.

Parameters:
[in] nb_seqs : the number of seqs in the set after the comparison (ref + query)
This function will print the ending message on screen concerning the comparison step of all queries against the reference for the current set

References _PRINT, and PRINT_.

Referenced by compare_all_against_ref().

void print_verbose_end_conserved_regions ( int  nb_sets  ) 

Function used to print the ending message on screen concerning the searching for conserved regions.

Parameters:
[in] nb_sets : the number of conserved regions found
This function will print the ending message on screen concerning the searching of the conserved regions (number of regions found)

References _PRINT, LINE, and PRINT_.

Referenced by main().

void print_verbose_end_maxi_clique_set ( int  nb_seqs  ) 

Function used to print the ending message on screen concerning the comparison step of searching the maxi clique for the current set.

Parameters:
[in] nb_seqs : the number of seqs in the set after the maxi clique serach (ref + query)
This function will print the ending message on screen concerning the comparison step of searching the maxi clique for the current set

References PRINT_.

Referenced by maxi_clique_search().

void print_verbose_end_naive_clique_set ( int  nb_seqs  ) 

Function used to print the ending message on screen concerning the comparison step of searching the naive clique for the current set.

Parameters:
[in] nb_seqs : the number of seqs in the set after the naive clique serach (ref + query)
This function will print the ending message on screen concerning the comparison step of searching the naive clique for the current set

References _PRINT, and PRINT_.

Referenced by search_naive_clique().

void print_verbose_end_process ( long  execution_time  ) 

Function used to print the ending message.

Parameters:
[in] execution_time : the execution time spent
This function will print the ending message (with execution time)

Execution time > 1s : print time in seconds and milliseconds

References PRINT_.

Referenced by main().

void print_verbose_end_score ( float  mean  ) 

Function used to print the ending message on screen concerning the score calculation.

Parameters:
[in] mean : the mean number of alignments found by position
This function will print the ending message on screen concerning the score calculation (mean number of alignments)

References _PRINT, LINE, and PRINT_.

Referenced by main().

void print_verbose_end_search_naive_clique (  ) 

Function used to print the ending message on screen concerning the comparison step of the naive clique search.

Function used to print the ending message on screen concerning the comparison step of the maxi clique search.

This function will print the ending message on screen concerning the comparison step of of the naive clique search

This function will print the ending message on screen concerning the comparison step of of the maxi clique search

References _PRINT, LINE, and PRINT_.

Referenced by main().

void print_verbose_end_sequences ( sequence_array array_of_seqs  ) 

Function used to print the ending message on screen concerning the parsing of the sequences.

This function will print the ending message on screen concerning the parsing of the sequences (number of sequences, their name and length)

Parameters:
[in] array_of_seqs : the array of extracted sequences
This function will print the ending message on screen concerning the parsing of the sequences (number of sequences, their names and lengths)

References _PRINT, LINE, sequence_array::nb_seqs, PRINT_, and sequence_array::seqs.

Referenced by main().

void print_verbose_end_write_GFF3 ( int  nb_files  ) 

Function used to print the ending message on screen concerning the writing of result GFF3 files.

Parameters:
[in] nb_files : the number of GFF3 files written
This function will print the ending message on screen concerning the writing of result GFF3 files (number of files written)

References LINE, and PRINT_.

Referenced by main().

void print_verbose_end_write_multifasta ( int  nb_files  ) 

Function used to print the ending message on screen concerning the writing of result multifasta files.

Parameters:
[in] nb_files : the number of multifasta files written
This function will print the ending message on screen concerning the writing of result multifasta files (number of files written)

References LINE, and PRINT_.

Referenced by main().

void print_verbose_no_connect ( int  nb  ) 

Function used to print the the message when a set of sequences has no connected sequence.

Parameters:
nb : the number of the set concerned
This function will print the the message when a set of sequences has no connected sequence

References _PRINT, and PRINT_.

Referenced by search_naive_clique().

void print_verbose_sort_identity_ref (  ) 

Function used to print the message on screen concerning the sorting of queries by identities.

This function will print the message on screen concerning the sorting of queries by identities

References _PRINT, and PRINT_.

Referenced by main().

void print_verbose_start_alignments (  ) 

Function used to print the starting message on screen concerning the parsing of the alignments.

This function will print the starting message on screen concerning the parsing of the alignments

References _PRINT, char_array::nb_chars, OPTS_alignments, and PRINT_.

Referenced by main().

void print_verbose_start_alignments_file ( char *  filename  ) 

Function used to print the starting message on screen concerning the parsing of the alignments in the current file.

Parameters:
[in] filename : the name of the current alignment file
This function will print the starting message on screen concerning the parsing of the alignments in the current file

References _PRINT, and PRINT_.

Referenced by read_alignments_files().

void print_verbose_start_build_sets (  ) 

Function used to print the starting message on screen concerning the building sets step.

This function will print the starting message on screen concerning the building sets step

References _PRINT, and PRINT_.

Referenced by main().

void print_verbose_start_check_repetitions (  ) 

Function used to print the message on screen concerning the checking of species repetitions.

This function will print the message on screen concerning the checking of species repetitions

References _PRINT, OPTS_max_species_repet, and PRINT_.

Referenced by main().

void print_verbose_start_checking_repetitions_set ( int  nb_set,
int  nb_seqs 
)

Function used to print the starting message on screen concerning the species repetitions for the current set.

Parameters:
[in] nb_set : the number of set processed
[in] nb_seqs : the number of sequences in the set (ref + queries)
This function will print the starting message on screen concerning the species repetitions for the current set (nb_set). It also print the number of sequences in the set

References _PRINT, and PRINT_.

Referenced by check_species_repetitions().

void print_verbose_start_compare_ref (  ) 

Function used to print the starting message on screen concerning the comparison step of all queries against the reference.

This function will print the starting message on screen concerning the comparison step of all queries against the reference

References _PRINT, OPTS_carnac, OPTS_max_id, OPTS_min_id, and PRINT_.

Referenced by main().

void print_verbose_start_compare_ref_set ( int  nb_set,
int  nb_seqs 
)

Function used to print the starting message on screen concerning the comparison step of all queries against the reference for the current set.

Parameters:
[in] nb_set : the number of set processed
[in] nb_seqs : the number of sequences in the set (ref + queries)
This function will print the starting message on screen concerning the comparison step of all queries against the reference for the current set (nb_set). It also print the number of sequences in the set

References _PRINT, and PRINT_.

Referenced by compare_all_against_ref().

void print_verbose_start_conserved_regions (  ) 

Function used to print the starting message on screen concerning the searching for conserved regions.

This function will print the starting message on screen concerning the searching of the conserved regions

References _PRINT, OPTS_max_length_region, OPTS_min_length_region, and PRINT_.

Referenced by main().

void print_verbose_start_maxi_clique_set ( int  nb_set,
int  nb_seqs 
)

Function used to print the starting message on screen concerning the comparison step of searching the maxi clique for the current set.

Parameters:
[in] nb_set : the number of set processed
[in] nb_seqs : the number of sequences in the set (ref + queries)
This function will print the starting message on screen concerning the comparison step of searching the maxi clique for the current set (nb_set). It also print the number of sequences in the set

References PRINT_.

Referenced by maxi_clique_search().

void print_verbose_start_naive_clique_set ( int  nb_set,
int  nb_seqs 
)

Function used to print the starting message on screen concerning the comparison step of searching the naive clique for the current set.

Parameters:
[in] nb_set : the number of set processed
[in] nb_seqs : the number of sequences in the set (ref + queries)
This function will print the starting message on screen concerning the comparison step of searching the naive clique for the current set (nb_set). It also print the number of sequences in the set

References _PRINT, and PRINT_.

Referenced by search_naive_clique().

void print_verbose_start_process (  ) 

Function used to print starting message on screen.

This function will print on screen the starting message

References _PRINT, LINE, and PRINT_.

Referenced by main().

void print_verbose_start_score (  ) 

Function used to print the starting message on screen concerning the score calculation.

This function will print the starting message on screen concerning the score calculation

References _PRINT, OPTS_lambda, and PRINT_.

Referenced by main().

void print_verbose_start_search_naive_clique (  ) 

Function used to print the starting message on screen concerning the comparison step of the naive clique search.

Function used to print the starting message on screen concerning the comparison step of the maxi clique search.

This function will print the starting message on screen concerning the comparison step of of the naive clique search

This function will print the starting message on screen concerning the comparison step of of the maxi clique search

References _PRINT, OPTS_carnac, OPTS_max_id, OPTS_min_id, OPTS_nb_seqs_set, and PRINT_.

Referenced by main().

void print_verbose_start_sequences (  ) 

Function used to print the starting message on screen concerning the parsing of the sequences.

This function will print the starting message on screen concerning the parsing of the sequences

References _PRINT, OPTS_ref_file, and PRINT_.

Referenced by main().

void print_verbose_start_write_GFF3 (  ) 

Function used to print the starting message on screen concerning the writing of result GFF3 files.

This function will print the starting message on screen concerning the writing of result GFF3 files

References OPTS_nb_seqs_set, OPTS_output_dir, and PRINT_.

Referenced by main().

void print_verbose_start_write_multifasta (  ) 

Function used to print the starting message on screen concerning the writing of result multifasta files.

This function will print the starting message on screen concerning the writing of result multifasta files

References OPTS_nb_seqs_set, OPTS_output_dir, and PRINT_.

Referenced by main().

void read_file ( FILE *  fd,
char **  content 
)

Function used to read a file and get its content.

Parameters:
[in] fd : the file descriptor of the reading file
[out] content : the string representation of the file content
This function will be used to read a file and return its content or NULL if the file is empty

Parameters:
[in] fd : the file descriptor of the reading file
[out] content : the string representation of the file content
This function will be used to read a file and return its content

References NEW.

Referenced by carnac_individual_energy().

int write_GFF3 ( p_matt_ygraph  m  ) 

Function used to write GFF3 files.

Parameters:
[in] m : the main structure containing all info needed
Returns:
the number of files written
This function will produce as many GFF3 as the number of sets of sequences discovered

References _ERROR, DESTROY, ERROR_, get_size_number(), NEW, OPTS_nb_seqs_set, OPTS_output_dir, and OPTS_selecting_mode.

Referenced by main().

int write_multifasta ( p_matt_ygraph  m  ) 

Function used to write multifasta files.

Parameters:
[in] m : the main structure containing all info needed
Returns:
the number of files written
This function will produce as many multifasta as the number of sets of sequences discovered

References _ERROR, DESTROY, ERROR_, get_size_number(), NEW, OPTS_nb_seqs_set, OPTS_output_dir, and OPTS_selecting_mode.

Referenced by main().


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