Question: Workflow inserting input name to output file
0
gravatar for johnathanwong4
9 weeks ago by
johnathanwong4 • 10 wrote:

I've looked through some of the answers but they are all about renaming the output file. I would like to use the variable to modify the output file.

I have a workflow that takes in reads of a sample and produces a tab file as its final output. I would like to insert the name of the input at the very beginning of the file. I have got the inserting part figured out but not the sample name variable part.

Say I have a input called SRR123456_1.fastq.gz. My file before the final step would look like:

Col1 Col2 Col3

My file after the final step would look like:

SRR123456

Col1 Col2 Col3

How can I accomplish this?

If it helps the tool, Im using is Text transformation with sed. If i can get this tool to recognize a variable then I can accomplish my task.

workflow • 135 views
ADD COMMENT • link • modified 9 weeks ago by Mo Heydarian ♦ 830 • written 9 weeks ago by johnathanwong4 • 10
1
gravatar for Mo Heydarian
9 weeks ago by
Mo Heydarian ♦ 830
United States
Mo Heydarian ♦ 830 wrote:

Hi,

Try using the 'Collection Column Join' tool. This tool will combine files based on a common identifier and include the file name in each column header.

If your input data is:

ID Col2 Col3

The output would look like:

ID SRR123456_2 SRR123456_3 SRR654321_2 SRR654321_3

Also have a look at the 'Add Input Name as Column' tool. It's not exactly what you're looking for but useful.

Hope this helps.

Thanks for using Galaxy!

Cheers,

Mo

ADD COMMENT • link written 9 weeks ago by Mo Heydarian ♦ 830

Thanks. The tools you mentioned didn't work for my specific case but I used them as inspiration to make a galaxy tool that fits my exact need.

ADD REPLY • link written 5 weeks ago by johnathanwong4 • 10
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: 165 users visited in the last hour