Question: set_environment fails to set up Trinity path
gravatar for bankapur
3.5 years ago by
United States
bankapur0 wrote:

I have a local galaxy instance on which I am trying to run Trinity. I have the following in my bashrc:

export TRINITY_HOME=/../../SOFTWARE/trinityrnaseq

I have tried to use this in three ways:

1) Included TRINITY_HOME in requirement type but this fails. I don't understand why, as Trinity is loaded in my environment

2) Included TRINITY_HOME in <tool_dependency>, changed the galaxy.ini file to include this: tool_dependency_dir=/../../SOFTWARE and made tool_dependencies.xml with TRINITY_HOME

3) As a last resort added this tag  <tool_dependency> to trinityrnaseq.xml itself (this portion is commented out in the file below).

In all 3 situations I get the same error: command Trinity not found.

Kindly advice as to how I should proceed to resolve this issue?

trinityrnaseq.xml: [Edited to include the entire xml]

<tool id="trinityrnaseq" name="Trinity" version="0.0.1">
    <!-- Written by Jeremy Goecks, now maintained here by bhaas -->
    <description>De novo assembly of RNA-Seq data Using Trinity - Simple Interface</description>
        <requirement type="set_environment">TRINITY_HOME</requirement>
        \$TRINITY_HOME/Trinity --JM 1G --CPU 1 --full_cleanup --bflyHeapSpaceMax 5G
        ## Inputs.
        #if str($inputs.paired_or_single) == "paired":
            --left $inputs.left_input --right $inputs.right_input
            #if  $inputs.left_input.ext == 'fa':
                --seqType fa
                --seqType fq
            #end if
            #if str($inputs.library_type) != "None":
                --SS_lib_type $inputs.library_type
            #end if
            --group_pairs_distance $inputs.group_pairs_distance
            --single $inputs.input
            #if  str($inputs.input.ext) == 'fa':
                --seqType fa
                --seqType fq
            #end if
            #if str($inputs.library_type) != "None":
                --SS_lib_type $inputs.library_type
            #end if
        #end if
        ## Additional parameters.
        #if str($additional_params.use_additional) == "yes":
            --min_kmer_cov $additional_params.min_kmer_cov --max_reads_per_graph $additional_params.max_reads_per_graph
            #if $additional_params.bfly_opts != 'None':
                --bfly_opts " $additional_params.bfly_opts "
            #end if
        #end if
        ## direct to output
        > $trinity_log 2>&amp;1
galaxy • 1.6k views
ADD COMMENTlink modified 3.5 years ago • written 3.5 years ago by bankapur0
gravatar for Martin Čech
3.5 years ago by
Martin Čech ♦♦ 4.9k
United States
Martin Čech ♦♦ 4.9k wrote:

There is a package in the Tool Shed that you can install in your Galaxy and get working trinity:

If you want your own/newer version you can follow the steps that the package uses (by exploring tool_dependencies.xml)

ADD COMMENTlink written 3.5 years ago by Martin Čech ♦♦ 4.9k

The second point in my post is where I state that I use tool_dependencies.xml. my understanding of galaxy is that it uses the user's bashrc file to run tools. However, it doesn't do so for me. Is this a permissions issue? 

ADD REPLYlink written 3.5 years ago by bankapur0

Did you go through the installation process from Tool Shed? If so which repository did you install? If you did not I advise you to do so - trying to simulate that process manually is most probably not gonna work.

tool_dependency_dir is a Galaxy configuration variable and it is not used as you think it is. It tells Galaxy where to install dependencies from the Tool Shed but building that folder manually I do not recommend. 

Could you please describe what you want to achieve in the end? If you just want to run local installation of trinity you do not have to mess with the dependencies at all. Setting up the environment variables in a manner that trinity is accessible to the user that runs Galaxy is enough. You do not have to describe to Galaxy what you have done, Galaxy will just try to execute ```trinity``` after you submit the form.

What Galaxy tool are you using? Did you write your own  or did you modify e.g. 

Could you please share it in whole?

ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by Martin Čech ♦♦ 4.9k

I have a galaxy instance installed on a remote server. The ultimate goal is to run Trinity (which is also located on the server). My bashrc includes the path to Trinity called "TRINITY_HOME", which I use in the trinityrnaseq.xml in the requirement tag and set type="set_environment". Error being "Trinity command not found".

Since this did not work for me I veered off to tool_dependency topic which after your explanation (thank you for that), is definitely not what I am looking for. I have edited my post to include the entire xml now.

ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by bankapur0

Few notes:

  • do not use TRINITY_HOME variable in Galaxy at all - you said you want locally installed trinity, I think setting TRINITY_HOME is a part of the installation, not execution
  • fully drop <requirements> tag from the wrapper, you do not need it
  • invoke trinity simply either with `Trinity` or `` command (based on the version of trinity you use) - basically the same way you invoke it when you are using it from cli (i.e. exactly as the wrapper in does it)
ADD REPLYlink written 3.5 years ago by Martin Čech ♦♦ 4.9k
Please log in to add an answer.


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