Assembly API¶
tcrsift.assemble constructs full-length α, β, and synthesis-ready
single-chain (β-2A-α) protein and DNA sequences from clonotype tables.
Overview¶
By default, input tables carry full-length V(D)J variable-region sequences
(VDJ_alpha_aa, VDJ_beta_aa) from aggregate_clonotypes. When working with
5'-truncated contigs (partial_VDJ_{chain}_aa/_nt, where sequencing begins
downstream of the leader start codon) or bare (v_gene, CDR3, j_gene) tables,
pass germline_vdj_fallback=True (--germline-vdj-fallback on the CLI, after
tcrsift data download --group germline or --auto-download-germline):
- 5'-partial contig rescue (
contig_5prime_germline_rescued): prepends only the missing N-terminal FR1/CDR1 segment from the best-matching IMGTV-REGIONallele while preserving all sequenced donor framework SNPs, CDR3 codons, and FR4 codons verbatim. - Bare V+CDR3+J reconstruction (
germline_vj_reconstructed): splices IMGT germlineV-REGION(FR1–FR3up to conservedCys 104) +CDR3+ IMGT germlineJ-REGION(FR4past[FW]GXG). - Every germline-imputed chain records
{chain}_vdj_source,{chain}_vdj_germline_allele, andqc_warnings({chain}_vdj_germline_reconstructed) and setsconstruct_contig_verified = Falseso germline imputation is never conflated with a 5'-to-3' contig-verified sequence.
Assembly configures four components:
- Signal peptides (leaders): standard human or murine leader peptides per chain, native V-gene leaders extracted from Cell Ranger FASTA contigs, or no leader.
- Constant regions: packaged canonical human (
TRAC,TRBC1,TRBC2) and mouse (Trac,Trbc1,Trbc2) references (including chimeric human-VDJ + mouse-constant pairing viaconstant_species="mouse"), or explicit{chain}_constant_aa/_ntcolumns from input data. - Self-cleaving 2A linkers:
T2A,P2A,E2A, orF2A. - Single-chain orientation:
β-linker-αconstructs with validation for start/stop codons, reading frame, J→C junction seam, and repeated k-mers.
Signal-peptide options¶
Each chain takes its own leader setting (defaults: CD28 on α and CD8A on β
so chains remain distinguishable):
| Value | Behavior |
|---|---|
"CD8A", "CD28", "mCD8B", "mCD28", "H2Kb", "IgK", "TRAC", "TRBC" |
Predefined signal peptide (table below) |
"from_contig" |
Native V-gene leader extracted from Cell Ranger contig FASTAs (germline-anchored against IMGT L-PART1+L-PART2) |
None |
Omit signal peptide |
| Name | Origin | Species | Amino-acid sequence |
|---|---|---|---|
CD8A |
CD8A signal peptide (UniProt P01732) |
Human | MALPVTALLLPLALLLHAARP |
CD28 |
CD28 signal peptide (UniProt P10747) |
Human | MLRLLLALNLFPSIQVTG |
mCD8B |
Cd8b1 signal peptide (UniProt P10300) |
Mouse | MQPWLWLVFSMKLAALWSSSA |
mCD28 |
Cd28 signal peptide (UniProt P31041) |
Mouse | MTLRLLFLALNFFSVQVT |
H2Kb |
H2-K1 (H-2Kb) signal peptide (UniProt P01901) |
Mouse | MVPCTLLLLLAAALAPTQTRA |
IgK |
IgGκ light-chain signal peptide | Mouse | METDTLLLWVLLLWVPGSTG |
TRAC |
Synthetic TCR α-chain signal peptide | Human | MAGTWLLLLLALGCPALPTG |
TRBC |
Synthetic TCR β-chain signal peptide | Human | MGTSLLCWMALCLLGADHADG |
2A linkers¶
| Name | Virus | Amino-acid sequence |
|---|---|---|
T2A |
Thosea asigna virus | EGRGSLLTCGDVEENPGP |
P2A |
Porcine teschovirus-1 | GSGATNFSLLKQAGDVEENPGP |
E2A |
Equine rhinitis A virus | QCTNYALLKLAGDVESNPGP |
F2A |
Foot-and-mouth disease virus | VKQTLNFDLLKLAGDVESNPGP |
Usage examples¶
from tcrsift import assemble_full_sequences
# Default: CD28 leader on alpha, CD8A leader on beta
assembled = assemble_full_sequences(clonotypes)
# Native V-gene leaders from Cell Ranger contig FASTAs
assembled = assemble_full_sequences(
clonotypes,
contigs_dir="/path/to/contigs",
alpha_leader="from_contig",
beta_leader="from_contig",
)
# Leader on beta chain only (upstream chain in a β-2A-α construct)
assembled = assemble_full_sequences(
clonotypes,
alpha_leader=None,
beta_leader="CD8A",
)
Constant-region construction¶
Canonical human (tcrsift/refseqs/canonical_constants.fasta) and mouse
(tcrsift/refseqs/canonical_constants_mouse.fasta) TRAC, TRBC1, and TRBC2
sequences are bundled in the package. Pass species="mouse" for murine TCRs, or
species="human", constant_species="mouse" for murinized chimeric TCR-T
constructs (codon_species defaults to constant_species and can be set
independently, e.g. codon_species="human" when expressing a murinized TCR in
human T cells). The default constant_source="ensembl" is retained as a
backward-compatible alias for "canonical" and performs no network or Ensembl
lookup. Pass constant_source="from-data" to read explicit
{chain}_constant_aa and {chain}_constant_nt columns instead.
When contigs_dir is provided, nucleotide assembly blends donor contig 3′
reads into the canonical constant region:
- Retain donor nucleotides across the J→C junction and subsequent complete codons while their translation matches the canonical constant-region protein.
- Complete a trailing 1- or 2-nt partial contig codon when a compatible codon exists for the canonical amino acid.
- Fill the remainder of the constant region with codon-optimized canonical nucleotides once contig coverage ends or diverges.
The translated constant-region protein stays canonical; {chain}_constant_source
records how much donor sequence was kept, and qc_warnings flags any
divergence. Without contigs_dir, codon-optimized canonical sequence is used
across the entire constant region.
API reference¶
assemble ¶
Full-length TCR sequence assembly for TCRsift.
Builds complete TCR sequences including leader peptides and constant regions.
CODON_TABLE
module-attribute
¶
CODON_TABLE = {'ATA': 'I', 'ATC': 'I', 'ATT': 'I', 'ATG': 'M', 'ACA': 'T', 'ACC': 'T', 'ACG': 'T', 'ACT': 'T', 'AAC': 'N', 'AAT': 'N', 'AAA': 'K', 'AAG': 'K', 'AGC': 'S', 'AGT': 'S', 'AGA': 'R', 'AGG': 'R', 'CTA': 'L', 'CTC': 'L', 'CTG': 'L', 'CTT': 'L', 'CCA': 'P', 'CCC': 'P', 'CCG': 'P', 'CCT': 'P', 'CAC': 'H', 'CAT': 'H', 'CAA': 'Q', 'CAG': 'Q', 'CGA': 'R', 'CGC': 'R', 'CGG': 'R', 'CGT': 'R', 'GTA': 'V', 'GTC': 'V', 'GTG': 'V', 'GTT': 'V', 'GCA': 'A', 'GCC': 'A', 'GCG': 'A', 'GCT': 'A', 'GAC': 'D', 'GAT': 'D', 'GAA': 'E', 'GAG': 'E', 'GGA': 'G', 'GGC': 'G', 'GGG': 'G', 'GGT': 'G', 'TCA': 'S', 'TCC': 'S', 'TCG': 'S', 'TCT': 'S', 'TTC': 'F', 'TTT': 'F', 'TTA': 'L', 'TTG': 'L', 'TAC': 'Y', 'TAT': 'Y', 'TAA': '*', 'TAG': '*', 'TGC': 'C', 'TGT': 'C', 'TGA': '*', 'TGG': 'W'}
LINKERS
module-attribute
¶
LINKERS = {'T2A': {'dna': 'GAGGGCAGAGGAAGTCTGCTAACATGCGGTGACGTCGAGGAGAATCCTGGCCCG', 'aa': 'EGRGSLLTCGDVEENPGP', 'source': 'Thosea asigna virus'}, 'P2A': {'dna': 'GGAAGCGGAGCTACTAACTTCAGCCTGCTGAAGCAGGCTGGAGACGTGGAGGAGAACCCTGGACCT', 'aa': 'GSGATNFSLLKQAGDVEENPGP', 'source': 'Porcine teschovirus-1'}, 'E2A': {'dna': 'CAGTGTACTAATTATGCTCTCTTGAAATTGGCTGGAGATGTTGAGAGCAACCCAGGTCCC', 'aa': 'QCTNYALLKLAGDVESNPGP', 'source': 'Equine rhinitis A virus'}, 'F2A': {'dna': 'GTGAAACAGACTTTGAATTTTGACCTTCTCAAGTTGGCGGGAGACGTGGAGTCCAACCCAGGGCCC', 'aa': 'VKQTLNFDLLKLAGDVESNPGP', 'source': 'Foot-and-mouth disease virus'}}
DEFAULT_LEADERS
module-attribute
¶
DEFAULT_LEADERS = {'CD8A': {'aa': 'MALPVTALLLPLALLLHAARP', 'dna': 'ATGGCCCTGCCTGTGACAGCCCTGCTGCTGCCTCTGGCTCTGCTGCTGCATGCCGCTAGACCC', 'source': 'Human CD8A signal peptide (UniProt P01732)', 'species': 'human'}, 'CD28': {'aa': 'MLRLLLALNLFPSIQVTG', 'dna': 'ATGCTCCGCCTGCTGCTGGCCCTGAACCTGTTCCCCAGCATCCAGGTGACCGGC', 'source': 'Human CD28 signal peptide (UniProt P10747)', 'species': 'human'}, 'mCD8B': {'aa': 'MQPWLWLVFSMKLAALWSSSA', 'dna': 'ATGCAGCCTTGGCTGTGGCTCGTGTTCAGCATGAAGCTGGCCGCTCTGTGGAGCTCCAGCGCC', 'source': 'Murine Cd8b1 signal peptide (UniProt P10300)', 'species': 'mouse'}, 'mCD28': {'aa': 'MTLRLLFLALNFFSVQVT', 'dna': 'ATGACCCTGAGACTGCTCTTCCTGGCCCTCAACTTCTTTAGCGTGCAGGTGACC', 'source': 'Murine Cd28 signal peptide (UniProt P31041)', 'species': 'mouse'}, 'H2Kb': {'aa': 'MVPCTLLLLLAAALAPTQTRA', 'dna': 'ATGGTGCCCTGCACCCTGCTCCTGCTTCTGGCCGCTGCCCTCGCTCCTACCCAGACAAGAGCC', 'source': 'Murine H2-K1 (H-2Kb) signal peptide (UniProt P01901)', 'species': 'mouse'}, 'IgK': {'aa': 'METDTLLLWVLLLWVPGSTG', 'dna': 'ATGGAGACAGACACACTCCTGCTATGGGTACTGCTGCTCTGGGTTCCAGGTTCCACTGGT', 'source': 'Murine IgGκ light chain signal peptide', 'species': 'mouse', 'note': 'Widely used for high secretion efficiency in mammalian expression'}, 'TRAC': {'aa': 'MAGTWLLLLLALGCPALPTG', 'dna': 'ATGGCTGGCACCTGGCTGCTGCTGCTGCTGGCCCTGGGATGCCCAGCACTGCCCACAGGC', 'source': 'Synthetic TCR alpha-chain leader peptide (legacy key TRAC)', 'species': 'human'}, 'TRBC': {'aa': 'MGTSLLCWMALCLLGADHADG', 'dna': 'ATGGGCACCAGCCTGCTGTGCTGGATGGCCCTGTGCCTGCTGGGAGCAGACCACGCCGATGGC', 'source': 'Synthetic TCR beta-chain leader peptide (legacy key TRBC)', 'species': 'human'}}
assemble_full_sequences ¶
assemble_full_sequences(clonotypes: DataFrame, contigs_dir: str | Path | None = None, alpha_leader: str | None = 'CD28', beta_leader: str | None = 'CD8A', include_constant: bool = True, constant_source: str = 'ensembl', linker: str = 'T2A', trac_allele: str = 'auto', trbc1_allele: str = 'auto', trbc2_allele: str = 'auto', stop_codons: tuple[str, ...] = ('TAA', 'TGA'), verbose: bool = True, show_progress: bool = True, sample_name_from: str = 'parent', cellranger_dir: str | Path | None = None, sample_sheet: DataFrame | None = None, leader_fallback: str = 'germline', force_alpha_leader: str | None = None, force_beta_leader: str | None = None, secondary_alpha_leader: str | None = None, secondary_beta_leader: str | None = None, codon_optimization: str = 'focal', max_codon_repeats: int = 1, avoid_enzymes: tuple[str, ...] = (), species: str = 'human', constant_species: str | None = None, codon_species: str | None = None, germline_vdj_fallback: bool = False, data_dir: str | Path | None = None, auto_download_germline: bool = False) -> pd.DataFrame
Assemble full-length TCR sequences.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
clonotypes
|
DataFrame
|
Clonotype DataFrame with VDJ sequences (from fwr1/cdr1/fwr2/cdr2/fwr3/cdr3/fwr4) |
required |
contigs_dir
|
str or Path
|
Directory with CellRanger contig FASTA files. Required if alpha_leader or beta_leader is set to "from_contig". |
None
|
alpha_leader
|
str or None
|
Leader sequence for alpha chain. Options: - None: No leader sequence - "from_contig": Extract native leader from contig FASTA (requires contigs_dir) - Key from DEFAULT_LEADERS: "CD8A", "CD28", "IgK", "TRAC", "TRBC" Default is "CD28" to provide distinct sequences from beta chain. |
'CD28'
|
beta_leader
|
str or None
|
Leader sequence for beta chain. Same options as alpha_leader. Default is "CD8A" to provide distinct sequences from alpha chain. |
'CD8A'
|
leader_fallback
|
str or None
|
Signal peptide to substitute when a |
'germline'
|
include_constant
|
bool
|
Include constant region sequences. |
True
|
constant_source
|
str
|
Source for constant regions:
|
'ensembl'
|
linker
|
str
|
Linker sequence for single-chain constructs: "T2A", "P2A", "E2A", "F2A" |
'T2A'
|
trac_allele
|
str
|
Per-gene allele selection (#113). Default |
'auto'
|
trbc1_allele
|
str
|
Per-gene allele selection (#113). Default |
'auto'
|
trbc2_allele
|
str
|
Per-gene allele selection (#113). Default |
'auto'
|
stop_codons
|
tuple of str
|
Stop codons appended to the codon-optimized constant CDS.
Default uses two non-redundant stops (recognized by
different release factors → reduced read-through in
synthesized constructs). Pass |
``("TAA", "TGA")``
|
verbose
|
bool
|
Print progress information |
True
|
show_progress
|
bool
|
Show progress bar |
True
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Clonotypes with full sequences added. Allele audit columns emitted per clone (#113):
Constant NT triad emitted per chain (#116):
The same triad is also exposed for |
Examples:
>>> # Default: CD28 on alpha, CD8A on beta (distinct leaders)
>>> assembled = assemble_full_sequences(clonotypes)
>>> # No leader sequences
>>> assembled = assemble_full_sequences(clonotypes, alpha_leader=None, beta_leader=None)
>>> # Leader only on beta chain (first in 2A construct)
>>> assembled = assemble_full_sequences(clonotypes, alpha_leader=None, beta_leader="CD8A")
>>> # Extract native leaders from contig FASTAs
>>> assembled = assemble_full_sequences(
... clonotypes,
... contigs_dir="/path/to/contigs",
... alpha_leader="from_contig",
... beta_leader="from_contig",
... )
Source code in tcrsift/assemble.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 | |
reconstruct_germline_vdj ¶
reconstruct_germline_vdj(clonotypes: DataFrame, *, species: str = 'human', codon_species: str | None = None, data_dir=None, auto_download: bool = False) -> pd.DataFrame
Populate missing VDJ_{alpha,beta}_{aa,nt} via IMGT germline rescue/reconstruction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
clonotypes
|
DataFrame
|
Clonotype table with |
required |
species
|
str
|
VDJ organism species ( |
``"human"``
|
codon_species
|
str or None
|
Species codon table for any untemplated junctional back-translation. |
None
|
data_dir
|
str or Path
|
Override tcrsift reference cache directory. |
None
|
auto_download
|
bool
|
When True, automatically download missing IMGT V-REGION and J-REGION
references for |
False
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Copy of |
Source code in tcrsift/_assemble_germline.py
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | |
translate_dna ¶
Translate DNA sequence to amino acids.
Returns:
| Type | Description |
|---|---|
tuple
|
(amino_acid_sequence, ragged_3p_nucleotides) |
Source code in tcrsift/_assemble_codons.py
find_longest_orf ¶
Find and translate the longest open reading frame.
Returns:
| Type | Description |
|---|---|
tuple
|
(amino_acid_sequence, start_offset, ragged_3p_nucleotides) |
Source code in tcrsift/_assemble_codons.py
parse_fasta ¶
Parse a FASTA (or .fasta.gz) file.
Returns:
| Type | Description |
|---|---|
dict
|
Mapping from sequence ID to sequence |
Source code in tcrsift/_assemble_codons.py
load_contigs ¶
load_contigs(contig_dir: str | Path | None = None, *, sample_name_from: str = 'parent', cellranger_dir: str | Path | None = None, sample_sheet: DataFrame | None = None) -> dict[str, dict[str, str]]
Load contig sequences from a CellRanger-style output tree (#124).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
contig_dir
|
str or Path
|
Root directory to scan for |
None
|
sample_name_from
|
('parent', 'grandparent', 'sheet')
|
How to derive the sample name from each discovered FASTA's path:
|
'parent'
|
cellranger_dir
|
str or Path
|
Shorthand for |
None
|
sample_sheet
|
DataFrame
|
Required when |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
Nested dict: |
Source code in tcrsift/_assemble_codons.py
689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 | |
get_constant_region_sequences ¶
get_constant_region_sequences(*, stop_codons: tuple[str, ...] = ('TAA', 'TGA'), species: str = 'human', codon_species: str | None = None) -> dict[str, str]
Return TCR constant-region CDS (DNA) via codon-aware back-translation.
Source code in tcrsift/assemble.py
validate_sequences ¶
validate_sequences(df: DataFrame, strict: bool = False, fix: bool = False, *, species: str | None = None) -> list[ValidationMessage]
Validate assembled sequences end-to-end per row (#67, #68).
Per-chain checks on each full_{chain}_aa row:
- Length window (200–450 aa).
- CDR3 substring present in the assembled sequence.
- Constant region's canonical C-terminus (from
:data:
CONSTANT_REGION_ENDINGS). - Constant region's canonical start (first 8+ residues of
:data:
HUMAN_CONSTANT_REGIONS_AA). - Constant length floor (:data:
CONSTANT_AA_FLOOR). - No premature stop codon (
*mid-chain). - Methionine start (when a leader was included).
- Standard residue alphabet only (:data:
_VALID_AA_CHARS). - Byte-for-byte equality of
leader + vdj + constantand the assembledfull_{chain}_aa, when all three parts are present.
Cross-row checks:
- β-chain J→C in-cis parity:
TRBJ1*pairs with TRBC1,TRBJ2*with TRBC2. - Single-chain integrity: linker present in
single_chain_aa. - Per-row
qc_warnings(stashed by_add_constant_regions) are surfaced.
Returns a flat list of :class:ValidationMessage (a str
subclass with .idx and .severity attributes). When
strict is True, raises :class:TCRsiftValidationError if any
load-bearing checks fail. Informational notes ("didn't have enough
info to check") are returned but never raise — distinguishing
those from a silent pass was the gap that hid #66.
When fix is True, autocorrect β J→C parity mismatches in-place
via :func:fix_jc_parity before validating (#89). Autocorrection
notes are prepended to the returned messages and the input frame
is mutated unconditionally — the mutation survives even when a
later check fails and strict=True raises.
Source code in tcrsift/_assemble_qc.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | |
export_fasta ¶
Export sequences to FASTA format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
DataFrame with sequences |
required |
output_path
|
str or Path
|
Output file path |
required |
sequence_col
|
str
|
Column containing sequences to export |
'single_chain_aa'
|