Re: [galaxy-dev] "interval" attribute for Input?: error in exec_pre_job hook
Hi, What I am trying is, A) to write an exec_after_process for tool1(Scatterer tool). This tool1 gives multiple outputs(in the form of files names generated by Galaxy). ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ scatterer_postprocess.py def exec_after_process(app, inp_data, out_data, param_dict, tool, stdout, stderr): print "Collected Dataset[Primary] is %s"% param_dict.get('__collected_datasets__')['primary']['output1']; Output: Collected Dataset[Primary] is {'output2': <galaxy.model.HistoryDatasetAssociation object at 0xb0648ac>, 'output3': <galaxy.model.HistoryDatasetAssociation object at 0xb15170c>, 'output4': <galaxy.model.HistoryDatasetAssociation object at 0xaf499ac>} ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ I could see these values successfully. Next, B) I wanted to view these multiple values in the exec_prejob hook of tool2(Gatherer) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ gatherer_prejob.py def exec_before_job(inp_data, out_data, param_dict, tool): print "******************* collected dataset is %s"% param_dict.get('__collected_datasets__')['primary']['output1']; Output: TypeError: Error in 'Gather' hook 'exec_before_job', original message: exec_before_job() got multiple values for keyword argument 'inp_data' ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ I am not very savy with Python for now. Can someone point me out to any possible resolution to this issue. The reason I am writing these hooks is to read the multiple inputs in tool2 thrown out by tool1. Thank you for your time. Regards, Sonali Amonkar From: Sonali Amonkar Sent: Friday, January 21, 2011 8:16 PM To: 'galaxy-dev@lists.bx.psu.edu' Subject: "interval" attribute for Input? Hi, Currently I am building a workflow which splits a file into multiple chunks and then recreates it back into one. Following the document on https://bitbucket.org/galaxy/galaxy-central/wiki/ToolsMultipleOutput, I wrote the following code. The following is my Splitter tool: <tool id="sc" name="sc" version = "1.0.0" force_history_refresh="True"> <description> My tool 1 </description> <requirements/> <command>java -cp /Splitter1.jar /Common.jar SplitterModule $input $output1 $output1.id $__new_file_path__</command> <inputs> <param format="txt" name="input" type="data" label="reads"> <label>Reads</label> </param> </inputs> <outputs> <data format="interval" name="output1" metadata_source="input"/> </outputs> <help> </help> </tool> The following is my Integrator tool: <tool id="gt" name="gt" version = "1.0.0"> <description> My Tool 2 </description> <requirements/> <command> java -cp Integrator1.jar:Common.jar IntegratorModule $input $output </command> <inputs> <param format="interval" name="input" type="data" label="pp"> <label>File Name</label> </param> </inputs> <outputs> <data format="text" name="output"/> </outputs> <help> This tool reads the reads.pp.txt file and creates smaller sized batches of it. </help> </tool> When I try to connect and run the workflow, this is what happens: 1. The files with the names generated from the parameters are created in the tmp folder temporarily 2. Then these are removed and converted to .dat files and placed in database/files/000 folder with the galaxy generated numbers file names.(eg. dataset_89.dat) 3. However, when I check the parameters in the IntegratorModule program, I receive new dataset files generated by Galaxy and NOT the ones which were created and should have been passed from the Splitter module Is there a format I need to follow when writing the Integrator Module's input parameters? Any pointer to any document which mentions this will be helpful. Thank you for your time. Warm Regards, Sonali Amonkar DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
participants (1)
-
Sonali Amonkar