Skip to content

Conversation

@Jiya873
Copy link

@Jiya873 Jiya873 commented May 19, 2025

This PR addresses part of the existing issues #775 with sample-level heterozygosity handling by:

  • Refactoring the heterozygosity functionality in the AnophelesDataResource class to expose a public API instead of relying solely on the private _sample_count_het method.
  • Unit tests (with monkey-patching) for the heterozygosity method will be added to ensure the method returns the expected results.
  • Setting up a dummy logging mechanism to avoid dependency issues during testing.

The handling of ROH and cohort-level comparisons remains suboptimal and will be addressed in a separate effort. This change focuses solely on improving heterozygosity accessibility for single samples.

@jonbrenas
Copy link
Collaborator

Thank you @Jiya873. This is great but I think there are several steps that need to be done before we get to the public function:

  1. All of the ROH and het functions currently in anopheles.py need to be moved to their own file under anoph/
  2. The tests in tests/anoph/ need to be structured similarly to what exists for other functions
  3. The public functions need to be updated to meet with the newer requirements, including surveillance_use_only and unrestricted_access that are currently being implemented (see Add unrestricted_use_only and surveillance_use_only constructor params #724), and we need to make sure that the functions make sense for the analyses that they are connected too. In this case, we need a function that returns the heterozygosity for a single sample, another one that works at the cohort(s) level, and at least one plotting function.

That's a lot of work (a lot of which is dependent on other things to complete first) so there is no pressure to proceed with this PR quickly.

@leehart
Copy link
Collaborator

leehart commented Aug 8, 2025

Looks like this PR is still in progress.

@leehart leehart requested a review from jonbrenas August 8, 2025 08:42
@jonbrenas
Copy link
Collaborator

I think it has been abandoned.

@leehart
Copy link
Collaborator

leehart commented Aug 8, 2025

Thanks @jonbrenas . If there's no response after a short time (say, September) then I guess we'll close this. This PR can always be resurrected, if needs be.

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.

3 participants