Skip to content

Commit

Permalink
Merge pull request #15 from michaelwenk/filter-data-by-ppm
Browse files Browse the repository at this point in the history
chore: enable stereo information in spectral knowlegde base & filter data by ppm
  • Loading branch information
Michael Wenk authored Jun 22, 2023
2 parents c166a3c + c3a10c9 commit 812a58b
Show file tree
Hide file tree
Showing 15 changed files with 726 additions and 518 deletions.
118 changes: 0 additions & 118 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,121 +61,3 @@ If the removal of the network created by docker-compose is desired, then use the

docker-compose -f docker-compose.yml -f docker-compose.publish.yml down

<!---
## Self Compilation and Dependencies
### Compilation
CASEkit (https://github.com/michaelwenk/casekit) has to be downloaded and compiled beforehand.
Now add the jar file to the local Maven repository by following command:
(note: replace "PATH/TO/CASEKIT-JAR-WITH-DEPENDENCIES" by the path to previously built CASEkit jar):
mvn install:install-file -Dfile=PATH/TO/CASEKIT-JAR-WITH-DEPENDENCIES -DgroupId=org.openscience -DartifactId=casekit -Dversion=1.0 -Dpackaging=jar
Clone this repository:
git clone https://github.com/michaelwenk/sherlock.git
Change the directory and build all the .jar files needed for this project using the build shell script:
cd sherlock
sh buildJars.sh
### Dependencies
Some services rely on specific software or file dependencies which has to be downloaded and put into certain places.
#### PyLSD
For the structure generation part PyLSD (http://eos.univ-reims.fr/LSD/JmnSoft/PyLSD/) is needed.
PyLSD can be downloaded from http://eos.univ-reims.fr/LSD/JmnSoft/PyLSD/INSTALL.html.
Extract and rename the new PyLSD folder to "PyLSD", if needed.
Now put the PyLSD folder into
backend/sherlock-pylsd/data/lsd/
In case custom filters are desired to use one can create a folder "filters" in
backend/sherlock-pylsd/data/lsd/
and put the custom filters there. The system will use them automatically.
For more details about LSD and defining substructures and filters see http://eos.univ-reims.fr/LSD/MANUAL_ENG.html#SSTR .
#### NMRShiftDB
For the dereplication, automatic hybridization detection und chemical shift prediction via HOSE codes the NMRShiftDB (https://nmrshiftdb.nmr.uni-koeln.de) is required.
Download the "nmrshiftdb2withsignals.sd" from https://sourceforge.net/projects/nmrshiftdb2/files/data/ and copy it into
backend/sherlock-db-service-dataset/data/nmrshiftdb/
and rename the file to "nmrshiftdb.sdf".
### Docker and Application Start/Stop
This project uses Docker containers (https://www.docker.com) and starts them via docker-compose. Make sure that docker-compose is installed.
#### Build
To build the container images use the following command:
docker-compose -f docker-compose.yml -f docker-compose.production.yml build
#### Start
To start this application (in detached mode) use
docker-compose -f docker-compose.yml -f docker-compose.production.yml up -d
Note: It can take a few minutes until all services are available and registered.
#### Stop
To stop this application use
docker-compose -f docker-compose.yml -f docker-compose.production.yml down
### Docker Container and Data Preparation/Persistence
The databases for datasets and hybridizations have to be filled when starting the application the first time.
After that procedure, the container database contents are stored in the "data/db" subdirectory of each "db-instance" service.
That enables the persistence of database content to access the data whenever the database services are restarting.
#### Dataset
For dataset creation and insertion use:
curl -X POST -i 'http://localhost:8081/sherlock-db-service-dataset/replaceAll?nuclei=13C'
This will fill-in datasets with 13C spectra only. If multiple nuclei are desired,
then this could be done by adding them separated by comma, e.g. 13C, 15N:
curl -X POST -i 'http://localhost:8081/sherlock-db-service-dataset/replaceAll?nuclei=13C,15N'
One can then check the number of datasets:
curl -X GET -i 'http://localhost:8081/sherlock-db-service-dataset/count'
#### Statistics
As for datasets we need to build the hybridization and connectivity statistics and can decide which nuclei to consider:
curl -X POST -i 'http://localhost:8081/sherlock-db-service-statistics/hybridization/replaceAll?nuclei=13C'
curl -X POST -i 'http://localhost:8081/sherlock-db-service-statistics/connectivity/replaceAll?nuclei=13C'
To check the number of hybridization/connectivity entries:
curl -X GET -i 'http://localhost:8081/sherlock-db-service-statistics/hybridization/count'
curl -X GET -i 'http://localhost:8081/sherlock-db-service-statistics/connectivity/count'
#### HOSE Codes
One needs to insert the HOSE code information as well:
curl -X POST -i 'http://localhost:8081/sherlock-db-service-hosecode/replaceAll?nuclei=13C&maxSphere=6'
To check the number of HOSE code entries:
curl -X GET -i 'http://localhost:8081/sherlock-db-service-hosecode/count'
For spectra prediction a map of HOSE code and assigned statistics is needed.
Due to this one now needs to execute following command to store such map in a shared volume:
curl -X GET -i 'http://localhost:8081/sherlock-db-service-hosecode/saveAllAsMap'
-->

Loading

0 comments on commit 812a58b

Please sign in to comment.