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

Option for excluding individual from its group when the individual is compared with the group #32

Open
martynamolak opened this issue Jun 24, 2024 · 3 comments

Comments

@martynamolak
Copy link

There are situations when one wants to calculate f-statistics between an individual and its own population, e.g.:
F4(PopulationA, TestPopulation; Individual1FromPopulationA, Outgroup)

In such situations it might be useful (or might make more sense) to use PopulationA but with Individual1 excluded.
I'm not sure whether this should be a default behavior but would certainly be a useful option.
Specifying an ad hoc "PopulationA-minus-Individual1FromPopulationA" for each individual is of course an option but when one is estimating a lot of f-statistics and, particularly, when there is many individuals that one would like such estimates for, it ends up being fairly cumbersome.

If this would be a fairly easy option to introduce, it would be awesome to have it.

@stschiff
Copy link
Member

stschiff commented Jul 2, 2024

Right. Thanks for adding this issue. I agree about the usefulness, but so far lack imagination for how the exact API could look so that users won't be surprised. Will think about it.

@martynamolak
Copy link
Author

martynamolak commented Jul 4, 2024

Don't you think that it actually could be a default behavior that whenever an individual is compared to its own population it gets excluded from the population? Then it wouldn't be confusing by there being more options to set up.

I mean every time you have fstats estimation, xerxes would first check whether the entities which are individuals are a part of any other entity that are populations or packages and if they are, turn this population/package into (population - individual) or (package - individual).
That should also work in cases when there are more than one individual in the fstats.
Eg.

fstats:

  • type: F4
    a: PopA
    b: PopB
    c: PopAInd1
    d: PopBInd1

would turn be automatically processed into:
fstats:

  • type: F4
    a: PopA minus PopAInd1
    b: PopB minus PopBInd1
    c: PopAInd1
    d: PopBInd1

and:

fstats:

  • type: F4
    a: PopA
    b: PopB
    c: PopAInd1
    d: PopAInd2

would turn be automatically processed into:
fstats:

  • type: F4
    a: PopA minus PopAInd1 minus PopAInd2
    b: PopB
    c: PopAInd1
    d: PopAInd2

@stschiff
Copy link
Member

Hmm, yes, I admit that sounds like a useful feature.

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