Hi John,

yes - I created this hacky solution and it works.

I now tried what you said, but no success.
Code:
 
<collection name="split_output" type="list" label="@OUTPUT_NAME_PREFIX@ on ${on_string} (Fastq Collection)" format_source="fastq_input1"> 
    <discover_datasets pattern="sample_(?P&lt;name&gt;.+)\.fq" directory="output" />
</collection>

It puts the samples into the collection correctly, but doesn't set a data type.

Weird enough: In the collection, the files even don't show any format
(in the small history view on the right). Is that normal?

Addon: How can I let the files in the collection have the same database build
attached? The other file (log file) gets it.

Best,
Alexander


2015-06-25 9:12 GMT-05:00 John Chilton <jmchilton@gmail.com>:
You are giving Galaxy mixed signals :). format_source will say to use
the data type specified by the corresponding input - but

<discover_datasets pattern="__name_and_ext__" directory="splits" />

Is saying (with the pattern __name_and_ext__) read files of the form
out1.fastq and assign the collection identifier to "out1" and the
extension/format to "fastq".

Two things should work - one of them will and the other might but should.

One thing you can do is not override the extension in your pattern:

<discover_datasets pattern="__name__" directory="splits" />

or if you don't want to include the .fq in the output identifier (and
you probably don't want to)

<discover_datasets pattern="(?P&lt;name&gt;.+)\.fq" />

If that doesn't work - it is a bug and please let me know and I will
attempt to fix it.

The hackier way to get this to work that I am more confident will work
- is to drop the format_source - use the same pattern:

<discover_datasets pattern="__name_and_ext__" directory="splits" />

But just use a shell command or something to rename all files of the
form *.fq to *.${fastq_input1.ext}.

Hope this helps.

-John


On Thu, Jun 25, 2015 at 9:56 AM, Alexander Vowinkel
<vowinkel.alexander@gmail.com> wrote:
> no - not a typo. The tool can process both.
> It's just my naming, because I use it for fastq.
> I'll change the help tag.
>
> 2015-06-25 3:44 GMT-05:00 Peter Cock <p.j.a.cock@googlemail.com>:
>>
>> Hi Alexander,
>>
>> If this wasn't a collection, I would expect  format_source to work
>> (possibly also using metadata_source="fastq_input1"), so perhaps
>> this is a bug - John?
>>
>> Peter
>>
>> P.S. Your help caption and output label both say FASTQ, but the
>> input also allows FASTA input. Typo?
>>
>> On Thu, Jun 25, 2015 at 2:39 AM, Alexander Vowinkel
>> <vowinkel.alexander@gmail.com> wrote:
>> > Hi,
>> >
>> > I have an input, that can be fasta,fastqsanger,fastqillumina:
>> >
>> > <param name="fastq_input1" type="data"
>> > format="fasta,fastqsanger,fastqillumina" label="Select the fastq file"
>> > help="Specify fastq file with reads"/>
>> >
>> >
>> > I have multiple outputfiles - bundled in a list collection:
>> >
>> > <collection name="split_output" type="list" label="@OUTPUT_NAME_PREFIX@
>> > on
>> > ${on_string} (Fastq Collection)" format_source="fastq_input1">
>> >     <discover_datasets pattern="__name_and_ext__" directory="splits" />
>> > </collection>
>> >
>> >
>> > The format_source parameter doesn't work - the files in the list
>> > (extension
>> > fq) are of format "fq"
>> >
>> > How can I make it possible that they are fasta,fastqsanger,fastqillumina
>> > depending on fastq_input1?
>> >
>> > Thanks,
>> > Alexander
>> >
>> > ___________________________________________________________
>> > 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/
>
>