# HG changeset patch
# User jowong
# Date 1540813932 14400
# Node ID 82569b47df8d9e83c7e53b016bdb3cffd75c453e
# Parent dde3036465de6d069f3dd76385a1ba0aa49abd81
planemo upload
diff -r dde3036465de -r 82569b47df8d data_path.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data_path.py Mon Oct 29 07:52:12 2018 -0400
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+import sys
+import argparse as ap
+
+parser = ap.ArgumentParser(prog='data_path', conflict_handler='resolve',
+ description="Output the galaxy file path of datasets in a text file")
+
+input = parser.add_argument_group('Input', '')
+input.add_argument('-i', '--input', nargs='+', required=True, help="Paths to data1")
+input.add_argument('-j', '--input2', nargs='*', required=True, help="Paths to data2")
+
+if len(sys.argv) == 0:
+ parser.print_usage()
+ sys.exit(1)
+
+args = parser.parse_args()
+output = open('paths.txt', 'w')
+if len(args.input2) == 0:
+ for index,path in enumerate(args.input):
+ output.write("%s\n" % (path))
+else:
+ for index,path in enumerate(args.input):
+ output.write("%s\t%s\n" % (path, args.input2[index]))
diff -r dde3036465de -r 82569b47df8d data_path.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data_path.xml Mon Oct 29 07:52:12 2018 -0400
@@ -0,0 +1,17 @@
+
+ creates a txt file of the paths of items in a data collection
+
+
+
+
+
+
+
+
+This tool outputs the paths of the files in a data collection
+
+
+
+
diff -r dde3036465de -r 82569b47df8d filler.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filler.py Mon Oct 29 07:52:12 2018 -0400
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+import sys
+import argparse as ap
+
+parser = ap.ArgumentParser(prog='filler', conflict_handler='resolve',
+ description="produce filler collection to deal with galaxy handling")
+
+input = parser.add_argument_group('Input', '')
+input.add_argument('-i', '--input', nargs=1, required=True, help="Paths to forward reads")
+input.add_argument('-o', '--output', nargs=1, required=True, help="output")
+
+if len(sys.argv) == 0:
+ parser.print_usage()
+ sys.exit(1)
+
+args = parser.parse_args()
+output = open(args.output[0], 'w')
+output.write(args.input[0])
+output.write("\n")
diff -r dde3036465de -r 82569b47df8d filler.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filler.xml Mon Oct 29 07:52:12 2018 -0400
@@ -0,0 +1,36 @@
+
+ Filler Function to deal with paired collection
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+This tool processes the PRINCE galaxy output such that it is in line with the command line
+
+
+
+
diff -r dde3036465de -r 82569b47df8d prince_postprocess.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/prince_postprocess.py Mon Oct 29 07:52:12 2018 -0400
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+
+import sys
+import argparse as ap
+import re
+parser = ap.ArgumentParser(prog='prince_postprocess', conflict_handler='resolve',
+ description="Postprocess galaxy PRINCE output")
+
+input = parser.add_argument_group('Input', '')
+input.add_argument('-i', '--input', nargs=1, required=True, help="PRINCE OUTPUT")
+input.add_argument('-s', '--sample', nargs='*', required=True, help="Sample names")
+
+if len(sys.argv) == 0:
+ parser.print_usage()
+ sys.exit(1)
+
+args = parser.parse_args()
+
+#print(args.input)
+#sample_name = re.sub('(_1.fastq(.gz)*|_2.fastq(.gz)*|.fastq(.gz)*)', '', args.label.rstrip().lstrip())
+
+with open(args.input[0]) as prince_output:
+ with open('prince_postprocess_output.txt', 'w') as output:
+ x = 1
+ index = 0
+ for line in prince_output:
+ if x%2 == 0:
+ sample = re.sub('(_1.fastq(.gz)*|_2.fastq(.gz)*|.fastq(.gz)*)', '', args.sample[index])
+ output.write(re.sub('.*.dat', sample, line))
+ index += 1
+ else:
+ output.write(line)
+ x += 1
+ #output.write("\n")
+
+
diff -r dde3036465de -r 82569b47df8d prince_postprocess.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/prince_postprocess.xml Mon Oct 29 07:52:12 2018 -0400
@@ -0,0 +1,18 @@
+
+ Postprocess PRINCE galaxy output
+
+
+
+
+
+
+
+
+
+This tool processes the PRINCE galaxy output such that it is in line with the command line
+
+
+
+