Answers.Body: <p>You may try to set the correct path through the <code>infernal_dir</code> variable in <code>tRNAscan-SE.conf.src</code>. You might need to do this before the installation process.</p>
  
  <p>Original file starts with:</p>
  
  <pre><code># tRNAscan-SE 2.0 
  # Configuration File
  
  # default paths
  bin_dir: @bindir@
  lib_dir: @libdir@/tRNAscan-SE
  infernal_dir: {bin_dir}
  </code></pre>
  
  <p>Try the following:</p>
  
  <pre><code># tRNAscan-SE 2.0 
  # Configuration File
  
  # default paths
  bin_dir: @bindir@
  lib_dir: @libdir@/tRNAscan-SE
  infernal_dir: "/Users/user/anaconda/envs/python3env/bin"
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-06T15:51:45.120Z
Answers.Text: I've done what you said and it still works but how do I know it's not because my symbolic links are still active? Do you know how I can erase them?
Answers.UserDisplayName: Biomagician
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-06T16:04:08.443Z
Answers.Text: @charlesdarwin You can remove them by  (carefully) performing`sudo rm /usr/local/bin/cmsearch` and `sudo rm /usr/local/bin/cmscan`.
Answers.UserDisplayName: bli
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-06T12:34:18.763Z
Answers.LastActivityDate: 2018-07-06T12:34:18.763Z
Answers.UserDisplayName: bli
Answers.Body: <p>tRNAscan-SE 2.0 requires separate installation of Infernal 1.1.2.
  The source code and prebuilt binaries can be obtained at
  <a href="http://eddylab.org/infernal/" rel="nofollow noreferrer">http://eddylab.org/infernal/</a>.</p>
  
  <p>The installation directory of Infernal should be the same as the one
  where tRNAscan-SE 2.0 is installed.</p>
  
  <p>When install infernal, run the configure command with the option <code>--prefix &lt;your tRNAscan-SE-2.0 install path&gt;</code>.
  If you didn't add option <code>--prefix</code> when installing tRNAscan-SE-2.0, then you should install infernal without option <code>--prefix</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-03T09:44:41.867Z
