def Neutral_Evolution_with_incompatible_gene_outcrossing001(p): np.random.seed(p) population_simulator = population(growth_speed_array=[1, 1, 1], incompatible=1, outcrossing_rate=0.01, max_generation=2000) return population_simulator.evolve_until_fix()
def positive_selection_simulation(p): np.random.seed(p) population_simulator = population(growth_speed_array=[1, 1, 1], max_generation=50, outcrossing_rate=0.01, incompatible=1) return population_simulator.evolve_until_fix()
def Neutral_Evolution_with_incompatible_gene_outcrossing0001_large_population_fitness_balancing( p): np.random.seed(p) population_simulator = population(population_size=10000, growth_speed_array=[1, 1.0035, 1.007], incompatible=1, outcrossing_rate=0.001) return population_simulator.evolve_until_fix()
import insert import find from dbconnect import config, connect from models import species, population, line, chromosome, variant, genotype, trait, phenotype, growout_type, growout, location, gwas_algorithm, genotype_version, imputation_method, kinship_algorithm, kinship, population_structure_algorithm, population_structure, gwas_run, gwas_result if __name__ == '__main__': conn = connect() # ADD A HARD-CODED SPECIES TO DB USING insert_species() mySpecies = species('maize', 'Zea mays', None, None) insertedSpeciesID = insert.insert_species(conn, mySpecies) print(insertedSpeciesID) # ADD A HARD-CODED POPULATION TO DB USING insert_population() myPopulation = population('Maize282',maizeSpeciesID) insertedPopulationID = insert.insert_population(conn, myPopulation) print(insertedPopulationID) # LOOK UP ID OF A HARD-CODED SPECIES USING find_species() maizeSpeciesID = find.find_species(conn, 'maize') print("SpeciesID of maize:") print(maizeSpeciesID) # LOOK UP ID OF A HARD-CODED POPULATION USING find_population() maize282popID = find.find_population(conn, 'Maize282') print("PopulationID of Maize282:") print(maize282popID) # LOOK UP ID OF A HARD-CODED CHROMOSOME USING find_chromosome() maizeChr10ID = find.find_chromosome(conn, 'chr10', maizeSpeciesID)
def neutral_simulation(p): np.random.seed(p) population_simulator = population(growth_speed_array=[1, 1, 1]) return population_simulator.evolve_until_fix()
def Neutral_Evolution_with_incompatible_gene_outcrossing1(p): np.random.seed(p) population_simulator = population(population_size=10000, growth_speed_array=[1, 1, 1], incompatible=1) return population_simulator.evolve_until_fix()
def heterozygous_advantage_simulation(p): np.random.seed(p) population_simulator = population(growth_speed_array=[1, 1.02, 1]) return population_simulator.evolve_until_fix()