# HG changeset patch # User bgruening # Date 1624378008 0 # Node ID f46f0e4f75c4e6b36209af283ff0ad87be1752f5 # Parent ddf54b12c295195d649e7178f47a3820db659b4b "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 5f5d5802a961a77ceb092cbdef90d93e29717029-dirty" diff -r ddf54b12c295 -r f46f0e4f75c4 cat.xml --- a/cat.xml Tue Oct 06 09:47:04 2020 +0000 +++ b/cat.xml Tue Jun 22 16:06:48 2021 +0000 @@ -1,4 +1,4 @@ - + tail-to-head (cat) macros.xml @@ -11,12 +11,15 @@ > '$out_file1' && + #end for #for $q in $queries: - #echo ' '.join(['"%s"' % $file for $file in $q.inputs2])# + #for $file in $q.inputs2: + cat '$file' >> '$out_file1' && + #end for #end for - > $out_file1 + exit 0 ]]> diff -r ddf54b12c295 -r f46f0e4f75c4 sort_rows.xml --- a/sort_rows.xml Tue Oct 06 09:47:04 2020 +0000 +++ b/sort_rows.xml Tue Jun 22 16:06:48 2021 +0000 @@ -1,11 +1,11 @@ - + according to their columns macros.xml $outfile + python -c 'for line in ( "\t".join(sorted(line.strip().split("\t"))) for line in open("$infile") ): print(line)' > $outfile ]]> diff -r ddf54b12c295 -r f46f0e4f75c4 unfold_column.py --- a/unfold_column.py Tue Oct 06 09:47:04 2020 +0000 +++ b/unfold_column.py Tue Jun 22 16:06:48 2021 +0000 @@ -2,18 +2,22 @@ import sys -out = open(sys.argv[4], 'w+') +out = open(sys.argv[4], "w+") sep = sys.argv[3] # un-sanitize Galaxy inputs -if sep == 'X': - sep = ';' +if sep == "X": + sep = ";" with open(sys.argv[1]) as handle: for line in handle: - cols = line.split('\t') + cols = line.split("\t") unfolding_column = int(sys.argv[2]) - 1 - column_content = cols[ unfolding_column ] - for elem in column_content.split( sep ): - out.write( '\t'.join( cols[:unfolding_column] + [elem] + cols[unfolding_column+1:]) ) + column_content = cols[unfolding_column] + for elem in column_content.split(sep): + out.write( + "\t".join( + cols[:unfolding_column] + [elem] + cols[unfolding_column + 1:] + ) + ) out.close()