Answers.LastActivityDate: 2018-09-03T15:11:06.317Z
Answers.LastEditDate: 2018-09-03T15:11:06.317Z
Answers.UserDisplayName: Nancy Liu
Answers.Body: <p><strong>A much cleaner solution is given in <a href="https://bioinformatics.stackexchange.com/a/4639/298">@bli's answer</a>.</strong></p>
  
  <hr>
  
  <p>The error message is telling you that tRNAScan-SE is looking for the <code>cmsearch</code> executable at <code>/usr/local/bin/cmsearch</code>. However, you installed it though conda which apparently placed it at <code>/Users/user/anaconda/envs/python3env/bin/cmsearch</code>.</p>
  
  <p>A simple, if not very elegant solution, would be to make a link to it:</p>
  
  <pre><code>sudo ln -s /Users/user/anaconda/envs/python3env/bin/cmsearch /usr/local/bin/
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-06T12:26:12.480Z
Answers.Text: had to do the same with cmscan and now the code is running.
Answers.UserDisplayName: Biomagician
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-06T12:26:51.003Z
Answers.Text: what does this soft link do?
Answers.UserDisplayName: Biomagician
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-06T12:37:09.790Z
Answers.Text: @charlesdarwin This enables the program to access the program from the place it looks at by default. There might be a cleaner way to do: Changing the default (see my untested answer).
Answers.UserDisplayName: bli
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-06T12:38:30.010Z
Answers.Text: @charlesdarwin as bli said, that just creates a "fake file" at `/usr/local/bin/` which points to `/Users/user/anaconda/envs/python3env/bin/cmsearch`, so that when something tries to open `/usr/local/bin/cmsearch`, it will actually run `/Users/user/anaconda/envs/python3env/bin/cmsearch`. But bli's approach of changing the configuration file is a much cleaner solution. Please use that instead.
Answers.UserDisplayName: terdon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-06T11:25:19.713Z
Answers.LastActivityDate: 2018-07-06T15:52:28.600Z
Answers.LastEditDate: 2018-07-06T15:52:28.600Z
Answers.UserDisplayName: terdon
Answers.Body: <p>An easy way to build tRNAscan and their dependencies "all Infernal packages" without confusion is to run</p>
  
  <pre><code>conda install -c bioconda trnascan-se 
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-14T06:46:41.293Z
Answers.LastActivityDate: 2018-10-14T14:02:07.053Z
Answers.LastEditDate: 2018-10-14T14:02:07.053Z
Answers.UserDisplayName: M.Bioinfo
Body: <p>I have downloaded tRNAscan-SE from <a href="http://lowelab.ucsc.edu/tRNAscan-SE/" rel="nofollow noreferrer">here</a>. After decompressing and untaring the file, I installed it using:</p>
  
  <pre><code>./configure
  make
  make install
  </code></pre>
  
  <p>When I type <code>tRNAscan-SE --help</code>, I get the help page:</p>
  
  <pre><code>tRNAscan-SE 2.0 (December 2017)
  
  FATAL: No sequence file(s) specified.
  
  Usage: tRNAscan-SE [-options] &lt;FASTA file(s)&gt;
  
    Scan a sequence file for tRNAs 
            -- default: use Infernal &amp; tRNA covariance models
               with eukaryotic sequences 
               (use -B, -A, -M, -O or -G to scan other types of sequences)
  
  Basic Options
    -E         : search for eukaryotic tRNAs (default)
    -B         : search for bacterial tRNAs
    -A         : search for archaeal tRNAs
    -M &lt;model&gt; : search for mitochondrial tRNAs
                   options: mammal, vert
    -O         : search for other organellar tRNAs
    -G         : use general tRNA model (cytoslic tRNAs from all 3 domains included)
    -L         : search using the legacy method (tRNAscan, EufindtRNA, and COVE)
                   use with -E, -B, -A, -O, or -G
    -I         : search using Infernal (default)
                   use with -E, -B, -A, -O, or -G
    -o &lt;file&gt;  : save final results in &lt;file&gt;
    -f &lt;file&gt;  : save tRNA secondary structures to &lt;file&gt;
    -m &lt;file&gt;  : save statistics summary for run in &lt;file&gt;
                 (speed, # tRNAs found in each part of search, etc)
    -H         : show both primary and secondary structure components to
                 covariance model bit scores
    -q         : quiet mode (credits &amp; run option selections suppressed)
  
    -h         : print full list (long) of available options
  </code></pre>
  
  <p>I then tried to use it with <code>tRNAscan-SE c_elegans.PRJNA13758.WS263.genomic.fa</code> but it gave the following error:</p>
  
  <p><code>FATAL: Unable to find /usr/local/bin/cmsearch executable</code></p>
  
  <p>After googling cmsearch, it seems that is is part of the <a href="http://eddylab.org/infernal/Userguide.pdf" rel="nofollow noreferrer">Infernal</a> package. So, I installed infernal with conda using <code>conda install infernal</code>. </p>
  
  <p>I pulled the help from <code>cmsearch</code> successfully:</p>
  
  <pre><code>cmsearch -h    
  # cmsearch :: search CM(s) against a sequence database
  # INFERNAL 1.1.2 (July 2016)
  # Copyright (C) 2016 Howard Hughes Medical Institute.
  # Freely distributed under a BSD open source license.
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Usage: cmsearch [options] &lt;cmfile&gt; &lt;seqdb&gt;
  
  Basic options:
    -h        : show brief help on version and usage
    -g        : configure CM for glocal alignment [default: local]
    -Z &lt;x&gt;    : set search space size in *Mb* to &lt;x&gt; for E-value calculations  (x&gt;0)
    --devhelp : show list of otherwise hidden developer/expert options
  
  Options directing output:
    -o &lt;f&gt;       : direct output to file &lt;f&gt;, not stdout
    -A &lt;f&gt;       : save multiple alignment of all significant hits to file &lt;s&gt;
    --tblout &lt;f&gt; : save parseable table of hits to file &lt;s&gt;
    --acc        : prefer accessions over names in output
    --noali      : don't output alignments, so output is smaller
    --notextw    : unlimit ASCII text output line width
    --textw &lt;n&gt;  : set max width of ASCII text output lines  [120]  (n&gt;=120)
    --verbose    : report extra information; mainly useful for debugging
  
  Options controlling reporting thresholds:
    -E &lt;x&gt; : report sequences &lt;= this E-value threshold in output  [10.0]  (x&gt;0)
    -T &lt;x&gt; : report sequences &gt;= this score threshold in output
  
  Options controlling inclusion (significance) thresholds:
    --incE &lt;x&gt; : consider sequences &lt;= this E-value threshold as significant  [0.01]
    --incT &lt;x&gt; : consider sequences &gt;= this score threshold as significant
  
  Options controlling model-specific reporting thresholds:
    --cut_ga : use CM's GA gathering cutoffs as reporting thresholds
    --cut_nc : use CM's NC noise cutoffs as reporting thresholds
    --cut_tc : use CM's TC trusted cutoffs as reporting thresholds
  
  Options controlling acceleration heuristics*:
    --max      : turn all heuristic filters off (slow)
    --nohmm    : skip all HMM filter stages, use only CM (slow)
    --mid      : skip first two HMM filter stages (SSV &amp; Vit)
    --default  : default: run search space size-dependent pipeline  [default]
    --rfam     : set heuristic filters at Rfam-level (fast)
    --hmmonly  : use HMM only, don't use a CM at all
    --FZ &lt;x&gt;   : set filters to defaults used for a search space of size &lt;x&gt; Mb
    --Fmid &lt;x&gt; : with --mid, set P-value threshold for HMM stages to &lt;x&gt;  [0.02]
  
  Other options*:
    --notrunc     : do not allow truncated hits at sequence termini
    --anytrunc    : allow full and truncated hits anywhere within sequences
    --nonull3     : turn off the NULL3 post hoc additional null model
    --mxsize &lt;x&gt;  : set max allowed alnment mx size to &lt;x&gt; Mb [df: autodetermined]
    --smxsize &lt;x&gt; : set max allowed size of search DP matrices to &lt;x&gt; Mb  [128.]
    --cyk         : use scanning CM CYK algorithm, not Inside in final stage
    --acyk        : align hits with CYK, not optimal accuracy
    --wcx &lt;x&gt;     : set W (expected max hit len) as &lt;x&gt; * cm-&gt;clen (model len)
    --toponly     : only search the top strand
    --bottomonly  : only search the bottom strand
    --tformat &lt;s&gt; : assert target &lt;seqdb&gt; is in format &lt;s&gt;: no autodetection
    --cpu &lt;n&gt;     : number of parallel CPU workers to use for multithreads
  
  *Use --devhelp to show additional expert options.
  </code></pre>
  
  <p>I tried the tRNAscan-SE command again but it failed with the same error message.</p>
  
  <p>So, tRNAscan-SE is looking for cmsearch in the wrong place. How can I make tRNAscan-SE use cmsearch successfully?</p>
  
  <p>Cheers.</p>
  
  <h3>Update</h3>
  
  <p>Forgot to tell you I am working on Mac OS X and that cmsearch is installed here:</p>
  
  <p><code>/Users/user/anaconda/envs/python3env/bin/cmsearch</code></p>
  
  <p>and my <code>python3env</code> anaconda environment is active.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-06T09:43:32.847Z
Comments.Text: Please [edit] your question and tell us i) what operating system you are using and ii) assuming it is some sort of *nix, the output of `which cmsearch`
Comments.UserDisplayName: terdon
Tags: <sequence-annotation><software-installation><trna><trnascan-se>
Title: tRNAscan-SE error: FATAL: Unable to find /usr/local/bin/cmsearch executable
ThreadText: # tRNAscan-SE error: FATAL: Unable to find /usr/local/bin/cmsearch executable
  
  (Asked by: username_0 on 2018-07-06)
  
  I have downloaded tRNAscan-SE from [here](http://lowelab.ucsc.edu/tRNAscan-SE/). After decompressing and untaring the file, I installed it using:
  
  ```
  ./configure
  make
  make install
  
  ```
  
  When I type `tRNAscan-SE --help`, I get the help page:
  
  ```
  tRNAscan-SE 2.0 (December 2017)
  
  FATAL: No sequence file(s) specified.
  
  Usage: tRNAscan-SE [-options] <FASTA file(s)>
  
    Scan a sequence file for tRNAs 
            -- default: use Infernal & tRNA covariance models
               with eukaryotic sequences 
               (use -B, -A, -M, -O or -G to scan other types of sequences)
  
  Basic Options
    -E         : search for eukaryotic tRNAs (default)
    -B         : search for bacterial tRNAs
    -A         : search for archaeal tRNAs
    -M <model> : search for mitochondrial tRNAs
                   options: mammal, vert
    -O         : search for other organellar tRNAs
    -G         : use general tRNA model (cytoslic tRNAs from all 3 domains included)
    -L         : search using the legacy method (tRNAscan, EufindtRNA, and COVE)
                   use with -E, -B, -A, -O, or -G
    -I         : search using Infernal (default)
                   use with -E, -B, -A, -O, or -G
    -o <file>  : save final results in <file>
    -f <file>  : save tRNA secondary structures to <file>
    -m <file>  : save statistics summary for run in <file>
                 (speed, # tRNAs found in each part of search, etc)
    -H         : show both primary and secondary structure components to
                 covariance model bit scores
    -q         : quiet mode (credits & run option selections suppressed)
  
    -h         : print full list (long) of available options
  
  ```
  
  I then tried to use it with `tRNAscan-SE c_elegans.PRJNA13758.WS263.genomic.fa` but it gave the following error:
  
  `FATAL: Unable to find /usr/local/bin/cmsearch executable`
  
  After googling cmsearch, it seems that is is part of the [Infernal](http://eddylab.org/infernal/Userguide.pdf) package. So, I installed infernal with conda using `conda install infernal`.
  
  I pulled the help from `cmsearch` successfully:
  
  ```
  cmsearch -h    
  # cmsearch :: search CM(s) against a sequence database
  # INFERNAL 1.1.2 (July 2016)
  # Copyright (C) 2016 Howard Hughes Medical Institute.
  # Freely distributed under a BSD open source license.
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Usage: cmsearch [options] <cmfile> <seqdb>
  
  Basic options:
    -h        : show brief help on version and usage
    -g        : configure CM for glocal alignment [default: local]
    -Z <x>    : set search space size in *Mb* to <x> for E-value calculations  (x>0)
    --devhelp : show list of otherwise hidden developer/expert options
  
  Options directing output:
    -o <f>       : direct output to file <f>, not stdout
    -A <f>       : save multiple alignment of all significant hits to file <s>
    --tblout <f> : save parseable table of hits to file <s>
    --acc        : prefer accessions over names in output
    --noali      : don't output alignments, so output is smaller
    --notextw    : unlimit ASCII text output line width
    --textw <n>  : set max width of ASCII text output lines  [120]  (n>=120)
    --verbose    : report extra information; mainly useful for debugging
  
  Options controlling reporting thresholds:
    -E <x> : report sequences <= this E-value threshold in output  [10.0]  (x>0)
    -T <x> : report sequences >= this score threshold in output
  
  Options controlling inclusion (significance) thresholds:
    --incE <x> : consider sequences <= this E-value threshold as significant  [0.01]
    --incT <x> : consider sequences >= this score threshold as significant
  
  Options controlling model-specific reporting thresholds:
    --cut_ga : use CM's GA gathering cutoffs as reporting thresholds
    --cut_nc : use CM's NC noise cutoffs as reporting thresholds
    --cut_tc : use CM's TC trusted cutoffs as reporting thresholds
  
  Options controlling acceleration heuristics*:
    --max      : turn all heuristic filters off (slow)
    --nohmm    : skip all HMM filter stages, use only CM (slow)
    --mid      : skip first two HMM filter stages (SSV & Vit)
    --default  : default: run search space size-dependent pipeline  [default]
    --rfam     : set heuristic filters at Rfam-level (fast)
    --hmmonly  : use HMM only, don't use a CM at all
    --FZ <x>   : set filters to defaults used for a search space of size <x> Mb
    --Fmid <x> : with --mid, set P-value threshold for HMM stages to <x>  [0.02]
  
  Other options*:
    --notrunc     : do not allow truncated hits at sequence termini
    --anytrunc    : allow full and truncated hits anywhere within sequences
    --nonull3     : turn off the NULL3 post hoc additional null model
    --mxsize <x>  : set max allowed alnment mx size to <x> Mb [df: autodetermined]
    --smxsize <x> : set max allowed size of search DP matrices to <x> Mb  [128.]
    --cyk         : use scanning CM CYK algorithm, not Inside in final stage
    --acyk        : align hits with CYK, not optimal accuracy
    --wcx <x>     : set W (expected max hit len) as <x> * cm->clen (model len)
    --toponly     : only search the top strand
    --bottomonly  : only search the bottom strand
    --tformat <s> : assert target <seqdb> is in format <s>: no autodetection
    --cpu <n>     : number of parallel CPU workers to use for multithreads
  
  *Use --devhelp to show additional expert options.
  
  ```
  
  I tried the tRNAscan-SE command again but it failed with the same error message.
  
  So, tRNAscan-SE is looking for cmsearch in the wrong place. How can I make tRNAscan-SE use cmsearch successfully?
  
  Cheers.
  
  ### Update
  
  Forgot to tell you I am working on Mac OS X and that cmsearch is installed here:
  
  `/Users/user/anaconda/envs/python3env/bin/cmsearch`
  
  and my `python3env` anaconda environment is active.
  
  **Tags:** sequence-annotation, software-installation, trna, trnascan-se
  
  > **Comments:**
  > **username_1**: Please [edit] your question and tell us i) what operating system you are using and ii) assuming it is some sort of *nix, the output of `which cmsearch`  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_4 on 2018-10-14. Score: 5 | Accepted answer
  
  An easy way to build tRNAscan and their dependencies "all Infernal packages" without confusion is to run
  
  ```
  conda install -c bioconda trnascan-se 
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2018-07-06. Score: 8
  
  You may try to set the correct path through the `infernal_dir` variable in `tRNAscan-SE.conf.src`. You might need to do this before the installation process.
  
  Original file starts with:
  
  ```
  # tRNAscan-SE 2.0 
  # Configuration File
  
  # default paths
  bin_dir: @bindir@
  lib_dir: @libdir@/tRNAscan-SE
  infernal_dir: {bin_dir}
  
  ```
  
  Try the following:
  
  ```
  # tRNAscan-SE 2.0 
  # Configuration File
  
  # default paths
  bin_dir: @bindir@
  lib_dir: @libdir@/tRNAscan-SE
  infernal_dir: "/Users/user/anaconda/envs/python3env/bin"
  
  ```
  
  > **Comments:**
  > **username_0**: I've done what you said and it still works but how do I know it's not because my symbolic links are still active? Do you know how I can erase them?  
  > **username_2**: @charlesdarwin You can remove them by  (carefully) performing`sudo rm /usr/local/bin/cmsearch` and `sudo rm /usr/local/bin/cmscan`.  
  
  ---
  
  ### Answer by username_3 on 2018-09-03. Score: 4
  
  tRNAscan-SE 2.0 requires separate installation of Infernal 1.1.2.
  The source code and prebuilt binaries can be obtained at
  <http://eddylab.org/infernal/>.
  
  The installation directory of Infernal should be the same as the one
  where tRNAscan-SE 2.0 is installed.
  
  When install infernal, run the configure command with the option `--prefix <your tRNAscan-SE-2.0 install path>`.
  If you didn't add option `--prefix` when installing tRNAscan-SE-2.0, then you should install infernal without option `--prefix`.
  
  
  ---
  
  ### Answer by username_1 on 2018-07-06. Score: 2
  
  **A much cleaner solution is given in [@username_2's answer](https://bioinformatics.stackexchange.com/a/4639/298).**
  
  ---
  
  The error message is telling you that tRNAScan-SE is looking for the `cmsearch` executable at `/usr/local/bin/cmsearch`. However, you installed it though conda which apparently placed it at `/Users/user/anaconda/envs/python3env/bin/cmsearch`.
  
  A simple, if not very elegant solution, would be to make a link to it:
  
  ```
  sudo ln -s /Users/user/anaconda/envs/python3env/bin/cmsearch /usr/local/bin/
  
  ```
  
  > **Comments:**
  > **username_0**: had to do the same with cmscan and now the code is running.  
  > **username_0**: what does this soft link do?  
  > **username_2**: @charlesdarwin This enables the program to access the program from the place it looks at by default. There might be a cleaner way to do: Changing the default (see my untested answer).  
  > **username_1**: @charlesdarwin as bli said, that just creates a "fake file" at `/usr/local/bin/` which points to `/Users/user/anaconda/envs/python3env/bin/cmsearch`, so that when something tries to open `/usr/local/bin/cmsearch`, it will actually run `/Users/user/anaconda/envs/python3env/bin/cmsearch`. But bli's approach of changing the configuration file is a much cleaner solution. Please use that instead.  
  
  ---
  
  