CLI Reference¶
The output of the --help
commands for the various Freqgen CLI tools is
included below for reference.
To summarize the relationship between the different commands, here’s a graph of the commands, the file types they take, and how they relate:
graph TD
aa[freqgen aa]-->|.faa|generate[freqgen generate]
seq["DNA sequence(s)"]-->|.fna |featurize[freqgen featurize]
featurize-->|.yaml|generate
seq["DNA sequence(s)"]-->|.fna |aa
amino["Amino acid sequence(s)"]-->|.faa|aa
generate-->|.fna|vis[freqgen visualize]
amino-->|.faa|generate
Overview¶
$ freqgen --help
Usage: freqgen [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
generate* Generate a new DNA sequence with matching...
aa Generate an amino acid sequence from FASTA
featurize Featurize a FASTA file
visualize Visualize the results of an optimization
Generation Reference¶
$ freqgen generate --help
Usage: freqgen generate [OPTIONS]
Generate a new DNA sequence with matching features
Options:
-s, --original PATH The target amino acid sequence. [required]
-t, --target PATH The target frequencies. [required]
-v, --verbose Whether to show optimization progress. Defaults
to false.
-i INTEGER How many generations to stop after no
improvement. Defaults to 50.
-p INTEGER Population size. Defaults to 100.
-m FLOAT Mutation rate. Defaults to 0.3.
-c FLOAT Crossover rate. Defaults to 0.8.
-r FLOAT Relative improvement threshold. Defaults to 0.0.
-g, --genetic-code INTEGER The translation table to use. Defaults to 11,
the standard genetic code.
-o, --output PATH The path to the output FASTA file.
--mode [JSD|ED] The fitness function to use. Defaults to
Euclidean distance.
--help Show this message and exit.
Amino Acid Generation Reference¶
$ freqgen aa --help
Usage: freqgen aa [OPTIONS] FILEPATH
Generate an amino acid sequence from FASTA
Options:
--mode [freq|seq] Whether to use the exact AA seq or its
frequencies. Defaults to freq.
-g, --genetic-code INTEGER The translation table to use. Defaults to 11,
the standard genetic code.
-l, --length INTEGER The length of the AA sequence (excluding stop
codon) to generate if --mode=freq.
-s, --stop-codon Whether to include a stop codon. Defaults to
true.
-v, --verbose Whether to print final result if outputting to
file. Defaults to false.
-o, --output PATH The output FASTA file.
--help Show this message and exit.
Sequence Featurization Reference¶
$ freqgen featurize --help
Usage: freqgen featurize [OPTIONS] FILEPATH
Featurize a FASTA file
Options:
-k INTEGER Values of k to featurize the seqs for. May be repeated.
-c, --codon-usage Whether to include a codon frequency featurization.
-o, --output PATH The output YAML file.
--help Show this message and exit.
Result Visualization Reference¶
$ freqgen visualize --help
Usage: freqgen visualize [OPTIONS]
Visualize the results of an optimization
Options:
-s, --original PATH The original DNA sequence.
-t, --target PATH The target frequencies. [required]
-r, --optimized PATH The optimized DNA sequence. [required]
-l, --title TEXT The title for the graph.
-w, --width INTEGER The width of the output graph. Defaults to 1200.
-h, --height INTEGER The height of the output graph. Defaults to 400.
-o, --output PATH The path to the output HTML file. Defaults to
freqgen.html.
--show / --no-show Whether to show the resulting visualization
file.
-g, --genetic-code INTEGER The translation table to use. Defaults to 11,
the standard genetic code.
--help Show this message and exit.