elissasoroj / shadie

GNU General Public License v3.0
11 stars 4 forks source link

Plan approved #1

Closed hackers-test closed 3 years ago

hackers-test commented 3 years ago

Hi Elissa,

The plan looks good, you will need to put some more thought into the user interaction section. For now, you can go ahead and begin creating the file structure for your project, and rename the repo as you would like.

Your current plan includes a LOT of classes, which may end up being overkill. It will depend whether these are objects that will need to have callable functions or attributes associated with them, versus just storing a single value. For example, I could imagine that some of these could maybe be just stored in a dictionary of fewer class objects. But I think you will find what works best as you begin to write. Which object do you think you will create first? What is needed to produce a minimal working example?

I think if possible it would be great to model your API to act similar to the ipcoal API. Here's one idea:


# define a demographic model and the total genome size and recomb rate or map
mod = Model(
    tree=tree, 
    Ne=1000, 
    nsamples=2,          # number of sampled haplotypes per tip in final data 
    organism="fern",    # defines how gametes get selected and replicate
    recomb=1e-9, 
    genome_size=1e6,
)

# call simulate with details on genome structure (and which life stage selection occurs?)
mod.simulate(
    dict(name='a', selection=-0.01, start=2000, end=3000, haploid=True),
    dict(name='b', selection=-0.02, start=5000, end=6000, haploid=True),
    dict(name='c', selection=-0.03, start=9000, end=10000, haploid=True),
    dict(name='A', selection=0.01, start=2000, end=3000, haploid=False),
    dict(name='B', selection=0.02, start=5000, end=6000, haploid=False),
    dict(name='C', selection=0.03, start=9000, end=10000, haploid=False),
)