Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend competition to the case without coordinates #111

Open
timflutre opened this issue Jun 1, 2022 · 3 comments
Open

Extend competition to the case without coordinates #111

timflutre opened this issue Jun 1, 2022 · 3 comments

Comments

@timflutre
Copy link
Contributor

Hi Facundo,

I hope you are going well!

I would like to use both competition models from Muir (2005). The first one corresponds to the "tree" case as implemented by you in breedR, thanks! The second one corresponds to the "animal" case in the paper. I am interested in trying the latter but for that we need to drop the "coordinate" requirements of the competition and additive_genetic_competition functions. Instead we need a "group" ("pen") argument indicating which phenotypic data comes from which genotype in which "group". And in plants, a genotype may be in several different groups...

Does it sound simple to do for you? If yes, by any chance, would you have the time to do it? Otherwise, can I try to do it and submit a pull request?

Best,
Tim

@famuvie
Copy link
Owner

famuvie commented Jun 2, 2022

Hi Tim! nice to hear from you.
I can see what you are willing to do.
In principle, it should not be too complicated to do. It reduces to some argument checking and triggering a new function for building the corresponding incidence matrices. The most annoying part would be to update all the argument checking and testing.
Still, I won't be able to work on it at least before September or even October. A pull-request would be most welcome. I can provide assistance for understanding the structure of the code if needed.
ƒacu.-

@timflutre
Copy link
Contributor Author

Thanks for your quick answer. I will try...!

I forked the repo, created a new branch (compet-without-coord) and started to add tests in a new file test-competition-without-coord.R. For these new tests to pass (as well as the old ones), I added a group argument which should correspond to a column of data and contain the group membership of any individual. You can see the commit here: master...timflutre:compet-without-coord. I think that the competition function should not return an object inheriting from spatial anymore, at least not when group is supplied.

What do you think? Did I start in the right direction?

@famuvie
Copy link
Owner

famuvie commented Jun 3, 2022

Tim, this is extremely well headed. I've only skimmed through the changes, but I think you've correctly identified the key functions that need to be modified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants