From 0c25dc3219a0abf2dd433d2ebae2e5b622350e90 Mon Sep 17 00:00:00 2001 From: Mark Schroering Date: Thu, 14 Nov 2019 15:02:11 -0500 Subject: [PATCH] Add option to update sample name when creating a genomic set --- lib/cmds/genomics_cmds/create-genomic-set.js | 7 ++++++- test/unit/commands/ga4gh-genomicset.test.js | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/cmds/genomics_cmds/create-genomic-set.js b/lib/cmds/genomics_cmds/create-genomic-set.js index 318bf99..fc46b5c 100644 --- a/lib/cmds/genomics_cmds/create-genomic-set.js +++ b/lib/cmds/genomics_cmds/create-genomic-set.js @@ -58,6 +58,10 @@ exports.builder = yargs => { describe: 'Update the filter for all variants to be PASS', type: 'boolean', default: false + }).option('update-sample', { + describe: 'Update the VCF sample name to a unique value', + type: 'boolean', + default: false }); }; @@ -74,7 +78,8 @@ exports.handler = async argv => { indexedDate: argv.indexedDate, performerId: argv.performerId, outputVcfName: argv.outputVcfName, - passFilter: argv.passFilter + passFilter: argv.passFilter, + updateSample: argv.updateSample }); print(response.data, argv); }; diff --git a/test/unit/commands/ga4gh-genomicset.test.js b/test/unit/commands/ga4gh-genomicset.test.js index c1bbba7..b4e0ff3 100644 --- a/test/unit/commands/ga4gh-genomicset.test.js +++ b/test/unit/commands/ga4gh-genomicset.test.js @@ -43,7 +43,8 @@ test.serial.cb('The "ga4gh-genomicsets-create" should create a genomic set', t = performerId: 'performer1', indexedDate: '1999-01-01 12:00', outputVcfName: 'foo.vcf.gz', - passFilter: false + passFilter: false, + updateSample: false }); t.is(printSpy.callCount, 1); t.is(printSpy.getCall(0).args[0], res.data);