-
Notifications
You must be signed in to change notification settings - Fork 5
08. FAQ
Running into trouble? Here's some solutions to common difficulties.
Nextflow installation should be relatively painless, but it does rely on a recent version of Java (11+). You can check which Java you're running with
$ java -version. If you need a newer version of Java, you can start by installingSDKwith the command$ curl -s "https://get.sdkman.io" | bash. Once that installation has completed and you've refreshed your terminal, you should be able to install a newer Java with SDK, e.g.$ sdk install java 17.0.6-amzn. Finally, you can download Nextflow with$ wget -qO- https://get.nextflow.io | bash, then make the binary executable with$ chmod +x nextflow. Feel free to move the nextflow file to the directory of your choice, and add it to your$PATHvariable so you can call it with$ nextflowinstead of specifying the full path name.
Memory and CPU allotment are easy to customize on a per-process basis. In your
pipesnakedirectory, openconf/base.config. Adjust the relevant parameters and save this new file (e.g.new_params.config). Once you are ready to run a new analysis, pass this new config file along to the pipeline with the-cflag, e.g.-c new_params.config. Make sure to store yournew_params.configfile somewhere safe, as it will be removed if you pull a new version of the pipeline.
By default, pipesnake will keep the output files of the following processes:
-
MERGE_TREES(in[outdir]/merge/) -
MAKE_PRG(in[outdir]/make/) -
GBLOCKS(in[outdir]/gblocks/) -
IQTREEorRAXML(in[outdir]/iqtreeor[outdir]/raxml) -
ASTER(in[outdir]/aster) -
MAFFT(in[outdir]/mafft)
If you would like to keep the files produced by other processes, you can do that in one of two ways.
(1) By specifying the process you'd like to keep with the appropriate flag set to true, e.g.
--bbmap_dedupe_keep_output true.
(2) You could do the above for all the processes, but to simplify the pipesnake command you can instead adjust the relevant parameters in the
conf/base.configfile (the same as above for memory/CPU usage). Open the file and scroll down to the the keep_output section (lines 200-229), change whichever parameters you'd like, then pass the new config file along to the pipeline with the-cflag, e.g.-c new_params.config.
Nextflow handles job submissions and supervises the running jobs. The Nextflow process must run until the pipeline is finished. The Nextflow
-bgflag launches Nextflow in the background, detached from your terminal so that the workflow does not stop if you log out of your session. The logs are saved to a file. Alternatively, you can use screen / tmux or similar tool to create a detached session which you can log back into at a later time. Some HPC setups also allow you to run nextflow within a cluster job submitted your job scheduler (from where it submits more jobs).
Weird things happen with computers. One of the first things you can try is removing the cached version of
pipesnakestored on your computer and replace it with a fresh pull from github. Start by locating and removing the cached version, it's likely in the directory~/.nextflow/assets/ausarg/pipesnake. Let's remove this whole directory for a start.
rm -rf ~/.nextflow/assets/ausarg/pipesnake
Now that we've removed the cached version, let's pull down the most recent version available.
nextflow pull ausarg/pipesnake
Hopefully that resolves your problem.
Workflows can always run into errors, so resolving them is a great skill to learn. Here are some common issues and how they can be resolved.
ERROR ~ Error executing process > 'AUSARG_PIPESNAKE:PIPESNAKE:[*INSERT_PROGRAM*] (ToyData_Sample3)'
Caused by:
Process requirement exceeds available memory -- req: 24 GB; avail: 16 GB
The above error message is a result of a disconnect between requested (24 GB) and available (16 GB) memory. This can be easily adjusted by (1) adapting the existing
conf/base.configfile to suit your machine's resources, or (2) making a newconf/[name].configfile with appropriate resources indicated.
Sometimes we get stuck where we can't run the pipeline and we can't pull down a new version. This is generally accompanied by the error message:
Checking ausarg/pipsnake ...
ausarg/pipesnake contains uncommitted changes -- cannot pull from repository
The easiest solution is to follow the instructions for removing and re-pulling
pipesnake:
rm -rf ~/.nextflow/assets/ausarg/pipesnake
Now that we've removed the cached version, let's pull down the most recent version available.
nextflow pull ausarg/pipesnake
If you're running
pipesnakeon an HPC you may have limited storage on a shared drive.pipesnakegenerates a lot of temporary files that help to provide a cache if you need to-resumea run. Unfortunately these can take up a lot of space. If you have room on another available drive, you can specify the working directory using theNextflowcommand-work-dir. We suggest testing this using the test data to make sure you've identified the correct path:
nextflow run ausarg/pipesnake -profile test,docker --outdir <PATH/TO/WDIR/RUN1> -work-dir <PATH/TO/WDIR>
Users of Apple computers with M1 and M2 silicon chips have run into issues with platform issues. If you get this error message:
The requested image’s platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
You will need to specify the pipesnake image build so it is consistent with your compute architecture. Resolving this is relatively straightforward and follows this solution found on StackOverflow. Start by removing your current pipesnake image.
rm -rf ~/.nextflow/assets/ausarg/pipesnake
You can then tell Docker which platform to use when downloading pipesnake. Open your .bashrc or .zprofile and add the following line:
export DOCKER_DEFAULT_PLATFORM=linux/amd64
Make sure to close your terminal and open another, or source your bashrc/zprofile before running again.