[galaxy-dev] Error after loading up bebatut MetaPhlAn2 to our local Galaxy instance

2016-11-22 Thread Dooley, Damion
After loading up MetaPhlAn2 (8991e05c44e4) from toolshed and attaching
db_v20, I tried running a few fasta files on it, including the tool's
test-data/input_sequences.fasta file, but after about a minute of churning
I keep getting this error:

Fatal error: Exit code 1 ()
…
Traceback (most recent call last):
  File 
"/usr/local/galaxy/shared/tool_dependency/metaphlan2/2.5.0/bebatut/package_
metaphlan2_2_5_0/43a80f92815f/metaphlan2.py", line 1172, in 
tree = TaxTree( mpa_pkl, ignore_markers )
  File 
"/usr/local/galaxy/shared/tool_dependency/metaphlan2/2.5.0/bebatut/package_
metaphlan2_2_5_0/43a80f92815f/metaphlan2.py", line 857, in __init__
clades_txt = ((l.strip().split("|"),n) for l,n in
mpa_pkl['taxonomy'].items())
AttributeError: 'list' object has no attribute 'items'

I believe the database is connected properly, but would the tool run for a
while even if it wasn't?  It seems like the mpa_pkl file data is loaded
via the --mpa_pkl attribute as in tool command line:

which bowtie2 || exit 200) && metaphlan2.py
/galaxy_data/production1/files/013/dataset_13546.dat -o
/galaxy_data/production1/files/013/dataset_13547.dat --input_type fasta
--bowtie2_exe `which bowtie2` --bowtie2db
/usr/local/packages/metaphlan2/db_v20/mpa_v20_m200 --mpa_pkl
/usr/local/packages/metaphlan2/db_v20/mpa_v20_m200".pkl" --no_map -t
rel_ab --tax_lev a --min_cu_len 2000 --min_alignment_len 0 --stat_q 0.1 -s
/galaxy_data/production1/files/013/dataset_13548.dat

Tool's xml file does a touch of funny business with the mpa_v20_m200".pkl"
file name parameter, but I guess that works if no one else has a problem
with it.

Thx for any info, 

Damion
 

___
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] Any way to prime the value of a tool text field parameter dynamically?

2016-06-08 Thread Dooley, Damion
I have a need to have the default value of a text parameter :



Set dynamically, as powered by say a call to a function in  , much like a 
dynamic_options="get_rule_section(recipe_file)" call.  Has anyone done that 
somehow without hacking Galaxy code?

A user can then edit the text.  The default depends on a previous selection 
(e.g. recipe_file input).

Thanks,

Damion

___
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/

Re: [galaxy-dev] Scaling tools: data available? (Peter van Heusden)

2016-03-19 Thread Dooley, Damion
If you are looking for a simple python program to log cpu% and memory of
another executable, then analyze.py might do.  Its in
https://github.com/Public-Health-Bioinformatics/kipper/tree/master/RDP-test
-case along with a few scripts that show examples of its use.

Damion
>>
>> On 02/21/2016 11:13 PM, Peter van Heusden wrote:
>>
>> Hi there
>>
>> We're researching the resource (CPU time and memory) requirements for
>>RNA
>> STAR at the moment. Specifically, we'd like to build up a database of
>>input
>> size to resource usage so that we can use this to feed a dynamic
>> destination mapper (currently our STAR configuration uses a thumbsuck
>>for
>> RAM and CPU requirements that is not optimal but works in many cases).
>>
>> Has anyone collected these metrics before? And more generally, is anyone
>> collecting metrics for a range of bioinformatics tools? A database like
>> this could be very useful!
>>
>> Thanks!
>> 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:
  https://lists.galaxyproject.org/

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

Re: [galaxy-dev] A Report Calc tool which provides a scripting language and interpreter for text mining and quality control

2016-02-09 Thread Dooley, Damion
Hi folks,
I'm back with one more feeler to gauge interest in the approach we are
trying out for a Galaxy quality control tool to interject into existing
bioinformatics pipelines.  With some nudging (thanks Bob) I've implemented
basic infix math expressions.  As well we're trying out the inclusion of
ontology metadata within report data to encourage data
import/export/comparison.  The goal is to make it easy to see and change
quality control metrics (without having to recompile code or modify Galaxy
workflow mechanics.)

