Skip to content

Add Afar1 species support for Anopheles farauti in the Pacific#1266

Open
iftiquar wants to merge 1 commit intomalariagen:masterfrom
iftiquar:GH-afar1-species-support
Open

Add Afar1 species support for Anopheles farauti in the Pacific#1266
iftiquar wants to merge 1 commit intomalariagen:masterfrom
iftiquar:GH-afar1-species-support

Conversation

@iftiquar
Copy link
Copy Markdown

@iftiquar iftiquar commented Mar 31, 2026

Summary

  • Implements the Afar1 API client class for accessing Anopheles farauti genomic data from Google Cloud Storage, following the established pattern of existing species (Adir1, Amin1, Af1). This enables open-source genomic surveillance tools for a key malaria vector responsible for transmission in the Pacific region (Papua New Guinea, Solomon Islands, Vanuatu).
  • Adds complete test infrastructure including Afar1Simulator with simulated genome/GFF/SNP/metadata generation, fixture metadata CSVs for Pacific region samples, and case_afar1 test parametrization across 6 unit test modules (base, snp_data, snp_frq, sample_metadata, heterozygosity, g123).
  • Adds Sphinx API documentation (Afar1.rst) and updates the docs landing page with an Afar1 grid card.
  • Fixes a pre-existing bug in Adar1.__repr__/_repr_html_ where documentation URLs incorrectly pointed to Adir1.html instead of Adar1.html.

Changes

New files

  • malariagen_data/afar1.pyAfar1 class with GCS configuration, taxon colors, cache names, __repr__/_repr_html_
  • docs/source/Afar1.rst — Sphinx API documentation listing all available analysis functions
  • tests/integration/test_afar1.py — Skeleton integration test with setup_afar1 helper
  • tests/anoph/fixture/vo_afar_release_master_us_central1/ — Fixture metadata CSVs (30 samples across PNG, SLB, VUT)

Modified files

  • malariagen_data/__init__.py — Register Afar1 export
  • malariagen_data/adar1.py — Fix doc URL bug (Adir1.htmlAdar1.html)
  • docs/source/index.rst — Add Afar1 grid card to landing page
  • tests/anoph/conftest.py — Add Afar1Simulator class and afar1_sim_fixture
  • tests/anoph/test_{base,snp_data,snp_frq,sample_metadata,heterozygosity,g123}.py — Add afar1_sim_api fixtures and case_afar1_sim parametrization

Test plan

  • Verify unit tests pass with pytest tests/anoph/ -x (includes Afar1 parametrized cases)
  • Verify from malariagen_data import Afar1 works correctly
  • Verify Afar1.__repr__() and Afar1._repr_html_() produce correct output
  • Verify Sphinx docs build without errors: cd docs && make html
  • Integration test pytest tests/integration/test_afar1.py (requires GCS access)

Implement the Afar1 API client class for accessing An. farauti genomic
data, following the established pattern of existing species (Adir1, Amin1).
This enables open-source genomic surveillance tools for a key malaria
vector in the Pacific region.

Changes:
- Add malariagen_data/afar1.py with Afar1 class inheriting from
  AnophelesDataResource, configured for GCS bucket vo_afar_release
- Register Afar1 in malariagen_data/__init__.py
- Add Afar1Simulator to tests/anoph/conftest.py with simulated genome,
  GFF, SNP, and metadata generation
- Add test fixture metadata CSVs for Pacific region samples (PNG, SLB, VUT)
- Add case_afar1 test parametrization across 6 test modules (base,
  snp_data, snp_frq, sample_metadata, heterozygosity, g123)
- Add skeleton integration test tests/integration/test_afar1.py
- Add Sphinx API documentation docs/source/Afar1.rst
- Add Afar1 card to docs/source/index.rst landing page
- Fix Adar1 __repr__/_repr_html_ doc URLs pointing to Adir1.html

Made-with: Cursor
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.

1 participant