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

extract sequences from pdb files with BioPandas #5

Merged
merged 5 commits into from
Apr 5, 2024

Conversation

stephprince
Copy link
Collaborator

Motivation

Currently sequence extraction using the biopython SeqIO parser creates fasta files with incorrectly shortened sequences. This seems to occur because SeqIO ignores out-of-order residues, and residues added to the beginning of the pdb file by pdb-fixer are given out-of-order sequence numbers (see 3M8J_A.pdb for an example).

The proposed changes use BioPandas instead to extract the sequence information from the pdb files.

How to test the behavior?

extract-seq -f /path/to/input.pdb -o /path/to/output.fasta

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running ruff from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.

Copy link

codecov bot commented Apr 5, 2024

Codecov Report

Attention: Patch coverage is 97.36842% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 94.38%. Comparing base (aab0700) to head (fc3e6ea).

Files Patch % Lines
tests/test_extract_seq.py 96.15% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main       #5       +/-   ##
===========================================
+ Coverage   80.95%   94.38%   +13.42%     
===========================================
  Files           2        3        +1     
  Lines          63       89       +26     
===========================================
+ Hits           51       84       +33     
+ Misses         12        5        -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@smallfishabc smallfishabc merged commit bb2b20d into main Apr 5, 2024
10 checks passed
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 this pull request may close these issues.

2 participants