IsoQuant icon indicating copy to clipboard operation
IsoQuant copied to clipboard

SyntaxWarning for escape sequence

Open kbseah opened this issue 9 months ago • 7 comments

I get the following syntax warning when running visualize.py:

/usr/local/share/isoquant-3.6.3-0/src/file_utils.py:25: SyntaxWarning: invalid escape sequence '\d'

The referenced line: https://github.com/ablab/IsoQuant/blob/159f9af1d439a23d6161f67da95379874e0aafbe/src/file_utils.py#L25 should use a raw string literal: re.split('r(\d+)', s)

Thanks for your help!

kbseah avatar Apr 01 '25 04:04 kbseah

I can confirm that I'm encountering this error also, using versions 3.6.1 and 3.6.3

number-25 avatar Apr 02 '25 02:04 number-25

Thanks for the report, will fix in the next release!

andrewprzh avatar Apr 02 '25 17:04 andrewprzh

Hi! Thanks so much for this amazing tool. I encountered the same issue while running nf-core/sc-nanoseq pipeline. Is there any way to get a singularity image with the fixed typo? https://biocontainers.pro/tools/isoquant Thank you so much!

lauratwomey avatar Apr 09 '25 10:04 lauratwomey

Hi!

I will make a new release within the next week! Also, I think the error should be just a warning in earlier Python version.

P.S. I also suggest using the latest IsoQuant version.

Best Andrey

andrewprzh avatar Apr 09 '25 12:04 andrewprzh

Thanks @andrewprzh : we will fix things on our end (in nf-core/scnanoseq) as soon as your new release is out.

lianov avatar Apr 09 '25 15:04 lianov

thanks for looking into this!

kbseah avatar Apr 09 '25 15:04 kbseah

For anyone curious

Other Language Changes

  • A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+.\d+")). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. (Contributed by Victor Stinner in gh-98401.)

https://docs.python.org/3/whatsnew/3.12.html#other-language-changes

number-25 avatar Apr 09 '25 22:04 number-25

Fixed in 3.7

andrewprzh avatar May 19 '25 09:05 andrewprzh