Question: Use paired collection on wrapper
gravatar for benoit.valot
4 months ago by
benoit.valot0 wrote:


I'm try to write a wrapper for a tool that performed subsampling of fastq file. The script is also able to handle paired-end files. My problem is to run on paired collection.

See the input parameter

    <conditional name="fastq" >
  <param name="choice" type="select" label="Type of reads to subsampling" help="" >
    <option value="choice1" selected="true">Single</option>
    <option value="choice2">Paired (separated)</option>
    <option value="choice3">Paired</option>
  <when value="choice1">
    <param name="single" type="data" format="fastq,fastq.gz"
           label="Single read file" help="Fastq(gz) format" />
  <when value="choice2">
    <param name="forward" type="data" format="fastq,fastq.gz"
           label="Forward read file" help="Fastq(gz) format" />
    <param name="reverse" type="data" format="fastq,fastq.gz"
           label="Reverse read file" help="Fastq(gz) format" />
  <when value="choice3">
    <param name="pairedfile" type="data_collection" format="fastq,fastq.gz"
           label="Paired of read files" help="Fastq(gz) format"
           collection_type="paired" />

And the command line:

    #if $fastq.choice == "choice3"
  #if $fastq.pairedfile
    -r '${fastq.pairedfile.forward}'
    -l '${fastq.pairedfile.reverse}'
  #end if 
#end if

When I run the wrapper, I got the following message:

Error executing tool: Paired instance must define 'forward' and 'reverse' datasets .

I have look at other tools like bwa-mem that use also paired collection, but don't see where is the problem in my code.

Thanks in advance


software error galaxy • 164 views
ADD COMMENTlink modified 4 months ago • written 4 months ago by benoit.valot0
gravatar for benoit.valot
4 months ago by
benoit.valot0 wrote:

I finnaly found the problem.

It was not related to the input, but to the output collection. Name of dataset must be forward and reverse as follow:

    <collection name="paired_output" type="paired"
            label="${} on ${}">
  <data name="forward" format="fastqsanger.gz"
  <data name="reverse" format="fastqsanger.gz"
  <filter>fastq['choice'] == "choice3"</filter>
ADD COMMENTlink written 4 months ago by benoit.valot0
Please log in to add an answer.


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