Mercurial > repos > sanbi-uwc > data_manager_shapeit_reference
changeset 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 | 6b54dcb42cd5 |
files | data_manager/shapeit_ref.py data_manager/shapeit_ref.xml data_manager_conf.xml tool-data/shapeit_ref.loc.sample tool_data_table_conf.xml.sample |
diffstat | 5 files changed, 13 insertions(+), 7 deletions(-) [+] |
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')
--- a/data_manager/shapeit_ref.xml Thu Sep 13 14:35:09 2018 -0400 +++ b/data_manager/shapeit_ref.xml Sat Sep 15 03:20:01 2018 -0400 @@ -1,11 +1,12 @@ -<tool id="shapeit_reference_manager" name="SHAPEIT reference data path manager" tool_type="manage_data" version="0.0.5"> - <command detect_errors="aggressive"><![CDATA[ +<tool id="shapeit_reference_manager" name="SHAPEIT reference data path manager" tool_type="manage_data" version="0.0.6"> + <command detect_errors="exit_code"><![CDATA[ python $__tool_directory__/shapeit_ref.py '${value}' '${name}' '${path}' '${reference_prefix}' '${map_prefix}' + '${sample_prefix}' '${output_file}' ]]></command>> <inputs> @@ -14,6 +15,7 @@ <param name="path" type="text" label="Filesystem path to directory containing this reference set" /> <param name="reference_prefix" type="text" label="Filename prefix for the reference (.hap / .legend / .sample) files" /> <param name="map_prefix" type="text" label="Filename prefix for map files in this reference set" /> + <param name="sample_prefix" type="text" label="Filename prefix for sample file for this reference set"> </inputs> <outputs> <data name="output_file" format="data_manager_json" />
--- a/data_manager_conf.xml Thu Sep 13 14:35:09 2018 -0400 +++ b/data_manager_conf.xml Sat Sep 15 03:20:01 2018 -0400 @@ -8,6 +8,7 @@ <column name="path" /> <column name="reference_prefix" /> <column name="map_prefix" /> + <column name="sample_prefix" /> </output> </data_table> </data_manager>
--- a/tool-data/shapeit_ref.loc.sample Thu Sep 13 14:35:09 2018 -0400 +++ b/tool-data/shapeit_ref.loc.sample Sat Sep 15 03:20:01 2018 -0400 @@ -1,7 +1,7 @@ #This file lists the locations of SHAPEIT reference data connections # -#<value> <description> <path> <reference_file_prefix> <map_file_prefix> +#<value> <description> <path> <reference_file_prefix> <map_file_prefix> <sample_file_prefix> # #For example # -#1000G_Phase3 1000 Genomes project haplotypes /path/to/shapeit_ref/1000G 1000GP_Phase3_ genetic_map_ +#1000G_Phase3 1000 Genomes project haplotypes /path/to/shapeit_ref/1000G 1000GP_Phase3_chr genetic_map_chr 1000GP_Phase3
--- a/tool_data_table_conf.xml.sample Thu Sep 13 14:35:09 2018 -0400 +++ b/tool_data_table_conf.xml.sample Sat Sep 15 03:20:01 2018 -0400 @@ -1,6 +1,6 @@ <tables> <table name="shapeit_ref" comment_char="#"> - <columns>value, name, path, reference_prefix, map_prefix</columns> + <columns>value, name, path, reference_prefix, map_prefix, sample_prefix</columns> <file path="tool-data/shapeit_ref.loc" /> </table> </tables> \ No newline at end of file