simulate_alignment
piqtree.simulate_alignment(tree, model, length=1000, rand_seed=None, insertion_rate=0.0, deletion_rate=0.0, insertion_size_distribution='POW{1.7/100}', deletion_size_distribution='POW{1.7/100}', root_seq=None, num_threads=None)
Uses AliSim to simulate an Alignment through IQ-TREE.
| PARAMETER | DESCRIPTION |
|---|---|
tree
|
A tree to simulate an alignment over.
TYPE:
|
model
|
The substitution model's specification.
TYPE:
|
length
|
The length of the alignment (by default 1000). Alignment may be longer when indel model is used due to insertion events.
TYPE:
|
rand_seed
|
The random seed - None means no seed is used, by default None.
TYPE:
|
insertion_rate
|
The insertion rate relative to substitution rate (by default 0.0).
TYPE:
|
deletion_rate
|
The deletion rate relative to substitution rate (by default 0.0).
TYPE:
|
insertion_size_distribution
|
The insertion size distribution (by default the Zipfian distribution with a=1.7 and maximum size 100).
TYPE:
|
deletion_size_distribution
|
The deletion size distribution (by default the Zipfian distribution with a=1.7 and maximum size 100).
TYPE:
|
root_seq
|
The root sequence (by default None).
TYPE:
|
num_threads
|
Number of threads for IQ-TREE to use, by default None (single-threaded).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
AlignedSeqsType
|
The simulated alignment. |
Source code in src/piqtree/iqtree/_alignment.py
Usage
For usage, see "Simulate alignments with AliSim".