Skip to content

Annotations endpoints#26

Open
Fabian-RY wants to merge 31 commits into3dbionotes-community:developmentfrom
Fabian-RY:ENSEMBL_annotations
Open

Annotations endpoints#26
Fabian-RY wants to merge 31 commits into3dbionotes-community:developmentfrom
Fabian-RY:ENSEMBL_annotations

Conversation

@Fabian-RY
Copy link
Copy Markdown

This pull request adds the first 2 API endpoints for BWS from the annotation endpoints:

  • SMART annotation
  • ENSEMBL annotation: this also stablish the models and endpoint for the ENSEMBL variant endpoint, which is expected to be ready and tested soon.

They can be tested at:
$(url)/api/annotations/smart/Uniprot/
$(url)/api/annotations/ensembl/annotations/

@adrianq adrianq requested review from p3rcypj June 26, 2025 10:10
@adrianq
Copy link
Copy Markdown
Contributor

adrianq commented Jun 26, 2025

@Fabian-RY Can you point this PR to the development branch?

@Fabian-RY Fabian-RY changed the base branch from master to development June 26, 2025 10:25
@Fabian-RY
Copy link
Copy Markdown
Author

Done @adrianq

@p3rcypj
Copy link
Copy Markdown
Contributor

p3rcypj commented Jul 14, 2025

Hi @Fabian-RY, I've been reviewing the PR, but at first glance I can't get Django to run — I'm getting the following error:
ImportError: cannot import name 'source_pfam' from 'api.annotations' (/app/api/annotations/init.py).
It seems like there might be some missing files that haven't been committed...?

I also noticed that the migrations/ folder was in the .gitignore. I hadn't realized that detail.
Could you include them?

Thanks a lot!

@Fabian-RY
Copy link
Copy Markdown
Author

Hi @p3rcypj Done. It seems that I forgot to add it to the commit originally (but of course, it was on my filesystem so i didn't see the error). My fault.

Migrations are also added in the last commit

I've added the files and also all the last changes I made since I opened this pull requests from the last report. This include testing and some other endpoints I'm testing. I have yet to finish some of the tests, though.

@Fabian-RY Fabian-RY changed the title Ensembl and SMART annotations endpoints Annotations endpoints Jul 14, 2025
@p3rcypj
Copy link
Copy Markdown
Contributor

p3rcypj commented Jul 14, 2025

No worries! Thanks @Fabian-RY!

Copy link
Copy Markdown
Contributor

@p3rcypj p3rcypj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Fabian-RY for your hard work! I've tested all endpoints functionally after your commit, and here are some things that I notice:

  • PFAM: has an extra [ ] on root level, using a protein id that is not in DB returns an HTML
  • SMART: consistency -> when an invalid protein id like 'c', it returns { } while on production we return [ ]
  • PDB_REDO: has an extra [ ] on root level
  • Phosphosite: has an extra [ ] on root level
  • IEDB: void, logic not done
  • dbptm: has an extra [ ] on root level
  • biomuta: has an extra [ ] on root level, it has /dbptm/ prefix before /biomuta/, invalid protein like 'c' returns and error but with message <built-in function ids>...
  • dsysmap: has an extra [ ] on root level
  • elmdb: void. Is pointing to dsysmap
  • ensembl: repeated endpoints with /ENSEMBL/
  • lengths: has an extra [ ] on root level, and it's a number -> so answering like { length: 0 } would be more appropiate, if an invalid protein is requested it returns [ 82 ] which is kind of weird... but also happens in production so (but with [ 70 ])... whatever -> likewise could you check why is this happening? <- also it uses BLAST @adrianq
  • multi: Django error
  • ENSEMBL annotation: it gives error DB all the time, and also the response is the one given by variation
  • ENSEMBL variation: has an extra [ ] on root level, it gives the answer that should be in annotation

Thanks!

@Fabian-RY
Copy link
Copy Markdown
Author

I've made a push with several commits fixing as many as your comments as possible. I checked them individually.
I have yet to remove the root extra [], which django creates it due to the fact that a query may have different hits in the db, and each element correspond to a query result. Should proteins ID should be unique in each table? That assumption may change how to focus on that.

Regardless of that, I'll look again at the rest. Maybe I missed still something. Also, note that in ELMD sql insert queries, the "data" element (a list) ended with "\n" which was a source of problems for django, as it could not parse it correctly.

@Fabian-RY
Copy link
Copy Markdown
Author

Fabian-RY commented Jul 24, 2025

Also, I think the db have the annotation and variation of ENSEMBL swapped. The content itself, and I looked the sql and it is swapped, probably when I adapted the statements to the new table name convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants