Last active
January 31, 2019 03:46
-
-
Save mpkocher/65738463731fe802fb92bd2b6b55d5cf to your computer and use it in GitHub Desktop.
Setup SMRTLink Dev ENV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
#set -o | |
# This is the new >= 4.1.0 config setup | |
source /mnt/software/Modules/current/init/bash | |
module load jq | |
module load jdk/1.8.0_71 | |
# Sets up SMRT Link System ENV | |
default="smrtlink-bihourly" | |
export PB_SYSTEM=${1:-"$default"} | |
export PB_SMRT_ROOT=/pbi/dept/secondary/siv/smrtlink/${PB_SYSTEM}/smrtsuite | |
export PB_USER_DATA=${PB_SMRT_ROOT}/userdata | |
export PB_SLAG_ROOT=${PB_SMRT_ROOT}/current/bundles/smrtlink-analysisservices-gui/current/private/pacbio/smrtlink-analysisservices-gui | |
export PB_CONFIG_JSON=${PB_USER_DATA}/config/smrtlink-system-config.json | |
# This are useful for pbservice to not have to explicitly pass --port and --host | |
export PB_SERVICE_HOST=$(cat ${PB_CONFIG_JSON} | jq --raw-output ' .smrtflow.server.dnsName') | |
export PB_SERVICE_PORT=$(cat ${PB_CONFIG_JSON} | jq --raw-output ' .smrtflow.server.port') | |
export PB_SERVICE_LOG_DIR=$(cat ${PB_CONFIG_JSON} | jq --raw-output '.pacBioSystem.logDir') | |
function smrtlink_server_log() { | |
echo ${PB_SERVICE_LOG_DIR}/secondary-smrt-server.log | |
} | |
function smrtlink_server_summary() { | |
echo "SMRT Link Config Summary" | |
echo "System ${PB_SYSTEM}" | |
echo "Server Config.json ${PB_CONFIG_JSON}" | |
echo "Jobs root ${PB_JOB_ROOT}" | |
echo "" | |
python -m json.tool ${PB_CONFIG_JSON} | |
} | |
# Customized the PATH to have extra exes in the PATH | |
# - server admin for get-status | |
# - smrtcmds/bin | |
# - Add all other tools | |
# - Admin (to start, stop, get status) | |
export PATH=${PB_SMRT_ROOT}/smrtcmds/bin:${PB_SMRT_ROOT}/current/bundles/smrttools/current/private/otherbins/all/bin:${PB_SMRT_ROOT}/current/admin/bin:${PB_SLAG_ROOT}/bin:${PB_SLAG_ROOT}/tools/bin:$PATH | |
smrtlink_server_summary | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
#set -o | |
source /mnt/software/Modules/current/init/bash | |
module load jq | |
# Sets up SMRT Link System ENV | |
default="smrtlink-beta" | |
export PB_SYSTEM=${1:-"$default"} | |
export PB_SMRT_ROOT=/pbi/dept/secondary/siv/smrtlink/${PB_SYSTEM}/smrtsuite | |
export PB_USER_DATA=${PB_SMRT_ROOT}/userdata | |
export PB_CONFIG_JSON=${PB_USER_DATA}/config/config.json | |
# This are useful for pbservice to not have to explicitly pass --port and --host | |
export PB_SERVICE_HOST=$(cat ${PB_CONFIG_JSON} | jq --raw-output ' .HOST') | |
export PB_SERVICE_PORT=$(cat ${PB_CONFIG_JSON} | jq --raw-output ' .PB_SERVICES_ANALYSIS_PORT') | |
function smrtlink_server_log() { | |
local logDir=$(cat ${PB_CONFIG_JSON} | jq --raw-output ' .PB_LOG_DIR') | |
echo ${logDir}/secondary-smrt-server.log | |
} | |
function smrtlink_server_summary() { | |
echo "SMRT Link Config Summary" | |
echo "System ${PB_SYSTEM}" | |
echo "Server Config.json ${PB_CONFIG_JSON}" | |
echo "Jobs root ${PB_JOB_ROOT}" | |
echo "" | |
python -m json.tool ${PB_CONFIG_JSON} | |
} | |
# Customized the PATH to have extra exes in the PATH | |
# - server admin for get-status | |
# - smrtcmds/bin | |
# - Add all other tools | |
# - Admin (to start, stop, get status) | |
export PATH=${PB_SMRT_ROOT}/smrtcmds/bin:${PB_SMRT_ROOT}/current/bundles/smrttools/current/private/otherbins/all/bin:${PB_SMRT_ROOT}/current/admin/bin:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment