Skip to main content

Pytorch Breeding

Project description

ChewC

In short, this will be a GPU-enabled stochastic simulation for breeding programs with an emphasis on cost-benefit-analysis for novel breeding tools and creating a suitable interface for RL agents.


We will also incorporate an emphasis on budget and costs associated with each action to manage long-term breeding budgets. As well as model theoretical tools in the plant breeder’s toolbox. e.g.

a treatment which increases crossover rates

a treatment which reduces flowering time

a treatment which enables gene drive at select loci

Each treatment will cost $$ ultimately helping guide the implementation in real-world breeding programs.

Install

pip install chewc

How to use

First, define the genome of your crop

import torch
ploidy = 2
n_chr = 10
n_loci = 100
n_Ind = 333
g = Genome(ploidy, n_chr, n_loci)
population = Population()
population.create_random_founder_population(g, n_founders=n_Ind)
init_pop = population.get_dosages().float()  # gets allele dosage for calculating trait values

# multi_traits
target_means = torch.tensor([0, 5, 20])
target_vars = torch.tensor([1, 1, 0.5])  # Note: I'm assuming you want a variance of 1 for the second trait
correlation_matrix = [
        [1.0, 0.2, 0.58],
        [0.2, 1.0, -0.37],
        [0.58, -0.37, 1.0],
    ]
correlation_matrix = torch.tensor(correlation_matrix)

ta = TraitModule(g, population, target_means, target_vars, correlation_matrix,100)
ta(population.get_dosages()).shape
Created genetic map

torch.Size([333, 3])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ChewC-0.0.7.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ChewC-0.0.7-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file ChewC-0.0.7.tar.gz.

File metadata

  • Download URL: ChewC-0.0.7.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.1

File hashes

Hashes for ChewC-0.0.7.tar.gz
Algorithm Hash digest
SHA256 6f22df8b311348dfa8a583adff802793d22cde3f23adbce47ff3c3f7c2e74ec8
MD5 d52f4b51a4348bd4ac075b75e28d4e8c
BLAKE2b-256 ebf67691d7397bcb7e006beb94ba1b46af03295b86bf5a2373e76f4ed1557c9f

See more details on using hashes here.

File details

Details for the file ChewC-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: ChewC-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.1

File hashes

Hashes for ChewC-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 fbd0bcbf937c202101af379a30384aca01e21181395e281d1aca74dcee0d0cd0
MD5 e13ec33337ea503cd7118e0d3b6f1f89
BLAKE2b-256 8b3b7f2e3a68ff55e721f474f24512fe561a05c6a49fba42aa74e935571b9a0c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page