Unalign alignments to produce unaligned sequence files.
Under the hood, SEGUL will read the alignment files and remove all gap characters to produce unaligned sequences. SEGUL can do it for thousands of files in a single command.
Assume we have an alignment file in FASTA format as follows:
>seq1ATGCAT--A>seq2ATGCATA-->seq3ATGCAA-A->seq4ATGCATA--To unalign the sequences, use the following command:
segul align unalign --dir alignments/The output will be as follows, with all gap characters removed:
>seq1ATGCATA>seq2ATGCATA>seq3ATGCAAA>seq4ATGCATADetailed usage
Section titled “Detailed usage”Unaligning alignments (DNA)
Section titled “Unaligning alignments (DNA)”To unalign alignments, use the align unalign command with the following options. It will automatically detect the input format.
segul align unalign --dir <alignment-dir>Unaligning alignments (Amino Acid)
Section titled “Unaligning alignments (Amino Acid)”To unalign amino acid alignments, use the --datatype aa option as follows:
segul align unalign --dir <alignment-dir> --datatype aaSpecifying output directory
Section titled “Specifying output directory”By default, the output directory will be named Align-Unalign in the current working directory. You can change the output directory name using the --output or -o option. For example, to name the output directory unalign-output, use the command below:
segul align unalign --dir <alignment-dir> --output unalign-outputMore ways to specify input files
Section titled “More ways to specify input files”You can also specify input files using the --input or -i option. This option allows you to provide a single alignment file or multiple alignment files using wildcards. For example:
segul align unalign --input alignments/*.fastaAll 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), aa, or ignore |
-F, --output-format | Output format: fasta-int (default) or fasta |
-o, --output | Output directory. Default: Align-Unalign |
--force | Overwrite an existing output directory |
--log | Log file path. Default: segul.log |