Re: [galaxy-dev] new visualization tool for composite datatype?

2015-08-18 Thread Carl Eberhard
Hi, Anne

Can you be more specific about how you'd like to visualize the files? It
sounds like you've already got a tool that will build an html file which is
the classic way to make visualizations with galaxy.

Now you'd like to make it more interactive? Do you already have javascript
or python code that will be used to manipulate or draw the data? The
visualization registry will help you link a user's data to your
visualization code but will not create the code that does the rendering or
interaction.

Aside from that, if you know the structure and filenames of your
composite's extra files directory, currently you can access those files
using:
api/histories/{history_id}/contents/{content_id}/display?filename=some
file
The meme type will be guessed based on the extension generally and more
complex paths can also be specified using the filename parameter.

So, for example, if I have a FastQC Html composite file with an extra files
path of:
database/files/000/dataset_83_files

And within that directory, fastqc makes an additional subdirectory:
sample1_fastqc/Icons
sample1_fastqc/Images
sample1_fastqc/summary.txt

I can fetch the summary.txt file (with the 'text/plain' memetype) using:
api/histories/{history_id}/contents/{content_id}/display?filename=sample1_fastqc/summary.txt

Let me know if that wasn't the info you were after or I misunderstood the
question.
Carl


On Fri, Aug 14, 2015 at 7:50 AM, Anne Claire Fouilloux 
a.c.fouill...@geo.uio.no wrote:

 Hi,


 I created a new composite datatype (class derived from Html class)
 myDatatype and I sucessfully use it in a new created tool.


 When I click on View data it shows my Html file with a list of binary
 files and everything is Ok.


 Now I would like to Visualize my data. I created a new directory in

 galaxy-dist/config/plugins/visualizations/ following instructions given at

 https://wiki.galaxyproject.org/VisualizationsRegistry and read

 https://wiki.galaxyproject.org/VisualizationsRegistry/Configuration and

 https://wiki.galaxyproject.org/DataProviders


 However, I still don't understand what I should do to be able to access
 files from my composite datatype to be able to visualize myDatatype (I mean
 I need to visualize the files containing in the directory listed by the
 html file).


 Is it possible? Where can I find some information on how to do it?


 Thanks,


 Anne.



 ___
 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:
   https://lists.galaxyproject.org/

 To search Galaxy mailing lists use the unified search at:
   http://galaxyproject.org/search/mailinglists/

___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

[galaxy-dev] Unable to run simple Docker tool

2015-08-18 Thread Mikel Egaña Aranguren
Hi;

I'm trying to develop a Docker based tool, as suggested by a peer-reviewer
who might be reading this :P

However, I'm having trouble with even the most basic setting, and I don't
know what might be wrong, so any help will be much appreciated. I have
developed a very simple docker image and corresponding Galaxy tool, so that
I get it working before starting with the actual tool, but when I execute
it through Galaxy it simply stays executing forever, instead of failing or
terminating.

My image simply executes a shell script that reads the content of a file
and concatenates a string to it. The image:

FROM busybox:ubuntu-14.04
MAINTAINER Mikel Egaña Aranguren mikel.egana.arangu...@gmail.com

RUN mkdir /sadi
COPY test-io.sh /sadi/
RUN chmod a+x /sadi/test-io.sh
ENV PATH $PATH:/sadi

The test-io.sh script within the image:

#!/bin/sh

cat $1
echo AAA

Invoking the container and executing the script through a normal shell
works fine:

REPOSITORY   TAG IMAGE
IDCREATED VIRTUAL SIZE
mikeleganaaranguren/busybox-galaxy-test-io   v1
9c2b8bdade1d54 minutes ago  5.609 MB

docker run -i -t mikeleganaaranguren/busybox-galaxy-test-io:v1

BusyBox v1.21.1 (Ubuntu 1:1.21.0-1ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ #
~ # echo BBB  test
~ # test-io.sh test
BBB
AAA

This is the tool file I'm using in Galaxy:

tool id=SADIBUSYBOX name=SADIBUSYBOX
descriptionIO/description
requirements
  container
type=dockermikeleganaaranguren/busybox-galaxy-test-io:v1/container
/requirements
command
  test-io.sh $input  $output
/command
inputs
param name=input type=data label=Dataset/
/inputs
outputs
data format=txt name=output /
/outputs
help
/help
/tool

And my job_conf.xml:

?xml version=1.0?
!-- A sample job config that explicitly configures job running the way it
is configured by default (if there is no explicit config). --
job_conf
plugins
plugin id=local type=runner
load=galaxy.jobs.runners.local:LocalJobRunner workers=4/
/plugins
handlers
handler id=main/
/handlers
destinations default=docker_local
destination id=local runner=local/
destination id=docker_local runner=local
  param id=docker_enabledtrue/param
/destination
/destinations
/job_conf

As I said, when I execute the tool in Galaxy, it simply executes forever,
it stays in a yellow state, till I kill the Galaxy server. The log says:

127.0.0.1 - - [18/Aug/2015:19:08:00 +0200] GET
/tool_runner?tool_id=SADIBUSYBOX HTTP/1.1 200 - http://127.0.0.1:8080/;
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101
Firefox/40.0
galaxy.tools.actions INFO 2015-08-18 19:08:07,178 Handled output (77.825 ms)
galaxy.tools.actions INFO 2015-08-18 19:08:07,280 Verified access to
datasets (12.387 ms)
galaxy.tools.execute DEBUG 2015-08-18 19:08:07,307 Tool [SADIBUSYBOX]
created job [2] (217.508 ms)
127.0.0.1 - - [18/Aug/2015:19:08:07 +0200] POST /api/tools HTTP/1.1 200 -
http://127.0.0.1:8080/tool_runner?tool_id=SADIBUSYBOX; Mozilla/5.0 (X11;
Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
127.0.0.1 - - [18/Aug/2015:19:08:07 +0200] GET
/api/histories/f2db41e1fa331b3e/contents HTTP/1.1 200 - 
http://127.0.0.1:8080/; Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0)
Gecko/20100101 Firefox/40.0
galaxy.jobs DEBUG 2015-08-18 19:08:07,714 (2) Working directory for job is:
/home/mikel/UPV-EHU/SADI-Docker-Galaxy/galaxy/database/job_working_directory/000/2
galaxy.jobs.handler DEBUG 2015-08-18 19:08:07,721 (2) Dispatching to local
runner
galaxy.jobs DEBUG 2015-08-18 19:08:07,839 (2) Persisting job destination
(destination id: docker_local)
galaxy.jobs.runners DEBUG 2015-08-18 19:08:07,849 Job [2] queued (128.176
ms)
galaxy.jobs.handler INFO 2015-08-18 19:08:07,897 (2) Job dispatched
galaxy.jobs.command_factory INFO 2015-08-18 19:08:08,163 Built script
[/home/mikel/UPV-EHU/SADI-Docker-Galaxy/galaxy/database/job_working_directory/000/2/tool_script.sh]
for tool
command[/home/mikel/UPV-EHU/SADI-Docker-Galaxy/galaxy/database/job_working_directory/000/2/tool_script.sh]
galaxy.jobs.runners DEBUG 2015-08-18 19:08:08,322 (2) command is: sudo
docker inspect mikeleganaaranguren/busybox-galaxy-test-io:v1  /dev/null
21
[ $? -ne 0 ]  sudo docker pull
mikeleganaaranguren/busybox-galaxy-test-io:v1  /dev/null 21

sudo docker run -e GALAXY_SLOTS=$GALAXY_SLOTS -v
/home/mikel/UPV-EHU/SADI-Docker-Galaxy/galaxy:/home/mikel/UPV-EHU/SADI-Docker-Galaxy/galaxy:ro
-v
/home/mikel/UPV-EHU/SADI-Docker-Galaxy/galaxy/tools/catDocker:/home/mikel/UPV-EHU/SADI-Docker-Galaxy/galaxy/tools/catDocker:ro
-v
/home/mikel/UPV-EHU/SADI-Docker-Galaxy/galaxy/database/job_working_directory/000/2:/home/mikel/UPV-EHU/SADI-Docker-Galaxy/galaxy/database/job_working_directory/000/2:rw
-v