comparison create_config_file.py @ 0:dd513c72ea56 draft

planemo upload for repository https://github.com/portiahollyoak/Tools commit 1f1c277219ca756c9baa453592b455597fd593d8-dirty
author portiahollyoak
date Tue, 17 May 2016 04:47:23 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:dd513c72ea56
1 import argparse
2
3
4 description = ("This script will create a configuration file for samples to be run in Pindel")
5
6
7 parser = argparse.ArgumentParser()
8 parser.add_argument("--input_file", nargs="*", help="One or more alignment files")
9 parser.add_argument("--insert_size", nargs="+", help="Expected Insert size")
10 parser.add_argument("--sample_label", nargs="+", help="Sample label")
11 parser.add_argument("--output_config_file", help="Output config file")
12 args = parser.parse_args()
13
14 template = "{input_file}\t{insert_size}\t{sample_label}\n"
15 with open(args.output_config_file, "w") as output:
16 for input_file, insert_size, sample_label in zip(args.input_file, args.insert_size, args.sample_label):
17 config_line = template.format(input_file=input_file, insert_size=insert_size, sample_label=sample_label)
18 output.write(config_line)
19
20