Question: Change output filename
0
gravatar for devillartay
4.3 years ago by
devillartay30
France
devillartay30 wrote:

Hello alls

how to change the output filename of an action so that it becomes prefix_input filename (where I decide which prefix I want to add) rather than "action on data 1". I do not see how to do it in the "new output name" option

Thanks for your help

jp

galaxy • 1.9k views
ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by devillartay30
2
gravatar for Dannon Baker
4.3 years ago by
Dannon Baker3.7k
United States
Dannon Baker3.7k wrote:

You should be able to use the syntax #{tool_input_name} to grab the input filename, and can combine this with other text, for something like "YourPrefix on #{tool_input_name}".

One helpful tip is that if you're seeing a blank where you expected an input name to be, it probably means the tool's input name doesn't actually match.  For example, the input might be 'input' instead of 'input1', etc.  In recent versions of galaxy, valid inputs will be displayed in the Rename Action box as a reference.

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by Dannon Baker3.7k
1

Thanks Dannon but this does not work for me, the output name is either blank if I use #{input_file_variable} or "{#input_file_variable}" if I use {#input_file_variable}. Lastly, it becomes "MyPrefix on" if I use the syntax MyPrefix on ${#input_file_variable}. In this last case a new box appears in my workflow page which says:

Workflow Parameters

input_file_variable

I don't know what to do next ;-( Best jp

2014-08-20 13:24 GMT+02:00 Dannon Baker on Galaxy Biostar < notifications@biostars.org>:

ADD REPLYlink written 4.3 years ago by devillartay30

It's definitely the former (#) syntax, as the $ syntax is for workflow parameters, which while they can be used in combination with the rename actions, aren't what you're looking for.

Let me test a few things here and get back to you.

ADD REPLYlink written 4.3 years ago by Dannon Baker3.7k

Editing the original response, so others find this easier.  Turns out I needed one more coffee before I responded above.

ADD REPLYlink written 4.3 years ago by Dannon Baker3.7k

I'm desperate, it doesn't work. Here is exactly what I do:

in my workflow canvas for testing this  I have an Input dataset tool box and a FASTQ to FASTA tool box.

Within this last tool box , I create a new output_file and enter #{FASTQ to FASTA_input_name} in the New output name as you suggest

When I run the workflow, the name is empty

ADD REPLYlink written 4.3 years ago by devillartay30
1

Which FASTQ to FASTA converter are you using?  Here are examples, using both.  Note the difference between "input" and "input_file".

https://www.dropbox.com/s/lu77ne1mqpq2r4r/Screenshot%202014-08-20%2011.33.17.png

https://www.dropbox.com/s/d24cn977duq3fno/Screenshot%202014-08-20%2011.33.20.png

ADD REPLYlink written 4.3 years ago by Dannon Baker3.7k
1
gravatar for devillartay
4.3 years ago by
devillartay30
France
devillartay30 wrote:

Bingo !!!!! now it works. Thanks a lot Dannon.

To sumarize:

in the New output name window of a particulaenter: prefix #{input_file} or prefix #{input} depending on the tool being used

If you have several successive tools in your workflow be sure to do that for each tool if you want to keep track of the name of your input dataset. You end up with something like this in my case after 8 tools (each new prefix is in italic) but at least you keep the info that it concerns the IonXpress 018_TOR-126 dataset

 

118: IonXpress_018_TOR-126.fastq

213: Groomer IonXpress_018_TOR-126.fastq

214: FASTQ to Tabular Groomer IonXpress_018_TOR-126.fastq

215: Sort FASTQ to Tabular Groomer IonXpress_018_TOR-126.fastq

216: Tabular to FASTQ Sort FASTQ to Tabular Groomer IonXpress_018_TOR-126.fastq

217: Groomer Tabular to FASTQ Sort FASTQ to Tabular Groomer IonXpress_018_TOR-126.fastq

218: Filter Groomer Tabular to FASTQ Sort FASTQ to Tabular Groomer IonXpress_018_TOR-126.fastq

219: FASTA Filter Groomer Tabular to FASTQ Sort FASTQ to Tabular Groomer IonXpress_018_TOR-126.fastq

220: 500K FASTA Filter Groomer Tabular to FASTQ Sort FASTQ to Tabular Groomer IonXpress_018_TOR-126.fastq

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by devillartay30

Could you describe the location of the "New output name window" you are referring to? thanks in advance

ADD REPLYlink written 2.7 years ago by marc.ciosi0

Within the workflow editor, click on the target tool, then review the far right panel for the selection related to post-job actions such as renaming datasets. Thanks! Jen

ADD REPLYlink written 2.7 years ago by Jennifer Hillman Jackson25k
Please log in to add an answer.

Help
Access

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