HighlanderLab / SIMplyBee

SIMplyBee R package extends AlphaSimR for simulating honeybee populations and breeding programmes
http://www.simplybee.info/
Other
0 stars 5 forks source link

Should we remove father selection from crossColonies()? #264

Closed janaobsteter closed 2 years ago

janaobsteter commented 2 years ago

Currently, we have a duplicated situtation:

gregorgorjanc commented 2 years ago

This will likely happen when we merge L2 and L3, no?

Still, I am not sure, what is the real problem? That this code is duplicated

 fatherGroups <- pullDroneGroupsFromDCA(
      DCA = drones,
      n = nCol,
      nFathers = nFathers,
      removeFathers = removeFathers
    )

I think that this is controlled by nFathers - there is no sub-sampling when nFathers == nInd(fatherGroup), right?

janaobsteter commented 2 years ago

Should we start merging the functions?

gregorgorjanc commented 2 years ago

I think this would make sense. Which function do you want to start with? I suggest we do one at a time to make life simple and controlable.

janaobsteter commented 2 years ago

I can start with a "non-crucial", such as collapse (if it's not already done) or split.

janaobsteter commented 2 years ago

Ok, I now realized what the problem is. Father selection should in reality be pulled out of crossVirginQueen() - in there, we use only "simple" selectInd(). That should be taken out and instead, cross() function should use pullDroneGroupsFromDCA(), because that one has all the checks and functionality (such as "killing" used drones).

gregorgorjanc commented 2 years ago

Closing as this has been addressed in https://github.com/HighlanderLab/SIMplyBee/pull/316