# HG changeset patch # User jowong # Date 1542897969 18000 # Node ID 89a88542f301a1a840ac8aa4657c3e8814ec6ff5 # Parent 12b9a42289c2c0d77accab625401ef0e27f1f931 planemo upload diff -r 12b9a42289c2 -r 89a88542f301 kwip.xml --- a/kwip.xml Thu Nov 22 09:25:15 2018 -0500 +++ b/kwip.xml Thu Nov 22 09:46:09 2018 -0500 @@ -1,4 +1,4 @@ - + Calculates k-mer weighted inner product, a de novo estimator of genetic similarity kwip diff -r 12b9a42289c2 -r 89a88542f301 kwip_postprocess.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/kwip_postprocess.py Thu Nov 22 09:46:09 2018 -0500 @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +import sys +import argparse as ap +import re +parser = ap.ArgumentParser(prog='kwip_postprocess', conflict_handler='resolve', + description="Postprocess galaxy kWIP output") + +input = parser.add_argument_group('Input', '') +input.add_argument('-i', '--input', nargs=1, required=True, help="kWIP galaxy OUTPUT") + + +if len(sys.argv) == 0: + parser.print_usage() + sys.exit(1) + +args = parser.parse_args() + + +with open(args.input[0]) as kwip_output: + with open('kwip_postprocess_output.txt', 'w') as output: + for line in kwip_output: + new_line = re.sub('(_1.fastq(.gz)*|_2.fastq(.gz)*|.fastq(.gz)*)', '', line) + output.write(new_line) + + + diff -r 12b9a42289c2 -r 89a88542f301 kwip_postprocess.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/kwip_postprocess.xml Thu Nov 22 09:46:09 2018 -0500 @@ -0,0 +1,17 @@ + + Postprocess kWIP galaxy output + + + + + + + + +This tool processes the kwip galaxy output such that it is in line with the command line + + + +