-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from lifeomic/PHC-5229
feat: PHC-5229 Add VCF ingest command
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
'use strict'; | ||
|
||
const { post } = require('../../../api'); | ||
const print = require('../../../print'); | ||
|
||
exports.command = 'create-vcf <projectId> <vcfFileId> <manifestFileId>'; | ||
exports.desc = 'Create VCF ingestion for <vcfFileId> and <manifestFileId> in <projectId>'; | ||
exports.builder = yargs => { | ||
yargs.positional('projectId', { | ||
describe: 'The project ID.', | ||
type: 'string' | ||
}).positional('vcfFileId', { | ||
describe: 'The ID of the VCF file.', | ||
type: 'string' | ||
}).positional('manifestFileId', { | ||
describe: 'The ID of the manifest file.', | ||
type: 'string' | ||
}).option('succeededEmail', { | ||
describe: 'An email address to notify if the ingestion succeeds', | ||
type: 'string' | ||
}).option('failedEmail', { | ||
describe: 'An email address to notify if the ingestion fails', | ||
type: 'string' | ||
}); | ||
}; | ||
|
||
exports.handler = async argv => { | ||
const response = await post(argv, `/v1/genomic-ingestion/projects/${argv.projectId}/ingestions`, { | ||
ingestionType: 'Vcf', | ||
inputFiles: { | ||
vcf: argv.vcfFileId, | ||
manifest: argv.manifestFileId | ||
}, | ||
notificationConfig: { | ||
succeededEmail: argv.succeededEmail, | ||
failedEmail: argv.failedEmail | ||
} | ||
}); | ||
print(response.data, argv); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters