convert_fasta_2_nexus¶
-
yoda_powers.bio.
convert_fasta_2_nexus
(path_directory, path_directory_out)[source]¶ Return the number of fasta file’s convert find in directory (“fasta”, “fa”, “fas”) where are converted
Warning
Sequence on fasta must align and have the same length
Notes
function need modules:
pathlib
BioPython
- Parameters
path_directory (str) – a path to fasta file directory
path_directory_out (str) – a directory path to write nexus file
- Returns
the number of file converted
- Return type
int
- Raises
ValueError – If path_directory does not exist.
ValueError – If path_directory is not a valid directory.
ValueError – If fasta is not align.
Examples
>>> nb_file = convert_fasta_2_nexus('path/to/directory/',' path/to/directory/') >>> print(nb_file) "4172"