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

Spectra end-point with no filter should be avoid #45

Open
ypriverol opened this issue Oct 24, 2019 · 3 comments
Open

Spectra end-point with no filter should be avoid #45

ypriverol opened this issue Oct 24, 2019 · 3 comments
Labels
documentation This issue is related with the documentation or repository structure enhancement New feature or request

Comments

@ypriverol
Copy link
Contributor

The spectra endpoint contains three possible filters:
usi, accession, scan, file collection

However, we never defined that at least one of them should be defined for the query. Then, the following query is possible:

http://www.peptideatlas.org/api/proxi/v0.1/spectra?pageSize=100&resultType=compact&responseContentType=json

In practical terms we shouldn't allow this because no many users will loop in the entire resource to get all the spectra.

Opinions?

@ypriverol ypriverol added documentation This issue is related with the documentation or repository structure enhancement New feature or request labels Oct 24, 2019
@edeutsch
Copy link
Contributor

In my opinion it can be up each individual resource what queries they can honor and which they can decline as too unconstrained. If MassIVE has an indexed set of a billion spectra and they will let users execute that query, fine. At PeptideAtlas, we will likely return an error that an unconstrained query is not supported. My main interest is we're all using the same language, not to insist on what subset of options must be supported. At the moment, we only support a USI-based query. We can alternatively support accession, file, scan if all provided as a trio, although we haven't hooked that up yet. I think it would also be useful to specify a peptidoform ion as a query parameter, so you could ask for all spectra corresponding to a particular ion. Although that is not yet in the spec. I think it should be eventually.

But I suppose the near term goal is to see what the various resources can easily support and compare notes.

@ypriverol
Copy link
Contributor Author

ypriverol commented Oct 30, 2019

In my opinion it can be up each individual resource what queries they can honor and which they can decline as too unconstrained. If MassIVE has an indexed set of a billion spectra and they will let users execute that query, fine. At PeptideAtlas, we will likely return an error that an unconstrained query is not supported. My main interest is we're all using the same language, not to insist on what subset of options must be supported. At the moment, we only support a USI-based query. We can alternatively support accession, file, scan if all provided as a trio, although we haven't hooked that up yet. I think it would also be useful to specify a peptidoform ion as a query parameter, so you could ask for all spectra corresponding to a particular ion. Although that is not yet in the spec. I think it should be eventually.

Ok, we just need to make sure that even if a parameter or query is possible by definition, then the specific implementation can reply no implemented error code as we defined for the things that the specific service do not support.

But I suppose the near term goal is to see what the various resources can easily support and compare notes.

Agree

@chambm
Copy link

chambm commented Dec 6, 2019

I think the schema should mandate that implementers support a subset of filters, and optionally support more advanced ones. There should also be a mandatory endpoint for returning which filter combinations are supported, so that clients don't have to blunder around trying different filters like I just did 30 minutes ago trying to figure out what was supported (apparently nobody supports retrieving by accession only right now). Beyond that, I propose that implementers should have to support returning USI spectra individually. And perhap they should also have to support returning entire datasets by accession (probably not supporting it with JSON but some binary serialization or even just sending a list of URLs of files to download). Having a common language for requesting an entire dataset seems very useful to me.

Returning all spectra for a particular ion should be under the /psms endpoint, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This issue is related with the documentation or repository structure enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants