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 loading data #95

Closed
mreed1272 opened this issue Feb 20, 2025 · 4 comments
Closed

Error loading data #95

mreed1272 opened this issue Feb 20, 2025 · 4 comments

Comments

@mreed1272
Copy link

I am trying to explore alphamap for analyzing my dataset from various search sources but I keep running into an error loading the data set. The program seems to be hanging up at the loading of the fasta file for the organism selected. Even the example data set is not loading. I am using the windows one-click installer.

The error in the dos box is:


Using frozen version. Setting SSL context to unverified.
WARNING:param.Alert00063: Setting non-parameter attribute styles={'background': 'white'} using a mechanism intended only for parameters


******* AlphaMap 0.2.0 *******


Launching server at http://localhost:64533
404 GET /favicon.ico (::1) 0.00ms
Downloading https://raw.githubusercontent.com/MannLabs/alphamap/refs/heads/main/alphamap/data/human.fasta to C:\Program Files (x86)\AlphaMap_internal\alphamap..\alphamap\data\human.fasta..
Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOLoop object at 0x000001F6A3610970>>, <Task finished name='Task-135' coro=<_needs_document_lock.._needs_document_lock_wrapper() done, defined at bokeh\server\session.py:51> exception=PermissionError(13, 'Permission denied')>)
Traceback (most recent call last):
File "tornado\ioloop.py", line 750, in _run_callback
File "tornado\ioloop.py", line 774, in _discard_future_result
File "bokeh\server\session.py", line 67, in _needs_document_lock_wrapper
File "bokeh\server\session.py", line 195, in with_document_locked
File "bokeh\document\document.py", line 1183, in wrapper
File "bokeh\document\document.py", line 1169, in _with_self_as_curdoc
File "bokeh\document\document.py", line 1182, in invoke
File "bokeh\document\document.py", line 972, in remove_then_invoke
File "panel\reactive.py", line 204, in _change_event
File "panel\reactive.py", line 187, in _process_events
File "param\parameterized.py", line 1451, in set_param
File "param\parameterized.py", line 1578, in _batch_call_watchers
File "panel\param.py", line 739, in _replace_pane
File "panel\param.py", line 663, in eval
File "param\parameterized.py", line 337, in _depends
File "alphamap\gui.py", line 1480, in upload_data
upload_organism_info()
File "alphamap\gui.py", line 1166, in upload_organism_info
full_fasta = import_fasta(select_organism.value)
File "alphamap\organisms_data.py", line 80, in import_fasta
file_path = _download_file(DATA_PATH, fasta_file_name)
File "alphamap\organisms_data.py", line 118, in _download_file
open(file_path, 'wb') as out_file:
PermissionError: [Errno 13] Permission denied: 'C:\Program Files (x86)\AlphaMap\_internal\alphamap\..\alphamap\data\human.fasta'


When I go looking for the fasta file in the data structure, I can not find the files at all.

@mschwoer
Copy link
Collaborator

Hi,
thanks for the detailed report.
It seems like you don't have the rights to write to C:\Program Files (x86)\AlphaMap\_internal\alphamap\..\alphamap\data\human.fasta, which is required to download the required fasta files on the first run.

There's some potential remedies:

There's two more ideas (providing a Docker container and including the files in the windows installer) that would require some more work on our end.

let me know if this helps..

best,
Magnus

@mreed1272
Copy link
Author

Copying the *.fasta and *.csv files worked to get past that issue. I was able to load the example dataset at least. However, when I tried to load a dataset from Fragpipe (DIA data), I get a "KeyError: 57.0214". See below:


ERROR:tornado.application:Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOLoop object at 0x00000179E59EF970>>, <Task finished name='Task-3568' coro=<_needs_document_lock.._needs_document_lock_wrapper() done, defined at bokeh\server\session.py:51> exception=KeyError(57.0214)>)
Traceback (most recent call last):
File "tornado\ioloop.py", line 750, in _run_callback
File "tornado\ioloop.py", line 774, in _discard_future_result
File "bokeh\server\session.py", line 67, in _needs_document_lock_wrapper
File "bokeh\server\session.py", line 195, in with_document_locked
File "bokeh\document\document.py", line 1183, in wrapper
File "bokeh\document\document.py", line 1169, in _with_self_as_curdoc
File "bokeh\document\document.py", line 1182, in invoke
File "bokeh\document\document.py", line 972, in remove_then_invoke
File "panel\reactive.py", line 204, in _change_event
File "panel\reactive.py", line 187, in _process_events
File "param\parameterized.py", line 1451, in set_param
File "param\parameterized.py", line 1578, in _batch_call_watchers
File "panel\param.py", line 739, in _replace_pane
File "panel\param.py", line 663, in eval
File "param\parameterized.py", line 337, in _depends
File "alphamap\gui.py", line 1481, in upload_data
upload_experimental_data()
File "alphamap\gui.py", line 1067, in upload_experimental_data
df = import_data(
File "alphamap\importing.py", line 708, in import_data
data = import_fragpipe_data(input_info, sample=sample)
File "alphamap\importing.py", line 629, in import_fragpipe_data
modif_seq = data_sub.apply(lambda row: convert_fragpipe_mq_mod(row[id_col], row["Assigned Modifications"]), axis=1)
File "pandas\core\frame.py", line 8827, in apply
File "pandas\core\apply.py", line 727, in apply
File "pandas\core\apply.py", line 851, in apply_standard
File "pandas\core\apply.py", line 867, in apply_series_generator
File "alphamap\importing.py", line 629, in
modif_seq = data_sub.apply(lambda row: convert_fragpipe_mq_mod(row[id_col], row["Assigned Modifications"]), axis=1)
File "alphamap\importing.py", line 547, in convert_fragpipe_mq_mod
modifs_posit[posit] = modif_convers_dict[mod_mass].format(add_aa)
KeyError: 57.0214

@mschwoer
Copy link
Collaborator

Most likely this entry https://github.com/MannLabs/alphamap/blob/main/alphamap/importing.py#L479 should be hit, but isn't.
Probably due to a rounding error?

You could try to pre-process your data:
In the Assigned Modifications column, replace all instances of *,57.0214 with *,57.0215

best,
Magnus

@mreed1272
Copy link
Author

Editing the file to change the cys mod to 57.0215 worked. Thanks for the help.

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

No branches or pull requests

2 participants