biotite icon indicating copy to clipboard operation
biotite copied to clipboard

RCSB API group by function

Open jlefebre opened this issue 3 years ago • 1 comments

Would it be possible to implement the group_by function of the RCSB API in the search command? This would allow for retrieval of grouped PDB IDs based on Uniprot accession or sequence similarity or, more interestingly, of one representative of each Uniprot ID. The respecitve REST API query would look something like this:

"return_type": "polymer_entity",
 "request_options": {
   "group_by_return_type": "groups",
   "group_by": {
     "aggregation_method": "matching_uniprot_accession",
     "ranking_criteria_type": {
       "sort_by": "rcsb_entry_info.resolution_combined",
       "direction": "asc"

jlefebre avatar Jul 23 '22 09:07 jlefebre

Hi, this sounds like a useful functionality to have. I think at least for "group_by_return_type" : "representatives", this is easy to integrate into the existing search() function, since the type of the return value does not change.

padix-key avatar Jul 23 '22 11:07 padix-key

Are there any updates on this issue? Thanks. @padix-key

alirezaomidi avatar Mar 07 '23 20:03 alirezaomidi

Not yet. Since there seems to be some need for this feature, I would implement it in the upcoming week.

padix-key avatar Mar 08 '23 10:03 padix-key