- Nextflow pipeline using chai1 Docker image from Harbor - S3-based input/output paths (s3://omic/eureka/chai-lab/) - GPU-accelerated protein folding with MSA support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
696 B
Python
Executable File
25 lines
696 B
Python
Executable File
# Copyright (c) 2024 Chai Discovery, Inc.
|
|
# Licensed under the Apache License, Version 2.0.
|
|
# See the LICENSE file for details.
|
|
|
|
|
|
import pytest
|
|
|
|
from chai_lab.data.io.cif_utils import get_chain_letter
|
|
|
|
|
|
def test_get_chain_letter():
|
|
with pytest.raises(AssertionError):
|
|
get_chain_letter(0)
|
|
assert get_chain_letter(1) == "A"
|
|
assert get_chain_letter(26) == "Z"
|
|
assert get_chain_letter(27) == "a"
|
|
assert get_chain_letter(52) == "z"
|
|
|
|
assert get_chain_letter(53) == "AA"
|
|
assert get_chain_letter(54) == "AB"
|
|
|
|
# For one-letter codes, there are 26 + 26 = 52 codes
|
|
# For two-letter codes, there are 52 * 52 codes
|
|
assert get_chain_letter(52 * 52 + 52) == "zz"
|