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

Return structural variants by ID in Variation/VEP endpoints #603

Merged
merged 5 commits into from
Nov 3, 2023

Conversation

nuno-agostinho
Copy link
Contributor

@nuno-agostinho nuno-agostinho commented Aug 17, 2023

Description

ENSVAR-5793: Return structural variants (SVs) by their ID when using Variation/VEP endpoints.

The information displayed for SVs is based on their Ensembl Variation page: for instance, esv1815690

Requires Ensembl/ensembl-variation#1029.

Use case

Users request that these endpoints return SVs (e.g., esv1815690). Currently, they only return non-SVs (e.g., rs699).

Possible Drawbacks

If all IDs are non-SVs, the code will take the same time as before; otherwise, the code looks for the mismatched IDs in the SV table.

Also, some SVs may hit the memory limit, such as in the case of nsv3901821, and return an error message: ERROR: Cannot allocate memory.

Testing

Unit tests added (but failing because they require Ensembl/ensembl-variation#1029).

Some examples

# POST variation/human
curl -d '{ "ids" : ["esv1815690", "rs699", "cnvi0111251"] }' -H "Content-Type: application/json" http://wp-np2-11.ebi.ac.uk:9300/variation/human

# POST vep/human/id
curl -d '{ "ids" : ["esv1815690", "rs699", "cnvi0111251"] }' -H "Content-Type: application/json" http://wp-np2-11.ebi.ac.uk:9300/vep/human/id

Documentation changes

Check the following documentation updates in my sandbox:

Changelog

[/variation/:species/id] Return structural variants by their ID
[/variation/:species] Return structural variants by their ID
[/vep/:species/id] Return structural variants by their ID
[/vep/:species] Return structural variants by their ID

@nuno-agostinho nuno-agostinho marked this pull request as ready for review August 31, 2023 09:50
@dglemos
Copy link
Contributor

dglemos commented Sep 19, 2023

The documentation specifies which type of ID is supported: http://rest.ensembl.org/documentation/info/vep_id_get
Maybe you could update the docs to make it clear SV IDs are also supported.

@nuno-agostinho
Copy link
Contributor Author

nuno-agostinho commented Sep 19, 2023

@nwillhoft
Copy link
Contributor

Hi @nuno-agostinho, please could I check if this is for Release 111 or 112? Thanks!

@nuno-agostinho
Copy link
Contributor Author

nuno-agostinho commented Sep 20, 2023

Hi @nwillhoft, this is for 112, so no need to rush. Still waiting for an approval from @dglemos. Thanks for asking!

Copy link
Contributor

@nwillhoft nwillhoft left a comment

Choose a reason for hiding this comment

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

Approving PR based on code review carried out by Variation team.

@nwillhoft nwillhoft merged commit f5201ad into Ensembl:main Nov 3, 2023
1 check failed
@nuno-agostinho nuno-agostinho deleted the add/sv-id branch November 16, 2023 13:11
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