Skip to content

Features

This page shows what each SEGUL feature does with your data. Each diagram uses a small example; the same rules apply to datasets with thousands of loci. Under each feature, the guide links open its step-by-step instructions for the GUI, CLI, and Python API, or say when an interface does not support it yet. The Rust and R APIs use the SEGUL library directly.

SEGUL groups its features by the kind of input they take. In the GUI, each group is a button in the navigation bar or rail. In the CLI, each group is a command.

SEGUL task groupsThree task groups. Alignments takes aligned files or partitions and offers concatenation, conversion, distance, filtering, partition conversion, splitting, summary, trimming, and unalignment. Genomic takes FASTQ reads, FASTA contigs, or MAF whole-genome alignments and offers read and contig summaries plus MAF conversion and summary. Sequences takes aligned or unaligned files and offers addition, ID extraction, mapping, renaming, sequence extraction, filtering, removal, translation, and transposition.AlignmentsInputAligned files or partitionsConcatenationConversionDistanceFilteringPartition conversionSplittingSummaryTrimmingUnalignmentsegul align …GenomicInputReads, contigs, or MAFSequence read summaryContig summaryMAF conversionMAF summarysegul read|contig|maf …SequencesInputAligned or unaligned filesAdditionID extractionID mappingID renamingExtractionFilteringRemovalTranslationTranspositionsegul sequence …
Each task group is a button in the GUI navigation and a command group in the CLI.

The CLI splits the genomic group into three commands: read for FASTQ files, contig for FASTA contigs, and maf for Multiple Alignment Format (MAF) files. The GUI keeps all three in one group.

Alignment tasks need alignments: every sequence in a file has the same length. Partition conversion is the exception and takes partition files, such as RAxML or NEXUS partitions. SEGUL checks only lengths, so it cannot detect misaligned sequences that happen to share a length.

Sequence tasks take aligned or unaligned files and do not check lengths. The documentation calls these standard sequence files.

Aligned and unaligned sequencesAn aligned file has three sequences that are all ten characters long, using gaps to fill the difference. The same sequences unaligned have no gaps and lengths of eight, ten, and nine. Alignment tasks need aligned input; sequence tasks accept both.Alignedseq1AGTCCCCA--seq2AGTCCCCAATseq3AGTC-CCTTAEvery row has 10 sites; gaps (–) pad shorter ones.✓ Alignment tasks✓ Sequence tasksUnalignedseq1AGTCCCCAseq2AGTCCCCAATseq3AGTCCCTTARows can differ in length.✓ Sequence tasks
Alignment tasks need every sequence in a file to have the same length. Sequence tasks accept either kind.

SEGUL accepts many input files at once. Alignment Splitting is the exception: it takes one concatenated alignment.

Supported file extensionsAlignment and sequence tasks read NEXUS (.nex, .nexus, .nxs), FASTA (.fasta, .fa, .fna, .fsa, .fas), and relaxed PHYLIP (.phy, .phylip, .ph). Genomic tasks read FASTQ reads (.fastq, .fq, .fastq.gz, .fq.gz), FASTA contigs (.fasta, .fa, .fna, .fsa, .fas, and gzipped such as .fasta.gz), MAF whole-genome alignments (.maf, .maf.gz), and BED loci for MAF conversion (.bed, .bed.gz).Alignment and sequence tasksNEXUS.nex.nexus.nxsFASTA.fasta.fa.fna.fsa.fasRelaxed PHYLIP.phy.phylip.phGenomic tasksReads.fastq.fq.fastq.gz.fq.gzContigs.fasta.fa.fna.fsa.fas.fasta.gzMAF.maf.maf.gzBED loci.bed.bed.gz
Compressed files end in .gz. SEGUL reads them directly, without decompressing them first.

:::note SEGUL supports relaxed PHYLIP, not strict PHYLIP. Strict PHYLIP limits sample names to 10 characters and splits sequences into blocks with spaces:

3 20
Seq1 ATCGATCGAT ATCGATCGAT
Seq2 ATCGATCGAT ATCGATCGAT
Seq3 ATCGATCGAT ATCGATCGAT

Relaxed PHYLIP allows longer names and writes each sequence without spaces:

3 20
genus_species_museumNo1 ATCGATCGATATCGATCGAT
genus_species_museumNo2 ATCGATCGATATCGATCGAT
genus_species_museumNo3 ATCGATCGATATCGATCGAT

:::

Joins many alignments into one and writes a partition that records where each locus starts and ends. Sequences are matched by sample name, so a typo or inconsistent name leaves a sequence unmatched.

Alignment concatenationlocus_1 has 10 sites and locus_2 has 8 sites for samples seq1 to seq3. Concatenation joins each sample's sequences into one 18-site alignment, with locus_1 at sites 1 to 10 and locus_2 at sites 11 to 18, and writes the partition in RAxML or NEXUS format.locus_1seq1AGTCCCCA--seq2AGTCCCCAATseq3AGTC-CCTTAlocus_2seq1GGCTAA-Tseq2GGCTAACTseq3GG-TAACTconcatenateconcatenatedseq1AGTCCCCA--GGCTAA-Tseq2AGTCCCCAATGGCTAACTseq3AGTC-CCTTAGG-TAACTlocus_1 = 1–10locus_2 = 11–18Plus a partition file in the format you choose:RAxML partitionDNA, locus_1 = 1-10DNA, locus_2 = 11-18NEXUS partition#NEXUSbegin sets; charset locus_1 = 1-10; charset locus_2 = 11-18;end;
Rows are matched by sample name, and loci are joined in alphanumeric order.

Changes the file format of alignments.

Alignment conversionA batch of FASTA files such as locus_1.fasta is converted to NEXUS as locus_1.nex or to relaxed PHYLIP as locus_1.phy. File names stay the same; only the format and extension change.locus_1.fastaFASTAconvertlocus_1.nexNEXUSlocus_1.phyRelaxed PHYLIP
Converts one file or a whole folder. Output can be NEXUS, relaxed PHYLIP, or FASTA, sequential or interleaved.

Computes pairwise genetic distances between samples in each alignment. Optionally averages the distances within and between populations or species, using groups from sample names, a regular expression, or a group file, and writes all distances as long tables.

GuidesGUICLIPython not yet supported
Alignment distanceFour aligned samples are compared pair by pair to give a 4 by 4 matrix of p-distances. seq1: 0.00, 0.10, 0.33, 0.50; seq2: 0.10, 0.00, 0.22, 0.40; seq3: 0.33, 0.22, 0.00, 0.22; seq4: 0.50, 0.40, 0.22, 0.00. Supported models are p-distance, JC69, K2P, TN93, and Poisson for amino acids.locus_1seq1AGTCCCCATAseq2AGTCCGCATAseq3AGTACGCTT-seq4GGTACGTTTAcomparep-distanceseq1seq2seq3seq40.000.100.330.500.100.000.220.400.330.220.000.220.500.400.220.00seq1seq2seq3seq4Modelsp-distanceJC69K2PTN93Poisson (amino acid)
Gaps and missing or ambiguous sites are skipped for each pair. SEGUL writes one matrix per locus and a summary table.

Keeps the alignments that meet a criterion and drops the rest.

Alignment filteringWith a minimum length of 500 bp, locus_1 (1240 bp) is kept, locus_2 (380 bp) is removed, locus_3 (860 bp) is kept, locus_4 (450 bp) is removed, locus_5 (1020 bp) is kept. Other criteria are matrix completeness, parsimony-informative sites, missing data, minimum taxa, and taxon ID.Example: minimum alignment length 500 bplocus_11240 bp✓ keptlocus_2380 bp✕ removedlocus_3860 bp✓ keptlocus_4450 bp✕ removedlocus_51020 bp✓ keptOther ways to filterAlignment lengthMatrix completenessParsimony-informative sitesMissing dataMinimum taxaTaxon ID
Filtering keeps or drops whole alignments. To drop single sequences instead, use Sequence Filtering.

Converts partitions between RAxML and NEXUS formats.

Partition conversionA RAxML partition listing DNA, locus_1 = 1-100, locus_2 = 101-150, and locus_3 = 151-200 converts to and from a NEXUS sets block with the same charsets.RAxMLDNA, locus_1 = 1-100DNA, locus_2 = 101-150DNA, locus_3 = 151-200NEXUSbegin sets; charset locus_1 = 1-100; charset locus_2 = 101-150; charset locus_3 = 151-200;end;
Converts single or multiple partition files, and extracts partitions embedded in NEXUS alignments.

Splits a concatenated alignment back into separate loci using its partition.

Alignment splittingA concatenated 18-site alignment and a partition defining locus_1 at sites 1 to 10 and locus_2 at sites 11 to 18 are split back into two separate alignments, locus_1 and locus_2.concatenatedseq1AGTCCCCA--GGCTAA-Tseq2AGTCCCCAATGGCTAACTseq3AGTC-CCTTAGG-TAACT1–1011–18partition.txtor NEXUS in-file charsetsplitlocus_1seq1AGTCCCCA--seq2AGTCCCCAATseq3AGTC-CCTTAlocus_2seq1GGCTAA-Tseq2GGCTAACTseq3GG-TAACT
Splitting is the reverse of concatenation. It takes one concatenated alignment and its partition.

Computes summary statistics for a set of alignments at three levels: the whole dataset, each alignment, and each sample.

Alignment summaryA folder of alignments produces three outputs: an alignment summary text file for the whole dataset, a locus summary CSV with one row per alignment, and a taxon summary CSV with one row per sample.alignmentsDNA or amino acidAlignment summaryWhole dataset · TXTLocus summaryOne row per alignment · CSVTaxon summaryOne row per sample · CSV
Statistics differ for DNA and amino acid alignments; DNA is the default.

Removes sites, not whole alignments, that have too much missing data or that fall below a count of parsimony-informative characters.

GuidesGUICLIPython not yet supported
Alignment trimmingWith a missing data threshold of 0.5, sites 4 and 5 have more than half of the samples missing and are removed. The trimmed alignment: AGTC?ATG, AGTCTA-G, AGT-CATG, A-TCTATG.Missing data ≤ 50% per site✕✕seq1AGT--C?ATGseq2AGT--CTA-Gseq3AGTC--CATGseq4A-T--CTATGtrimseq1AGTC?ATGseq2AGTCTA-Gseq3AGT-CATGseq4A-TCTATG
Sites with more missing data than the threshold are removed. Trimming can also keep only parsimony-informative sites.

Removes the gaps from every aligned sequence, so you can align the sequences again with a different aligner or settings.

GuidesGUICLIPython not yet supported
Unalign alignmentsGaps are removed from each aligned sequence: seq1 AGTCCATG, seq2 AGTCACCTG, seq3 ATCAATG.alignedseq1AGT--CCATGseq2AGTCACC-TGseq3A-TCA--ATGunalignunalignedseq1AGTCCATGseq2AGTCACCTGseq3ATCAATG
The output is FASTA with gaps removed, ready for a new alignment.

Computes summary statistics for raw sequence reads in FASTQ format, plain, gzip, or BGZF-compressed. The read summary uses every CPU core, even for a single large file. Its complete mode reports quality by read position, read length, quality, and GC distributions, duplication across every read, overrepresented sequences, and adapter content, which SEGUI shows as an interactive report.

Read summaryFASTQ read files, plain, gzip, or BGZF-compressed, produce a read summary table with read counts, lengths, and N50, GC content, base quality, and Q20 and Q30 bases. Complete mode adds per-position quality, duplication across every read, overrepresented sequences, and adapter content.sample.fq.gzFASTQ readsRead summaryCSV table• Read count, length, and N50• GC content, base quality, Q20 and Q30• Duplication and adapters (complete)Modes: minimal · default · complete
Accepts many files at once and writes one CSV table. Complete mode also writes a report that SEGUI shows as interactive charts.

Computes summary statistics for assembled contigs in FASTA format, such as contig counts, lengths, N50, N75, N90, and GC content.

Contig summaryFASTA contig files, plain or gzip-compressed, produce a contig summary table with contig counts and lengths, N50, N75, N90, and GC content.sample.fastaFASTA contigsContig summaryCSV table• Contig count and lengths• N50, N75, N90• GC content, base countsCounts of contigs ≥ 750, 1000, 1500 bp
Accepts many files at once and writes one CSV table.

Whole-genome aligners, such as Progressive Cactus and LASTZ with MULTIZ, write Multiple Alignment Format (MAF) files: blocks that align a stretch of a reference genome to other genomes. MAF conversion turns the blocks into alignments that phylogenetic software can read. With a BED file of loci, each block is clipped to every locus it overlaps, and blocks of the same locus are joined across files. Without a BED file, each block, or each reference chromosome, becomes its own alignment.

GuidesGUICLIPython not yet supported
MAF conversionTwo MAF blocks on chr1 overlap the BED locus geneA (chr1:100–115). SEGUL joins them into one alignment named geneA-chr1-100-115. panTro6 is missing from block 2, so its part is filled with gaps: hg38 ACGT--ACGTACGGCCA, panTro6 ACGTTTACGTAC-----, mm10 ACGA--ACGTACGGCTA.genome.mafblock 1 · chr1:100–110hg38ACGT--ACGTACpanTro6ACGTTTACGTACmm10ACGA--ACGTACblock 2 · chr1:110–115hg38GGCCAmm10GGCTAloci.bed: geneA chr1:100–115clip, joingeneA-chr1-100-115block 1block 2hg38ACGT--ACGTACGGCCApanTro6ACGTTTACGTAC-----mm10ACGA--ACGTACGGCTA
Blocks are clipped to each BED locus they overlap and joined in reference order. Species missing from a block are filled with gaps.

Reports the number of blocks, the alignment length, and how much of the reference genome each species covers, so you can check a whole-genome alignment before converting it.

GuidesGUICLIPython not yet supported
MAF summarygenome.maf has 2 blocks, 3 species, 17 aligned columns, 15 reference bases. Reference coverage: hg38 100% in 2 of 2 blocks, mm10 100% in 2 of 2 blocks, panTro6 67% in 1 of 2 blocks.genome.maf2 blocks3 species17 aligned columns15 reference basesReference coveragehg38100%2 of 2 blocks · referencemm10100%2 of 2 blockspanTro667%1 of 2 blocks
One CSV row per file and one per species. Coverage is the share of reference bases aligned to a base of the species.

Lists every unique sample name across your files.

Sequence ID extractionThree alignments containing seq1, seq2, seq3; seq2, seq3; seq1, seq3, seq4 give one alphabetical list of unique IDs: seq1, seq2, seq3, seq4.locus_1seq1seq2seq3locus_2seq2seq3locus_3seq1seq3seq4uniqueID listseq1seq2seq3seq4
Use the list to check for typos or inconsistent names before concatenation.

Shows which samples are present in each file.

Sequence ID mappingThree alignments are mapped into a table of samples present in each: locus_1 has seq1, seq2, seq3; locus_2 has seq2, seq3; locus_3 has seq1, seq3, seq4. Present samples are TRUE and absent ones FALSE.locus_1seq1seq2seq3locus_2seq2seq3locus_3seq1seq3seq4seq1seq2seq3seq4locus_1TRUETRUETRUEFALSElocus_2FALSETRUETRUEFALSElocus_3TRUEFALSETRUETRUE
The map is a CSV table of TRUE and FALSE values, written alongside the unique ID list.

Replaces sample names across all files using a table of original and new names.

GuidesGUICLIPython not yet supported
Sequence ID renamingAn alignment with IDs sample_1, sample_2, sample_3 and a two-column table of original and new names give the same alignment with IDs Genus_species1_V01, Genus_species2_V02, Genus_species3_V03.locus_1sample_1sample_2sample_3+names.csvsample_1,Genus_species1_V01sample_2,Genus_species2_V02sample_3,Genus_species3_V03renamelocus_1Genus_species1_V01Genus_species2_V02Genus_species3_V03
The table is a CSV or TSV file with a header row: original IDs in the first column and new IDs in the second.

Adds sequences to existing files that share the same file name, such as new samples to a set of loci, or collects every sequence into one file. The output is unaligned, ready to realign.

GuidesGUICLIPython not yet supported
Sequence additionseq4 from new/locus_1.fas is added to aligned/locus_1.nex because the file names match. The output locus_1.fas is unaligned: seq1 AGTCCATG, seq2 AGTCACCTG, seq3 ATCAATG, seq4 AGTCCATG.new/locus_1.fasseq4AGTCCATGaligned/locus_1.nexseq1AGT--CCATGseq2AGTCACC-TGseq3A-TCA--ATGaddlocus_1.fasseq1AGTCCATGseq2AGTCACCTGseq3ATCAATGseq4AGTCCATG
Sequences go to the destination file with the same name. Use a single destination file to collect every sequence in one place.

Keeps only the sequences you select by ID, by a list in a text file, or by a regular expression.

Sequence extractionKeep IDs: seq1; seq3. Of seq1, seq2, seq3, seq4, the result keeps seq1, seq3.Keep IDs: seq1; seq3locus_1seq1AGTCCCCATAseq2AGTCCGCATAseq3AGTACGCTT-seq4GGTACGTTTA✓✕✓✕extractresultseq1AGTCCCCATAseq3AGTACGCTT-
Extraction keeps the selected sequences. Removal is its opposite.

Drops single sequences that fail a criterion, such as too few non-gap sites or too many gaps, and keeps the rest of each file. To drop whole alignments instead, use Alignment Filtering.

GuidesGUICLIPython not yet supported
Sequence filteringMinimum length: 6 non-gap sites. Of seq1, seq2, seq3, seq4, the result keeps seq1, seq3.Minimum length: 6 non-gap siteslocus_1seq1AGTCCCCATAseq2AGTC------seq3AGTACGCTT-seq4GG--------✓✕✓✕filterresultseq1AGTCCCCATAseq3AGTACGCTT-
Each sequence is checked on its own, so a file keeps every sequence that passes.

Deletes the sequences you select by ID or by a regular expression. Removing a few sequences is faster than extracting the rest.

Sequence removalRemove IDs: seq2. Of seq1, seq2, seq3, seq4, the result keeps seq1, seq3, seq4.Remove IDs: seq2locus_1seq1AGTCCCCATAseq2AGTCCGCATAseq3AGTACGCTT-seq4GGTACGTTTA✓✕✓✓removeresultseq1AGTCCCCATAseq3AGTACGCTT-seq4GGTACGTTTA
Removal is the opposite of extraction.

Translates DNA sequences to amino acids.

Sequence translationThe DNA sequence ATG GCT TGG AAA TAA is read three bases at a time with the standard code to give the protein M A W K followed by a stop codon.DNAATGGCTTGGAAATAAMMetAAlaWTrpKLys*StopProtein
Defaults to NCBI table 1, the standard code, in reading frame 1. You can choose another table or frame.

Turns locus alignments into one file per sample. Each file holds one sequence for every locus where the sample is present, named after that locus, with gaps and missing data removed.

GuidesGUICLIPython not yet supported
Sequence transpositionTwo loci become one file per sample. seq1 gets locus_1 and locus_2; seq2 gets locus_1; seq3 gets locus_1 and locus_2. Gaps and missing data are removed.locus_1seq1AGTCCCCA--seq2AGTCCCCAATseq3AGTC-CCTTAlocus_2seq1GGCTAA-Tseq3GG-TAACTtransposeseq1locus_1AGTCCCCAlocus_2GGCTAATseq2locus_1AGTCCCCAATseq3locus_1AGTCCCTTAlocus_2GGTAACT
Each output sequence is named after its locus. Samples missing from a locus simply have no sequence for it.