Noble-Lab / casanovo

De Novo Mass Spectrometry Peptide Sequencing with a Transformer Model
https://casanovo.readthedocs.io
Apache License 2.0
102 stars 37 forks source link

How to specify custom residues to train Casanovo from scratch? #298

Closed irleader closed 7 months ago

irleader commented 7 months ago

Since release of version 3.5.0, "Specifying custom residues to retrain Casanovo is now possible."

  1. I assume retrain means train Casanovo from scratch, it is still not possible to add extra residues to train Casanovo from a pretrained weights, am I right?
  2. Are there any other actions I shall do apart from modifying the residues part in config.yaml? e.g., other than the residues specified in original config.yaml, I added "K+42.022": 170.11676305 #Lysine Guandination 128.094963050 + 42.02180. Is it all I need to do to specify custom residues?
  3. Actually, I have been adding/removing residues to train Casanovo from scratch since version 3.1.0, it seems to work well. So, what has been changed between v3.5.0 and previous v3.x.0 regarding specifying custom residues?

Thanks!

bittremieux commented 7 months ago
  1. Correct, when you change the residue alphabet, training from scratch is necessary.
  2. No. (Besides having spectra for peptides with those modifications in your training data of course.)
  3. Before version 3.5.0 modifications specified in the config would be ignored. This was fixed in version 3.5.0. For more details, see #229.