Converting command line awk to Galaxy

I have the following command line code for using awk to manipulate a file:

	awk 'BEGIN{RS=">";OFS="\t"}NR>1{print ">"$1,$2}' input.file | \
	awk '{print $1"\t"$2"\t"substr($2,1,4)""substr($2,length($2)-1,2)}' | \
	awk '{$2 = substr($2, 5); print }' | \
	awk '{$2 = substr($2, 1, length($2)-2); print }' | \
	awk '{print $1"_"$3"\n"$2}' > output.file

What would I actually put in AWK Program box in Galaxy to make this work?

Hi @Billy_Mills,
Accidentally, I came across your question. I understand, it was asked years ago, but the answer might be useful for Galaxy community. I can suggest something like this: create five awk jobs, each job with a script from a single line (between pipes), create a Galaxy workflow with these five awk jobs and add the workflow into the tool panel, so it can be used as a tool. The workflow is essentially a pipe.
Kind regards,
Igor

1 Like