Question: how to run a tool (package) installed into anaconda environment ..using mac terminal
1
gravatar for Seraph
11 weeks ago by
Seraph0
Seraph0 wrote:

Hi all,

I built an environment in Anaconda..and installed a Trimmomatic package... how to launch the Trimmomatic tool using Mac terminal.. and apply the tool on fastaq file located in my local server!

tool genome • 313 views
ADD COMMENTlink modified 6 weeks ago • written 11 weeks ago by Seraph0
2

I mean how to launch the Trimmomatic tool using Mac terminal.

There is no graphical interface to launch, if that is what you are expecting.

ADD REPLYlink written 11 weeks ago by genomax87k

Actually I meant to start the tool..what command or code should I write in the terminal, after activating the environment

ADD REPLYlink written 11 weeks ago by Seraph0

You can simply go into the bin folder of your anaconda and check how exactly the tool is named.

ADD REPLYlink written 11 weeks ago by ATpoint36k
1

Have you activated the environment? Did you try to run it following the manual?

ADD REPLYlink written 11 weeks ago by Asaf8.3k

Thanks for your answer, yes I activated the environment using the code " conda activate py2" and confirmed that the Trimmomatic is presented in Py2 environment by using the code "conda list", but whats next ...how to run Trimmomatic!

ADD REPLYlink written 11 weeks ago by Seraph0

According to the manual, for single end mode; java -classpath <path to="" trimmomatic="" jar=""> org.usadellab.trimmomatic.TrimmomaticSE [- threads <threads>] [-phred33 | -phred64] [-trimlog <logfile>] <input> <output> <step 1=""> ...

Should I flow the same process even I used installation code to install Trmmomatic package, not downloaded a jar file!!

ADD REPLYlink written 11 weeks ago by Seraph0
1

After installation with conda you should just run trimmomatic rather than java -jar etc

ADD REPLYlink written 11 weeks ago by WouterDeCoster44k

ok, but what is the command (code to run) ..I followed these steps;

In terminal;

activate py3 #(which is my anaconda environment that contains trimmomatic)

after activation;

I tried;

trimmomatic 
open trimmomatic

but no code could run the tool!!!

ADD REPLYlink modified 10 weeks ago by RamRS28k • written 11 weeks ago by Seraph0

but no code could run the tool!!!

What does that mean? Which error message did you get? You will have to be more specific if you expect help. What is the output of conda list?

ADD REPLYlink written 11 weeks ago by WouterDeCoster44k

Hi, sorry for being unspecific ...Trimmomatic is shown in the conda list output, which confirmed that I have Trimmomatic in my environment.

run Trimmomatic showed me this output;

Usage: 
       PE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-summary <statsSummaryFile>] [-quiet] [-validatePairs] [-basein <inputBase> | <inputFile1> <inputFile2>] [-baseout <outputBase> | <outputFile1P> <outputFile1U> <outputFile2P> <outputFile2U>] <trimmer1>...
   or: 
       SE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-summary <statsSummaryFile>] [-quiet] <inputFile> <outputFile> <trimmer1>...

So I think I need to go through the trimmomatic guide to more understand these terms.

Thanks

ADD REPLYlink modified 10 weeks ago by RamRS28k • written 11 weeks ago by Seraph0
3

What you are looking at is in-line help that trimmomatic provides. It is giving you a clue as to what you minimally need in your command line. Generally things in <> are optional. Here is an example of what a real command looks like:

trimmomatic PE -threads 4 SRR_1056_1.fastq SRR_1056_2.fastq  \
              SRR_1056_1.trimmed.fastq SRR_1056_1un.trimmed.fastq \
              SRR_1056_2.trimmed.fastq SRR_1056_2un.trimmed.fastq \
              ILLUMINACLIP:adapters.fa SLIDINGWINDOW:4:20

\ in command line is used to wrap the command on multiple lines. That is not necessary when you type the command out. This example is for paired-end data. If you have single-end reads then things would change some.

trimmomatic SE -threads 4 SRR_1056.fastq \
              SRR_1056.trimmed.fastq SRR_1056_un.trimmed.fastq \
              ILLUMINACLIP:SRR_adapters.fa SLIDINGWINDOW:4:20
ADD REPLYlink modified 11 weeks ago • written 11 weeks ago by genomax87k

thanks for your explanation

ADD REPLYlink written 11 weeks ago by Seraph0

Hi genomax,

I activated my python-based environment in mac terminal. And using the Trimmomatic code:

trimmomatic PE -threads 4 SRR_292770_1.fastq SRR_292770_2.fastq \ SRR_292770_1.trimmed.fastq SRR_292770_1un.trimmed.fastq \ SRR_292770_2.trimmed.fastq SRR_292770_2un.trimmed.fastq \ ILLUMINACLIP:adapters.fa SLIDINGWINDOW:4:20

showed me this error; ^ SyntaxError: invalid syntax

I wonder where is the problem!!

ADD REPLYlink modified 6 weeks ago • written 6 weeks ago by Seraph0
1

Make sure you are using proper hypens and underscores. macOS has something called smartquotes and dashes. Turn them off under System pref -> Keyboard -> text and then re-type the command and see if that helps. Your command looks good otherwise.

ADD REPLYlink modified 6 weeks ago • written 6 weeks ago by genomax87k
2

So I think I need to go through the trimmomatic guide to more understand these terms.

Yes, that's usually the best idea to start there before diving in trying out a new tool.

ADD REPLYlink modified 11 weeks ago • written 11 weeks ago by WouterDeCoster44k
1
gravatar for WouterDeCoster
11 weeks ago by
Belgium
WouterDeCoster44k wrote:

After installation with conda the executable is named trimmomatic.

ADD COMMENTlink written 11 weeks ago by WouterDeCoster44k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 682 users visited in the last hour