Make research tool as a service.
Many tools are used in the research, but located in each computer. e.g. xps to pdf, convert rnaseq results to a report etc.
Why can't we do all these things in one place? TService is the answer.
{:port 8089
;; when :nrepl-port is set the application starts the nREPL server on load
:nrepl-port 7000
;; :database-url "postgresql://localhost:5432/tservice_dev?user=postgres&password=password"
:database-url "jdbc:sqlite:./tservice/tservice_dev.db"
:external-bin "/Users/choppy/Documents/Code/ClinicoOmics/ReportEngine/tservice-plugins/external:/Users/choppy/miniconda3/envs/multiqc/bin"
:tservice-workdir "./tservice"
:tservice-plugin-path "./tservice/"
:tservice-run-mode "dev"
:fs-services [{:fs-service "minio"
:fs-endpoint "http://localhost:9000"
:fs-access-key "XXXXXXXXXXXX"
:fs-secret-key "XXXXXXXXXXXX"
:fs-rootdir "/data/minio"}
{:fs-service "oss"
:fs-endpoint "http://oss-cn-shanghai.aliyuncs.com"
:fs-access-key "XXXXXXXXXXXX"
:fs-secret-key "XXXXXXXXXXXX"
:fs-rootdir ""}]
:default-fs-service "minio"
:tasks {:sync-reports {:cron "0 */1 * * * ?"}}}
# Port
export PORT=3000
# NREPL Port
export NREPL_PORT=7000
# Database(Support PostgreSQL, H2, SQLite)
## PostgreSQL
export DATABASE_URL="postgresql://localhost:5432/tservice_dev?user=postgres&password=password"
## H2
export DATABASE_URL="jdbc:h2:./tservice_dev.db"
## SQLite
export DATABASE_URL="jdbc:sqlite:./tservice_dev.db"
# TService Working Directory
export TSERVICE_WORKDIR=./
# TService Plugin Path
export TSERVICE_PLUGIN_PATH=./
https://github.com/clinico-omics/tservice
docker pull ghcr.io/clinico-omics/tservice:v0.3.2-9e3daa48
# TODO
You will need Leiningen 2.0 or above installed.
Clone the tservice
repo
git clone https://github.com/clinico-omics/tservice.git
cd tservice
Prepare a configuration file and save as dev-config.edn
into the tservice
directory
;; WARNING
;; The dev-config.edn file is used for local environment variables, such as database credentials.
;; This file is listed in .gitignore and will be excluded from version control by Git.
{:port 3000
;; when :nrepl-port is set the application starts the nREPL server on load
:nrepl-port 7000
:database-url "postgresql://localhost:5432/tservice_dev?user=postgres&password=password"
:external-bin "~/miniconda3/envs/multiqc/bin"
:tservice-workdir "~/Downloads/tservice"
:tservice-plugin-path "~/Downloads/tservice/"
:tservice-run-mode "dev"
:fs-services [{:fs-service "minio"
:fs-endpoint "http://10.157.72.56:9000"
:fs-access-key "test"
:fs-secret-key "4gmPNjG5JKRXXXXXuxTqO"
:fs-rootdir "/data/minio"}
{:fs-service "oss"
:fs-endpoint "http://oss-cn-shanghai.aliyuncs.com"
:fs-access-key "LTAI4Fi5MEXXXXXzhjEEF43a"
:fs-secret-key "hQhPB8tRFloXXXXXXhKv1GOLdwFVLgt"
:fs-rootdir ""}]
:default-fs-service "minio"
:tasks {:sync-reports {:cron "0 */1 * * * ?"}}}
Install PostgreSQL and create the tservice_dev
database for development
lein deps
To start a web server for the application, run:
lein run
(require '[user :as u])
(u/restart)
# TODO
info:
name: Quartet DNA-Seq Report
version: v1.0.1
description: Parse the results of the quartet-dna-qc app and generate the report.
category: Tool
home: https://github.com/clinico-omics/tservice-plugins
source: PGx
short_name: quartet-dnaseq-report
icons:
- src: ""
type: image/png
sizes: 192x192
author: Jingcheng Yang
plugin:
name: quartet-dnaseq-report
display-name: Quartet DNA-Seq Report
lazy-load: false
init:
# Unpack environment file to the directory, repository/envs/quartet-dnaseq-report
- step: unpack-env
envname: quartet-dnaseq-report
- step: load-namespace
namespace: tservice.plugins.quartet-dnaseq-report
- step: register-plugin
entrypoint: tservice.plugins.quartet-dnaseq-report/metadata
- step: init-event
entrypoint: tservice.plugins.quartet-dnaseq-report/events-init
Commit all code modifications
Give a tag for the latest commit
Build your documentation with lein codox
To publish your docs to Github Pages, run the following commands
cd docs
git add .
git commit -am "Update docs."
git push -u origin gh-pages
cd ..
make build-docker
make dev-db
Copyright © 2015-2021 Eclipse Public License 2.0
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close