The QC scripting language/interpreter as a Galaxy tool lets us read in
text file(s) - some assembly contig data say - and then run a program (a
set of rules) like:

   store( 200 report/contigs/contig_count_QC_threshold )
   store( 20 report/contigs/contig_N50_QC_threshold )
   store( 2000 report/contigs/contig_N99_QC_threshold )

   if( ( genome_size_ratio > genome_size_ratio_QC_threshold ) fail(qc
"Failed genome size ratio threshold") )
   store( statisticN( contig_lengths 50 ) report/contigs/contig_N50 )
   store( statisticN( contig_lengths 99 ) report/contigs/contig_N99 )
   if( contig_N50 < contig_N50_QC_threshold fail(qc "Failed minimum N50
contig length threshold")  )
   if( contig_N99 < contig_N99_QC_threshold fail(qc "Failed minimum N99
contig length threshold")  )
   if( report/contigs/contigs_count > contig_count_QC_threshold fail(job
"Failed minimum contig count threshold" ) )
 

Which is like a generic, basic function(parameter1 parameter2...) type of
language.

On a good run this yields a JSON report like:

{
   "title": "RCQC Quality Control Report",
   "tool_version": "0.0.7",
   "job": {
  "status": "ok"
   },
   "quality_control": {
  "status": "ok"
   },
   "date": "2016-02-09 09:21",
   "contigs": {
  "contig_lengths": [ 128, 172, 221, 224, 238, 230, 240, 246, 407, ...
, 242, 2284, 1506],
  "genome_size_ratio_QC_threshold": 0.10001,
  "contig_N99_QC_threshold": 2000,
  "assembly_genome_size": 4615592,
  "genome_size_ratio": 0.04970310891496809,
  "contig_N50": 427122,
  "contig_N99": 8542,
  "contig_count_QC_threshold": 200,
  "contig_count": 44,
  "reference_genome_identifier": "serovar Typhimurium LT2",
  "reference_genome_size": 4857000,
  "contig_N50_QC_threshold": 20
   },
   "@context": {
  "contigs": "http://purl.obolibrary.org/obo/SO_0001462;,
  "genome_size_ratio_QC_threshold":
"http://purl.obolibrary.org/obo/GenEpiO_0001564;,
  "contig_N99_QC_threshold":
"http://purl.obolibrary.org/obo/GenEpiO_0001566;,
  "assembly_genome_size":
"http://purl.obolibrary.org/obo/GenEpiO_0001561;,
  "genome_size_ratio":
"http://purl.obolibrary.org/obo/GenEpiO_0001563;,
  "contig_N50": "http://purl.obolibrary.org/obo/OBI_0001941;,
  "contig_N99": "http://purl.obolibrary.org/obo/GenEpiO_0001570;,
  "contig_count_QC_threshold":
"http://purl.obolibrary.org/obo/GenEpiO_0001571;,
  "contig_count": "http://purl.obolibrary.org/obo/GenEpiO_093;,
  "reference_genome_identifier":
"http://purl.obolibrary.org/obo/GenEpiO_0001562;,
  "date": "http://purl.obolibrary.org/obo/IAO_416;,
  "reference_genome_size":
"http://purl.obolibrary.org/obo/GenEpiO_0001560;,
  "contig_N50_QC_threshold":
"http://purl.obolibrary.org/obo/GenEpiO_0001565;
   }
}


So we'd appreciate any advice on roadblocks or desired features you
perceive on this...

- Damion
>

___
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] access system variables in tool xml (Matthias De Smet)

2016-01-27 Thread Dooley, Damion
Others might have responded to this, and I can't remember the very latest
approach, but I used the approach below... Its not easy though since api
is read via  script [BTW, topically, I still need  on a
regular basis!], but is passed over to command line app securely via a
.  For error situation messaging back to user I was using a
dynamic box radio drill_down input.  All this code is in toolshed under
"versioned_data".  Teasing out what you need might require some work
though - the code also has a chunk of stuff for maintaining use of an
administrator's api key as well as the user's since the app needed to do
admin level api work on behalf of a user.



>--
>
>Message: 11
>Date: Wed, 27 Jan 2016 12:42:17 +
>From: Matthias De Smet 
>...
>Hi again
>
>I’m trying to create a tool that interacts with galaxy through the API.
>For this, I need to get the users API key (or equivalent) en the domain
>name of the Galaxy host.
>
>The purpose of this tool is to get data and put it in a data library, so
>I suppose I need to use the API. Or is there another way to do this with
>a tool?
>
>Thanks!
>Matthias



#assert $__user__, Exception( 'You must be logged in to use this tool.' )
versioned_data.py
...
 -O "$__app__.security.encode_id($log.id)"
 --api_info_path "$api_info_path" ##Actually a file path to configfile
that holds api key
 
 
...
 


   ${__user__.api_keys[0].key}
 $api_info
   







And over in versioned_data_form.py ( there's a reference to "set_trans()"
which feeds through to set_user_api() below...


import vdb_retrieval


def vdb_init_tool_user(trans):
"""
Retrieves a user's api key if they have one, otherwise lets them know
they need one
This function is automatically called from versioned_data.xml form on
presentation to user
Note that this is how self.api_url gets back into form, for passage back
to 2nd call via versioned_data.py
self.api_key is passed via secure  construct.
ALSO: squeezing history_id in this way since no other way to pass it.
"trans" is provided only by tool form presentation via 
BUT NOW SEE John Chilton's:
https://gist.github.com/jmchilton/27c5bb05e155a611294d
See galaxy source code at
https://galaxy-dist.readthedocs.org/en/latest/_modules/galaxy/web/framework
.html, 
See 
http://dev.list.galaxyproject.org/error-using-get-user-id-in-xml-file-in-ne
w-Galaxy-td4665274.html
See 
http://dev.list.galaxyproject.org/hg-galaxy-2780-Real-Job-tm-support-for-th
e-library-upload-to-td4133384.html
master api key, set in galaxy config: #self.master_api_key =
trans.app.config.master_api_key
"""
global retrieval_obj


api_url = trans.request.application_url + '/api'
history_id = str(trans.security.encode_id(trans.history.id))
user_api_key = None


if trans.user:

user_name = trans.user.username

if trans.user.api_keys and len(trans.user.api_keys) > 0:
user_api_key = trans.user.api_keys[0].key #First key is 
always the
active one?
items = [ { 'name': user_name, 'value': api_url + '-' + 
history_id,
'options':[], 'selected': True } ]

else: 
items = [ { 'name': user_name + ' - Note: you need a 
key (see "User"
menu)!', 'value': '0', 'options':[], 'selected': False } ]

else:
items = [ { 'name': 'You need to be logged in to use this 
tool!',
'value': '1', 'options':[], 'selected': False } ]


retrieval_obj = vdb_retrieval.VDBRetrieval()
retrieval_obj.set_trans(api_url, history_id, user_api_key)

return items



And over in tool xml's target code (versioned_data.py) it includes
vdb_retrieval.py BUT THIS HAS A LOT OF STUFF YOU PROBABLY DON'T NEED!
Sorry!:


from bioblend.galaxy import GalaxyInstance

class VDBRetrieval(object):




def __init__(self, api_key=None, api_url=None):
"""
This gets either trans.x.y from  call in
versioned_data.xml,
or it gets a call with api_key and api_url from 
versioned_data.py

@param api_key_path string File path to temporary file 
containing user's
galaxy api_key
@param api_url string contains http://[ip]:[port] for handling 
galaxy
api calls.  

"""
# Initialized constants during the life of a request:
self.global_retrieval_date = None
self.library_id = None
self.history_id = None
self.data_stores = []

# Entire json library structure.  item.url, type=file|folder, 
id, name
(library path) 
# Note: changes to library during a request aren't reflected 
here.
self.library = None


Re: [galaxy-dev] A Report Calc tool which provides a scripting language and interpreter for text mining and quality control

2016-01-11 Thread Dooley, Damion
Hi,

Thanks for quick reply, and good point about keeping math expressions
familiar to most users.   In this first round I settled for a simple
prefix "function(parameter1 parameter2 ...)".  All the python infix
operators like "a + b" have equivalent prefix functions "add(a b)" so the
latter are used.  

Yes, infix "a + b" parsing would be easier to read, and I was thinking we
could try that on our next iteration (and remain backward compatible) but
more opinion may shift that up!  (Some other issues to tackle too:
decisions about whether "/" should map to "div(a b)" or "truediv(a b)",
and how to avoid conflict with our namespace method of referring to
variables via a/b/c paths).

I'm definitely avoiding eval() since we do have to control exactly which
functions, conditionals, and loop constructs are executed.  Not trying to
provide the all-out iPython approach.
 
D.


On 2016-01-11, 12:03 PM, "Bob Harris" <rshar...@bx.psu.edu> wrote:

>On Jan 11, 2016, at 2:42 PM, Dooley, Damion wrote:
>> ... we're testing out a basic scripting language ... meant to provide
>>[folks] with
>> ways to [do something] without having to be programmers ...
>>  
>>   if( lt(/N50 20) set(report/job/status FAIL))
>> 
>> Math is accomplished by python built-in math functions ...
>
>
>It could well be that's the only way to accomplish what you want in
>whatever environment you're in.  But the use of prefix notation and a
>funny name, for an operator like "<" that non-programmers use familiarly
>as infix, would seem contrary to the stated goal that the user needn't be
>a programmer.
>
>If math can be accomplished via python, why not "<"?  By "math" do you
>only mean function calls, and not arithmetic operators?  Is it that
>python eval() can't be used because of security issues?
>
>Bob H
>

___
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] A Report Calc tool which provides a scripting language and interpreter for text mining and quality control

2016-01-11 Thread Dooley, Damion
Folks, we're testing out a basic scripting language and interpreter for
report writing and quality control that is meant to provide both
command-line programmers and Galaxy platform researchers and admins with
ways to tweak workflow quality control behaviour without having to be
programmers themselves.

I wanted to sound-out the community about whether or not there are any
basic objections to our approach, described briefly below?
 

Currently the interpreter provides all the built-in Python operator and
math functions (as well as some particular named group regular expression
functions for text mining) so that users can examine given input log or
data datasets for fields that need to be reported or compared with QC
metric rules.  

The Report Calc tool takes in a file of statements (each being a
function(parameter1 parameter2 ...) syntax) that look like this:

   set(4857000 report/contigs/reference_genome_size)
   set("serovar Typhimurium LT2" report/contigs/reference_genome)
   set(0.1 report/contigs/good_genome_size_ratio)


   set( statisticN(report/contigs/contig_lengths 50) report/contigs/N50)
   if( lt(/N50 20) set(report/job/status FAIL))

Math is accomplished by python built-in math functions (I.e. Ignore the
"/" - that's a namespace syntax character).

   set( 
  truediv( abs( sub( /sampleGenomeSize /referenceGenomeSize))
/referenceGenomeSize)



  report/contigs/sample_genome_size_ratio
   )

And writes any output as desired to a standard tool output folder:
  

   writeFile( 
  pageHtml( getHtml(report) "My Report Widget")
  report.html
   )


It allows users to build a ruleset (file containing statements like the
above), and process text, json, tabular datasets in their history, and it
can manipulate variables, arrays and dictionaries in the tools in-memory
temporary data structure namespace.  It doesn't touch Galaxy's inner
workings or interact with a workflow except by way of app exit codes.

One can even write little text-mining programs in it:

   iterate( readFileByName(contigs-all.fasta)
  if( eq( getitem(iterator/0/value 0) ">")
 append( 
regexp(iterator/0/value "length_(?P\\d+)_")
report/contigs/contig_lengths
 )
  )
   )


I'll release it shortly for review/play, with lots of documentation that
describes in detail what it can/can't do, and an argument for why one
might want to bother using/learning it.

There are one or two irrelevant python built-in functions we might filter
out (e.g. isCallable() ); so far we haven't spotted any security issues,
and we've limited the flow control to only accomplish loops by iterables
so there's no evident way to create infinite loops.  One only iterates
through files or in-memory arrays.

As well suggested functionality for the wish-list now accepted!

Regards,

Damion

 

___
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/

Re: [galaxy-dev] Publish tool with Python dependencies to the toolshed

2015-12-03 Thread Dooley, Damion
Related to this thread, my report calc tool needs a few python packages,
but I think they are generic enough to be in python 2.6, 2.7 or 3.x , so
can I specify the packages without specifying the python version? (I'm
looking at the 
https://github.com/galaxyproject/tools-iuc/blob/master/packages/package_pyt
hon_2_7_bcbiogff_0_6_2/tool_dependencies.xml file). Or do I need to be
doing something like: pip install
...  ?  I'm able to upload this to our local toolshed, and it
seems to install ok from there, but I see in test server galaxy log
"galaxy.tools.deps WARNING 2015-12-03 22:23:02,513 Failed to resolve
dependency on 'report_calc', ignoring", though tool still runs (probably
because the python packages were already installed manually previously.)

Much obliged,

Damion


Tool definition file has:


report_calc



tool_dependencies.xml :








https://pypi.python.org/packages/source/d/dateutils/dateutils
-0.6.6.tar.gz#md5=2ba7fcac03635f1f1cad0d94d785001b

https://pypi.python.org/packages/source/p/pyparsing/pyparsing
-2.0.6.tar.gz#md5=a2d85979e33a6600148c6383d3d8de67



 








___
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/

Re: [galaxy-dev] Tool code for symlinking a data collection from input to output?

2015-11-17 Thread Dooley, Damion
Ah, I can see how symlinking could lead to file management issues.  Well,
we were trying to avoid the situation where use of our qc tool would
require customizing any subsequent tools in a workflow, and as well,
reduce disk overhead of hundred megabyte files being passed along in a
workflow.

So wow on the second paragraph - enabling dependencies outside of tool
file I/o.  I agree with Eric, this will be great.

Now in our current canned workflows we actually don't need this to be
edited via the interface - so are there details on how to edit a workflow
file directly to get this dependency of tool B on tool A in place?

Thanks,

Damion

On 2015-11-17, 11:18 AM, "John Chilton"  wrote:

>Slowly trying to catch up on e-mail after a lot of travel in November
>and I answered a variant of this to Damion directly, the most relevant
>snippet was:
>
>"
>I would not symbolic link the
>files though. I would just take the original collection and pipe it
>into the next tool and add a dummy input to the next tool
>("passing_qc_text_file") that would cause the workflow to fail if the
>qc fails. This is a bit hacky, but symbolic linking will break
>Galaxy's deletion, purging, etc You can delete the original
>dataset collection and the result would affect the files on disk for
>the output collection without Galaxy having anyway to know.
>
>The workflow subsystem has the ability to define a connection like
>this (just wait for one tool to pass before calling the next without a
>input/output relationship) but it hasn't been exposed in the workflow
>editor yet."
>
>-John

___
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] _JAVA_OPTIONS config parameter in job_conf.xml.sample_advanced

2015-09-24 Thread Dooley, Damion

Wondering if anyone has reported this for the doc/sample file team:  Isn't the 
java config example line in that file wrong (at least for my java 1.6):

   -Xmx=6GB

With a setting of -Xmx=10g, Picard wouldn't run sortSam, instead this stderr 
text:
*
Fatal error: Exit code 1 ()
Picked up _JAVA_OPTIONS: -Xmx=10g
Invalid maximum heap size: -Xmx=10g
Could not create the Java virtual machine.
*

I changed the  tag to take out "=" so it reads:

   -Xmx6G

and now its working fine!  Had to lookup -Xmx param format on the net from: 
http://javahowto.blogspot.ca/2006/06/6-common-errors-in-setting-java-heap.html

Regards,

Damion.

Hsiao lab, BC Public Health Microbiology & Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
___
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/

Re: [galaxy-dev] galaxy.ini tool_dependency_dir change

2015-09-09 Thread Dooley, Damion
Thanks for suggestion.  I was hoping to have my tool dependencies folder sit 
alongside some other folders on a /data/ mount though.  Now after some 
searching related to your mount idea, I'm seeing "mount --bind" as a possible 
solution ... anyone use this approach?  Something like:

mv /home/galaxy/tool_dependencies /data/irida/data/tool_dependencies
mkdir /home/galaxy/tool_dependencies
mount -o bind /data/irida/data/tool_dependencies /home/galaxy/tool_dependencies

Regards,

Damion

Hsiao lab, BC Public Health Microbiology & Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada

From: Will Holtz [who...@lygos.com]
Sent: Wednesday, September 09, 2015 11:10 AM
To: Dooley, Damion
Cc: galaxy-...@lists.bx.psu.edu
Subject: Re: [galaxy-dev] galaxy.ini tool_dependency_dir change

Can you move the folder to a new drive, but mount that new drive at the same 
place within the filesystem?

-Will
___
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] galaxy.ini tool_dependency_dir change

2015-09-09 Thread Dooley, Damion
On a VM I moved the tool_dependency_dir folder to another mount since it was 
getting so large that the smallish main mount was full (and changed galaxy.ini, 
restarted galaxy, and checked that permissions were appropriate for galaxy 
user).  But I'm finding I have to reinstall various tool dependencies (prokka 
etc) to enable galaxy to find the command line executables.  Is there a trick 
to getting the tool dependencies working again after moving the folder 
wholesale?

Thanks,

Damion

Hsiao lab, BC Public Health Microbiology & Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
___
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/

Re: [galaxy-dev] Cosmetic Makeblastdb error promulgated through wrapper

2015-07-07 Thread Dooley, Damion
So it does return error code 0, thankfully.  I've dropped the workaround on 
https://github.com/peterjc/galaxy_blast/issues/40
, and could do the pull request process in a few weeks.

d.
...

What is the error code? It might still be zero (which is fine for
a warning only).

I've reopened https://github.com/peterjc/galaxy_blast/issues/40
for any potential Galaxy wrapper work around,

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

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

[galaxy-dev] Cosmetic Makeblastdb error promulgated through wrapper

2015-07-04 Thread Dooley, Damion
Makeblastdb can spit out warning notices when a higher count of N ambiguous 
nucleotides occurs in the first row of fasta data, but goes ahead and completes 
the blast database.

Error: (1431.1) FASTA-Reader: Warning: FASTA-Reader: First data line in seq is 
about 45% ambiguous nucleotides (shouldn't be over 40%)

At moment the NCBI Blast+ wrappers 
(toolshed.g2.bx.psu.edu/repos/devteam/ncbi_blast_plus/ncbi_makeblastdb/0.1.01) 
are saying yup those are errors, but i think they should be downgraded to 
just Notices?  If the tool is part of a workflow it fails - on db's like RDP 
RNA this is quite a nuisance.

Anyone else run into the same thing?

d.

Also see:

http://www.acgt.me/blog/2014/5/15/fun-with-an-error-message-from-ncbi-blast

Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
___
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/

Re: [galaxy-dev] find UUID of current history in tool XML wrapper?

2015-05-05 Thread Dooley, Damion
About
   1. find UUID of current history in tool XML wrapper? (Ben Bimber)
   2. Re: find UUID of current history in tool XML wrapper?
  (John Chilton)

I think this will work for you, I've simplified the code.  I was able to do 
this somewhat circuitously (=bonfire of time) for my upcoming Versioned Data 
tool.  In your tool XML definition file:

param name=history_id display=radio type=drill_down 
dynamic_options=vdb_init_tool_user(__trans__) /
...
code file=versioned_data_form.py /

Not sure if making history_id a hidden field would work (I seemed to recall 
__trans__ variable only exposed to select param).

And in a script named versioned_data_form.py we have:

def vdb_init_tool_user(trans):

...
ALSO: squeezing history_id in this way since no other way to pass it.
trans is provided only by tool form presentation via code 
file=... 
...

history_id = str(trans.security.encode_id(trans.history.id))

items = [ { 'name': 'think of something to say here', 'value': 
history_id, 'options':[], 'selected': True } ]

return items
___
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/

Re: [galaxy-dev] find UUID of current history in tool XML wrapper?

2015-05-05 Thread Dooley, Damion
P.s. I tried using BioBlend and(or) the Galaxy API to get a given user's 
current history but found there was no way to do so.  

Seems like there is occasionally a tension between plaform by design (reduced 
instruction set, occasionally with security in mind, or dev resource 
limitations) and platform for creativity (everything exposed in case someone 
might find use for it).

d.

Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada

From: Ben Bimber [bbim...@gmail.com]
...

If I'm already using non-public APIs to get the current history ID, can it be 
done more directly using something analogous to the above?

Thanks,
Ben
___
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/

Re: [galaxy-dev] find UUID of current history in tool XML wrapper?

2015-05-05 Thread Dooley, Damion
First, John, that $output_dataset.creating_job.history.id looks great! 

Ok, Dannon, I see various merits of stateless design - always providing server 
processes with the entire input array (files, params) in which no server state 
memory is referenced for a given user/agent task (aside from user state 
permissions).  

So I'm thinking John's solution is copacetic because it expresses that we're 
after a piece of information about the current process - where it is delivering 
its output - since we have other immediate processes that need to contribute to 
that work.

Thanks for your attention in revisiting this matter!

d.

Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada

From: Dannon Baker [dannon.ba...@gmail.com]
...
Subject: Re: [galaxy-dev] find UUID of current history in tool XML wrapper?

Galaxy's API goal is to be intentionally stateless, and methods that operate on 
a history accept that as a parameter and don't recognize the notion of 
'current'.  State like that is to be maintained in the client, whatever that is 
-- whether a webpage, cron job, etc.  I think this approach is probably *more* 
flexible in that we don't box ourselves into relying on the notion of a 
'current' history, though some few methods might currently rely on it.

It's worth noting that this argument has conspicuous parallels to the argument 
against allowing tools to understand the 'current' history as well.
___
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/

Re: [galaxy-dev] Comment on Training Documentation

2015-03-13 Thread Dooley, Damion
Hi,

Ok, thanks for all the quick feedback folks, and your tool links John.  So much 
work rolling off everyone's presses!

John, on command and nixing interpreter= : Ok, I like that, to change it so 
that people can see command tag is a place for shell interaction. 

Re. Update / Revision distinction:
So looking at this in detail (Peter and Martin ;) ) - it turns out the update 
and revision terms are actually from Install latest revision vs Get 
updates options that occur in the Galaxy interface (you can see from snapshots 
I did of galaxy admin view in tool versioning tutorial) when downloading tool 
updates.  So my definitions were an attempt to explain the difference there.
Perhaps then we should have a ticket to have Galaxy force any toolshed update 
to have a version id that increments, then no opportunity for confusion, and no 
need for update phrase in galaxy UI? 

In tutorial I do want to show people the implications of not incrementing. ... 
I'll let trainees know that incrementing a tool version number leads to a 
separately selectable tool version to run.  To keep an up-to-date Galaxy 
install is to engage the admin to be bringing in these tool versions/choices 
more frequently even though they functionally don't do anything different.  
Advice is to encourage the dev to batch their changes into just a few revisions 
per year say for main Galaxy toolshed.  I've downgraded this whole update 
thing to just say its possible to upload a change without version increment but 
not advisable for main toolshed.  

Cheers,

Damion

P.s. for the ffp_phylogeny tool I wanted to do piping in the command tag  
e.g. commandprogx -a | progy -b -c | progz/command.  Easy enough unless 
one wants to catch errors when they happen within the piped processes.  I found 
that verbatim one would unfortunately never see any error info from earlier 
stages of the pipe on return to Galaxy, right?.  I took a stab at writing a 
check_output(command) call in ffp_phylogeny tool that sets up error reporting 
for each stage of pipe, which seems to do ok (though only tested manually), but 
wondering if anyone else has tackled the piping error reporting?


Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada

From: John Chilton [jmchil...@gmail.com]
Sent: Friday, March 13, 2015 7:56 AM
To: Peter Cock
Cc: Martin Čech; galaxy-...@lists.bx.psu.edu; Hsiao, William; Dooley, Damion
Subject: Re: [galaxy-dev] Comment on Training Documentation

Awesome work Damion - thanks for publishing and sharing these! I hope
the workshop goes well.

I recently created a wiki page just with tool development resource links

https://wiki.galaxyproject.org/Develop/ResourcesTools

that now gets embedded in other more common landing pages including

https://wiki.galaxyproject.org/Admin/Tools/AddToolTutorial
https://wiki.galaxyproject.org/Develop

I have added links to your content from to this resource list.

One quick thought on the content. The interpreter=python idiom for
wrappers has been around for years and is used widely but it has some
serious drawbacks - in particular nothing can come before the wrapper
in the tool XML - no cheetah directives like #import or #set and no
linking in files (for instance the following setup idiom:

ln -s ${input_bam} temp_input.bam 
ln -s ${input_bam.metadata.bam_index} temp_input.bam.bai 
actual_command --args

In the planemo documentation I am not going to mention interpreter for
this reason - I think it is frustrating for people when it does not
work the way intuitively it should. The forthcoming 15.03 injects a
new variable called $__tool_directory__ that I think should be the new
best practice.

ln -s ${input_bam} temp_input.bam 
ln -s ${input_bam.metadata.bam_index} temp_input.bam.bai 
python $__tool_directory__/wrapper.py --args

I understand that it might be best to not base your tutorial on
features not even released yet :) - but I did want to take the
opportunity to mention this idiom.

As you mentioned I have also been working on updated tool development
documentation lately at (http://planemo.readthedocs.org/en/latest/). I
am trying to build a set of smaller resources that can be composed
into tailored resources (e.g. build tools without planemo, with
planemo, with planemo virtual appliance), (normal tutorial, verbose
tutorial, slide-based tutorial), (with and without Docker). I don't
know if rst is up to this task, but we will see.

Another effort along these lines worth checking out is Kyle's tool
tutorial - https://github.com/kellrott/galaxy-tooldev-docs/tree/master/docs.
This tutorial is focused on using the planemo appliance and
Dockerizing tools.

-John

On Fri, Mar 13, 2015 at 4:35 AM, Peter Cock p.j.a.c...@googlemail.com wrote:
 On Fri, Mar 13, 2015 at 12:23 AM, Martin Čech mar...@bx.psu.edu wrote:
 Your tutorial looks great Damion! Thank you

Re: [galaxy-dev] Tool param type library_data (Dooley, Damion)

2015-03-02 Thread Dooley, Damion
I understand a new tool form module is rolling out in the next few weeks.  Will 
anything change in the HTML form hidden input submit fields?  Right now tool 
forms have the equivalent of:

form id=tool_form name=tool_form action=../../../tool_runner  
target=galaxy_main method=post enctype=application/x-www-form-urlencoded
input type=hidden name=refresh value=refresh/
input type=hidden name=tool_id value=bccdcSelectSubsets/
input type=hidden name=tool_state value=3865326638  
1323033303764
input type=hidden name=input value=4246/
input type=hidden name=incl_excl value=1/

... and then on to the visible fields.

Currently one of my galaxy tools blast_reporting generates an html report 
(form) which users can view and select items and submit - which calls another 
tool with just the right parameters, as above, including tool_state value which 
is copied once from viewing source of the live target tool form.  2nd tool 
immediately generates the desired dataset.  I know html form approach is a hack 
but it works and it keeps things simple (its never part of a workflow).

However, a nice feature for the new tool form engine would be to have the tool 
state accept an empty value= for initial submission of forms.  Is that 
possible?  

That way I wouldn't have to bother with one other yucky installation step for 
my blast_reporting tool where one has to manually view source of an instance of 
the target tool (bccdcSelectSubsets above) and retrieve the generic tool_state 
field value setting.  

d.
___
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/

Re: [galaxy-dev] Tool Testing: field inputs that occur inside repeat tag - resolved

2015-02-27 Thread Dooley, Damion
Yay, with your tip, galaxy direct tests now work with tool_conf.xml AND data 
table in place! 

Galaxy DOC person: please update 
https://wiki.galaxyproject.org/Admin/RunningTests to state that 
tool_conf.xml.sample is NOT used for testing!  It is stated in the run_tests.sh 
help info half way down the page.

Tool wasn't loading on new site because data table it referenced wasn't set up. 

I'll note for galaxy devs that the WARNING is actually fatal i.e. that missing 
data table caused some kind of weird error:

galaxy.tools.toolbox.base INFO 2015-02-27 13:48:48,190 Parsing the tool 
configuration ./config/tool_conf.xml
galaxy.tools.parameters.dynamic_options WARNING 2015-02-27 13:48:48,199 Data 
table named 'blast_reporting_fields' is required by tool but not configured
galaxy.tools.toolbox.base ERROR 2015-02-27 13:48:48,200 Error reading tool from 
path: TESTING/blast_reporting/blast_reporting.xml
Traceback (most recent call last):
  File ...galaxy-dist/lib/galaxy/tools/toolbox/base.py, line 670, in 
_load_tool_tag_set
tool = self.load_tool( os.path.join( tool_path, path ), guid=guid, 
repository_id=repository_id )
...
  File .../galaxy-dist/lib/galaxy/tools/parameters/dynamic_options.py, line 
608, in column_spec_to_index
return int( column_spec )
ValueError: invalid literal for int() with base 10: 'type'

Thanks again, Peter!

Damion

Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada

From: Peter Cock [p.j.a.c...@googlemail.com]
Sent: Friday, February 27, 2015 1:39 PM
To: Dooley, Damion
Cc: galaxy-...@lists.bx.psu.edu
Subject: Re: Tool Testing: field inputs that occur inside repeat tag - semi 
resolved.
...
 And I run tests.sh -id blast_reporting (with Galaxy as owner
 of tool folder):

While the tests used to use tool_conf.xml.sample last year
(or even longer ago?) this was switched to using the main
tool_conf.xml instead. This is much easier for testing what
you actually have installed.

If I've guessed wrong, watch the run_tests.sh output to see
which tools are loaded - and make sure your tool loads OK
(and for example doesn't fail with an XML error or something).

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

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

[galaxy-dev] FW: Tool Testing: field inputs that occur inside repeat tag

2015-02-26 Thread Dooley, Damion
Slightly garbled there ... meant to say 

Help appreciated once again,

Damion

Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
___
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] Tool Testing: field inputs that occur inside repeat tag

2015-02-26 Thread Dooley, Damion
Helop aI've been testing (using planemo) some tools scheduled for toolshed 
publication.  My first test works, but Galaxy reports that the second one fails 
with: 

Parameter %s requires a value, but has no legal values defined % self.name
AssertionError: Parameter filter_column requires a value, but has no legal 
values defined
requests.packages.urllib3.connectionpool: DEBUG: POST /api/tools HTTP/1.1 500 
None

I presume its because of extra stuff needed to name variables have to be 
referred-to when they are inside a repeat section?  Or is it just something 
pecular to do with data_table_sources?

test!-- Equivalent to output of old bccdc BLASTn XML to Tabular --
param name=blastxml_file value=blast_reporting_1.blastxml/
output name=tabular_file file=blast_reporting_1a.tabular/
param name=out_format value=std/
param name=column_labels value= /
param name=drop_redundant_hits value=true/

/test
test
param name=blastxml_file value=blast_reporting_1.blastxml/
output name=tabular_file file=blast_reporting_1b.tabular/
param name=out_format value=std/
param name=column_labels value= /
param name=drop_redundant_hits value=true/

param name=filter_column value=pident/
param name=filter_comparison value=gte/
param name=filter_value value=97/

/test

The form repeat area:

repeat name=filter_num title=Numeric Filter min=0 max=4

param name=filter_column type=select label=Col
options from_data_table=blast_reporting_fields
filter type=static_value value=numeric 
column=type /
filter type=sort_by column=name/
/options
/param

repeat name=constraint title=Constraint min=1 max=3
param name=filter_comparison type=select 
label=Comparison
option value=gtegt;= /option
option value=gtgt;/option
option value=ltlt; /option
option value=ltelt;= /option
option value===equal to /option
option value=!=not equal to /option
/param

param name=filter_value type=text value= 
label=Value
validator type=regex message=Please input a 
number([0-9]+|[0-9]*\.[0-9]+)/validator
/param

/repeat
/repeat

The working command section that sends the filter field info is:

#for $i, $my_repeat in enumerate( $filter_num ) 
$my_repeat.filter_column:
#for $i, $my_repeat2 in enumerate( $my_repeat.constraint ) 
$my_repeat2.filter_comparison $my_repeat2.filter_value,
#end for
;
#end for 




Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
___
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] Tool test failure - I could use some help...

2015-02-11 Thread Dooley, Damion
I was trying to track down why an attempt to test my tool is eventually failing 
with:

ValueError: No such test TestForTool_ffp_phylogeny

In my case the tool code is located in a Galaxy's tool shed folder, so I'm 
guessing that might have something to do with it?  Has someone come up with a 
thorough checklist on issues around this?

Tool xml file header:

tool id=ffp_phylogeny name=Feature Frequency Profile Phylogeny 
version=0.1.00

Using John Chilton's ready made sqlite db (though our live server uses a 
postgres one)

 export GALAXY_TEST_DB_TEMPLATE=tmp/db_gx_rev_0120.sqlite

Command line (recent Update tag latest_2015.01.13 for changeset 0cb6cec4ee57):

 run_tests.sh -id ffp_phylogeny

begins the process alright.

***

My galaxy-dist/tool_shed.xml.sample where I understand references to the tool 
are supposed to go (and I confirmed the tool file absolute path):

?xml version=1.0?
toolbox tool_path=../shed_tools
section id=bccdc_tools name=BCCDC Tools version=
  tool 
file=/usr/local/galaxy/production1/shed_tools/salk.bccdc.med.ubc.ca/toolshed/repos/ddooley/ffp_phylogeny/eb1924fbd3ba/ffp_phylogeny/ffp_phylogeny.xml
 
guid=salk.bccdc.med.ubc.ca/toolshed/repos/ddooley/ffp_phylogeny/ffp_phylogeny/0.1.00
  tool_shedsalk.bccdc.med.ubc.ca/toolshed/tool_shed
repository_nameffp_phylogeny/repository_name
repository_ownerddooley/repository_owner

installed_changeset_revisioneb1924fbd3ba/installed_changeset_revision

idsalk.bccdc.med.ubc.ca/toolshed/repos/ddooley/ffp_phylogeny/ffp_phylogeny/0.1.00/id
version0.1.00/version
/tool
  tool 
file=salk.bccdc.med.ubc.ca/toolshed/repos/damion/versioned_data/e9ebe2959300/versioned_data/versioned_data.xml
 
guid=salk.bccdc.med.ubc.ca/toolshed/repos/damion/versioned_data/versioned_data/0.1.00
  tool_shedsalk.bccdc.med.ubc.ca/toolshed/tool_shed
repository_nameversioned_data/repository_name
repository_ownerdamion/repository_owner

installed_changeset_revisione9ebe2959300/installed_changeset_revision

idsalk.bccdc.med.ubc.ca/toolshed/repos/damion/versioned_data/versioned_data/0.1.00/id
version0.1.00/version
/tool

/toolbox

Thanks for any pointers!  Soon as tests fly, I'll be contributing the tools up 
to the test tooshed.

Regards,

Damion


Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
___
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/

Re: [galaxy-dev] Tool param type library_data (Dooley, Damion)

2015-01-20 Thread Dooley, Damion
I was successful getting library dataset selection and form submission to 
happen within tool form tool form input param type=library_data ... - Yay!  
But it appears one last fix (besides the url: 
/visualization/list_libraries,' bug) is needed to enable history tool item to 
be RERUN.

So if a galaxy dev can tackle this, great!  Otherwise I'll have to drop this 
approach :( 

*
For others who may need...

tool form's param:

param name=library_datasets type=library_data label=Reference Bin 
file help=Select one reference bin at a time from the popup window's 
Reference Bin library./

command tag contents

#if $library_datasets
-B 
#for $i, $dataset in enumerate($library_datasets)
#$dataset.get_file_name()
$dataset.id
#end for

#end if

Successfully submits either the full file path of selected dataset, or its id.

*
However trying to rerun this history tool item gets us an error (not related to 
the above command contents):

Error Traceback:
View as:   Interactive  |  Text  |  XML (full)
⇝ AttributeError: 'int' object has no attribute 'id'

Module galaxy.tools.parameters.basic:146 in value_to_basic  view
  return self.to_string( value, app )
Module galaxy.tools.parameters.basic:2406 in to_string 
app galaxy.app.UniverseApplication object at 0x59a0710
ldda331
selfgalaxy.tools.parameters.basic.LibraryDatasetToolParameter 
object at 0x7fced01d2090
value   [331]
  return [ldda.id for ldda in value]
AttributeError: 'int' object has no attribute 'id'

which is in /lib/galaxy/tools/parameters/basic.py:

class LibraryDatasetToolParameter( ToolParameter ):

Parameter that lets users select a LDDA from a modal window, then 
use it within the wrapper.


...
def to_string( self, value, app ):
if not value:
return value
return [ldda.id for ldda in value]

Value is getting an array of dataset ids, whereas this method is expecting 
value to be a list of dataset objects.  I tried changing ldda.id to just id 
but found other parts of  LibraryDatasetTool code were broken as they too were 
expecting an object.  Maybe this is related to the tool job's history detail 
link showing Reference Bin file as a string label of an object?:

Input Parameter Value   Note for rerun
BLAST results as XML240: megablast Pasted Entry vs 
16SMicrobial.fasta   
Reference Bin file  [galaxy.model.LibraryDatasetDatasetAssociation 
object at 0x7fcee04d4350]  
Tabular Report Column LabelsShort name  
HTML Report templatetemplates.html_report




The other bug:

2) Tool_form.mako has a hardcoded url that doesn't work for galaxy installs 
that have a prefix so that needs adjustment:

  $(.add-librarydataset).click(function() {
var link = $(this);
$.ajax({
url: /visualization/list_libraries,
___
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/

Re: [galaxy-dev] Tool param type library_data

2015-01-19 Thread Dooley, Damion
Just to summarize what I found about getting tool parameter param 
type=library_data  going again (though a future expansion of dataset 
parameters to handle this would be great, esp. if one can specify a particular 
data library):

1) Aysam's patch (thanks!)
2) Tool_form.mako has a hardcoded url that doesn't work for galaxy installs 
that have a prefix so that needs adjustment:

  $(.add-librarydataset).click(function() {
var link = $(this);
$.ajax({
url: /visualization/list_libraries,

Now one gets the popup form in one's tool where one or more library datasets 
can be selected.  Selecting one or more gets them listed in one's tool form.

However, I'm not understanding how to get those items submitted with galaxy 
form command params.  I tried for example:
  -B $library_datasets[0].file_name
and also tried a loop to enumerate the dataset file names.

I keep on getting: 

File cheetah_DynamicallyCompiledCheetahTemplate_1421706558_2_37415.py, line 
203, in respond
TypeError: object of type 'LibraryDatasetValueWrapper' has no len()

If anyone knows the solution, that would be appreciated.

Damion

Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
___
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] Tool param type library_data

2015-01-14 Thread Dooley, Damion
I just discovered a scant reference to this on the ToolSyntax page, and tracked 
it down to something that looks like it was introduced around 2011:  a 
LibraryDatasetToolParameter


http://bitbucket.org/galaxy/galaxy-central/changeset/8553b02ce9ee/
changeset:   8553b02ce9ee
user:kanwei
date:2011-07-19 03:56:23
summary: Tools: Add new LibraryDataset tool parameter to expose LDDAs to 
tools. Use trackster's modal popup interface for item selection. Add new 
InputWrapper that exposes LDDA templates as well.

Now I can't quite fathom the syntax around this but it appears to be broken - 
python error displayed:

TypeError: get_initial_value() got an unexpected keyword argument 'history'

Which is because in the galaxy code the 
   
   def get_initial_value( self, trans, context ) 

function is missing a history=None parameter like other types have?!

But is this input type essentially discontinued (no other refs to it on the 
web) or is it supposed to be operational?

I was hoping for a tool input that would list a particular libraries datasets, 
so that I could obtain their file paths for use in my tool.

param name=test type=library_data label=test help=test help/
   options library=Reference Bins
/param

Regards,

Damion


Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
___
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/

Re: [galaxy-dev] No API way to delete a galaxy data library folder?

2015-01-12 Thread Dooley, Damion
Hi Martin - Following up on this - I think your API folder delete commit is : 
https://bitbucket.org/galaxy/galaxy-central/commits/8f76a6abc5d7d5c98b6c148c4cfe75cc1c159e90
  ?  I was wondering how to find out more about this API call.  Not knowing the 
guts of the Galaxy API code much, is it a call like:

http://[my galaxy]/api/folders/[my folder id]/delete

I haven't tested since I haven't played with Next-stable galaxy branch.  When 
roughly does that get woven into stable or default?

Regards,

Damion

 Martin Čech | Threaded | More 
 Dec 04, 2014; 4:40pm Re: No API way to delete a galaxy data library folder?
 I have actually implemented this feature and it will be in the next release 
 (which should be made public around next monday).
___
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/

Re: [galaxy-dev] Galaxy Bioblend option for importing dataset into a library? (Nicola Soranzo)

2015-01-12 Thread Dooley, Damion
 Hi Damion,

 I finally got to implement this, see method copy_from_dataset() in this
commit:

 https://github.com/afgane/bioblend/commit/bc6b7cb71abb25aa109b85b1ff24e73aadac5ce4

Thanks Nicola!

Damion

Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
___
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] No API way to delete a galaxy data library folder?

2014-12-04 Thread Dooley, Damion
I just wanted to verify that this is the case?  I've put in a Trello card 
requesting this feature for the API.  My app creates and manages the content of 
some data library folders for the versioned data project.

Regards,

Damion

Hsiao lab, BC Public Health Microbiology  Reference Laboratory, BC Centre for 
Disease Control
655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
___
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/