biomcmc-lib  0.1
low level library for phylogenetic analysis
nexus_common.h
Go to the documentation of this file.
1 /*
2  * This file is part of biomcmc-lib, a low-level library for phylogenomic analysis.
3  * Copyright (C) 2019-today Leonardo de Oliveira Martins [ leomrtns at gmail.com; http://www.leomartins.org ]
4  *
5  * biomcmc is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
6  * License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
7  * version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
10  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11  * details (file "COPYING" or http://www.gnu.org/copyleft/gpl.html).
12  */
13 
18 #ifndef _biomcmc_nexus_common_h_
19 #define _biomcmc_nexus_common_h_
20 
21 #include "char_vector.h"
22 #include "empirical_frequency.h"
23 
25 #define MAX_NAME_LENGTH 4096
26 
28 char_vector new_char_vector_from_file (char *filename);
29 
31 char* remove_nexus_comments (char **string, size_t *stringsize, FILE *stream);
33 char* lowercase_string (char *string);
35 char* uppercase_string (char *string);
37 char* remove_space_from_string (char *string);
39 bool nonempty_string (char *string);
41 bool nonempty_fasta_line (char *string);
42 
43 #endif
Creates a histogram of a vector, ordered by frequency.
vector of strings (char vectors) of variable length
Definition: char_vector.h:27
bool nonempty_string(char *string)
returns bool::false if string is composed only of space characters (' ', ' ', '', ''...
Definition: nexus_common.c:122
bool nonempty_fasta_line(char *string)
returns bool::false if first nonspace character of string is ';' (FASTA comment) or '#' (HUPO extensi...
Definition: nexus_common.c:134
char_vector new_char_vector_from_file(char *filename)
General function that stores file content into char_vector_struct, removing shell-type comments...
Definition: nexus_common.c:22
char * lowercase_string(char *string)
Changes uppercase characters by lowercase versions.
Definition: nexus_common.c:98
char * remove_nexus_comments(char **string, size_t *stringsize, FILE *stream)
Removes (possible nested/multiline) nexus comments of the form [] (brackets).
Definition: nexus_common.c:53
char * remove_space_from_string(char *string)
Removes spaces, tabs from string.
Definition: nexus_common.c:114
list of strings (each string is a vector of chars)
char * uppercase_string(char *string)
Changes lowercase characters by uppercase versions.
Definition: nexus_common.c:106