Skip to content

Commit

Permalink
Fix to_bio_msa to preserve full sequence descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
TJBIII committed Sep 24, 2023
1 parent 1c08ccc commit 90e1dc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clipkit/msa.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ def complement_to_bio_msa(self) -> MultipleSeqAlignment:
return self._to_bio_msa(self.sites_trimmed)

def _to_bio_msa(self, sites) -> MultipleSeqAlignment:
# NOTE: we use the description as the id to preserve the full sequence description - see issue #20
return MultipleSeqAlignment(
[
SeqRecord(Seq("".join(rec)), **info)
SeqRecord(Seq("".join(rec)), id=str(info["description"]), description="")
for rec, info in zip(sites.tolist(), self.header_info)
]
)
Expand Down

0 comments on commit 90e1dc7

Please sign in to comment.