Skip to content

Commit

Permalink
delete unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
arogozhnikov committed Sep 10, 2024
1 parent a7fa95d commit 85b59d1
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions chai_lab/data/parsing/fasta.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from pathlib import Path
from typing import Iterable

import fsspec

from chai_lab.data.parsing.structure.entity_type import EntityType
from chai_lab.data.residue_constants import restype_1to3_with_x

Expand All @@ -26,21 +24,6 @@
}


def _fasta_to_str(fasta: Fasta) -> str:
header, sequence = fasta
return f">{header}\n{sequence}\n"


def fastas_to_str(fastas: Fastas) -> str:
return "".join(_fasta_to_str(fasta) for fasta in fastas)


def write_fastas(fastas: Fastas, output_path: str):
logger.debug(f"Writing {len(fastas)} sequences to {output_path}")
with fsspec.open(output_path, "w") as fp:
fp.write(fastas_to_str(fastas))


def read_fasta(file_path: str | Path) -> Iterable[Fasta]:
from Bio import SeqIO

Expand Down

0 comments on commit 85b59d1

Please sign in to comment.