Comments (2)
I need to think about this a bit more. I like the idea, but need to overthink the implications.
from scholia.
I also overthought again about it, and here is what came to my mind (WIP):
So keeping the same table but with an additional column, being "stereoisomer, isotopomer, etc." based on the matching layers:
PREFIX target: <http://www.wikidata.org/entity/Q41576>
# title: related chemical structures
SELECT ?mol ?molLabel ?InChI ?InChIKey ?CAS ?ChemSpider ?PubChem_CID ?layer_b ?layer_t ?layer_m ?layer_s WITH {
SELECT ?queryKey ?srsearch ?filter WHERE {
target: wdt:P235 ?queryKey .
BIND(CONCAT(SUBSTR($queryKey,1,14), " haswbstatement:P235") AS ?srsearch)
BIND(CONCAT("^", SUBSTR($queryKey,1,14)) AS ?filter)
}
} AS %MOLS WITH {
SELECT ?mol ?InChIKey WHERE {
INCLUDE %MOLS
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org";
wikibase:api "Search";
mwapi:srsearch ?srsearch;
mwapi:srlimit "max".
?mol wikibase:apiOutputItem mwapi:title.
}
?mol wdt:P235 ?InChIKey .
FILTER (REGEX(STR(?InChIKey), ?filter))
FILTER (?InChIKey != ?queryKey)
}
} AS %MOLS2 {
INCLUDE %MOLS2
?mol wdt:P234 ?InChI .
# WIP
BIND(REPLACE(?InChI, "/{0}.*?/b", "/") AS ?layer_b)
BIND(REPLACE(?InChI, "/{0}.*?/t", "/") AS ?layer_t)
BIND(REPLACE(?InChI, "/{0}.*?/m", "/") AS ?layer_m)
BIND(REPLACE(?InChI, "/{0}.*?/s", "/") AS ?layer_s)
OPTIONAL { ?mol wdt:P231 ?CAS }
OPTIONAL { ?mol wdt:P661 ?ChemSpider }
OPTIONAL { ?mol wdt:P662 ?PubChem_CID }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
from scholia.
Related Issues (20)
- Page down arrow does not work in the upper right search field nor the main search field
- book chapter is treated as a topic (was expecting a work) HOT 1
- Wrong volume and pages when creating item from DOI HOT 2
- id-to-quickstatements crashes with specific query
- doctest fails in doi module for get_doi_metadata
- Wrong DOI generated with no uppercasing of letters HOT 1
- New DOI extractor does not match at least journal and volume and possibly more.
- DOI is not generated for arXiv identifer HOT 1
- ORCID not added in DOI generation
- Added acceptance and participants information to event HOT 1
- ArXiv DOIs not identified.
- Triple definition of paper-to-quickstatements
- New identifier to Quickstatements does not extract DOIs with %2F
- "get_doi_metadata is too complex (19)"
- A number of participants and acceptance rate to event series
- Inputting string with many identifiers overload the identifier-to-quickstatemnets tool
- Add missing links to softwares in the curation tab HOT 1
- Current chemical class hierarchy looks cluttered
- Patch broke display of results HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scholia.