Skip to content

ERROR: Can only use .str accessor with string values! #755

@animesh

Description

@animesh

Describe the bug
I am trying to run a 'non-specific' search of fraction of sample collected in our timTOF-pro 2 instrument against human proteome but facing this issue? I wonder if the library generated respecting non-tryptic peptides? I also see that "Lumos" is being chosen as instrument in following log, could that be issue?

To Reproduce
Following is the setup

Image

Logs

Method Setup
CPU: 0.39%
RAM: 16.03 GB / 511.91 GB (3.13%)
0:00:00.208329 INFO: ├──optimization_manager
0:00:00.208329 INFO: │   ├──fwhm_rt: 5
0:00:00.208329 INFO: │   ├──fwhm_mobility: 0.01
0:00:00.208329 INFO: │   └──score_cutoff: 0
0:00:00.208329 INFO: ├──transfer_library
0:00:00.208329 INFO: │   ├──enabled: False
0:00:00.209329 INFO: │   ├──fragment_types:
0:00:00.209329 INFO: │   │   - b
0:00:00.209329 INFO: │   │   - y
0:00:00.209329 INFO: │   ├──max_charge: 2
0:00:00.209329 INFO: │   ├──top_k_samples: 3
0:00:00.209329 INFO: │   ├──norm_delta_max: True
0:00:00.209329 INFO: │   ├──precursor_correlation_cutoff: 0.5
0:00:00.209329 INFO: │   └──fragment_correlation_ratio: 0.75
0:00:00.209329 INFO: └──transfer_learning
0:00:00.209329 INFO:     ├──enabled: False
0:00:00.209329 INFO:     ├──batch_size: 2000
0:00:00.210329 INFO:     ├──max_lr: 0.0001
0:00:00.210329 INFO:     ├──train_fraction: 0.7
0:00:00.210329 INFO:     ├──validation_fraction: 0.2
0:00:00.210329 INFO:     ├──test_fraction: 0.1
0:00:00.210329 INFO:     ├──test_interval: 1
0:00:00.210329 INFO:     ├──lr_patience: 3
0:00:00.210329 INFO:     ├──epochs: 51
0:00:00.210329 INFO:     ├──warmup_epochs: 5
0:00:00.210329 INFO:     ├──nce: 25
0:00:00.210329 INFO:     └──instrument: Lumos
0:00:00.228420 INFO: Moved existing config file F:\promec\TIMSTOF\LARS\2025\251031_MAREN\alphaDIA\promec\library\frozen_config.yaml to F:\promec\TIMSTOF\LARS\2025\251031_MAREN\alphaDIA\promec\library\frozen_config.1.bkp.yaml
0:00:00.229421 INFO: Registering 7 custom modifications
0:00:00.307940 INFO: Searching 1 files:
0:00:00.307940 INFO:   251030_MAREN_DIALYSE_DIA_Slot1-37_1_11509.d
0:00:00.307940 INFO: Using 1 fasta files:
0:00:00.307940 INFO:   F:\promec\FastaDB\UP000005640_9606_1protein1gene.fasta
0:00:00.307940 INFO: Using library: None
0:00:00.307940 INFO: Saving output to: F:\promec\TIMSTOF\LARS\2025\251031_MAREN\alphaDIA\promec\library
0:00:00.308940 �PROGRESS: Loading spectral library�
0:00:00.308940 �PROGRESS: No library provided. Building library from fasta files.�
0:00:00.308940 INFO: Running FastaDigest
0:00:02.287389 INFO: Digesting fasta file
0:00:14.992470 INFO: Traceback (most recent call last):
  File "alphadia\cli.py", line 295, in run
    SearchPlan(output_directory, user_config, cli_params_config).run_plan()
  File "alphadia\search_plan.py", line 154, in run_plan
    self.run_step(
  File "alphadia\search_plan.py", line 193, in run_step
    step.run()
  File "alphadia\search_step.py", line 384, in run
    self.load_library()
  File "alphadia\search_step.py", line 270, in load_library
    spectral_library = fasta_digest(self.fasta_path_list)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "alphadia\libtransform\base.py", line 19, in __call__
    return self.forward(*args)
           ^^^^^^^^^^^^^^^^^^^
  File "alphadia\libtransform\fasta_digest.py", line 82, in forward
    fasta_lib.get_peptides_from_fasta_list(input)
  File "alphabase\protein\fasta.py", line 987, in get_peptides_from_fasta_list
    self.get_peptides_from_protein_dict(protein_dict)
  File "alphabase\protein\fasta.py", line 1018, in get_peptides_from_protein_dict
    self.get_peptides_from_protein_df(protein_df)
  File "alphabase\protein\fasta.py", line 998, in get_peptides_from_protein_df
    self._cleave_to_peptides(self.protein_df, protein_seq_column=digest_seq)
  File "alphabase\protein\fasta.py", line 1065, in _cleave_to_peptides
    self.refine_df()
  File "alphabase\spectral_library\base.py", line 344, in refine_df
    refine_precursor_df(self._precursor_df)
  File "alphabase\peptide\precursor.py", line 40, in refine_precursor_df
    df["nAA"] = df.sequence.str.len().astype(np.int32)
                ^^^^^^^^^^^^^^^
  File "pandas\core\generic.py", line 6299, in __getattr__
  File "pandas\core\accessor.py", line 224, in __get__
  File "pandas\core\strings\accessor.py", line 191, in __init__
  File "pandas\core\strings\accessor.py", line 245, in _validate
AttributeError: Can only use .str accessor with string values!

0:00:14.992470 �ERROR: Can only use .str accessor with string values!�
undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions