Errors upon picking peaks or assigning

Hello, 
I`m getting these two errors in ccpnmr V3 when I try to pick or assign a peak:

TypeError: unsupported operand type(s) for /: `NoneType` and `int`


TypeError: `<=` not supported between instances of `float` and `NoneType`

What`s the reason for that and how to fix that? Never ran into a similar error on V2.

Hi,

we have had this error before, I think, though I had assumed we had fixed it by now. Are you definitely up to date with all your Updates? (Go to Help / Check for Updates to see if you are or not.)

Vicky

(11-15-2021, 10:09 am)VickyH Wrote: Hi,

we have had this error before, I think, though I had assumed we had fixed it by now. Are you definitely up to date with all your Updates? (Go to Help / Check for Updates to see if you are or not.)

Vicky

I am also having this issue, I am definitely up to date but the peaks seem to have an issue in the NEF file. 
Peaks I picked and assigned in CCP V2 before upgrading to CCP V3 look like this:
774  2076  542149.9688   .  74400.02344   .  5.718946143  .  1.957833627  .  10bp-B  16  DA  H1`      10bp-B  15  DT  H2`      1  .  ` 16AdeH1` 15ThyH2`  `   .  1

whereas peaks I picked and assigned in CCP V3 look like this: 
843  2147  .             .  -4257.635057  .  13.22318892  .  12.73046601  .  10bp-B  15  DT  H3       10bp-B  18  DG  H1       1  .  .                        .  1

I made sure CCP V3 was updated and even deleted and reassigned peaks. So I`m not sure what to do except go back to CCP V2 and re pick and assign the new peaks.  Is it possible to move spectra and assignments from CCP V3 to CCP V2? Thanks.

(11-15-2021, 10:09 am)VickyH Wrote: Hi,

we have had this error before, I think, though I had assumed we had fixed it by now. Are you definitely up to date with all your Updates? (Go to Help / Check for Updates to see if you are or not.)

Vicky

I am also having this issue.  We made sure to use the most updated version of 3.0.4 and tried both the terminal and launcher app versions.  However, the same errors are still popping up even with all updates.  I assume this is a bug because it is coming fro the ccp python and we don`t have any special python variables on our end.  

thanks!

I`m struggling to replicate this. When exactly does it occur?
I had assumed the error was occurring with the Pick and Assign module, but I realise you actually say `pick or assign`. How are you picking the peak? How are you trying to assign it? Does it never work, or only start after a while? Does it start after you have tried to Undo something?
Thanks,
Vicky

(11-17-2021, 12:19 pm)VickyH Wrote: I`m struggling to replicate this. When exactly does it occur?
I had assumed the error was occurring with the Pick and Assign module, but I realise you actually say `pick or assign`. How are you picking the peak? How are you trying to assign it? Does it never work, or only start after a while? Does it start after you have tried to Undo something?
Thanks,
Vicky

I am using the Peak Assigner to pick and assign peaks. I use command shift L-click to pick a peaks and then right click, edit peak assignment to assign.  I can see the assigned peak on my spectra as a result.  However, I need to be able to export this data and that`s where I see the problem.  In the NEF file, my earlier assignments from ccpnmrV2 look like this:

60   74   2.487515152e+12  .  3.06830934e+11   .  11.41085127  .  10.00269129  .  A   5  G  H1    A   7  G  H2    1  .  ` 5GuaH1 7GuaH2  `  .  1

but my new assignments in the spectrum look like this:
100  126  .                .  7.126218596e+11  .  7.304256671  .  8.433765762  .  A   5  G  H3    A   8  A .  H2    1  .  .                         .  1

It looks like the assignment is missing (I can deal with that easily) but also information about the peak volume is missing.  I have tried to assign a few different ways which is when I noticed those python error messages.  But what I`ve described above is my main issue; it looks like the peak is assigned but I cannot get the information I need out of the assignment.

thanks for your help with this

So the peak volume is an easy one: in V3 we don`t automatically determine this when you pick a peak, but with EV or Spectrum / Estimate Volumes you can calculate the volumes and then should be included in the NEF file.

As regards the Assignment - that is there:
A 5 G H3 A 8 A . H2
Shows you that it is Chain A, Residue 5, Residue Type G, Atom Name A, and then in the same way A8AH2 in the other dimension. My guess is that you want to the `5GuaH1 7GuaH2` style assignment, do you? Without the
loop_
_nef_chemical_shift.chain_code
_nef_chemical_shift.sequence_code
_nef_chemical_shift.residue_name
_nef_chemical_shsift.atom_name
_nef_chemical_shift.value
_nef_chemical_shift.value_uncertainty
_nef_chemical_shift.element
_nef_chemical_shift.isotope_number
_nef_chemical_shift.ccpn_figure_of_merit
_nef_chemical_shift.ccpn_comment
Style loop information from your NEF file, I can`t work out what field V2 has put this into - I suspect it has just added this in the ccpn_comment field? It should be possible to write a macro to do that sort of thing if wanted.

(11-18-2021, 10:14 am)VickyH Wrote: So the peak volume is an easy one: in V3 we don`t automatically determine this when you pick a peak, but with EV or Spectrum / Estimate Volumes you can calculate the volumes and then should be included in the NEF file.

As regards the Assignment - that is there:
A   5  G  H3    A   8  A .  H2
Shows you that it is Chain A, Residue 5,  Residue Type G, Atom Name A, and then in the same way A8AH2 in the other dimension. My guess is that you want to the `5GuaH1 7GuaH2` style assignment, do you? Without the
loop_
        _nef_chemical_shift.chain_code
        _nef_chemical_shift.sequence_code
        _nef_chemical_shift.residue_name
        _nef_chemical_shsift.atom_name
        _nef_chemical_shift.value
        _nef_chemical_shift.value_uncertainty
        _nef_chemical_shift.element
        _nef_chemical_shift.isotope_number
        _nef_chemical_shift.ccpn_figure_of_merit
        _nef_chemical_shift.ccpn_comment
Style loop information from your NEF file, I can`t work out what field V2 has put this into - I suspect it has just added this in the ccpn_comment field? It should be possible to write a macro to do that sort of thing if wanted.

Using EV or Spectrum/ Estimate Volumes does not add the volumes into the NEF file. I have tried estimating volumes for the entire spectrum, just one peak, and picking new peaks to estimate the volume. The only volume values that show up in the NEF file are from peaks picked prior to moving to ccp3.  thanks

If the volumes are contained within the V3 project, then they should be written out to the NEF file.
It looks to me as though the problem might actually be that the volumes aren`t being calculated. The best thing is if you open your peak list (drag into the drop area). If your peaks don`t have linewidths specified, then the EV algorithm won`t work. So you may have to refit your peaks first with RP. This should give you linewidths and then you can do EV and get volumes. Then the volume export into the NEF file should work.
Vicky