Protein-to-nucleotide alignment

Thread nucleotide onto protein alignment

Command identity

Canonical command:

thread_dna

Handler:

thread_dna

Aliases:

p2n, pal2nal

Standalone executables:

pk_thread_dna, pk_p2n, pk_pal2nal

Categories:

Alignment & dataset utilities

Runtime interface

Synopsis

phykit thread_dna [--protein <protein>] [--nucleotide <nucleotide>] [--clipkit-log-file <clipkit_log_file>] [--stop <stop>] [--json]

Arguments

This table is generated from the live command parser. It is the authoritative source for accepted spellings, required arguments, types, defaults, and choices.

Argument

Required

Type

Default

Choices

-p, --protein

false

str

none

any

-n, --nucleotide

false

str

none

any

-c, --clipkit-log-file, --clipkit_log_file

false

str

none

any

-s, --stop

false

str2bool

true

any

--json

false

boolean

false

any

Output and errors

--json provides the command's structured JSON representation. Unless the guidance below states otherwise, results are emitted as command output. Invalid command syntax exits with status 2. Input validation and scientific limitations are described in the guidance below.

Guidance, interpretation, and examples

Thread DNA sequence onto a protein alignment to create a codon-based alignment.

This function requires that input alignments be in fasta format. Codon alignments are then printed to stdout. Note, paired sequences are assumed to have the same name between the protein and nucleotide file. The order does not matter.

To thread nucleotide sequences over a trimmed amino acid alignment, provide PhyKIT with a log file specifying which sites have been trimmed and which have been kept. The log file must be formatted the same as the log files outputted by the alignment trimming toolkit ClipKIT (see -l in ClipKIT documentation.) Details about ClipKIT can be seen here: https://github.com/JLSteenwyk/ClipKIT.

If using a ClipKIT log file, the untrimmed protein alignment should be provided in the -p/--protein argument.

phykit thread_dna -p <file> -n <file> [-c/--clipkit-log-file <file>] [-s] [--json]

Options:
-p/--protein: protein alignment file
-n/--nucleotide: nucleotide sequence file
-c/--clipkit-log-file: ClipKIT output log file. The legacy --clipkit_log_file spelling is also accepted.
-s/--stop: if used, stop codons will be removed from the output
--json: optional argument to print results as JSON