Question: (Closed) Setting clipping sequence as workflow parameter when running FASTX Clipper from BioBlend API
gravatar for ablumenf
3.9 years ago by
United States
ablumenf10 wrote:

I am using the BioBlend API to run a workflow on Galaxy, and I am having trouble setting the parameter to change the clipping sequence. I am able to change several of the other parameters of the tool, but not that one. I think it may have to do with the way the XML in the tool sets the param - it is part of a conditional, and I can't change the other param in the conditional. If anyone has been able to get this to work, your help is appreciated. A very detailed explanation follows: 


I am running a python script that will set the parameters for the workflow. First, I am creating a dictionary that set the parameters I want to change. In this example, I'll try to change the clipping sequence and the 'keepdelta' parameter (as a control to show that it works):

param_set = {'':{'keepdelta':99,'clip_sequence':'TGGAATTCTCGGGTGCCAAGGC'}}

The 'keepdelta' parameter will be set to 99 and the clip sequence will be set to TGGAATTCTCGGGTGCCAAGGC
I then run the workflow with this line: 

wf_results = gi.workflows.run_workflow('<workflow_ID_hidden>', dataset_map=dataset_map,params=param_set,history_name='New_History', import_inputs_to_history=True)

This creates a history New_History that starts ok. When the clipping tool runs I can look at the tool info and see this. The clipping sequence has not been updated (the AA is the value saved in the workflow), but the keepdelta value has, and been set to 99: 

Library to clip 3: FASTQ Groomer on data 2  
Minimum sequence length (after clipping, sequences shorter than this length will be discarded) 15  
Source user  
Enter custom clipping sequence AA  
enter non-zero value to keep the adapter sequence and x bases that follow it 99  
Discard sequences with unknown (N) bases Yes  
Output options Output only clipped sequences (i.e. sequences which contained the adapter)

My suspicion is that it has something to do with the way the parameter is saved in the XML file: the clipping sequence is part of a conditional, while the keepdelta value is not. The XML wrapper text is here:

I have tried setting the param as clip_source.clip_sequence , as in the XML, but that did not work. Any help would be appreciated!


Tool name: Clip
Tool version: 1.0.1
Tool ID:
ToolShed URL:


ADD COMMENTlink modified 3.9 years ago • written 3.9 years ago by ablumenf10

Post was closed because the problem was solved.

ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by ablumenf10
gravatar for ablumenf
3.9 years ago by
United States
ablumenf10 wrote:

*** Solved ***

I did a bit more searching and found that the solution is to use the | character instead of the . in naming the parameter in the conditional. Setting the params would become: 

param_set = {'':{'keepdelta':99,'clip_source|clip_sequence':'TGGAATTCTCGGGTGCCAAGGC'}}

The name of the conditional and the name of the parameter are separated by a | and not a . 

ADD COMMENTlink written 3.9 years ago by ablumenf10
Please log in to add an answer.
The thread is closed. No new answers may be added.


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