Mercurial > repos > sanbi-uwc > data_manager_shapeit_reference
diff data_manager/shapeit_ref.py @ 5:f0c7cab2f547 draft
planemo upload for repository https://github.com/pvanheus/data_manager_shapeit_reference commit 1e78071ffc35990e3ea5846a6cc07e194f886cf0
author | sanbi-uwc |
---|---|
date | Sat, 15 Sep 2018 03:20:01 -0400 |
parents | 094bd0114876 |
children |
line wrap: on
line diff
--- a/data_manager/shapeit_ref.py Thu Sep 13 14:35:09 2018 -0400 +++ b/data_manager/shapeit_ref.py Sat Sep 15 03:20:01 2018 -0400 @@ -37,6 +37,7 @@ parser.add_argument('path', help='Filesystem path to directory containing this reference set') parser.add_argument('reference_prefix', help='Filename prefix for the reference (.hap / .legend / .sample) files') parser.add_argument('map_prefix', help='Filename prefix for map files in this reference set') + parser.add_argument('sample_prefix', help='Filename prefix for sample file in this reference set') parser.add_argument('output_file', type=argparse.FileType('w'), help='JSON file used to write data manager values to') args = parser.parse_args() @@ -45,15 +46,17 @@ assert_prefix_exists(args.reference_prefix, args.path, 'reference') assert_prefix_exists(args.map_prefix, args.path, 'map') + assert_prefix_exists(args.sample_prefix, args.path, 'sample') - for column in ('key', 'name', 'path', 'reference_prefix', 'map_prefix'): + for column in ('key', 'name', 'path', 'reference_prefix', 'map_prefix', 'sample_prefix'): value = getattr(args, column) if '\t' in value: exit("TAB character found in {} argument".format(column)) data_manager_dict = {} data_table_entry = dict(value=args.key, name=args.name, path=args.path, - reference_prefix=args.reference_prefix, map_prefix=args.map_prefix) + reference_prefix=args.reference_prefix, map_prefix=args.map_prefix, + sample_prefix=args.sample_prefix) _add_data_table_entry(data_manager_dict, 'shapeit_ref', data_table_entry) args.output_file.write(json.dumps(data_manager_dict, sort_keys=True) + '\n')