This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to put CutAdapt in path for running TrimGalore?

I have installed TrimGalore and Cutadapt for Mac OSX but when I try to run TrimGalore I always get the error message:

Failed to execute Cutadapt porperly. Please install Cutadapt first and make sure it is in the PATH, or specify the path to the Cutadapt executable using --path_to_cutadapt /path/to/cutadapt

I know that I have installed cutadapt from following the instructions here: https://cutadapt.readthedocs.io/en/stable/installation.html#quick-installation

but how do I make sure that Cutadapt is in the path?

fastqc trimgalore cutadapt

Add the location of cutadapt directory to your $PATH by doing export PATH=$PATH:/dir_containing_cutadapt.

1 answer

I'd suggest the simplest is to make the Cutadapt path globally accessible by including it in your ~/.bashrc. Then TrimGalore will automatically find it within the path and run successfully.

Hope this helps!

Thank you for your help. I am awfully new to computers, do you know how I can include it in my ~/.bashrc ?

gedit ~/.bashrc

Then do what genomax suggests

I'd suggest having a look at an example here.

You may follow the steps below:

  1. Get the path of Cutadapt where it is installed by the command which cutadapt

  2. Copy the path that you get from Step1 and add it to your ~/.bashrc file as

    export PATH=$PATH:cutadapt_installation_path

    Replace the cutadapt_installation_path with the path you get from which cutadapt command

  3. Save the ~/.bashrc file and type source ~/.bashrc on the terminal

If cutadapt is running from any directory, then it is accessible globally.

Hope this helps!

@james is using macOS so they may not be using bash. In that case this solution would not work.

Log in to answer this question.