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

Casanovo predicts for invalid spectra #56

Open
bittremieux opened this issue Aug 5, 2022 · 3 comments
Open

Casanovo predicts for invalid spectra #56

bittremieux opened this issue Aug 5, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@bittremieux
Copy link
Collaborator

Invalid spectra after preprocessing are replaced by a dummy spectrum, but Casanovo still predicts a peptide for them. The resulting predictions are naturally incorrect, consisting of long peptide sequences with low(ish) scores (but not obviously wrong).

Instead invalid spectra should be filtered out or no prediction should be given. The former is probably better, because it might be a factor during training as well. I haven't fully been able to figure out how to skip items in the dataloader though.

@bittremieux bittremieux added the bug Something isn't working label Aug 5, 2022
@bittremieux
Copy link
Collaborator Author

One solution would be to move peak processing from Dataset to Parser in depthcharge. That way invalid spectra are encountered prior to being added to the index and can immediately be filtered out, rather than when being retrieved from the dataset. As an added advantage, spectrum processing only needs to be done once for each spectrum, when creating the index, rather than repeating it every time the same spectrum is retrieved.

A disadvantage, however, is that when spectrum processing options change, the index would have to be recreated. Nevertheless, I think our spectrum processing based on best practices and we don't really vary it, so for Casanovo at least it should be pretty fixed.

Additionally, it destroys the link between the indexes of the output PSMs and the input spectra. Although this is a broader issue (#70).

@wfondrie What do you think?

@wfondrie
Copy link
Collaborator

I'm open to this. I also think that the current way of tracking the spectrum index is pretty fragile and not ideal. Instead, that information should be saved in the index itself. Ayse started a PR in depthcharge to solve the spectrum tracking issue, but it was incomplete - I'll see if I can get it updated and integrated.

@melihyilmaz
Copy link
Collaborator

#105 will address spectrum index tracking once completed for future reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants