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.