-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Using pandas 2.2.3, the tmt_processing script results in one warning per MS2 scan:
/usr/local/lib/python3.9/site-packages/simsi_transfer/tmt_processing.py:174: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value '36440' has dtype incompatible with float32, please explicitly cast to a compatible dtype first.
scanseries["scanID"] = re.search(
This seems to be a result of scanseries explicitly using float32 but subsequently being assigned an int value:
SIMSI-Transfer/simsi_transfer/tmt_processing.py
Lines 168 to 176 in f3a2184
| scanseries = pd.Series(index=dfcol, dtype="float32") | |
| if extraction_level == 2: | |
| scanseries["scanID"] = int(re.search(r"scan=(\d+)", item["id"])[1]) | |
| else: | |
| # supposed to find parent MS2 spectrum for MS3 by looking into precursorList/precursor/spectrumRef | |
| scanseries["scanID"] = int(re.search( | |
| r"scan=(\d+)", item["precursorList"]["precursor"][0]["spectrumRef"] | |
| )[1]) |
Metadata
Metadata
Assignees
Labels
No labels