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

CODE: normalise #130

Merged
merged 1 commit into from
Feb 6, 2024
Merged

CODE: normalise #130

merged 1 commit into from
Feb 6, 2024

Conversation

daikitag
Copy link
Collaborator

@daikitag daikitag commented Feb 3, 2024

Add normalise_phenotype function in tstrait. Statistical tests are also added to verification.py to validate the normalized simulated tstrait phenotype against phenotypes that are generated by using the simulation framework which is used in the ARG-Needle paper (https://zenodo.org/records/7745746).

@daikitag daikitag linked an issue Feb 3, 2024 that may be closed by this pull request
Copy link

codecov bot commented Feb 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b372bdc) 100.00% compared to head (f43881b) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #130   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          330       341   +11     
  Branches        46        48    +2     
=========================================
+ Hits           330       341   +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daikitag daikitag marked this pull request as draft February 5, 2024 13:34
@daikitag daikitag marked this pull request as ready for review February 5, 2024 13:37
@daikitag daikitag marked this pull request as draft February 5, 2024 15:36
@daikitag daikitag marked this pull request as ready for review February 5, 2024 20:41
@daikitag
Copy link
Collaborator Author

daikitag commented Feb 6, 2024

Edit: Verification against ARG-Needle simulation will be added later.

@daikitag daikitag force-pushed the normalize branch 2 times, most recently from fa6eeff to 70d6cd9 Compare February 6, 2024 13:31
Copy link
Member

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just need to rebase and drop the first commit

## Normalise Phenotype

The simulated phenotypes can be scaled by using the {func}`normalise_phenotypes` function. The function
will first normalise the phenotype by subtrating the mean of the input phenotype from each
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo, subtracting

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just fixed it now, and thank you for spotting this

Add `normalise_phenotype` function in tstrait.
@mergify mergify bot merged commit 34dcec4 into tskit-dev:main Feb 6, 2024
12 checks passed
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

Successfully merging this pull request may close these issues.

Specifying mean and variance of simulated phenotypes
2 participants