Fwd: [galaxy-user] known name outputs shown in /database/files but not in galaxy windows
Hi Jen, I tried what you explain, but still doens't work. I did create a new datatype, gem. And I modified my code as you suggested. The tool i'm using always generates by default two archives . gem and .log. Those are the ones that I can't show in the galaxy interface, the output I get is empty, the dataset_54.dat and the dataset_55.dat. I can't handle to show me the .dat.gem and .dat.log ones. dataset_54.dat (my first declared output that it's empty) dataset_54.dat.gem (the output that throws the tool) dataset_54.dat.log (the other output file that throws the tool) dataset_55.dat (my second declared output that it's empty) Here it is the gem_indexer.xml <tool id="GEM Index" name="create GEM Indexer"> <command interpreter="python"> gem_indexer.py $input $output1 $output2</command> <inputs> <param name="input" type="data" format="fasta" label="Fichero de entrada(formato .fas)" /> </inputs> <stdio> <exit_code range="1:" level="fatal" description="Bad input dataset" /> </stdio> <outputs> <data format_source="gem" name="output1" label="${tool.name} on ${on_string}: salida" from_work_dir="gem_tools/salida.gem" /> <data format_source="tab" name="output2" label="${tool.name} on ${on_string}: salida" from_work_dir="gem_tools/salida.log" /> </outputs> </tool> And the gem_indexer.py import sys,os def __main__(): # Command to run GEM tool. Here the Gem indexer is getting invoked along with arguments to be passed. cmd="gem-indexer -i "+sys.argv[1]+" -o salida" os.system(cmd) if __name__ == "__main__" : __main__() 2014-04-04 6:05 GMT+02:00 Jennifer Jackson <jen@bx.psu.edu>: Reply posted:
http://dev.list.galaxyproject.org/known-name-outputs-shown-in-database-files...
Angelica, Next time it would be great to post to only a single list. The galaxy-dev@bx.psu.edu list is best for this type of question. Take care, Jen Galaxy team
On 4/3/14 12:13 AM, ANGELICA GOMEZ ROIG wrote:
I have made a wrapper that has a tool that giving it an input file, gives you two output files with known extension: .gem and .log I call the tool with a python file, and I pass it the input file and the two output file names for galaxy to show them, but when I look into de database/files/000/ i get four files:
dataset_54.dat (my first declared output that it's empty) dataset_54.dat.gem (the output that throws the tool) dataset_54.dat.log (the other output file that throws the tool) dataset_55.dat (my second declared output that it's empty)
So,what I'm getting in the galaxy interface is _54.dat and _55.dat, both empty, instead of _54.dat.gem and _54.dat.log that are the good ones. How can I fix these? Thanks
___________________________________________________________ The Galaxy User list should be used for the discussion of Galaxy analysis and other features on the public server at usegalaxy.org. Please keep all replies on the list by using "reply all" in your mail client. For discussion of local Galaxy instances and the Galaxy source code, please use the Galaxy Development list:
http://lists.bx.psu.edu/listinfo/galaxy-dev
To manage your subscriptions to this and other Galaxy lists, please use the interface at:
To search Galaxy mailing lists use the unified search at:
http://galaxyproject.org/search/mailinglists/
-- Jennifer Hillman-Jacksonhttp://galaxyproject.org
On Sat, Apr 5, 2014 at 8:07 AM, ANGELICA GOMEZ ROIG <nirvanargr2012@gmail.com> wrote:
Hi Jen, I tried what you explain, but still doens't work. I did create a new datatype, gem. And I modified my code as you suggested. The tool i'm using always generates by default two archives . gem and .log. Those are the ones that I can't show in the galaxy interface, the output I get is empty, the dataset_54.dat and the dataset_55.dat. I can't handle to show me the .dat.gem and .dat.log ones.
dataset_54.dat (my first declared output that it's empty) dataset_54.dat.gem (the output that throws the tool) dataset_54.dat.log (the other output file that throws the tool) dataset_55.dat (my second declared output that it's empty)
Here it is the gem_indexer.xml
<tool id="GEM Index" name="create GEM Indexer"> <command interpreter="python"> gem_indexer.py $input $output1 $output2</command> <inputs> <param name="input" type="data" format="fasta" label="Fichero de entrada(formato .fas)" /> </inputs> <stdio> <exit_code range="1:" level="fatal" description="Bad input dataset" /> </stdio> <outputs> <data format_source="gem" name="output1" label="${tool.name} on ${on_string}: salida" from_work_dir="gem_tools/salida.gem" /> <data format_source="tab" name="output2" label="${tool.name} on ${on_string}: salida" from_work_dir="gem_tools/salida.log" /> </outputs> </tool>
And the gem_indexer.py
import sys,os
def __main__():
# Command to run GEM tool. Here the Gem indexer is getting invoked along with arguments to be passed.
cmd="gem-indexer -i "+sys.argv[1]+" -o salida" os.system(cmd)
if __name__ == "__main__" : __main__()
Since you are using a wrapper script already, I would add lines to rename the generated files (based on sys.argv[1] plus the extensions) to the filename Galaxy is providing (here sys.argv[2] and sys.argv[3]). Peter
Just to add to what Peter said - you definitely don't want to use from_work_dir and reference the outputs ($output1) in the same command. If you know where the file is going to be relative to your working directory there should be no reason to pass it to your script. Also I think you want format instead of format_source as the attribute on output. On Mon, Apr 7, 2014 at 8:49 AM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
On Sat, Apr 5, 2014 at 8:07 AM, ANGELICA GOMEZ ROIG <nirvanargr2012@gmail.com> wrote:
Hi Jen, I tried what you explain, but still doens't work. I did create a new datatype, gem. And I modified my code as you suggested. The tool i'm using always generates by default two archives . gem and .log. Those are the ones that I can't show in the galaxy interface, the output I get is empty, the dataset_54.dat and the dataset_55.dat. I can't handle to show me the .dat.gem and .dat.log ones.
dataset_54.dat (my first declared output that it's empty) dataset_54.dat.gem (the output that throws the tool) dataset_54.dat.log (the other output file that throws the tool) dataset_55.dat (my second declared output that it's empty)
Here it is the gem_indexer.xml
<tool id="GEM Index" name="create GEM Indexer"> <command interpreter="python"> gem_indexer.py $input $output1 $output2</command> <inputs> <param name="input" type="data" format="fasta" label="Fichero de entrada(formato .fas)" /> </inputs> <stdio> <exit_code range="1:" level="fatal" description="Bad input dataset" /> </stdio> <outputs> <data format_source="gem" name="output1" label="${tool.name} on ${on_string}: salida" from_work_dir="gem_tools/salida.gem" /> <data format_source="tab" name="output2" label="${tool.name} on ${on_string}: salida" from_work_dir="gem_tools/salida.log" /> </outputs> </tool>
And the gem_indexer.py
import sys,os
def __main__():
# Command to run GEM tool. Here the Gem indexer is getting invoked along with arguments to be passed.
cmd="gem-indexer -i "+sys.argv[1]+" -o salida" os.system(cmd)
if __name__ == "__main__" : __main__()
Since you are using a wrapper script already, I would add lines to rename the generated files (based on sys.argv[1] plus the extensions) to the filename Galaxy is providing (here sys.argv[2] and sys.argv[3]).
Peter ___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
Thanks. Finally it worked!! I pass the solution: My python file: import sys,os def __main__(): # Command to run GEM tool. Here the Gem indexer is getting invoked along with arguments to be passed. cmd="gem-indexer -i "+sys.argv[1]+" -o "+sys.argv[2] os.system(cmd) name_gem=sys.argv[2]+".gem" os.rename(name_gem,sys.argv[2]) if __name__ == "__main__" : __main__() Take care!!!! 2014-04-07 15:51 GMT+02:00 John Chilton <jmchilton@gmail.com>:
Just to add to what Peter said - you definitely don't want to use from_work_dir and reference the outputs ($output1) in the same command. If you know where the file is going to be relative to your working directory there should be no reason to pass it to your script. Also I think you want format instead of format_source as the attribute on output.
On Mon, Apr 7, 2014 at 8:49 AM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
On Sat, Apr 5, 2014 at 8:07 AM, ANGELICA GOMEZ ROIG <nirvanargr2012@gmail.com> wrote:
Hi Jen, I tried what you explain, but still doens't work. I did create a new datatype, gem. And I modified my code as you suggested. The tool i'm using always generates by default two archives . gem and .log. Those are the ones that I can't show in the galaxy interface, the output I get is empty, the dataset_54.dat and the dataset_55.dat. I can't handle to show me the .dat.gem and .dat.log ones.
dataset_54.dat (my first declared output that it's empty) dataset_54.dat.gem (the output that throws the tool) dataset_54.dat.log (the other output file that throws the tool) dataset_55.dat (my second declared output that it's empty)
Here it is the gem_indexer.xml
<tool id="GEM Index" name="create GEM Indexer"> <command interpreter="python"> gem_indexer.py $input $output1 $output2</command> <inputs> <param name="input" type="data" format="fasta" label="Fichero de entrada(formato .fas)" /> </inputs> <stdio> <exit_code range="1:" level="fatal" description="Bad input dataset" /> </stdio> <outputs> <data format_source="gem" name="output1" label="${tool.name} on ${on_string}: salida" from_work_dir="gem_tools/salida.gem" /> <data format_source="tab" name="output2" label="${tool.name} on ${on_string}: salida" from_work_dir="gem_tools/salida.log" /> </outputs> </tool>
And the gem_indexer.py
import sys,os
def __main__():
# Command to run GEM tool. Here the Gem indexer is getting invoked along with arguments to be passed.
cmd="gem-indexer -i "+sys.argv[1]+" -o salida" os.system(cmd)
if __name__ == "__main__" : __main__()
Since you are using a wrapper script already, I would add lines to rename the generated files (based on sys.argv[1] plus the extensions) to the filename Galaxy is providing (here sys.argv[2] and sys.argv[3]).
Peter ___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
participants (3)
-
ANGELICA GOMEZ ROIG
-
John Chilton
-
Peter Cock