widdowquinn / ncfp

Program and package that retrieves nucleotide coding sequences from NCBI that correspond to a set of input protein sequences.
https://widdowquinn.github.io/ncfp/
MIT License
3 stars 2 forks source link

Biopython DeprecationWarning for ungap() Method #45

Closed monserrj closed 4 months ago

monserrj commented 11 months ago

Summary:

BiopythonDeprecationWarning for theungap() method, advising replacement with replace().

Description:

The code is currently using the deprecated ungap() method in Biopython, which triggers a BiopythonDeprecationWarning. The warning suggests replacing myseq.ungap(gap) with myseq.replace(gap, "") to address the deprecation.

Reproducible Steps:

  1. Obtain the FASTA sequence for the PduK protein reference B1VB70 from UniProt.
  2. Use Biopython to read the sequence and perform a sequence operation that involves the deprecated ungap() method, e.g., myseq.ungap("-").
  3. Observe the BiopythonDeprecationWarning generated.

Current Output:

The correct output is generated with the warning.

Expected Output:

No warning should be generated, and the code should execute without issues

ncfp Version: https://github.com/widdowquinn/ncfp.git

Python Version: 3.9.0

Operating System: Windows10

widdowquinn commented 4 months ago

Thanks @monserrj

This is now fixed with b139660