# HG changeset patch # User bgruening # Date 1624377806 0 # Node ID 5fef6d08de83ddecf4954be9476dc559f094667f # Parent 28b4fd1b0e9ab07fc3e779b2394cc80747e04a17 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 5f5d5802a961a77ceb092cbdef90d93e29717029-dirty" diff -r 28b4fd1b0e9a -r 5fef6d08de83 awk.xml --- a/awk.xml Sun May 17 16:20:08 2020 +0000 +++ b/awk.xml Tue Jun 22 16:03:26 2021 +0000 @@ -1,4 +1,4 @@ - + with awk macros.xml @@ -10,7 +10,7 @@ + tail-to-head (cat) macros.xml @@ -11,17 +11,20 @@ > '$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 28b4fd1b0e9a -r 5fef6d08de83 sort_rows.xml --- a/sort_rows.xml Sun May 17 16:20:08 2020 +0000 +++ b/sort_rows.xml Tue Jun 22 16:03:26 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 28b4fd1b0e9a -r 5fef6d08de83 unfold_column.py --- a/unfold_column.py Sun May 17 16:20:08 2020 +0000 +++ b/unfold_column.py Tue Jun 22 16:03:26 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()