Alignment Summary
SEGUL generates different summary statistics for DNA and amino acid sequences. By default, the data type is set to the DNA sequence. In general, the command is as follows:
segul align summary <input-option> [alignment-path] --datatype [datatype]The summary function produces three summary statistics:
- Summary statistics for all the alignments printed in the terminal and written to the log file (
segul.log). - Summary statistics for each alignment (assuming locus) written to a CSV file (default name:
locus_summary.csv). - Summary statistics for each taxon written to a CSV file (default name:
taxon_summary.csv).
Learn more about specifying the output directory and filenames here.
Computing sequence summary statistics for DNA sequences
Section titled “Computing sequence summary statistics for DNA sequences”Because the SEGUL datatype defaults to DNA, we don’t need to pass the command’s --datatype option. For example, to generate summary statistics for alignments in the folder alignments/:
segul align summary -d alignments/or using the --input or -i option:
segul align summary -i alignments/*.nexusBelow is an example of segul terminal output for DNA sequence summary statistics. This output is based on alignments from Oliveros et al. (2019).
=========================================================SEGUL v0.11.1An alignment tool for phylogenomics---------------------------------------------------------Input dir : oliveros_et_al_2019/File counts : 4,060Input format : NexusData type : DNATask : Sequence summary statistics
🌘 Finished computing summary stats!
General SummaryTotal taxa : 221Total loci : 4,060Total sites : 2,464,926Missing data : 38,227,233%Missing data : 7.32%GC content : 0.36AT content : 0.56Characters : 522,529,858Nucleotides : 484,302,625
Alignment SummaryMin length : 155 bpMax length : 1,410 bpMean length : 607.12 bp
Taxon SummaryMin taxa : 177Max taxa : 221Mean taxa : 210.84
Character Count? : 36,681,846- : 1,545,387A : 147,184,543C : 94,814,080G : 94,526,406T : 147,777,596
Data Matrix Completeness100% taxa : 1595% taxa : 3,06990% taxa : 3,72985% taxa : 3,96180% taxa : 4,060
Conserved SequencesCon. loci : 0%Con. loci : 0.00%Con. sites : 1,261,559%Con. sites : 0.51%Min con. sites : 16Max con. sites : 885Mean con. sites : 0.51
Variable SequencesVar. loci : 4,060%Var. loci : 100.00%Var. sites : 1,203,367%Var. sites : 0.49%Min var. sites : 15Max var. sites : 814Mean var. sites : 0.49
Parsimony InformativeInf. loci : 4,060%Inf. loci : 100.00%Inf. sites : 811,688%Inf. sites : 0.33%Min inf. sites : 2Max inf. sites : 631Mean inf. sites : 0.33
Output FilesAlignment summary : locus_per_locus.csvLog file : segul.log
Execution time : 4.3725607sComputing sequence summary statistics for amino acid sequences
Section titled “Computing sequence summary statistics for amino acid sequences”We need to use the --datatype aa option to compute the summary statistics for amino acid sequences. For example:
segul align summary -d alignments/ --datatype aaIf we use the --input or -i option, the command will be:
segul align summary -i alignments/*.nexus --datatype aaSetting up data matrix completeness interval
Section titled “Setting up data matrix completeness interval”By default, SEGUL will print the percentage of data matrix completeness with a decrement interval of 5 percent. It starts from 100% until it reaches all alignment coverage or near zero percent completeness. With the default interval, if SEGUL never reaches all alignment coverage, it will stop printing the result when the result reaches 5%. In the Oliveros et al. (2019) dataset above, SEGUL stops printing the data matrix completeness at 80% because it already covers the total number of alignments (4,060 alignments).
Use the --interval option to change the interval setting. SEGUL supports intervals 1, 2, 5, and 10. For example:
segul align summary -i alignments/*.nexus --interval 1Using Oliveros et al. (2019) dataset with 1% interval, the data matrix completeness result will be as below:
Data Matrix Completeness100% taxa : 1599% taxa : 52098% taxa : 1,21997% taxa : 1,95396% taxa : 2,49695% taxa : 3,06994% taxa : 3,30193% taxa : 3,44592% taxa : 3,54891% taxa : 3,63690% taxa : 3,72989% taxa : 3,78688% taxa : 3,84187% taxa : 3,88086% taxa : 3,90885% taxa : 3,96184% taxa : 3,98083% taxa : 4,00582% taxa : 4,02181% taxa : 4,05080% taxa : 4,060Specifying the output directory and filenames
Section titled “Specifying the output directory and filenames”The two CSV files are saved in the Align-Summary directory by default. You can change the directory name by using the --output or -o option. For example:
segul align summary -d alignments/ -f nexus -o alignment_statsYou can also add a prefix to the CSV filenames using the --prefix option. For example:
segul align summary -d alignments/ -f nexus -o alignment_stats --prefix my_samplesThe command above will create a directory named alignment_stats/ and write the CSV output files. Using the --prefix option, the output filename for the taxon summary will be my_samples_taxon_summary.csv,. For the locus, the summary will be my_samples_locus_summary.csv., and my_samples_alignment_summary.csv for the alignment summary.
All options
Section titled “All options”| Option | Description |
|---|---|
-d, --dir |
Directory with alignments |
-i, --input |
Alignment files. Allows wildcards |
-f, --input-format |
Input format: auto (default), fasta, nexus, or phylip |
--datatype |
Data type: dna (default) or aa |
--interval |
Data matrix completeness interval in percent: 5 (default), 1, 2, or 10 |
--per-locus |
Only compute summary statistics for each locus |
-o, --output |
Output directory. Default: Align-Summary |
--prefix |
Prefix of the output files |
--force |
Overwrite an existing output directory |
--log |
Log file path. Default: segul.log |
Copyright © 2026 H. Handika & J. A. Esselstyn.