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

ValueError: invalid literal for int() with base 10 #8

Open
nattzy94 opened this issue Oct 18, 2023 · 4 comments
Open

ValueError: invalid literal for int() with base 10 #8

nattzy94 opened this issue Oct 18, 2023 · 4 comments

Comments

@nattzy94
Copy link

Hi I am running GLEAMS on a bunch of MGF files using gleams embed *.mgf --embed_name GLEAMS_embed with 1 gpu.

The job starts:

2023-10-18 23:08:17,623 INFO [gleams/MainProcess] gleams.cli_embed : GLEAMS version 0.4.dev7+g13ebc74.d20231018
2023-10-18 23:08:17,672 DEBUG [gleams/MainProcess] encoder.init : Read the reference spectra
2023-10-18 23:08:18,008 DEBUG [gleams/MainProcess] encoder.init : Select 500 valid reference spectra
2023-10-18 23:08:19,146 DEBUG [gleams/MainProcess] nn.embed : Load the stored GLEAMS neural network
2023-10-18 23:08:19,200 DEBUG [gleams/MainProcess] embedder.init : Running the embedder model on 1 GPU(s)
2023-10-18 23:08:19,660 INFO [gleams/MainProcess] nn.embed : Embed all peak files for metadata file /var/tmp/pbs.858407.hn-10-03/tmpy7q23kig/GLEAMS_embed.parquet
2023-10-18 23:08:19,662 INFO [gleams/MainProcess] nn.embed : Process dataset GLEAMS [ 1/ 1] (120 files)
2023-10-18 23:08:19,663 DEBUG [gleams/MainProcess] feature._peaks_to_features : Process file 202112249_TY_Nathaniel_1364_m2_3_FAIMS_OTIT_F1.mgf

but then encounters the following error:

Traceback (most recent call last):
  File "/data/petretto/home/e0470749/.conda/envs/gleams/bin/gleams", line 8, in <module>
    sys.exit(gleams())
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/gleams/gleams.py", line 97, in cli_embed
    nn.embed(metadata_filename, config.model_filename, f'{embed_name}.npy',
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/gleams/nn/nn.py", line 188, in embed
    for filename, file_scans, file_encodings in joblib.Parallel(
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/joblib/parallel.py", line 1041, in __call__
    if self.dispatch_one_batch(iterator):
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/joblib/parallel.py", line 859, in dispatch_one_batch
    self._dispatch(tasks)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/joblib/parallel.py", line 777, in _dispatch
    job = self._backend.apply_async(batch, callback=cb)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/joblib/_parallel_backends.py", line 208, in apply_async
    result = ImmediateResult(func)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/joblib/_parallel_backends.py", line 572, in __init__
    self.results = batch()
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/joblib/parallel.py", line 262, in __call__
    return [func(*args, **kwargs)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/joblib/parallel.py", line 262, in <listcomp>
    return [func(*args, **kwargs)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/gleams/feature/feature.py", line 68, in _peaks_to_features
    scans['scan'] = scans['scan'].astype(np.int64)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/pandas/core/generic.py", line 5815, in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/pandas/core/internals/managers.py", line 418, in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/pandas/core/internals/managers.py", line 327, in apply
@nattzy94
Copy link
Author

Hi, I converted my mgf to mzML using msconvert and reran gleam embed on the mzML file:

gleams embed *.mzML --embed_name GLEAMS_embed

However, I run into the following error:

Traceback (most recent call last):
  File "/data/petretto/home/e0470749/.conda/envs/gleams/bin/gleams", line 8, in <module>
    sys.exit(gleams())
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/gleams/gleams.py", line 97, in cli_embed
    nn.embed(metadata_filename, config.model_filename, f'{embed_name}.npy',
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/gleams/nn/nn.py", line 220, in embed
    _combine_embeddings(
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/gleams/nn/nn.py", line 290, in _combine_embeddings
    np.save(filename_embeddings, np.vstack(embeddings))
  File "<__array_function__ internals>", line 5, in vstack
  File "/data/petretto/home/e0470749/.conda/envs/gleams/lib/python3.8/site-packages/numpy/core/shape_base.py", line 283, in vstack
    return _nx.concatenate(arrs, 0)
  File "<__array_function__ internals>", line 5, in concatenate
ValueError: need at least one array to concatenate
2023-11-10 13:37:11,224 INFO [gleams/MainProcess] gleams.cli_embed : GLEAMS version 0.4.dev7+g13ebc74.d20231018
2023-11-10 13:37:11,242 DEBUG [gleams/MainProcess] encoder.__init__ : Read the reference spectra
2023-11-10 13:37:11,570 DEBUG [gleams/MainProcess] encoder.__init__ : Select 500 valid reference spectra
2023-11-10 13:37:12,706 DEBUG [gleams/MainProcess] nn.embed : Load the stored GLEAMS neural network
2023-11-10 13:37:12,747 DEBUG [gleams/MainProcess] embedder.__init__ : Running the embedder model on 1 GPU(s)
2023-11-10 13:37:13,191 INFO [gleams/MainProcess] nn.embed : Embed all peak files for metadata file /var/tmp/pbs.864605.hn-10-03/tmp584gx28f/GLEAMS_embed.parquet
2023-11-10 13:37:13,192 INFO [gleams/MainProcess] nn.embed : Process dataset GLEAMS [  1/  1] (1 files)
2023-11-10 13:37:13,193 DEBUG [gleams/MainProcess] feature._peaks_to_features : Process file 20210331_TY_GndHCL_Extract2_C18_F1.mzML
2023-11-10 13:37:34,114 INFO [gleams/MainProcess] nn._combine_embeddings : Combine embeddings for 1 datasets
2023-11-10 13:37:34,114 DEBUG [gleams/MainProcess] nn._combine_embeddings : Append dataset GLEAMS [  1/  1]
2023-11-10 13:37:34,115 WARNING [gleams/MainProcess] nn._combine_embeddings : Missing embeddings for dataset GLEAMS, skipping...

I'm not really sure what is happening here. Is there a problem with writing out the embeddings?

@JannikSchneider12
Copy link

Hey, I have the same error. Did you found a solution?

@nattzy94
Copy link
Author

nattzy94 commented Dec 7, 2023

Unfortunately no, haven't been able to solve this.

@TIKeng
Copy link

TIKeng commented Apr 12, 2024

You can change TITLE=mzspec:MSV000080225:HUVEC_ne_con_5b_1:scan:20120 into TITLE=1.
image

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

3 participants