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

Add more CMS provider for SMILES #932

Merged

Conversation

NishaSharma14
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Patch coverage is 100.00% of modified lines.

Files Changed Coverage
src/bioregistry/version.py 100.00%

📢 Thoughts on this report? Let us know!.

@@ -91098,7 +91098,7 @@
"description": "Convert SMILES to various molecular formats using different toolkits.",
"homepage": "https://api.naturalproducts.net/latest/docs#/convert/SMILES_convert_to_Formats_convert_formats_get",
"name": "Convert SMILES to various molecular formats via the Cheminformatics Microservice",
"uri_format": "https://api.naturalproducts.net/latest/convert/formats?smiles=$1&toolkit=cdk"
"uri_format": "https://api.naturalproducts.net/latest/convert/formats?smiles=$1&toolkit=$2"
Copy link
Member

Choose a reason for hiding this comment

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

The Bioregistry doesn't currently support this kind of syntax with multiple placeholders, but this is something we could consider in the future if you make an issue about it

Copy link
Member

Choose a reason for hiding this comment

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

I formalized this curation guideline in a unit test in 41ef3b1 so we are reminded by CI to address this before finishing the PR

"description": "Generate SMILES from a given IUPAC name or a SELFIES representation.",
"homepage": "https://api.naturalproducts.net/latest/docs#/convert/IUPACname_or_SELFIES_to_SMILES_convert_smiles_get",
"name": "Generate SMILES via the Cheminformatics Microservice",
"uri_format": "https://api.naturalproducts.net/latest/convert/smiles?input_text=$1&representation=iupac"
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't make sense since the $1 doesn't represent a SMILES string but rather free text. please delete this one

"uri_format": "https://api.naturalproducts.net/latest/convert/mol2D?smiles=$1&toolkit=$2"
},
{
"code": "cms.convertMol3D",
Copy link
Member

Choose a reason for hiding this comment

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

we need to keep all codes lowercase. maybe we can use snake_case to separate words instead. Also, convert doesn't imply direction, so maybe cms.to_mol3d or even cms.mol3d would be better

better to put as little information in the URI as possible that can be passed separately as parameters
@NishaSharma14
Copy link
Contributor Author

Thanks @cthoyt for your review.
Is there anything you are still waiting from my end to merge this PR?

@cthoyt
Copy link
Member

cthoyt commented Sep 4, 2023

@NishaSharma14 nope, just wanted you to review my changes before merging

@NishaSharma14
Copy link
Contributor Author

@NishaSharma14 nope, just wanted you to review my changes before merging

Looks good to me.

@cthoyt cthoyt merged commit 7e0acf7 into biopragmatics:main Sep 4, 2023
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.

2 participants