Skip to content

Sequence ID Extraction

Parts of a SEGUL commandThe command segul sequence id --dir alignments/ --prefix my_ids has five parts: the program segul, the command sequence for the task group, the subcommand id for the task, the input --dir alignments/ (folder or files), and the option --prefix my_ids (optional).segulProgramsequenceCommandtask groupidSubcommandtask--dir alignments/Inputfolder or files--prefix my_idsOptionsoptional

Often, we need to know what the taxa in our dataset are. The most straightforward command would be:

Terminal window
segul sequence id -i [input-path]

or using directory input:

Terminal window
segul sequence id -d alignment_dir

SEGUL will generate the unique ID across all input alignments. The output is a text file containing a list of the IDs in alphabetical order. By default, the output directory is Sequence-ID. The file will be saved as id.txt in the output directory. For example, if all your alignments contain three samples, the output file will look like this:

sequence_1
sequence_2
sequence_3

To change the output directory, use the -o or --output option:

Terminal window
segul sequence id -d alignments/ -o my_alignment_id

To change the output file name, use the --prefix option:

Terminal window
segul sequence id -d alignments/ --prefix my_alignment_id
OptionDescription
-d, --dirDirectory with alignments
-i, --inputAlignment files. Allows wildcards
-f, --input-formatInput format: auto (default), fasta, nexus, or phylip
--datatypeData type: dna (default), aa, or ignore
--mapAlso write the presence of each ID in each alignment
-o, --outputOutput directory. Default: Sequence-ID
-p, --prefixPrefix of the output files
--forceOverwrite an existing output directory
--logLog file path. Default: segul.log

This material is based upon work supported by the National Science Foundation under grant numbers: DEB-1754393 and DEB-2244754. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.