Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with biopython 1.85 #337

Closed
manulera opened this issue Jan 23, 2025 · 1 comment · Fixed by #340
Closed

Error with biopython 1.85 #337

manulera opened this issue Jan 23, 2025 · 1 comment · Fixed by #340

Comments

@manulera
Copy link
Collaborator

Reported by @AlexeyNesterovichEst at #336

To reproduce, create a new environment and install pydna with latest biopython

pip install pydna biopython==1.85

Then run:

dsr = Dseqrecord("ATGCAAACAGTAATGATATAAT")
dsr.reverse_complement()

Gives this error:

Traceback (most recent call last):
  File "/Users/manu/Documents/OpenSource/pydna-336/dummy.py", line 12, in <module>
    dsr.reverse_complement()
  File "/Users/manu/Documents/OpenSource/pydna-336/.venv/lib/python3.11/site-packages/pydna/dseqrecord.py", line 940, in reverse_complement
    answer = type(self)(super().reverse_complement())
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/manu/Documents/OpenSource/pydna-336/.venv/lib/python3.11/site-packages/pydna/seqrecord.py", line 125, in reverse_complement
    answer = super().reverse_complement(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/manu/Documents/OpenSource/pydna-336/.venv/lib/python3.11/site-packages/Bio/SeqRecord.py", line 1381, in reverse_complement
    answer = self._from_validated(seq)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/manu/Documents/OpenSource/pydna-336/.venv/lib/python3.11/site-packages/Bio/SeqRecord.py", line 391, in _from_validated
    return cls(
           ^^^^
  File "/Users/manu/Documents/OpenSource/pydna-336/.venv/lib/python3.11/site-packages/pydna/dseqrecord.py", line 161, in __init__
    super().__init__(record, *args, **kwargs)
  File "/Users/manu/Documents/OpenSource/pydna-336/.venv/lib/python3.11/site-packages/pydna/seqrecord.py", line 56, in __init__
    super().__init__(seq, *args, id=id, name=name, description=description, **kwargs)
TypeError: SeqRecord.__init__() got multiple values for argument 'id'

Will look into it now.

@manulera
Copy link
Collaborator Author

This also fails:

from pydna.seqrecord import SeqRecord

dseq = SeqRecord("ATGCAAACAGTAATGATATAAT")
dseq.reverse_complement()

manulera added a commit that referenced this issue Jan 23, 2025
This was referenced Jan 23, 2025
manulera added a commit that referenced this issue Jan 23, 2025
manulera added a commit that referenced this issue Jan 23, 2025
BjornFJohansson pushed a commit that referenced this issue Jan 25, 2025
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 a pull request may close this issue.

1 participant