Skip to content

Commit d8272ea

Browse files
committed
fmt
1 parent cb783bf commit d8272ea

File tree

1 file changed

+26
-30
lines changed
  • registry/coder/modules/nextflow

1 file changed

+26
-30
lines changed

registry/coder/modules/nextflow/run.sh

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,42 @@ RESET='\033[0m'
88
printf "$${BOLD}Starting Nextflow...$${RESET}\n"
99

1010
if ! command -v nextflow > /dev/null 2>&1; then
11-
# Update system dependencies
12-
sudo apt update
13-
sudo apt install openjdk-18-jdk -y
14-
sudo apt install salmon fastqc multiqc -y
15-
16-
# Install nextflow
17-
export NXF_VER=${NEXTFLOW_VERSION}
18-
curl -s https://get.nextflow.io | bash
19-
sudo mv nextflow /usr/local/bin/
20-
sudo chmod +x /usr/local/bin/nextflow
21-
22-
# Verify installation
23-
tmp_verify=`mktemp -d coder-nextflow-XXXXXX`
24-
nextflow run hello \
25-
-with-report "$$tmp_verify/report.html" \
26-
-with-trace "$$tmp_verify/trace.txt" \
27-
-with-timeline "$$tmp_verify/timeline.html" \
28-
-with-dag "$$tmp_verify/flowchart.png"
29-
rm -f "$$tmp_verify"
11+
# Update system dependencies
12+
sudo apt update
13+
sudo apt install openjdk-18-jdk -y
14+
sudo apt install salmon fastqc multiqc -y
15+
16+
# Install nextflow
17+
export NXF_VER=${NEXTFLOW_VERSION}
18+
curl -s https://get.nextflow.io | bash
19+
sudo mv nextflow /usr/local/bin/
20+
sudo chmod +x /usr/local/bin/nextflow
21+
22+
# Verify installation
23+
tmp_verify=$(mktemp -d coder-nextflow-XXXXXX)
24+
nextflow run hello \
25+
-with-report "$$tmp_verify/report.html" \
26+
-with-trace "$$tmp_verify/trace.txt" \
27+
-with-timeline "$$tmp_verify/timeline.html" \
28+
-with-dag "$$tmp_verify/flowchart.png"
29+
rm -f "$$tmp_verify"
3030
else
31-
echo "Nextflow is already installed\n\n"
31+
echo "Nextflow is already installed\n\n"
3232
fi
3333

34-
if [ ! -z ${PROJECT_PATH} ]
35-
then
36-
# Project is located at PROJECT_PATH
37-
echo "Change directory: ${PROJECT_PATH}"
38-
cd ${PROJECT_PATH}
34+
if [ ! -z ${PROJECT_PATH} ]; then
35+
# Project is located at PROJECT_PATH
36+
echo "Change directory: ${PROJECT_PATH}"
37+
cd ${PROJECT_PATH}
3938
fi
4039

4140
# Start a web server to preview reports
4241
mkdir -p ${HTTP_SERVER_REPORTS_DIR}
4342
python3 -m http.server --directory ${HTTP_SERVER_REPORTS_DIR} ${HTTP_SERVER_PORT}
4443

4544
# Stub run?
46-
if [ "${STUB_RUN}" = "true" ]
47-
then
48-
nextflow ${STUB_RUN_COMMAND} -stub-run
45+
if [ "${STUB_RUN}" = "true" ]; then
46+
nextflow ${STUB_RUN_COMMAND} -stub-run
4947
fi
5048

5149
printf "\n$${BOLD}Nextflow ${NEXTFLOW_VERSION} is ready. HTTP server is listening on port ${HTTP_SERVER_PORT}$${RESET}\n"
52-
53-

0 commit comments

Comments
 (0)