This microservice is based on Quarkus (version 1.4.2).
It can be used for querying gene information in JSON format.
Currently, it holds gene information for Tribolium castaneum and Drosophila melanogaster.
## Running the application in dev mode
## Running the application in dev mode
The easiest way to use the application is by starting it in dev mode:
```
```
./mvnw quarkus:dev
./mvnw quarkus:dev
```
```
## Querying the Service
Once the service is running, gene information can be queried using cURL like this:
## Packaging and containerizing
```
curl -X GET "http://localhost:8080/geneinfo/current/v1/DATABASE/ID"
The application can be packaged and containerized by one command (docker required)
```
where DATABASE is either `tribolium` or `flybase` and ID is the gene identifier.
Gene identifiers can be in TC format (e.g. `TC016101`) or in FBgn format (e.g. `FBgn0010400`).
Replacing ID with `identifiers` returns a list of all gene IDs for the specific database.
Multiple genes can be queried with comma-separated requests:
```
```
curl -X GET "http://localhost:8080/geneinfo/current/v1/id?=TC016101,TC016102,FBgn10400"
./mvnw package
```
```
## Packaging and running the application
The application can be packaged using `./mvnw package`.
It produces the `geneinfoservice_new-1.0-SNAPSHOT-runner.jar` file in the `/target` directory.
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/lib` directory.
The application is now runnable using `java -jar target/geneinfoservice_new-1.0-SNAPSHOT-runner.jar`.
## Creating a native executable
You can create a native executable using: `./mvnw package -Pnative`.
Or, if you don't have GraalVM installed, you can run the native executable build in a container using: `./mvnw package -Pnative -Dquarkus.native.container-build=true`.
You can then execute your native executable with: `./target/geneinfoservice_new-1.0-SNAPSHOT-runner`
If you want to learn more about building native executables, please consult https://quarkus.io/guides/building-native-image.