Skip to content

Comments

fix(tests): handle missing sex_call in diplotype clustering tests for Amin1/Adir1#888

Open
adilraza99 wants to merge 1 commit intomalariagen:masterfrom
adilraza99:GH830-handle-missing-sex-call
Open

fix(tests): handle missing sex_call in diplotype clustering tests for Amin1/Adir1#888
adilraza99 wants to merge 1 commit intomalariagen:masterfrom
adilraza99:GH830-handle-missing-sex-call

Conversation

@adilraza99
Copy link
Contributor

Summary

Adir1 and Amin1 datasets contain only "UKN" values for sex_call because
sex chromosomes cannot be reliably identified from their fragmented assemblies.

Some diplotype clustering tests apply filters such as:

sex_call == "F"

For these datasets, the filter returns zero samples, causing the clustering
workflow to fail.

What this PR does

This change applies the existing no_sex_calls test pattern (already used in
test_snp_data.py) to ensure datasets without sex call metadata are excluded
from sex_call-filtered test cases.

Specifically:

• add Adir1 and Amin1 cases tagged with no_sex_calls
• exclude tagged datasets from tests that apply sex_call filters
• preserve existing behavior for datasets that support sex_call

Why this approach

  • follows an established repository pattern
  • prevents invalid zero-sample queries
  • preserves test intent
  • avoids changes to production code

Scope

Tests only. No production code changes.

Fixes #830

Adir1 and Amin1 datasets contain only "UKN" values for sex_call, so
filters such as `sex_call == "F"` return zero samples and cause test
failures.

Apply the existing "no_sex_calls" pattern to exclude these datasets
from sex_call-filtered tests while preserving behavior for others.

No production code changes.

Fixes malariagen#830
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.

Adir1 and Amin1 fail test_diplotype_clustering.py - no sex_call data

1 participant