Last active
February 20, 2024 10:20
-
-
Save colindaven/27f49a8e79fa384499c5f81b2fa888de to your computer and use it in GitHub Desktop.
Using Nextflow in Galaxy
This file contains 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
# Using Nextflow in Galaxy | |
* Nextflow is the workflow management tool used widely in bioinformatics | |
* Galaxy is a server based GUI tool with a nice interface and is also used to start workflows | |
## Can it be done ? | |
* There are few reports online, but it is possible. eg https://galaxyproject.org/blog/2022-08-15-making-nextflow-work-with-galaxy-at-cfsan-fda/ | |
* The main requirements: | |
* a) install Nextflow using a direct JAR download, not via conda. This may be because it collides with the internal Galaxy conda environments | |
* b) Output files directly to the Galaxy tool output dir directory. | |
An install script for getting the nextflow.jar file | |
``` | |
#!/bin/bash | |
source /etc/profile | |
set -e | |
# Download nextflow jar directly - no conda needed | |
wget -q -c -nc https://github.com/nextflow-io/nextflow/releases/download/v23.04.2/nextflow-23.04.2-all | |
mv nextflow-23.04.2-all nextflow | |
chmod a+x nextflow* | |
echo Done | |
``` | |
Then if you use a shell script to start your nextflow tool, you need to set up a system Java installation and tell bash where to find it. | |
This is just an example | |
run.sh script | |
``` | |
#!/bin/bash | |
set -e | |
# Setup java env - in MO for omics user | |
unset JAVA_HOME | |
unset _JAVA_OPTIONS | |
unset JAVA_OPTIONS | |
export JAVA_HOME=/path/to/software/java/jdk/jdk-16/ | |
# Run nextflow - note that nextflow is a self contained ca 95 MB JAR file | |
/path/to/nextflow run pipelein.nf -dsl2 -c $src/src/nextflow_large.config --ref_fasta $ref --outdir $output -with-timeline -with-report -with-dag EDTA_flowchart.dot -resume | |
``` | |
Now you should be able to set up Galaxy using the tool xml to run the `run.sh` script here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment