Skip to content

Comments

fix(assembly): add DNA/RNA support to to_fasta method#16

Merged
tpdmskim merged 1 commit intomainfrom
fix/nucleotide-fasta
Feb 20, 2026
Merged

fix(assembly): add DNA/RNA support to to_fasta method#16
tpdmskim merged 1 commit intomainfrom
fix/nucleotide-fasta

Conversation

@tpdmskim
Copy link
Contributor

@tpdmskim tpdmskim commented Feb 20, 2026

casp data 만들 때 assembly.to_fasta() method 쓰는데
DNA, RNA 지원 안 되어서 추가합니다!

Checklist

If the change is related to the source code, tests, or build environments, please also check the following:

  • Does pytest -vs pass without any errors and warnings (at the project root)?
  • Does mypy --pretty pass without any errors and warnings (at the project root)?

If you added new feature(s), then also check the following:

  • Did you also add corresponding tests?

Linked Issues

Link the tracking issue(s) of this PR, with the auto-close keywords here:

  • Closes #...


Note

Low Risk
Small, localized change to sequence export plus additive tests/fixtures; low risk aside from potential edge cases in residue ID mapping for nucleic acids.

Overview
Assembly.to_fasta() now generates FASTA output for all polymer chains (Protein, DNA, RNA) instead of protein-only, using new dna_restype_3to1/rna_restype_3to1 mappings (defaulting unknown bases to N) while preserving protein modres handling.

Adds pytest coverage for protein/DNA/RNA FASTA generation and introduces new mmCIF/CCD test fixtures (notably tests/test_data/mmcif/1bna.cif and additional nucleotide components in components_stdres.cif) to support the new cases.

Written by Cursor Bugbot for commit 9fb02ed. This will update automatically on new commits. Configure here.

@tpdmskim tpdmskim requested review from a team as code owners February 20, 2026 04:03
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 10.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.58%. Comparing base (552bec6) to head (33d96b8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/gmol/base/data/mmcif/assembly.py 10.00% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #16      +/-   ##
==========================================
- Coverage   82.88%   82.58%   -0.31%     
==========================================
  Files          14       14              
  Lines        1648     1654       +6     
  Branches      226      229       +3     
==========================================
  Hits         1366     1366              
- Misses        221      227       +6     
  Partials       61       61              
Files with missing lines Coverage Δ
src/gmol/base/data/mmcif/assembly.py 78.02% <10.00%> (-0.96%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jnooree
jnooree previously approved these changes Feb 20, 2026
@tpdmskim
Copy link
Contributor Author

@jnooree 이것도 test 짜야 하나용?!

@jnooree
Copy link
Member

jnooree commented Feb 20, 2026

짜면 좋긴 한데 워낙 단순해서.. 걍 합쳐도 될거같슴다

@tpdmskim tpdmskim merged commit dfc92a6 into main Feb 20, 2026
14 of 16 checks passed
@tpdmskim tpdmskim deleted the fix/nucleotide-fasta branch February 20, 2026 04:46
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.

2 participants