tseemann / nullarbor

:floppy_disk: :page_with_curl: "Reads to report" for public health and clinical microbiology
GNU General Public License v2.0
134 stars 37 forks source link

Could not find 'trimmomatic' #218

Closed Munnj90 closed 5 years ago

Munnj90 commented 5 years ago

Hi there,

I'm having the same issue as: https://github.com/tseemann/nullarbor/issues/177

Sorry for any duplicated comment, i commented in 177 as well but wasn't sure if it being closed would prevent notifications.

I've installed trimmomatic with homebrew and its in my path (i can run trimmomatic).

ubuntu@munnj90:~$ sudo./nullarbor/bin/nullarbor.pl --check [10:53:19] Hello root [10:53:19] This is nullarbor.pl 2.0.20181010 [10:53:19] Send complaints to Torsten Seemann [10:53:20] Found Perl module: Bio::SeqIO [10:53:20] Found Perl module: Cwd [10:53:20] Found Perl module: Sys::Hostname [10:53:20] Found Perl module: Time::Piece [10:53:20] Found Perl module: List::Util [10:53:20] Found Perl module: YAML::Tiny [10:53:20] Found Perl module: Moo [10:53:20] Found Perl module: Path::Tiny [10:53:20] Found Perl module: File::Copy [10:53:20] Found Perl module: File::Spec [10:53:20] Found Perl module: File::Path [10:53:20] Found Perl module: Data::Dumper [10:53:20] Found Perl module: Term::ANSIColor [10:53:20] Found Perl module: SVG [10:53:20] Found Perl module: Text::CSV [10:53:20] Found Perl module: List::MoreUtils [10:53:20] Found Perl module: IO::File [10:53:20] Found 'head' => /usr/bin/head [10:53:20] Found 'cat' => /bin/cat [10:53:20] Found 'install' => /usr/bin/install [10:53:20] Found 'env' => /usr/bin/env [10:53:20] Found 'nl' => /usr/bin/nl [10:53:20] Found 'grep' => /bin/grep [10:53:20] Found 'touch' => /usr/bin/touch [10:53:20] Found 'seqtk' => /usr/bin/seqtk [10:53:20] ERROR: Could not find 'trimmomatic'. Please install it and ensure it is in the PATH. ubuntu@munnj90:~$trimmomatic Usage: PE [-version] [-threads ] [-phred33|-phred64] [-trimlog ] [-summary ] [-quiet] [-validatePairs] [-basein | ] [-baseout | ] ... or: SE [-version] [-threads ] [-phred33|-phred64] [-trimlog ] [-summary ] [-quiet] ... or: -version ubuntu@munnj90:~$

Any help would be appreciated!

tseemann commented 5 years ago

What does trimmomatic -version say?

(Upgrading to 0.38 might help)

Munnj90 commented 5 years ago

Version = 0.38

Munnj90 commented 5 years ago

Thanks Torsten, resolved the issue with some help (followed the miniconda guide).

I mention this in regards to the install guide, when i downloaded kraken, i noticed the extracted folder is dated 20171013 instead of 20171019 - even though the original file is minikraken_20171019_4GB.tgz

Best wishes, John.

tseemann commented 5 years ago

Thx for letting me know.

quocviet0908 commented 5 years ago

Hello Munnji90, Sorry for digging this up but could you please guide me how to deal with the missing trimmomatic problem? I installed the trimmomatic throught both conda and apt-get but trimmomatic command still not found.

Thanks, Viet.

Edit: I tried to use the symbolic link method and it seems the installation goes fine so far.

Munnj90 commented 5 years ago

Morning Viet,

Sorry for the late response, do you have it working now?

Best, John.

quocviet0908 commented 5 years ago

Morning Viet,

Sorry for the late response, do you have it working now?

Best, John.

Hi Munnj90, I'm still unable to make it work. Could you please help me with the installation using miniconda guide that you did? Much appreciate.

Munnj90 commented 5 years ago

No worries,

So i ended up not individually installing trimmomatic but as part of the Nullarbor pipeline install. Credit goes out to those that helped me get to this point (i don't want to name drop without their permission). One caveat here: this was carried out on CLIMB rather than my local device so comes with a range of preinstalled utilities.

Finally, if you are running on CLIMB etc., remember to re-login etc. when you restart.

These notes were written up for students so apologies if i'm stating the obvious.

setup:

wget "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
bash Miniconda3-latest-Linux-x86_64.sh

Restart terminal and re-login

conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda install -c bioconda -c conda-forge nullarbor
wget https://ccb.jhu.edu/software/kraken/dl/minikraken_20171019_4GB.tgz
tar -C $HOME -zxvf minikraken_20171019_4GB.tgz
wget ftp://ftp.ccb.jhu.edu/pub/infphilo/centrifuge/data/p_compressed+h+v.tar.gz
mkdir $HOME/centrifuge-db
tar -C $HOME/centrifuge-db -zxvf p_compressed+h+v.tar.gz
echo "export KRAKEN_DEFAULT_DB=$HOME/minikraken_20171013_4GB" >> ~/.profile
echo "export CENTRIFUGE_DEFAULT_DB=$HOME/centrifuge-db/p_compressed+h+v" >> ~/.profile

Close and open your terminal tab again, log in and type:

nullarbor.pl --check

The final two lines that show up should be like this:

[12:37:34] All nullarbor.pl 2.0.20181010 dependencies are installed. [12:37:34] You deserve a medal!

Ready to run Nullarbor.

jb2cool commented 5 years ago

Editing your .profile couple be simplified so that it's more copy/paste friendly and require less interaction. Instead of going into vim and then copy/pasting the lines you could instead add this to your instructions, this will append the .profile file with the two lines you want to add.

echo "export KRAKEN_DEFAULT_DB=$HOME/minikraken_20171013_4GB" >> ~/.profile echo "export CENTRIFUGE_DEFAULT_DB=$HOME/centrifuge-db/p_compressed+h+v" >> ~/.profile

Once you've done this you can think of wrapping this up in a script so you just download the script, run it and it'll do everything for you.

Munnj90 commented 5 years ago

Thanks Jason, I'll do that - slowly picking this stuff up as I go and thats a great suggestion!

The above will be edited to reflect this advice (minus the scripting for now...).

tseemann commented 5 years ago

The core instructions are here: https://bioconda.github.io/user/install.html

Then just create a new environment:

conda create -n nullarbor_env nullarbor
conda activate nullarbor_env

You don't need the -c options in your conda install because you've already setup the correct channles, and they are in the correct order (which is very important!).

tseemann commented 5 years ago

I should incorporate the instructions you have above for the database downloading, thank you for pasting them here @Munnj90

quocviet0908 commented 5 years ago

Dear Munnj90 and jb2cool, I managed to get all the required dependencies, but unfortunately I got stuck again with Bio::Roary problem. I'm trying to install it with cpan and cpanminus but no luck so far. I will let you know if I can make it work.

Thanks all for your help.