Skip to content

Dobzhansky and Muller incompatibilities list generator

Notifications You must be signed in to change notification settings

camayal/dmiGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

dmiGenerator

Purpose

dmiGenerator generates a set of maximum theoretical1 Dobzhansky and Muller incompatibilities given a genotype for N genes (e.g., ”AbCD”), if the user does not provided the genotype a random genotype for N genes where each gene is sampled as a random binomial to be either ancestral or derived.

The incompatibilities are generated by evolving a mutational path between the two genomes following a set of rules based on Orr’s theory that prevents any DMIs from evolving within lineages while maximizing the number of DMIs that evolve between two lineages. This includes: (1) a mutation cannot evolve that is incompatible with other genes in the same genome; (2) a derived allele cannot be incompatible with its own alternative allelic state (e.g., derived and ancestral); (3) incompatibilities are only considered between populations; and (4) incompatibilities are asymmetric.

This program is an integral part of https://github.com/camayal/DMISimulations

1 All two-locus gene interactions that could occur in a perfect snowball scenario where one lineage evolves the given genotype and the other lineage evolves the exact opposite.

Examples:

dmiGenerator.py AbcDefG
dmiGenerator.py -n 16
dmiGenerator.py -v -n 26
dmiGenerator.py -v -g -n 6
dmiGenerator.py -vgn 6
dmiGenerator.py -t 18

Options

-h shows program's help

-v activates verbose mode

~$ dmiGenerator.py -v -n 6
Number of genes: 6
Original input (final genotype for lineage 1): ADEBCF
Final genotype for lineage 2): adebcf
Mutation per time in lineage 1: ['Adebcf', 'ADebcf', 'ADEbcf', 'ADEBcf', 'ADEBCf', 'ADEBCF']
Mutation per time in lineage 2: ['adebcf', 'adebcf', 'adebcf', 'adebcf', 'adebcf', 'adebcf']
Number of DMIs pairs: 15 (DI: 0, MI: 15)
Orr`s DMIs expection (K(K-1)/2): 15

Pair of genes with potential DMI:
['Da', 'Ea', 'Ed', 'Ba', 'Bd', 'Be', 'Ca', 'Cd', 'Ce', 'Cb', 'Fa', 'Fd', 'Fe', 'Fb', 'Fc']

-t replaces regular output for counts (# genes, # dmis, # ddis, # adis, # orrEstimate)

~$ dmiGenerator.py -t -n 6
6       15      8       7       15.0

-s modifies output separator

~$ dmiGenerator.py -s ";" -n 6
Ab;Db;Da;Eb;Ea;Ed;FB;FA;FD;FE;CB;CA;CD;CE;Cf

-g shows a schematic representation of every mutation and its incompatibilities in both genotypes

~$ dmiGenerator.py -g -n 6
['Bd', 'Ed', 'Eb', 'CD', 'CB', 'CE', 'Fd', 'Fb', 'Fe', 'FC', 'AD', 'AB', 'AE', 'Ac', 'AF']
|d    D| |d    D| |d    D| |d    D| |d    D| |d    D|
|b    b| |b    B| |b    B| |b    B| |b    B| |b    B|
|e    e| |e    e| |e    E| |e    E| |e    E| |e    E| 
|c    c| |c    c| |c    c| |C    c| |C    c| |C    c|
|f    f| |f    f| |f    f| |f    f| |f    F| |f    F|
|a    a| |a    a| |a    a| |a    a| |a    a| |A    a|

About

Dobzhansky and Muller incompatibilities list generator

Resources

Stars

Watchers

Forks

Languages