├── .devcontainer └── devcontainer.json ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md ├── semantic.yml └── workflows │ ├── ci.yml │ ├── codeql-analysis.yml │ ├── github-pages.yml │ ├── notify.yml │ └── stale_issue.yml ├── .gitignore ├── .gitmodules ├── .go-version ├── .nvmrc ├── .versionrc ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── THIRD-PARTY ├── buildspec.yml ├── bump.sh ├── examples ├── demo-cwl-project │ ├── agc-project.yaml │ └── workflows │ │ ├── hello │ │ └── hello.cwl │ │ ├── manyjobs │ │ ├── MANIFEST.json │ │ ├── compress-file.cwl │ │ ├── concatenate-files.cwl │ │ ├── inputs.json │ │ ├── inputs.tiny.json │ │ ├── make-a-little-data.js │ │ ├── make-array.cwl │ │ ├── manyjobs.cwl │ │ ├── options.json │ │ ├── run-script.cwl │ │ └── sort-file.cwl │ │ ├── nontrivial │ │ ├── MANIFEST.json │ │ ├── compress-file.cwl │ │ ├── concatenate-files.cwl │ │ ├── inputs.json │ │ ├── make-data.js │ │ ├── nontrivial.cwl │ │ ├── options.json │ │ ├── run-script.cwl │ │ └── sort-file.cwl │ │ ├── s3demo │ │ ├── MANIFEST.json │ │ ├── directory-from-directory.cwl │ │ ├── file-from-directory.cwl │ │ ├── inputs.json │ │ ├── options.json │ │ ├── s3demo.cwl │ │ └── shrink-image.cwl │ │ └── words │ │ ├── MANIFEST.json │ │ ├── inputs.json │ │ ├── main.cwl │ │ └── mieliestronk-words.txt ├── demo-nextflow-project │ ├── agc-project.yaml │ └── workflows │ │ ├── hello │ │ ├── main.nf │ │ └── nextflow.config │ │ ├── rnaseq │ │ ├── MANIFEST.json │ │ ├── inputs.json │ │ └── options.json │ │ └── words │ │ ├── .gitignore │ │ ├── MANIFEST.json │ │ ├── main.nf │ │ ├── mieliestronk-words.txt │ │ ├── nextflow.config │ │ └── params.json ├── demo-snakemake-project │ ├── agc-project.yaml │ └── workflow │ │ ├── countries │ │ ├── LICENSE │ │ ├── MANIFEST.json │ │ ├── Snakefile │ │ ├── config.yaml │ │ ├── envs │ │ │ ├── matplotlib.yaml │ │ │ └── xsv.yaml │ │ └── scripts │ │ │ └── plot-hist.py │ │ └── hello │ │ ├── MANIFEST.json │ │ └── Snakefile ├── demo-wdl-project │ ├── agc-project.yaml │ └── workflows │ │ ├── hello │ │ └── hello.wdl │ │ ├── read │ │ ├── README.md │ │ ├── hello.txt │ │ ├── main.wdl │ │ └── read.inputs.json │ │ └── words │ │ ├── MANIFEST.json │ │ ├── mieliestronk-words.txt │ │ ├── words-with-vowels.inputs.json │ │ └── words-with-vowels.wdl ├── gatk-best-practices-project-miniwdl │ ├── README.md │ ├── agc-project.yaml │ ├── gatk4-basic-joint-genotyping │ │ ├── MANIFEST.json │ │ ├── gatk4-basic-joint-genotyping.inputs.json │ │ └── gatk4-basic-joint-genotyping.wdl │ ├── gatk4-data-processing │ │ ├── MANIFEST.json │ │ ├── processing-for-variant-discovery-gatk4.hg38.wgs.inputs.json │ │ └── processing-for-variant-discovery-gatk4.wdl │ ├── gatk4-germline-snps-indels │ │ ├── MANIFEST.json │ │ ├── haplotypecaller-gvcf-gatk4.hg38.wgs.inputs.json │ │ └── haplotypecaller-gvcf-gatk4.wdl │ ├── gatk4-rnaseq-germline-snps-indels │ │ ├── MANIFEST.json │ │ ├── gatk4-rnaseq-germline-snps-indels.inputs.json │ │ └── gatk4-rnaseq-germline-snps-indels.wdl │ ├── seq-format-conversions │ │ ├── bam-to-unmapped-bams │ │ │ ├── MANIFEST.json │ │ │ ├── bam-to-unmapped-bams.inputs.json │ │ │ └── bam-to-unmapped-bams.wdl │ │ ├── cram-to-bam │ │ │ ├── MANIFEST.json │ │ │ ├── cram-to-bam.inputs.json │ │ │ └── cram-to-bam.wdl │ │ ├── interleaved-fastq-to-paired-fastq │ │ │ ├── MANIFEST.json │ │ │ ├── interleaved-fastq-to-paired-fastq.inputs.json │ │ │ └── interleaved-fastq-to-paired-fastq.wdl │ │ └── paired-fastq-to-unmapped-bam │ │ │ ├── MANIFEST.json │ │ │ ├── paired-fastq-to-unmapped-bam.wdl │ │ │ └── paired-fastq-to-unmapped-inputs.json │ └── seq-format-validation │ │ ├── MANIFEST.json │ │ ├── validate-bam.wdl │ │ └── validate-bams.input.json ├── gatk-best-practices-project │ ├── README.md │ ├── agc-project.yaml │ ├── gatk4-basic-joint-genotyping │ │ ├── MANIFEST.json │ │ ├── gatk4-basic-joint-genotyping.inputs.json │ │ ├── gatk4-basic-joint-genotyping.wdl │ │ └── options.json │ ├── gatk4-data-processing │ │ ├── MANIFEST.json │ │ ├── options.json │ │ ├── processing-for-variant-discovery-gatk4.hg38.wgs.inputs.json │ │ └── processing-for-variant-discovery-gatk4.wdl │ ├── gatk4-germline-snps-indels │ │ ├── MANIFEST.json │ │ ├── haplotypecaller-gvcf-gatk4.hg38.wgs.inputs.json │ │ ├── haplotypecaller-gvcf-gatk4.wdl │ │ └── options.json │ ├── gatk4-rnaseq-germline-snps-indels │ │ ├── MANIFEST.json │ │ ├── gatk4-rnaseq-germline-snps-indels.inputs.json │ │ ├── gatk4-rnaseq-germline-snps-indels.wdl │ │ └── options.json │ ├── seq-format-conversions │ │ ├── bam-to-unmapped-bams │ │ │ ├── MANIFEST.json │ │ │ ├── bam-to-unmapped-bams.inputs.json │ │ │ ├── bam-to-unmapped-bams.wdl │ │ │ └── options.json │ │ ├── cram-to-bam │ │ │ ├── MANIFEST.json │ │ │ ├── cram-to-bam.inputs.json │ │ │ ├── cram-to-bam.wdl │ │ │ └── options.json │ │ ├── interleaved-fastq-to-paired-fastq │ │ │ ├── MANIFEST.json │ │ │ ├── interleaved-fastq-to-paired-fastq.inputs.json │ │ │ ├── interleaved-fastq-to-paired-fastq.wdl │ │ │ └── options.json │ │ └── paired-fastq-to-unmapped-bam │ │ │ ├── MANIFEST.json │ │ │ ├── options.json │ │ │ ├── paired-fastq-to-unmapped-bam.wdl │ │ │ └── paired-fastq-to-unmapped-inputs.json │ ├── seq-format-validation │ │ ├── MANIFEST.json │ │ ├── options.json │ │ ├── validate-bam.wdl │ │ └── validate-bams.input.json │ └── workflow-diagrams │ │ ├── bam-to-unmapped-bams.dot │ │ ├── bam-to-unmapped-bams.dot.png │ │ ├── cram-to-bam.dot │ │ ├── cram-to-bam.dot.png │ │ ├── gatk4-basic-joint-genotyping.dot │ │ ├── gatk4-basic-joint-genotyping.dot.png │ │ ├── gatk4-data-processing.dot │ │ ├── gatk4-data-processing.dot.png │ │ ├── gatk4-germline-snps-indels.dot │ │ ├── gatk4-germline-snps-indels.dot.png │ │ ├── gatk4-rnadeq-germline-snps-indels.dot │ │ ├── gatk4-rnadeq-germline-snps-indels.dot.png │ │ ├── interleaved-to-paired-fastq.dot │ │ ├── interleaved-to-paired-fastq.dot.png │ │ ├── paired-fastq-to-unmapped-bam.dot │ │ ├── paired-fastq-to-unmapped-bam.dot.png │ │ ├── seq-format-validation.dot │ │ └── seq-format-validation.dot.png └── nf-core-project │ ├── README.md │ ├── agc-project.yaml │ └── workflows │ ├── atacseq │ ├── MANIFEST.json │ ├── design.csv │ └── inputs.json │ ├── rnaseq │ ├── MANIFEST.json │ └── inputs.json │ └── sarek │ ├── MANIFEST.json │ └── inputs.json ├── extras └── agc-minimal-permissions │ ├── .gitignore │ ├── .npmignore │ ├── README.md │ ├── bin │ └── permissions.ts │ ├── cdk.json │ ├── jest.config.js │ ├── lib │ ├── permissions-stack.ts │ └── policy-statements.ts │ ├── package-lock.json │ ├── package.json │ ├── test │ └── permissions.test.ts │ └── tsconfig.json ├── package-lock.json ├── packages ├── cdk │ ├── .eslintrc.js │ ├── .gitignore │ ├── .npmrc │ ├── .prettierrc.js │ ├── Makefile │ ├── README.md │ ├── apps │ │ ├── context │ │ │ ├── app.ts │ │ │ └── cdk.json │ │ └── core │ │ │ ├── app.ts │ │ │ └── cdk.json │ ├── go.mod │ ├── go.sum │ ├── jest.config.js │ ├── lib │ │ ├── artifacts │ │ │ └── batch-artifacts │ │ │ │ ├── amazon-ebs-autoscale.tgz │ │ │ │ └── ecs-additions │ │ │ │ ├── awscli-shim.sh │ │ │ │ ├── ecs-additions-common.sh │ │ │ │ ├── fetch_and_run.sh │ │ │ │ ├── get-amazon-ebs-autoscale.sh │ │ │ │ └── provision.sh │ │ ├── common │ │ │ └── BucketOperations.ts │ │ ├── constants.ts │ │ ├── constructs │ │ │ ├── api-proxy.ts │ │ │ ├── batch.ts │ │ │ ├── engines │ │ │ │ ├── engine-job-definition.ts │ │ │ │ ├── engine.ts │ │ │ │ ├── miniwdl │ │ │ │ │ └── miniwdl-engine.ts │ │ │ │ ├── nextflow │ │ │ │ │ └── nextflow-engine.ts │ │ │ │ └── snakemake │ │ │ │ │ └── snakemake-engine.ts │ │ │ ├── index.ts │ │ │ ├── launch-template-data.ts │ │ │ └── secure-service.ts │ │ ├── env │ │ │ ├── context-app-parameters.ts │ │ │ ├── core-app-parameters.ts │ │ │ └── index.ts │ │ ├── roles │ │ │ ├── cromwell-adapter-role.ts │ │ │ ├── cromwell-engine-role.ts │ │ │ ├── nextflow-adapter-role.ts │ │ │ ├── nextflow-engine-role.ts │ │ │ ├── policies │ │ │ │ ├── batch-policies.ts │ │ │ │ ├── cromwell-batch-policy.ts │ │ │ │ ├── head-job-batch-policy.ts │ │ │ │ ├── nextflow-adapter-batch-policy.ts │ │ │ │ ├── nextflow-describe-jobs-batch-policy.ts │ │ │ │ ├── nextflow-engine-batch-policy.ts │ │ │ │ ├── nextflow-submit-job-batch-policy.ts │ │ │ │ └── toil-batch-policy.ts │ │ │ ├── toil-engine-role.ts │ │ │ └── toil-job-role.ts │ │ ├── stacks │ │ │ ├── context-stack.ts │ │ │ ├── core-stack.ts │ │ │ ├── engines │ │ │ │ ├── batch-construct.ts │ │ │ │ ├── cromwell-engine-construct.ts │ │ │ │ ├── engine-construct.ts │ │ │ │ ├── miniwdl-engine-construct.ts │ │ │ │ ├── nextflow-engine-construct.ts │ │ │ │ ├── snakemake-engine-construct.ts │ │ │ │ └── toil-engine-construct.ts │ │ │ └── index.ts │ │ ├── types │ │ │ ├── engine-options.ts │ │ │ ├── index.ts │ │ │ ├── service-container.ts │ │ │ └── tagged-resource-types.ts │ │ └── util │ │ │ ├── index.ts │ │ │ └── instance-types.ts │ ├── npm-shrinkwrap.json │ ├── package.json │ └── tsconfig.json ├── cli │ ├── .dockerignore │ ├── .gitignore │ ├── Dockerfile │ ├── LICENSE │ ├── Makefile │ ├── NOTICE │ ├── TESTING.md │ ├── cmd │ │ └── application │ │ │ ├── description.go │ │ │ ├── description_windows.go │ │ │ ├── main.go │ │ │ ├── set_format.go │ │ │ ├── set_format_test.go │ │ │ └── template │ │ │ ├── macro.go │ │ │ └── template.go │ ├── go.mod │ ├── go.sum │ └── internal │ │ └── pkg │ │ ├── aws │ │ ├── batch │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── get_jobs.go │ │ │ ├── get_jobs_test.go │ │ │ └── interface.go │ │ ├── cdk │ │ │ ├── append_context_arguments.go │ │ │ ├── bootstrap.go │ │ │ ├── clear_context.go │ │ │ ├── clear_context_test.go │ │ │ ├── deploy_app.go │ │ │ ├── deploy_app_test.go │ │ │ ├── destroy_app.go │ │ │ ├── destroy_app_test.go │ │ │ ├── execute_cdk.go │ │ │ ├── execute_cdk_test.go │ │ │ ├── new_client.go │ │ │ ├── progress.go │ │ │ └── progress_test.go │ │ ├── cfn │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── delete_stack.go │ │ │ ├── delete_stack_test.go │ │ │ ├── errors.go │ │ │ ├── get_stack_exports.go │ │ │ ├── get_stack_info.go │ │ │ ├── get_stack_info_test.go │ │ │ ├── get_stack_status.go │ │ │ ├── get_stack_tags.go │ │ │ ├── interface.go │ │ │ ├── list_stacks.go │ │ │ ├── list_stacks_test.go │ │ │ └── stack_filters.go │ │ ├── cwl │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── get_logs.go │ │ │ ├── get_logs_test.go │ │ │ ├── interface.go │ │ │ ├── stream_logs.go │ │ │ └── stream_logs_test.go │ │ ├── ddb │ │ │ ├── client.go │ │ │ ├── get_workflow_instance_by_id.go │ │ │ ├── interface.go │ │ │ ├── list_workflow_instances.go │ │ │ ├── list_workflow_instances_by_context.go │ │ │ ├── list_workflow_instances_by_name.go │ │ │ ├── list_workflows.go │ │ │ └── write_workflow_instance.go │ │ ├── ecr │ │ │ ├── Interface.go │ │ │ ├── ecr_client.go │ │ │ ├── ecr_client_test.go │ │ │ ├── image_listable.go │ │ │ ├── image_listable_test.go │ │ │ ├── image_reference.go │ │ │ └── image_reference_test.go │ │ ├── provider.go │ │ ├── provider_test.go │ │ ├── s3 │ │ │ ├── bucket_exists.go │ │ │ ├── bucket_exists_test.go │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── delete_bucket.go │ │ │ ├── delete_bucket_test.go │ │ │ ├── delete_object.go │ │ │ ├── delete_object_test.go │ │ │ ├── empty_bucket.go │ │ │ ├── empty_bucket_test.go │ │ │ ├── interface.go │ │ │ ├── sync_file.go │ │ │ ├── sync_file_test.go │ │ │ ├── upload_file.go │ │ │ ├── util.go │ │ │ └── util_test.go │ │ ├── ssm │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── get_common_parameter.go │ │ │ ├── get_common_parameter_test.go │ │ │ └── interface.go │ │ ├── sts │ │ │ ├── get_account.go │ │ │ ├── get_account_test.go │ │ │ ├── new_client.go │ │ │ └── new_client_test.go │ │ └── util │ │ │ ├── time.go │ │ │ └── time_test.go │ │ ├── cli │ │ ├── account.go │ │ ├── account_activate.go │ │ ├── account_activate_test.go │ │ ├── account_deactivate.go │ │ ├── account_deactivate_test.go │ │ ├── awsresources │ │ │ └── awsresources.go │ │ ├── cli.go │ │ ├── cli_test.go │ │ ├── clierror │ │ │ ├── actionableerror │ │ │ │ ├── error.go │ │ │ │ ├── error_test.go │ │ │ │ └── mappings.go │ │ │ ├── cli_error.go │ │ │ └── cli_error_test.go │ │ ├── config │ │ │ ├── config.go │ │ │ ├── config_client.go │ │ │ ├── config_client_test.go │ │ │ ├── config_test.go │ │ │ └── io.go │ │ ├── configure.go │ │ ├── configure_describe.go │ │ ├── configure_describe_test.go │ │ ├── configure_email.go │ │ ├── configure_email_test.go │ │ ├── configure_format.go │ │ ├── configure_format_test.go │ │ ├── context.go │ │ ├── context │ │ │ ├── common_test.go │ │ │ ├── context_environment.go │ │ │ ├── info.go │ │ │ ├── info_test.go │ │ │ ├── interface.go │ │ │ ├── manager.go │ │ │ ├── manager_deploy.go │ │ │ ├── manager_deploy_test.go │ │ │ ├── manager_destroy.go │ │ │ ├── manager_destroy_test.go │ │ │ ├── manager_info.go │ │ │ ├── manager_info_test.go │ │ │ ├── manager_list.go │ │ │ ├── manager_list_test.go │ │ │ ├── manager_status.go │ │ │ ├── manager_status_test.go │ │ │ ├── manager_test.go │ │ │ ├── status.go │ │ │ └── util.go │ │ ├── context_auto_complete.go │ │ ├── context_auto_complete_test.go │ │ ├── context_deploy.go │ │ ├── context_deploy_test.go │ │ ├── context_describe.go │ │ ├── context_describe_test.go │ │ ├── context_destroy.go │ │ ├── context_destroy_test.go │ │ ├── context_list.go │ │ ├── context_list_test.go │ │ ├── context_status.go │ │ ├── context_status_test.go │ │ ├── context_test.go │ │ ├── describe_output.go │ │ ├── describe_output_test.go │ │ ├── flag.go │ │ ├── format │ │ │ ├── common_types.go │ │ │ ├── format.go │ │ │ ├── json.go │ │ │ ├── json_test.go │ │ │ ├── table.go │ │ │ ├── table_test.go │ │ │ ├── text.go │ │ │ └── text_test.go │ │ ├── group │ │ │ ├── group.go │ │ │ ├── group_windows.go │ │ │ └── key.go │ │ ├── logs.go │ │ ├── logs_access.go │ │ ├── logs_access_test.go │ │ ├── logs_adapter.go │ │ ├── logs_adapter_test.go │ │ ├── logs_core.go │ │ ├── logs_core_test.go │ │ ├── logs_engine.go │ │ ├── logs_engine_test.go │ │ ├── logs_workflow.go │ │ ├── logs_workflow_test.go │ │ ├── project.go │ │ ├── project_describe.go │ │ ├── project_describe_test.go │ │ ├── project_init.go │ │ ├── project_init_test.go │ │ ├── project_test.go │ │ ├── project_validate.go │ │ ├── project_validate_test.go │ │ ├── spec │ │ │ ├── context.go │ │ │ ├── data.go │ │ │ ├── io.go │ │ │ ├── io_test.go │ │ │ ├── manifest.go │ │ │ ├── project.go │ │ │ ├── project_schema.json │ │ │ ├── project_test.go │ │ │ └── workflow.go │ │ ├── types │ │ │ ├── context.go │ │ │ ├── data_ref.go │ │ │ ├── engine.go │ │ │ ├── project.go │ │ │ └── workflow.go │ │ ├── workflow.go │ │ ├── workflow │ │ │ ├── input.go │ │ │ ├── interface.go │ │ │ ├── manager.go │ │ │ ├── workflow_describe.go │ │ │ ├── workflow_describe_test.go │ │ │ ├── workflow_details.go │ │ │ ├── workflow_engine.go │ │ │ ├── workflow_engine_test.go │ │ │ ├── workflow_list.go │ │ │ ├── workflow_list_test.go │ │ │ ├── workflow_output.go │ │ │ ├── workflow_output_test.go │ │ │ ├── workflow_run.go │ │ │ ├── workflow_run_test.go │ │ │ ├── workflow_status.go │ │ │ ├── workflow_status_test.go │ │ │ ├── workflow_stop.go │ │ │ ├── workflow_stop_test.go │ │ │ ├── workflow_summary.go │ │ │ ├── workflow_tasks.go │ │ │ └── workflow_tasks_test.go │ │ ├── workflow_auto_complete.go │ │ ├── workflow_auto_complete_test.go │ │ ├── workflow_describe.go │ │ ├── workflow_list.go │ │ ├── workflow_output.go │ │ ├── workflow_output_test.go │ │ ├── workflow_run.go │ │ ├── workflow_status.go │ │ ├── workflow_status_test.go │ │ ├── workflow_stop.go │ │ └── zipfile │ │ │ ├── compress_to_tmp.go │ │ │ └── compress_to_tmp_test.go │ │ ├── constants │ │ ├── engines.go │ │ └── product.go │ │ ├── environment │ │ ├── environment.go │ │ └── environment_test.go │ │ ├── logging │ │ ├── logging.go │ │ ├── prefix.go │ │ └── prefix_windows.go │ │ ├── mocks │ │ ├── aws │ │ │ ├── interfaces.go │ │ │ └── mock_interfaces.go │ │ ├── context │ │ │ ├── interfaces.go │ │ │ └── mock_interfaces.go │ │ ├── io │ │ │ ├── interfaces.go │ │ │ └── mock_interfaces.go │ │ ├── manager │ │ │ ├── interfaces.go │ │ │ └── mock_interfaces.go │ │ ├── storage │ │ │ ├── interfaces.go │ │ │ └── mock_interfaces.go │ │ ├── wes │ │ │ ├── interfaces.go │ │ │ └── mock_interfaces.go │ │ └── workflow │ │ │ ├── interfaces.go │ │ │ └── mock_interfaces.go │ │ ├── osutils │ │ ├── utils.go │ │ └── utils_test.go │ │ ├── storage │ │ ├── input_client.go │ │ ├── input_client_test.go │ │ ├── interfaces.go │ │ ├── manifest_client.go │ │ ├── manifest_client_test.go │ │ ├── project_client.go │ │ ├── project_client_test.go │ │ ├── storage_client.go │ │ └── storage_client_test.go │ │ ├── term │ │ └── color │ │ │ ├── color.go │ │ │ └── color_test.go │ │ ├── unicode │ │ ├── utils.go │ │ └── utils_test.go │ │ ├── version │ │ ├── cache.go │ │ ├── cache_test.go │ │ ├── check_func.go │ │ ├── check_func_test.go │ │ ├── checker.go │ │ ├── checker_test.go │ │ ├── info.go │ │ ├── interfaces.go │ │ ├── mock_interfaces.go │ │ ├── replenish_func.go │ │ ├── replenish_func_test.go │ │ ├── store.go │ │ ├── store_test.go │ │ ├── version.go │ │ └── version_check_result.go │ │ └── wes │ │ ├── client.go │ │ ├── client_test.go │ │ ├── interface.go │ │ ├── option │ │ ├── option_func.go │ │ ├── workflow_attachment.go │ │ ├── workflow_engine_params.go │ │ ├── workflow_params.go │ │ ├── workflow_type.go │ │ ├── workflow_type_version.go │ │ └── workflow_url.go │ │ └── wes.go ├── engines │ ├── cromwell │ │ ├── Dockerfile │ │ ├── LICENSE │ │ ├── README.md │ │ ├── THIRD-PARTY │ │ ├── aws-cromwell-updates.patch │ │ ├── buildspec.yml │ │ └── cromwell.conf │ ├── miniwdl │ │ ├── Dockerfile │ │ ├── LICENSE │ │ ├── README.md │ │ ├── THIRD-PARTY │ │ ├── buildspec.yml │ │ └── miniwdl.aws.sh │ ├── new-engine-template │ │ ├── .aws.sh │ │ ├── DEVELOPMENT.MD │ │ ├── Dockerfile │ │ ├── THIRD-PARTY │ │ └── buildspec.yml │ ├── nextflow │ │ ├── Dockerfile │ │ ├── LICENSE │ │ ├── README.md │ │ ├── THIRD-PARTY │ │ ├── buildspec.yml │ │ └── nextflow.aws.sh │ ├── snakemake │ │ ├── .gitignore │ │ ├── Dockerfile │ │ ├── LICENSE │ │ ├── README.md │ │ ├── THIRD-PARTY │ │ ├── buildspec.yml │ │ └── snakemake.aws.sh │ └── toil │ │ ├── Dockerfile │ │ ├── LICENSE │ │ ├── README.md │ │ ├── THIRD-PARTY │ │ ├── buildspec.yml │ │ ├── rabbitmq.repo │ │ └── toil.aws.sh ├── wes_adapter │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── amazon_genomics │ │ ├── __init__.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ ├── test_BatchAdapter.py │ │ │ ├── test_MiniwdlWESAdapter.py │ │ │ ├── test_NextflowWESAdapter.py │ │ │ ├── test_SnakemakeWESAdapter.py │ │ │ └── verify_utils.py │ │ ├── util │ │ │ ├── __init__.py │ │ │ └── method_logger.py │ │ └── wes │ │ │ ├── __init__.py │ │ │ └── adapters │ │ │ ├── AbstractWESAdapter.py │ │ │ ├── BatchAdapter.py │ │ │ ├── CromwellWESAdapter.py │ │ │ ├── MiniWdlWESAdapter.py │ │ │ ├── NextflowWESAdapter.py │ │ │ ├── SnakemakeWESAdapter.py │ │ │ ├── __init__.py │ │ │ ├── config │ │ │ └── __init__.py │ │ │ └── util │ │ │ ├── __init__.py │ │ │ └── util.py │ ├── format-code.sh │ ├── index.py │ ├── init-local-server.sh │ ├── install.sh │ ├── local-server.py │ ├── requirements.txt │ ├── rest_api │ │ ├── __init__.py │ │ ├── controllers │ │ │ ├── __init__.py │ │ │ └── workflow_execution_service_controller.py │ │ ├── encoder.py │ │ ├── error_handling.py │ │ ├── exception │ │ │ ├── Exceptions.py │ │ │ └── __init__.py │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── base_model_.py │ │ │ ├── default_workflow_engine_parameter.py │ │ │ ├── error_response.py │ │ │ ├── log.py │ │ │ ├── run_id.py │ │ │ ├── run_list_response.py │ │ │ ├── run_log.py │ │ │ ├── run_request.py │ │ │ ├── run_status.py │ │ │ ├── service_info.py │ │ │ ├── state.py │ │ │ └── workflow_type_version.py │ │ ├── openapi │ │ │ └── openapi.yaml │ │ ├── typing_utils.py │ │ ├── util.py │ │ └── workflow │ │ │ ├── input.json │ │ │ └── sampleWorkFlow.wdl │ └── start-local-server.sh └── wes_api │ └── client │ ├── .gitignore │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ ├── FILES │ └── VERSION │ ├── .travis.yml │ ├── README.md │ ├── api │ └── openapi.yaml │ ├── api_workflow_execution_service.go │ ├── api_workflow_execution_service_log_extension.go │ ├── client.go │ ├── configuration.go │ ├── docs │ └── WorkflowExecutionServiceApi.md │ ├── git_push.sh │ ├── go.mod │ ├── go.sum │ ├── model_default_workflow_engine_parameter.go │ ├── model_error_response.go │ ├── model_log.go │ ├── model_run_id.go │ ├── model_run_list_response.go │ ├── model_run_log.go │ ├── model_run_request.go │ ├── model_run_status.go │ ├── model_service_info.go │ ├── model_state.go │ ├── model_workflow_type_version.go │ ├── response.go │ └── sigv4_client.go ├── scripts ├── cli │ ├── install.sh │ └── uninstall.sh ├── context-deploy-benchmark │ ├── context-benchmark.sh │ ├── cromwell │ │ └── agc-project.yaml │ └── nextflow │ │ └── agc-project.yaml ├── fiximports.sh ├── package-lock.json ├── package-release.sh ├── package.json └── run-dev.sh ├── site ├── .gitignore ├── LICENSE ├── README.md ├── archetypes │ └── default.md ├── assets │ ├── icons │ │ └── logo.svg │ └── scss │ │ └── _variables_project.scss ├── config.toml ├── content │ └── en │ │ ├── _index.html │ │ ├── about │ │ ├── _index.html │ │ └── featured-background.png │ │ ├── community │ │ └── _index.md │ │ ├── docs │ │ ├── Best practices │ │ │ ├── _index.md │ │ │ ├── controlling-costs │ │ │ │ └── index.md │ │ │ ├── iam-permissions │ │ │ │ └── index.md │ │ │ └── scaling-workloads │ │ │ │ └── index.md │ │ ├── Concepts │ │ │ ├── _index.md │ │ │ ├── accounts │ │ │ │ ├── AccountActivateArchitecture.png │ │ │ │ └── index.md │ │ │ ├── contexts │ │ │ │ ├── ContextGeneralArchitecture.png │ │ │ │ └── index.md │ │ │ ├── data │ │ │ │ └── index.md │ │ │ ├── engines │ │ │ │ └── index.md │ │ │ ├── logs │ │ │ │ └── index.md │ │ │ ├── namespaces │ │ │ │ └── index.md │ │ │ ├── projects │ │ │ │ └── index.md │ │ │ ├── users │ │ │ │ └── index.md │ │ │ └── workflows │ │ │ │ └── index.md │ │ ├── Contribution guidelines │ │ │ └── _index.md │ │ ├── Examples │ │ │ └── _index.md │ │ ├── Getting started │ │ │ ├── _index.md │ │ │ ├── helloworld │ │ │ │ └── index.md │ │ │ ├── installation │ │ │ │ ├── agc-cannot-open-popup.png │ │ │ │ ├── agc-cannot-verify-developer-popup.png │ │ │ │ └── index.md │ │ │ ├── prerequisites │ │ │ │ └── index.md │ │ │ └── setup │ │ │ │ └── index.md │ │ ├── Overview │ │ │ └── _index.md │ │ ├── Reference │ │ │ └── _index.md │ │ ├── Tutorials │ │ │ ├── _index.md │ │ │ └── walkthrough │ │ │ │ └── index.md │ │ ├── Workflow engines │ │ │ ├── Filesystems │ │ │ │ ├── _index.md │ │ │ │ ├── efs │ │ │ │ │ └── index.md │ │ │ │ └── s3 │ │ │ │ │ └── index.md │ │ │ ├── _index.md │ │ │ ├── cromwell │ │ │ │ ├── CromwellContextArch.png │ │ │ │ └── index.md │ │ │ ├── miniwdl │ │ │ │ ├── MiniWDLContextArch.png │ │ │ │ └── index.md │ │ │ ├── nextflow │ │ │ │ ├── NextflowContextArch.png │ │ │ │ └── index.md │ │ │ ├── snakemake │ │ │ │ ├── SnakeMakeContextArch.png │ │ │ │ └── index.md │ │ │ └── toil │ │ │ │ ├── ToilContextArch.png │ │ │ │ └── index.md │ │ └── _index.md │ │ ├── featured-background.png │ │ └── search.md ├── layouts │ └── 404.html ├── package-lock.json ├── package.json └── static │ └── favicons │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ └── site.webmanifest └── version.json /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Go", 3 | "image": "mcr.microsoft.com/devcontainers/go:0-1.19-bullseye", 4 | "features": { 5 | "ghcr.io/devcontainers/features/node:1": { 6 | "version": "lts" 7 | }, 8 | "ghcr.io/devcontainers/features/aws-cli:1": {}, 9 | "ghcr.io/devcontainers/features/docker-in-docker:1": {}, 10 | "ghcr.io/guiyomh/features/golangci-lint:0": {} 11 | }, 12 | 13 | // Configure tool-specific properties. 14 | "customizations": { 15 | // Configure properties specific to VS Code. 16 | "vscode": { 17 | // Set *default* container specific settings.json values on container create. 18 | "settings": { 19 | "go.toolsManagement.checkForUpdates": "local", 20 | "go.useLanguageServer": true, 21 | "go.gopath": "/go" 22 | } 23 | } 24 | } 25 | 26 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 27 | // "forwardPorts": [], 28 | 29 | // Use 'postCreateCommand' to run commands after the container is created. 30 | // "postCreateCommand": "go version", 31 | 32 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 33 | // "remoteUser": "root" 34 | } 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | [//]: # (Before raising the feature request, please check to see if an existing feature request already exists.) 11 | 12 | 13 | **Description** 14 | 15 | [//]: # (A short description of the feature you are proposing.) 16 | 17 | 18 | **Use Case** 19 | 20 | [//]: # (Why do you need this feature?) 21 | 22 | 23 | **Proposed Solution** 24 | 25 | [//]: # (Please include prototype/workaround/sketch/reference implementation.) 26 | 27 | 28 | **Other information** 29 | 30 | [//]: # (detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc) 31 | -------------------------------------------------------------------------------- /.github/semantic.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Semantic Pull Requests 2 | titleOnly: true 3 | 4 | types: 5 | - feat 6 | - fix 7 | - docs 8 | - style 9 | - refactor 10 | - perf 11 | - test 12 | - build 13 | - ci 14 | - chore 15 | - revert 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /output/ 3 | *.vscode 4 | codebuild_build.sh 5 | .DS_Store 6 | venv 7 | .venv 8 | *.iml 9 | coverage.out 10 | vendor 11 | /docs/ 12 | /site/content/en/docs/Reference/agc* 13 | /dist/ 14 | *.zip 15 | site/.hugo_build.lock 16 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "site/themes/docsy"] 2 | path = site/themes/docsy 3 | url = https://github.com/google/docsy.git 4 | -------------------------------------------------------------------------------- /.go-version: -------------------------------------------------------------------------------- 1 | 1.19.3 2 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 14.21.1 2 | -------------------------------------------------------------------------------- /.versionrc: -------------------------------------------------------------------------------- 1 | { 2 | "infile": "CHANGELOG.md", 3 | "packageFiles": [ 4 | { 5 | "filename": "version.json", 6 | "type": "json" 7 | } 8 | ], 9 | "bumpFiles": [ 10 | { 11 | "filename": "version.json", 12 | "type": "json" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | -------------------------------------------------------------------------------- /buildspec.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | env: 4 | shell: bash 5 | 6 | phases: 7 | install: 8 | commands: 9 | - (cd ~/.goenv; git pull) 10 | - goenv install 11 | - go version 12 | - go env -w GOPROXY=direct 13 | - go env -w GO111MODULE=on 14 | - make init 15 | pre_build: 16 | commands: 17 | - make test 18 | build: 19 | on-failure: ABORT 20 | commands: 21 | - make release 22 | 23 | artifacts: 24 | files: 25 | - '**/*' 26 | base-directory: dist 27 | -------------------------------------------------------------------------------- /bump.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | #---------------------------------------------------------------------------------------------------------- 6 | # 7 | # This script is intended to be used to bump up the version of the AGC modules for minor and patch releases 8 | # ---------------------------------------------------------------------------------------------------------- 9 | 10 | releaseAs=${1:-minor} 11 | if [ "${releaseAs}" != "minor" ] && [ "${releaseAs}" != "patch" ]; then 12 | echo "usage: ./bump.sh minor or patch. Major version bumps will require more intention." 13 | exit 1 14 | fi 15 | 16 | echo "Releasing a $releaseAs version bump..." 17 | npx standard-version --release-as "$releaseAs" 18 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/agc-project.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: CWLDemo 3 | schemaVersion: 1 4 | workflows: 5 | hello: 6 | type: 7 | language: cwl 8 | version: v1.2 9 | sourceURL: workflows/hello/hello.cwl 10 | nontrivial: 11 | type: 12 | language: cwl 13 | version: v1.2 14 | sourceURL: workflows/nontrivial 15 | manyjobs: 16 | type: 17 | language: cwl 18 | version: v1.2 19 | sourceURL: workflows/manyjobs 20 | words-with-vowels: 21 | type: 22 | language: cwl 23 | version: v1.0 24 | sourceURL: workflows/words 25 | s3demo: 26 | type: 27 | language: cwl 28 | version: v1.2 29 | sourceURL: workflows/s3demo 30 | data: 31 | - location: s3://spacenet-dataset 32 | readOnly: true 33 | contexts: 34 | myContext: 35 | engines: 36 | - type: cwl 37 | engine: toil 38 | 39 | spotCtx: 40 | requestSpotInstances: true 41 | engines: 42 | - type: cwl 43 | engine: toil -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/hello/hello.cwl: -------------------------------------------------------------------------------- 1 | cwlVersion: v1.0 2 | class: CommandLineTool 3 | baseCommand: echo 4 | stdout: output.txt 5 | inputs: 6 | - id: message 7 | type: string 8 | default: "Hello world!" 9 | inputBinding: 10 | position: 1 11 | outputs: 12 | - id: output 13 | type: File 14 | outputBinding: 15 | glob: output.txt 16 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "manyjobs.cwl", 3 | "inputFileURLs": [ 4 | "inputs.json" 5 | ], 6 | "optionsFileURL": "options.json" 7 | } 8 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/compress-file.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | cwlVersion: v1.2 3 | class: CommandLineTool 4 | baseCommand: ["-9", "-p", "8", "-c"] 5 | hints: 6 | DockerRequirement: 7 | dockerPull: bytesco/pigz 8 | ResourceRequirement: 9 | coresMin: 8 10 | inputs: 11 | input_file: 12 | type: File 13 | inputBinding: 14 | position: 1 15 | outputs: 16 | compressed_file: 17 | type: stdout 18 | stdout: compressed.gz 19 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/concatenate-files.cwl: -------------------------------------------------------------------------------- 1 | cwlVersion: v1.2 2 | class: CommandLineTool 3 | baseCommand: cat 4 | inputs: 5 | files: 6 | type: File[] 7 | inputBinding: 8 | position: 1 9 | 10 | outputs: 11 | concatenated_file: 12 | type: stdout 13 | 14 | stdout: concatenated.txt 15 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "script_file": {"class": "File", "path": "make-a-little-data.js"}, 3 | "script_argument_count": 1000 4 | } 5 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/inputs.tiny.json: -------------------------------------------------------------------------------- 1 | { 2 | "script_file": {"class": "File", "path": "make-a-little-data.js"}, 3 | "script_argument_count": 2 4 | } 5 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/make-a-little-data.js: -------------------------------------------------------------------------------- 1 | const crypto = require('crypto') 2 | if (process.argv.length > 2) { 3 | let arg = process.argv[2] 4 | console.log("Argument is: " + arg) 5 | 6 | let hashes = [arg] 7 | 8 | for (let i = 10; i >= 0; i--) { 9 | console.log(i + " bottles of " + arg + " on the wall...") 10 | hasher = crypto.createHash('sha512') 11 | for (let h of hashes) { 12 | hasher.update(h) 13 | } 14 | hashes.push(hasher.digest('hex')) 15 | } 16 | 17 | console.log("After meditating on the nature of " + arg + ", it turns out to be " + hashes[hashes.length - 1]) 18 | 19 | } else { 20 | console.log("Didn't get an argument") 21 | } 22 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/make-array.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | cwlVersion: v1.2 3 | class: ExpressionTool 4 | requirements: 5 | InlineJavascriptRequirement: {} 6 | inputs: 7 | size: 8 | type: int 9 | outputs: 10 | array: 11 | type: string[] 12 | expression: "$({array: function(){var arr = []; for (var i = 0; i < inputs.size; i++) {arr.push('' + i)}; return arr;}()})" 13 | 14 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/manyjobs.cwl: -------------------------------------------------------------------------------- 1 | cwlVersion: v1.2 2 | class: Workflow 3 | 4 | requirements: 5 | SubworkflowFeatureRequirement: {} 6 | ScatterFeatureRequirement: {} 7 | 8 | inputs: 9 | - id: script_file 10 | type: File 11 | - id: script_argument_count 12 | type: int 13 | 14 | steps: 15 | make_array: 16 | run: make-array.cwl 17 | in: 18 | size: script_argument_count 19 | out: [array] 20 | 21 | scripts: 22 | run: run-script.cwl 23 | scatter: arg 24 | in: 25 | src: script_file 26 | arg: make_array/array 27 | out: [script_output] 28 | 29 | sort: 30 | run: sort-file.cwl 31 | scatter: input_file 32 | in: 33 | input_file: scripts/script_output 34 | out: [sorted_file] 35 | 36 | concat: 37 | run: concatenate-files.cwl 38 | in: 39 | files: sort/sorted_file 40 | out: 41 | [concatenated_file] 42 | 43 | compress: 44 | run: compress-file.cwl 45 | in: 46 | input_file: concat/concatenated_file 47 | out: [compressed_file] 48 | 49 | outputs: 50 | - id: output 51 | type: File 52 | outputSource: compress/compressed_file 53 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/options.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/run-script.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | # Modified from the CWL docs 3 | cwlVersion: v1.2 4 | class: CommandLineTool 5 | baseCommand: node 6 | hints: 7 | DockerRequirement: 8 | dockerPull: node:slim 9 | ResourceRequirement: 10 | coresMax: 1 11 | ramMin: 2000 12 | inputs: 13 | src: 14 | type: File 15 | inputBinding: 16 | position: 1 17 | arg: 18 | type: string 19 | inputBinding: 20 | position: 2 21 | outputs: 22 | script_output: 23 | type: stdout 24 | stdout: output.txt 25 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/manyjobs/sort-file.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | cwlVersion: v1.2 3 | class: CommandLineTool 4 | baseCommand: ["sort"] 5 | requirements: 6 | InlineJavascriptRequirement: {} 7 | hints: 8 | ResourceRequirement: 9 | coresMax: 1 10 | outdirMin: $(parseInt(Math.ceil(inputs.input_file.size / Math.pow(2, 20)))) 11 | inputs: 12 | input_file: 13 | type: File 14 | inputBinding: 15 | position: 1 16 | outputs: 17 | sorted_file: 18 | type: stdout 19 | stdout: sorted.txt 20 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/nontrivial/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "nontrivial.cwl", 3 | "inputFileURLs": [ 4 | "inputs.json" 5 | ], 6 | "optionsFileURL": "options.json" 7 | } 8 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/nontrivial/compress-file.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | cwlVersion: v1.2 3 | class: CommandLineTool 4 | baseCommand: ["-9", "-p", "8", "-c"] 5 | hints: 6 | DockerRequirement: 7 | dockerPull: bytesco/pigz 8 | ResourceRequirement: 9 | coresMin: 8 10 | inputs: 11 | input_file: 12 | type: File 13 | inputBinding: 14 | position: 1 15 | outputs: 16 | compressed_file: 17 | type: stdout 18 | stdout: compressed.gz 19 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/nontrivial/concatenate-files.cwl: -------------------------------------------------------------------------------- 1 | cwlVersion: v1.2 2 | class: CommandLineTool 3 | baseCommand: cat 4 | inputs: 5 | files: 6 | type: File[] 7 | inputBinding: 8 | position: 1 9 | 10 | outputs: 11 | concatenated_file: 12 | type: stdout 13 | 14 | stdout: concatenated.txt 15 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/nontrivial/inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "script_file": {"class": "File", "path": "make-data.js"}, 3 | "script_arguments": [ 4 | "A", "B", "C", "D", "E", "F", "G", 5 | "cats", "pigs", "dogs", "space weasles", "snacks" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/nontrivial/make-data.js: -------------------------------------------------------------------------------- 1 | const crypto = require('crypto') 2 | if (process.argv.length > 2) { 3 | let arg = process.argv[2] 4 | console.log("Argument is: " + arg) 5 | 6 | let hashes = [arg] 7 | 8 | for (let i = 10000; i >= 0; i--) { 9 | console.log(i + " bottles of " + arg + " on the wall...") 10 | hasher = crypto.createHash('sha512') 11 | for (let h of hashes) { 12 | hasher.update(h) 13 | } 14 | hashes.push(hasher.digest('hex')) 15 | } 16 | 17 | console.log("After meditating on the nature of " + arg + ", it turns out to be " + hashes[hashes.length - 1]) 18 | 19 | } else { 20 | console.log("Didn't get an argument") 21 | } 22 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/nontrivial/nontrivial.cwl: -------------------------------------------------------------------------------- 1 | cwlVersion: v1.2 2 | class: Workflow 3 | 4 | requirements: 5 | SubworkflowFeatureRequirement: {} 6 | ScatterFeatureRequirement: {} 7 | 8 | inputs: 9 | - id: script_file 10 | type: File 11 | - id: script_arguments 12 | type: string[] 13 | 14 | steps: 15 | scripts: 16 | run: run-script.cwl 17 | scatter: arg 18 | in: 19 | src: script_file 20 | arg: script_arguments 21 | out: [script_output] 22 | 23 | sort: 24 | run: sort-file.cwl 25 | scatter: input_file 26 | in: 27 | input_file: scripts/script_output 28 | out: [sorted_file] 29 | 30 | concat: 31 | run: concatenate-files.cwl 32 | in: 33 | files: sort/sorted_file 34 | out: 35 | [concatenated_file] 36 | 37 | compress: 38 | run: compress-file.cwl 39 | in: 40 | input_file: concat/concatenated_file 41 | out: [compressed_file] 42 | 43 | outputs: 44 | - id: output 45 | type: File 46 | outputSource: compress/compressed_file 47 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/nontrivial/options.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/nontrivial/run-script.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | # Modified from the CWL docs 3 | cwlVersion: v1.2 4 | class: CommandLineTool 5 | baseCommand: node 6 | hints: 7 | DockerRequirement: 8 | dockerPull: node:slim 9 | ResourceRequirement: 10 | coresMax: 1 11 | ramMin: 2000 12 | inputs: 13 | src: 14 | type: File 15 | inputBinding: 16 | position: 1 17 | arg: 18 | type: string 19 | inputBinding: 20 | position: 2 21 | outputs: 22 | script_output: 23 | type: stdout 24 | stdout: output.txt 25 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/nontrivial/sort-file.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | cwlVersion: v1.2 3 | class: CommandLineTool 4 | baseCommand: ["sort"] 5 | requirements: 6 | InlineJavascriptRequirement: {} 7 | hints: 8 | ResourceRequirement: 9 | coresMax: 1 10 | outdirMin: $(parseInt(Math.ceil(inputs.input_file.size / Math.pow(2, 20)))) 11 | inputs: 12 | input_file: 13 | type: File 14 | inputBinding: 15 | position: 1 16 | outputs: 17 | sorted_file: 18 | type: stdout 19 | stdout: sorted.txt 20 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/s3demo/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "s3demo.cwl", 3 | "inputFileURLs": [ 4 | "inputs.json" 5 | ], 6 | "optionsFileURL": "options.json" 7 | } -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/s3demo/directory-from-directory.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | cwlVersion: v1.2 3 | class: ExpressionTool 4 | requirements: 5 | InlineJavascriptRequirement: {} 6 | LoadListingRequirement: 7 | loadListing: shallow_listing 8 | inputs: 9 | dir: 10 | type: Directory 11 | filename: 12 | type: string 13 | outputs: 14 | directory: 15 | type: Directory 16 | expression: | 17 | ${ 18 | for (var i = 0; i < inputs.dir.listing.length; i++) { 19 | if (inputs.dir.listing[i].basename == inputs.filename) { 20 | return {directory: inputs.dir.listing[i]}; 21 | } 22 | } 23 | throw new Error("Directory " + inputs.filename + " not found"); 24 | } 25 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/s3demo/file-from-directory.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | cwlVersion: v1.2 3 | class: ExpressionTool 4 | requirements: 5 | InlineJavascriptRequirement: {} 6 | LoadListingRequirement: 7 | loadListing: shallow_listing 8 | inputs: 9 | dir: 10 | type: Directory 11 | filename: 12 | type: string 13 | outputs: 14 | file: 15 | type: File 16 | expression: | 17 | ${ 18 | for (var i = 0; i < inputs.dir.listing.length; i++) { 19 | if (inputs.dir.listing[i].basename == inputs.filename) { 20 | return {file: inputs.dir.listing[i]}; 21 | } 22 | } 23 | throw new Error("File " + inputs.filename + " not found"); 24 | } 25 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/s3demo/inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "image_file": {"class": "File", "location": "s3://spacenet-dataset/AOIs/AOI_1_Rio/PS-RGB/PS-RGB_mosaic_013022223112.tif"}, 3 | "image_directory": {"class": "Directory", "location": "s3://spacenet-dataset/Hosted-Datasets/fmow/fmow-rgb/val/lighthouse/lighthouse_8/"}, 4 | "image_filename": "lighthouse_8_0_rgb.jpg" 5 | } -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/s3demo/options.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/s3demo/s3demo.cwl: -------------------------------------------------------------------------------- 1 | cwlVersion: v1.2 2 | class: Workflow 3 | 4 | requirements: 5 | SubworkflowFeatureRequirement: {} 6 | 7 | inputs: 8 | - id: image_file 9 | type: File 10 | - id: image_directory 11 | type: Directory 12 | - id: image_filename 13 | type: string 14 | 15 | steps: 16 | resize_file: 17 | run: shrink-image.cwl 18 | in: 19 | input_image: image_file 20 | out: [output_image] 21 | 22 | file_from_directory: 23 | run: file-from-directory.cwl 24 | in: 25 | dir: image_directory 26 | filename: image_filename 27 | out: [file] 28 | 29 | resize_from_directory: 30 | run: shrink-image.cwl 31 | in: 32 | input_image: file_from_directory/file 33 | out: [output_image] 34 | 35 | outputs: 36 | - id: image_from_file 37 | type: File 38 | outputSource: resize_file/output_image 39 | - id: image_from_directory 40 | type: File 41 | outputSource: resize_from_directory/output_image 42 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/s3demo/shrink-image.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | cwlVersion: v1.2 3 | class: CommandLineTool 4 | hints: 5 | DockerRequirement: 6 | # Make sure to use a Docker image without an ENTRYPOINT, or it will behave 7 | # differently depending on if you pass --singularity to your CWL runner or 8 | # not. 9 | dockerPull: oittaa/imagemagick 10 | ResourceRequirement: 11 | coresMin: 2 12 | coresMax: 1 13 | outdirMin: 1024 14 | tmpdirMin: 1024 15 | ramMin: 4096 16 | ramMax: 4096 17 | inputs: 18 | input_image: 19 | type: File 20 | inputBinding: 21 | position: 1 22 | outputs: 23 | output_image: 24 | type: File 25 | outputBinding: 26 | glob: output.jpg 27 | baseCommand: convert 28 | arguments: 29 | - position: 2 30 | valueFrom: "-resize" 31 | - position: 3 32 | valueFrom: "1024x1024" 33 | - position: 4 34 | valueFrom: "output.jpg" 35 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/words/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "main.cwl", 3 | "inputFileURLs": [ 4 | "inputs.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /examples/demo-cwl-project/workflows/words/inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "words": { 3 | "class": "File", 4 | "path": "mieliestronk-words.txt" 5 | }, 6 | "vowels": ["a","e","i","o","u"] 7 | } 8 | -------------------------------------------------------------------------------- /examples/demo-nextflow-project/agc-project.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: NextflowDemo 3 | schemaVersion: 1 4 | workflows: 5 | hello: 6 | type: 7 | language: nextflow 8 | version: 1.0 9 | sourceURL: workflows/hello 10 | rnaseq: 11 | type: 12 | language: nextflow 13 | version: 1.0 14 | sourceURL: workflows/rnaseq 15 | words: 16 | type: 17 | language: nextflow 18 | version: dsl2 19 | sourceURL: workflows/words 20 | data: 21 | - location: s3://1000genomes 22 | readOnly: true 23 | contexts: 24 | onDemandContext: 25 | engines: 26 | - type: nextflow 27 | engine: nextflow 28 | 29 | spotContext: 30 | requestSpotInstances: true 31 | engines: 32 | - type: nextflow 33 | engine: nextflow 34 | -------------------------------------------------------------------------------- /examples/demo-nextflow-project/workflows/hello/main.nf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nextflow 2 | 3 | cheers = Channel.from 'Bonjour', 'Ciao', 'Hello', 'Hola' 4 | 5 | process sayHello { 6 | echo true 7 | input: 8 | val x from cheers 9 | script: 10 | """ 11 | echo '$x world!' 12 | """ 13 | } 14 | -------------------------------------------------------------------------------- /examples/demo-nextflow-project/workflows/hello/nextflow.config: -------------------------------------------------------------------------------- 1 | process.container = 'ubuntu' 2 | -------------------------------------------------------------------------------- /examples/demo-nextflow-project/workflows/rnaseq/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "https://github.com/nextflow-io/rnaseq-nf.git", 3 | "inputFileURLs": [ 4 | "inputs.json" 5 | ], 6 | "engineOptions": "-resume -r v1.2" 7 | } 8 | -------------------------------------------------------------------------------- /examples/demo-nextflow-project/workflows/rnaseq/inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "reads": "s3://1000genomes/phase3/data/HG00243/sequence_read/SRR*_{1,2}.filt.fastq.gz", 3 | "genome": "GRCh37", 4 | "skip_qc": true 5 | } 6 | -------------------------------------------------------------------------------- /examples/demo-nextflow-project/workflows/rnaseq/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "reads": "s3://1000genomes/phase3/data/HG00243/sequence_read/SRR*_{1,2}.filt.fastq.gz", 3 | "genome": "GRCh37", 4 | "skip_qc": true 5 | } 6 | -------------------------------------------------------------------------------- /examples/demo-nextflow-project/workflows/words/.gitignore: -------------------------------------------------------------------------------- 1 | .nextflow.log* 2 | .nextflow.log.* 3 | .nextflow/ 4 | work/ 5 | ignore/ -------------------------------------------------------------------------------- /examples/demo-nextflow-project/workflows/words/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "main.nf", 3 | "inputFileURLs": [ 4 | "params.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /examples/demo-nextflow-project/workflows/words/nextflow.config: -------------------------------------------------------------------------------- 1 | manifest { 2 | name = "Demo - words with vowels" 3 | nextflowVersion = '>=22.04.0' 4 | } 5 | 6 | process { 7 | 8 | errorStrategy = 'retry' 9 | maxRetries = 3 10 | 11 | } 12 | 13 | profiles { 14 | stub { 15 | process { 16 | memory = '1 MB' 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /examples/demo-nextflow-project/workflows/words/params.json: -------------------------------------------------------------------------------- 1 | { 2 | "word_file": "./mieliestronk-words.txt" 3 | } -------------------------------------------------------------------------------- /examples/demo-snakemake-project/agc-project.yaml: -------------------------------------------------------------------------------- 1 | name: SnakemakeDemo 2 | schemaVersion: 1 3 | workflows: 4 | hello: 5 | type: 6 | language: snakemake 7 | version: 1.0 8 | sourceURL: workflow/hello 9 | countries: 10 | type: 11 | language: snakemake 12 | version: 1.0 13 | sourceURL: workflow/countries 14 | contexts: 15 | onDemandContext: 16 | engines: 17 | - type: snakemake 18 | engine: snakemake 19 | -------------------------------------------------------------------------------- /examples/demo-snakemake-project/workflow/countries/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2019 Johannes Köster 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /examples/demo-snakemake-project/workflow/countries/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": ".", 3 | "engineOptions": "-j 10 --use-conda" 4 | } 5 | -------------------------------------------------------------------------------- /examples/demo-snakemake-project/workflow/countries/Snakefile: -------------------------------------------------------------------------------- 1 | configfile: "config.yaml" 2 | 3 | 4 | rule all: 5 | input: 6 | expand( 7 | "plots/{country}.hist.pdf", 8 | country=config["countries"] 9 | ) 10 | 11 | 12 | rule select_by_country: 13 | input: 14 | "data/worldcitiespop.csv" 15 | output: 16 | "by-country/{country}.csv" 17 | conda: 18 | "envs/xsv.yaml" 19 | shell: 20 | "xsv search -s Country '{wildcards.country}' " 21 | "{input} > {output}" 22 | 23 | 24 | rule plot_histogram: 25 | input: 26 | "by-country/{country}.csv" 27 | output: 28 | "plots/{country}.hist.svg" 29 | conda: 30 | "envs/matplotlib.yaml" 31 | script: 32 | "scripts/plot-hist.py" 33 | 34 | 35 | rule convert_to_pdf: 36 | input: 37 | "{prefix}.svg" 38 | output: 39 | "{prefix}.pdf" 40 | wrapper: 41 | "0.47.0/utils/cairosvg" 42 | 43 | 44 | rule download_data: 45 | output: 46 | "data/worldcitiespop.csv" 47 | shell: 48 | "curl -L https://burntsushi.net/stuff/worldcitiespop.csv > {output}" 49 | -------------------------------------------------------------------------------- /examples/demo-snakemake-project/workflow/countries/config.yaml: -------------------------------------------------------------------------------- 1 | countries: 2 | - fr 3 | - at 4 | - sp 5 | -------------------------------------------------------------------------------- /examples/demo-snakemake-project/workflow/countries/envs/matplotlib.yaml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | dependencies: 4 | - python 3.7 5 | - matplotlib 3.1 6 | - pandas 0.25 7 | -------------------------------------------------------------------------------- /examples/demo-snakemake-project/workflow/countries/envs/xsv.yaml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | dependencies: 4 | - xsv 0.13 5 | -------------------------------------------------------------------------------- /examples/demo-snakemake-project/workflow/countries/scripts/plot-hist.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import pandas as pd 3 | 4 | cities = pd.read_csv(snakemake.input[0]) 5 | 6 | plt.hist(cities["Population"], bins=50) 7 | 8 | plt.savefig(snakemake.output[0]) 9 | -------------------------------------------------------------------------------- /examples/demo-snakemake-project/workflow/hello/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": ".", 3 | "engineOptions": "-j 10 --use-conda" 4 | } 5 | -------------------------------------------------------------------------------- /examples/demo-snakemake-project/workflow/hello/Snakefile: -------------------------------------------------------------------------------- 1 | rule all: 2 | input: 3 | expand( 4 | "output/{greeting}.txt", 5 | greeting = ['Bonjour', 'Ciao', 'Hello', 'Hola'], 6 | ), 7 | 8 | rule hello: 9 | output: 10 | "output/{greeting}.txt", 11 | shell: 12 | """ 13 | echo "{wildcards.greeting} AGC!" > {output} 14 | """ -------------------------------------------------------------------------------- /examples/demo-wdl-project/agc-project.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Demo 3 | schemaVersion: 1 4 | workflows: 5 | hello: 6 | type: 7 | language: wdl 8 | version: 1.0 9 | sourceURL: workflows/hello/hello.wdl 10 | read: 11 | type: 12 | language: wdl 13 | version: 1.0 14 | sourceURL: workflows/read 15 | words-with-vowels: 16 | type: 17 | language: wdl 18 | version: 1.0 19 | sourceURL: workflows/words 20 | data: 21 | - location: s3://gatk-test-data 22 | readOnly: true 23 | - location: s3://broad-references 24 | readOnly: true 25 | contexts: 26 | myContext: 27 | engines: 28 | - type: wdl 29 | engine: cromwell 30 | 31 | miniContext: 32 | engines: 33 | - type: wdl 34 | engine: miniwdl 35 | 36 | spotCtx: 37 | requestSpotInstances: true 38 | engines: 39 | - type: wdl 40 | engine: cromwell 41 | -------------------------------------------------------------------------------- /examples/demo-wdl-project/workflows/hello/hello.wdl: -------------------------------------------------------------------------------- 1 | version 1.0 2 | workflow hello_agc { 3 | call hello {} 4 | } 5 | task hello { 6 | command { echo "Hello Amazon Genomics CLI!" } 7 | runtime { 8 | docker: "ubuntu:latest" 9 | #cromwell retry 10 | awsBatchRetryAttempts: 3 11 | #miniwdl retry 12 | maxRetries: 3 13 | } 14 | output { String out = read_string( stdout() ) } 15 | } 16 | -------------------------------------------------------------------------------- /examples/demo-wdl-project/workflows/read/README.md: -------------------------------------------------------------------------------- 1 | ## How to provide input arguments 2 | 3 | This demo workflow requires an "input_file" input argument to be defined. You can use the definition in read.inputs.json file by providing it as a workflow argument: 4 | 5 | agc workflow run read --context myContext --inputsFile workflows/read/read.inputs.json 6 | 7 | See [Workflows](https://aws.github.io/amazon-genomics-cli/docs/concepts/workflows/) documentation for further details. 8 | -------------------------------------------------------------------------------- /examples/demo-wdl-project/workflows/read/hello.txt: -------------------------------------------------------------------------------- 1 | Hello Amazon Genomics CLI! -------------------------------------------------------------------------------- /examples/demo-wdl-project/workflows/read/main.wdl: -------------------------------------------------------------------------------- 1 | version 1.0 2 | workflow ReadFile { 3 | input { 4 | File input_file 5 | } 6 | call read_file { input: input_file = input_file } 7 | } 8 | 9 | task read_file { 10 | input { 11 | File input_file 12 | } 13 | String content = read_string(input_file) 14 | 15 | command { 16 | echo '~{content}' 17 | } 18 | runtime { 19 | docker: "ubuntu:latest" 20 | memory: "4G" 21 | #cromwell retry 22 | awsBatchRetryAttempts: 3 23 | #miniwdl retry 24 | maxRetries: 3 25 | } 26 | 27 | output { String out = read_string( stdout() ) } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /examples/demo-wdl-project/workflows/read/read.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "ReadFile.input_file": "./hello.txt" 3 | } -------------------------------------------------------------------------------- /examples/demo-wdl-project/workflows/words/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "words-with-vowels.wdl", 3 | "inputFileURLs": [ 4 | "words-with-vowels.inputs.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /examples/demo-wdl-project/workflows/words/words-with-vowels.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "Words_With_Vowels.word_file": "./mieliestronk-words.txt" 3 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/README.md: -------------------------------------------------------------------------------- 1 | ## Introduction 2 | 3 | This project includes workflows based on [GATK Best Practices](https://gatk.broadinstitute.org/hc/en-us), developed by 4 | the [Broad Institute](https://www.broadinstitute.org/). More information on how these workflows work is available in 5 | the [GATK Workflows Github repository](https://github.com/gatk-workflows). 6 | 7 | -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/gatk4-basic-joint-genotyping/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "gatk4-basic-joint-genotyping.wdl", 3 | "inputFileURLs": [ 4 | "gatk4-basic-joint-genotyping.inputs.json" 5 | ], 6 | "engineOptions": "--no-cache" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/gatk4-basic-joint-genotyping/gatk4-basic-joint-genotyping.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "BasicJointGenotyping.input_gvcfs": [ 3 | "s3://1000genomes-dragen-3.7.6/data/individuals/hg38-graph-based/NA12329/NA12329.hard-filtered.gvcf.gz", 4 | "s3://1000genomes-dragen-3.7.6/data/individuals/hg38-graph-based/NA06984/NA06984.hard-filtered.gvcf.gz", 5 | "s3://1000genomes-dragen-3.7.6/data/individuals/hg38-graph-based/NA06989/NA06989.hard-filtered.gvcf.gz" 6 | ], 7 | "BasicJointGenotyping.ref_fasta": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta", 8 | "BasicJointGenotyping.ref_fasta_index": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta.fai", 9 | "BasicJointGenotyping.ref_dict": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.dict", 10 | "BasicJointGenotyping.interval_list": "s3://broad-references/hg38/v0/hg38.even.handcurated.20k.chr20_test.intervals", 11 | "BasicJointGenotyping.callset_name": "Trio" 12 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/gatk4-data-processing/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "processing-for-variant-discovery-gatk4.wdl", 3 | "inputFileURLs": [ 4 | "processing-for-variant-discovery-gatk4.hg38.wgs.inputs.json" 5 | ], 6 | "engineOptions": "--no-cache" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/gatk4-germline-snps-indels/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "haplotypecaller-gvcf-gatk4.wdl", 3 | "inputFileURLs": [ 4 | "haplotypecaller-gvcf-gatk4.hg38.wgs.inputs.json" 5 | ], 6 | "engineOptions": "--no-cache" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/gatk4-germline-snps-indels/haplotypecaller-gvcf-gatk4.hg38.wgs.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "HaplotypeCallerGvcf_GATK4.input_bam": "s3://gatk-test-data/wgs_cram/NA12878_20k_hg38/NA12878.cram", 3 | "HaplotypeCallerGvcf_GATK4.input_bam_index": "s3://gatk-test-data/wgs_cram/NA12878_20k_hg38/NA12878.crai", 4 | 5 | "HaplotypeCallerGvcf_GATK4.ref_dict": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.dict", 6 | "HaplotypeCallerGvcf_GATK4.ref_fasta": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta", 7 | "HaplotypeCallerGvcf_GATK4.ref_fasta_index": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta.fai", 8 | 9 | "HaplotypeCallerGvcf_GATK4.scattered_calling_intervals_list": "s3://gatk-test-data/intervals/hg38_wgs_scattered_calling_intervals.txt" 10 | } 11 | -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/gatk4-rnaseq-germline-snps-indels/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "gatk4-rnaseq-germline-snps-indels.wdl", 3 | "inputFileURLs": [ "gatk4-rnaseq-germline-snps-indels.inputs.json" ], 4 | "engineOptions": "--no-cache" 5 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/seq-format-conversions/bam-to-unmapped-bams/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "bam-to-unmapped-bams.wdl", 3 | "inputFileURLs": [ 4 | "bam-to-unmapped-bams.inputs.json" 5 | ], 6 | "engineOptions": "--no-cache" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/seq-format-conversions/bam-to-unmapped-bams/bam-to-unmapped-bams.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "BamToUnmappedBams.input_bam": "s3://gatk-test-data/wgs_bam/NA12878_20k_hg38/NA12878.bam" 3 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/seq-format-conversions/cram-to-bam/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "cram-to-bam.wdl", 3 | "inputFileURLs": [ 4 | "cram-to-bam.inputs.json" 5 | ], 6 | "engineOptions": "--no-cache" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/seq-format-conversions/cram-to-bam/cram-to-bam.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "CramToBamFlow.sample_name": "NA12878", 3 | "CramToBamFlow.input_cram": "s3://gatk-test-data/wgs_cram/NA12878_20k_hg38/NA12878.cram", 4 | 5 | "CramToBamFlow.ref_dict": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.dict", 6 | "CramToBamFlow.ref_fasta": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta", 7 | "CramToBamFlow.ref_fasta_index": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta.fai" 8 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/seq-format-conversions/interleaved-fastq-to-paired-fastq/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "interleaved-fastq-to-paired-fastq.wdl", 3 | "inputFileURLs": [ 4 | "interleaved-fastq-to-paired-fastq.inputs.json" 5 | ], 6 | "engineOptions": "--no-cache" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/seq-format-conversions/interleaved-fastq-to-paired-fastq/interleaved-fastq-to-paired-fastq.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "UninterleaveFastqs.input_fastq": "s3://healthai-public-assets-us-east-1/agc-demo-data/interleaved-fastq/H06HDADXX130110.1.ATCACGAT.20k_reads.interleaved.fastq" 3 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/seq-format-conversions/paired-fastq-to-unmapped-bam/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "paired-fastq-to-unmapped-bam.wdl", 3 | "inputFileURLs": [ 4 | "paired-fastq-to-unmapped-inputs.json" 5 | ], 6 | "engineOptions": "--no-cache" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/seq-format-conversions/paired-fastq-to-unmapped-bam/paired-fastq-to-unmapped-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConvertPairedFastQsToUnmappedBamWf.readgroup_name": "NA12878_A", 3 | "ConvertPairedFastQsToUnmappedBamWf.sample_name": "NA12878", 4 | "ConvertPairedFastQsToUnmappedBamWf.fastq_1": "s3://gatk-test-data/wgs_fastq/NA12878_20k/H06HDADXX130110.1.ATCACGAT.20k_reads_1.fastq", 5 | "ConvertPairedFastQsToUnmappedBamWf.fastq_2": "s3://gatk-test-data/wgs_fastq/NA12878_20k/H06HDADXX130110.1.ATCACGAT.20k_reads_2.fastq", 6 | "ConvertPairedFastQsToUnmappedBamWf.library_name": "Solexa-NA12878", 7 | "ConvertPairedFastQsToUnmappedBamWf.platform_unit": "H06HDADXX130110.2.ATCACGAT", 8 | "ConvertPairedFastQsToUnmappedBamWf.run_date": "2016-09-01T02:00:00+0200", 9 | "ConvertPairedFastQsToUnmappedBamWf.platform_name": "illumina", 10 | "ConvertPairedFastQsToUnmappedBamWf.sequencing_center": "BI", 11 | 12 | "ConvertPairedFastQsToUnmappedBamWf.make_fofn": true 13 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/seq-format-validation/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "validate-bam.wdl", 3 | "inputFileURLs": [ 4 | "validate-bams.input.json" 5 | ], 6 | "engineOptions": "--no-cache" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project-miniwdl/seq-format-validation/validate-bams.input.json: -------------------------------------------------------------------------------- 1 | { 2 | "ValidateBamsWf.bam_array": [ 3 | "s3://gatk-test-data/wgs_bam/NA12878_24RG_hg38/NA12878_24RG_small.hg38.bam", 4 | "s3://gatk-test-data/wgs_bam/NA12878_24RG_hg38/NA12878_24RG_med.hg38.bam" 5 | ] 6 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/gatk4-basic-joint-genotyping/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "gatk4-basic-joint-genotyping.wdl", 3 | "inputFileURLs": [ 4 | "gatk4-basic-joint-genotyping.inputs.json" 5 | ], 6 | "optionFileURL": "options.json" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/gatk4-basic-joint-genotyping/gatk4-basic-joint-genotyping.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "BasicJointGenotyping.input_gvcfs": [ 3 | "s3://1000genomes-dragen-3.7.6/data/individuals/hg38-graph-based/NA12329/NA12329.hard-filtered.gvcf.gz", 4 | "s3://1000genomes-dragen-3.7.6/data/individuals/hg38-graph-based/NA06984/NA06984.hard-filtered.gvcf.gz", 5 | "s3://1000genomes-dragen-3.7.6/data/individuals/hg38-graph-based/NA06989/NA06989.hard-filtered.gvcf.gz" 6 | ], 7 | "BasicJointGenotyping.ref_fasta": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta", 8 | "BasicJointGenotyping.ref_fasta_index": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta.fai", 9 | "BasicJointGenotyping.ref_dict": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.dict", 10 | "BasicJointGenotyping.interval_list": "s3://broad-references/hg38/v0/hg38.even.handcurated.20k.chr20_test.intervals", 11 | "BasicJointGenotyping.callset_name": "Trio" 12 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/gatk4-basic-joint-genotyping/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "write_to_cache": false, 3 | "read_from_cache": false 4 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/gatk4-data-processing/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "processing-for-variant-discovery-gatk4.wdl", 3 | "inputFileURLs": [ 4 | "processing-for-variant-discovery-gatk4.hg38.wgs.inputs.json" 5 | ], 6 | "optionFileURL": "options.json" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/gatk4-data-processing/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "write_to_cache": false, 3 | "read_from_cache": false 4 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/gatk4-germline-snps-indels/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "haplotypecaller-gvcf-gatk4.wdl", 3 | "inputFileURLs": [ 4 | "haplotypecaller-gvcf-gatk4.hg38.wgs.inputs.json" 5 | ], 6 | "optionFileURL": "options.json" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/gatk4-germline-snps-indels/haplotypecaller-gvcf-gatk4.hg38.wgs.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "HaplotypeCallerGvcf_GATK4.input_bam": "s3://gatk-test-data/wgs_cram/NA12878_20k_hg38/NA12878.cram", 3 | "HaplotypeCallerGvcf_GATK4.input_bam_index": "s3://gatk-test-data/wgs_cram/NA12878_20k_hg38/NA12878.crai", 4 | 5 | "HaplotypeCallerGvcf_GATK4.ref_dict": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.dict", 6 | "HaplotypeCallerGvcf_GATK4.ref_fasta": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta", 7 | "HaplotypeCallerGvcf_GATK4.ref_fasta_index": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta.fai", 8 | 9 | "HaplotypeCallerGvcf_GATK4.scattered_calling_intervals_list": "s3://gatk-test-data/intervals/hg38_wgs_scattered_calling_intervals.txt" 10 | } 11 | -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/gatk4-germline-snps-indels/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "write_to_cache": false, 3 | "read_from_cache": false 4 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/gatk4-rnaseq-germline-snps-indels/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "gatk4-rnaseq-germline-snps-indels.wdl", 3 | "inputFileURLs": [ "gatk4-rnaseq-germline-snps-indels.inputs.json" ], 4 | "optionFileURL": "options.json" 5 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/gatk4-rnaseq-germline-snps-indels/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "write_to_cache": true, 3 | "read_from_cache": true 4 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/bam-to-unmapped-bams/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "bam-to-unmapped-bams.wdl", 3 | "inputFileURLs": [ 4 | "bam-to-unmapped-bams.inputs.json" 5 | ], 6 | "optionFileURL": "options.json" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/bam-to-unmapped-bams/bam-to-unmapped-bams.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "BamToUnmappedBams.input_bam": "s3://gatk-test-data/wgs_bam/NA12878_20k_hg38/NA12878.bam" 3 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/bam-to-unmapped-bams/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "write_to_cache": false, 3 | "read_from_cache": false 4 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/cram-to-bam/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "cram-to-bam.wdl", 3 | "inputFileURLs": [ 4 | "cram-to-bam.inputs.json" 5 | ], 6 | "optionFileURL": "options.json" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/cram-to-bam/cram-to-bam.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "CramToBamFlow.sample_name": "NA12878", 3 | "CramToBamFlow.input_cram": "s3://gatk-test-data/wgs_cram/NA12878_20k_hg38/NA12878.cram", 4 | 5 | "CramToBamFlow.ref_dict": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.dict", 6 | "CramToBamFlow.ref_fasta": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta", 7 | "CramToBamFlow.ref_fasta_index": "s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta.fai" 8 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/cram-to-bam/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "write_to_cache": false, 3 | "read_from_cache": false 4 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/interleaved-fastq-to-paired-fastq/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "interleaved-fastq-to-paired-fastq.wdl", 3 | "inputFileURLs": [ 4 | "interleaved-fastq-to-paired-fastq.inputs.json" 5 | ], 6 | "optionFileURL": "options.json" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/interleaved-fastq-to-paired-fastq/interleaved-fastq-to-paired-fastq.inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "UninterleaveFastqs.input_fastq": "s3://healthai-public-assets-us-east-1/agc-demo-data/interleaved-fastq/H06HDADXX130110.1.ATCACGAT.20k_reads.interleaved.fastq" 3 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/interleaved-fastq-to-paired-fastq/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "write_to_cache": false, 3 | "read_from_cache": false 4 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/paired-fastq-to-unmapped-bam/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "paired-fastq-to-unmapped-bam.wdl", 3 | "inputFileURLs": [ 4 | "paired-fastq-to-unmapped-inputs.json" 5 | ], 6 | "optionFileURL": "options.json" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/paired-fastq-to-unmapped-bam/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "write_to_cache": false, 3 | "read_from_cache": false 4 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-conversions/paired-fastq-to-unmapped-bam/paired-fastq-to-unmapped-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConvertPairedFastQsToUnmappedBamWf.readgroup_name": "NA12878_A", 3 | "ConvertPairedFastQsToUnmappedBamWf.sample_name": "NA12878", 4 | "ConvertPairedFastQsToUnmappedBamWf.fastq_1": "s3://gatk-test-data/wgs_fastq/NA12878_20k/H06HDADXX130110.1.ATCACGAT.20k_reads_1.fastq", 5 | "ConvertPairedFastQsToUnmappedBamWf.fastq_2": "s3://gatk-test-data/wgs_fastq/NA12878_20k/H06HDADXX130110.1.ATCACGAT.20k_reads_2.fastq", 6 | "ConvertPairedFastQsToUnmappedBamWf.library_name": "Solexa-NA12878", 7 | "ConvertPairedFastQsToUnmappedBamWf.platform_unit": "H06HDADXX130110.2.ATCACGAT", 8 | "ConvertPairedFastQsToUnmappedBamWf.run_date": "2016-09-01T02:00:00+0200", 9 | "ConvertPairedFastQsToUnmappedBamWf.platform_name": "illumina", 10 | "ConvertPairedFastQsToUnmappedBamWf.sequencing_center": "BI", 11 | 12 | "ConvertPairedFastQsToUnmappedBamWf.make_fofn": true 13 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-validation/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "validate-bam.wdl", 3 | "inputFileURLs": [ 4 | "validate-bams.input.json" 5 | ], 6 | "optionFileURL": "options.json" 7 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-validation/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "write_to_cache": false, 3 | "read_from_cache": false 4 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/seq-format-validation/validate-bams.input.json: -------------------------------------------------------------------------------- 1 | { 2 | "ValidateBamsWf.bam_array": [ 3 | "s3://gatk-test-data/wgs_bam/NA12878_24RG_hg38/NA12878_24RG_small.hg38.bam", 4 | "s3://gatk-test-data/wgs_bam/NA12878_24RG_hg38/NA12878_24RG_med.hg38.bam" 5 | ] 6 | } -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/bam-to-unmapped-bams.dot: -------------------------------------------------------------------------------- 1 | digraph BamToUnmappedBams { 2 | #rankdir=LR; 3 | compound=true; 4 | 5 | # Links 6 | CALL_RevertSam -> SCATTER_0_VARIABLE_unmapped_bam 7 | SCATTER_0_VARIABLE_unmapped_bam -> CALL_SortSam 8 | 9 | # Nodes 10 | subgraph cluster_0 { 11 | style="filled,solid"; 12 | fillcolor=white; 13 | CALL_SortSam [label="call SortSam"] 14 | SCATTER_0_VARIABLE_unmapped_bam [shape="hexagon" label="scatter over File as unmapped_bam"] 15 | } 16 | CALL_RevertSam [label="call RevertSam"] 17 | } 18 | -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/bam-to-unmapped-bams.dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/examples/gatk-best-practices-project/workflow-diagrams/bam-to-unmapped-bams.dot.png -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/cram-to-bam.dot: -------------------------------------------------------------------------------- 1 | digraph CramToBamFlow { 2 | #rankdir=LR; 3 | compound=true; 4 | 5 | # Links 6 | CALL_CramToBamTask -> CALL_ValidateSamFile 7 | 8 | # Nodes 9 | CALL_CramToBamTask [label="call CramToBamTask"] 10 | CALL_ValidateSamFile [label="call ValidateSamFile"] 11 | } 12 | -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/cram-to-bam.dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/examples/gatk-best-practices-project/workflow-diagrams/cram-to-bam.dot.png -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/gatk4-basic-joint-genotyping.dot: -------------------------------------------------------------------------------- 1 | digraph BasicJointGenotyping { 2 | #rankdir=LR; 3 | compound=true; 4 | 5 | # Links 6 | CALL_ImportGVCFs -> CALL_GenotypeGVCFs 7 | CALL_GenotypeGVCFs -> CALL_MergeVCFs 8 | SCATTER_0_VARIABLE_interval -> CALL_GenotypeGVCFs 9 | CALL_RenameAndIndexFile -> CALL_ImportGVCFs 10 | SCATTER_1_VARIABLE_input_gvcf -> CALL_RenameAndIndexFile 11 | SCATTER_0_VARIABLE_interval -> CALL_ImportGVCFs 12 | 13 | # Nodes 14 | CALL_MergeVCFs [label="call MergeVCFs"] 15 | subgraph cluster_0 { 16 | style="filled,solid"; 17 | fillcolor=white; 18 | CALL_ImportGVCFs [label="call ImportGVCFs"] 19 | CALL_GenotypeGVCFs [label="call GenotypeGVCFs"] 20 | SCATTER_0_VARIABLE_interval [shape="hexagon" label="scatter over String as interval"] 21 | } 22 | subgraph cluster_1 { 23 | style="filled,solid"; 24 | fillcolor=white; 25 | CALL_RenameAndIndexFile [label="call RenameAndIndexFile"] 26 | SCATTER_1_VARIABLE_input_gvcf [shape="hexagon" label="scatter over File as input_gvcf"] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/gatk4-basic-joint-genotyping.dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/examples/gatk-best-practices-project/workflow-diagrams/gatk4-basic-joint-genotyping.dot.png -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/gatk4-data-processing.dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/examples/gatk-best-practices-project/workflow-diagrams/gatk4-data-processing.dot.png -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/gatk4-germline-snps-indels.dot: -------------------------------------------------------------------------------- 1 | digraph HaplotypeCallerGvcf_GATK4 { 2 | #rankdir=LR; 3 | compound=true; 4 | 5 | # Links 6 | CALL_HaplotypeCaller -> CALL_MergeGVCFs 7 | SCATTER_0_VARIABLE_interval_file -> CALL_HaplotypeCaller 8 | CALL_CramToBamTask -> CALL_HaplotypeCaller 9 | 10 | # Nodes 11 | CALL_MergeGVCFs [label="call MergeGVCFs"] 12 | subgraph cluster_0 { 13 | style="filled,solid"; 14 | fillcolor=white; 15 | CALL_HaplotypeCaller [label="call HaplotypeCaller"] 16 | SCATTER_0_VARIABLE_interval_file [shape="hexagon" label="scatter over File as interval_file"] 17 | } 18 | subgraph cluster_1 { 19 | style="filled,dashed"; 20 | fillcolor=white; 21 | CALL_CramToBamTask [label="call CramToBamTask"] 22 | CONDITIONAL_1_EXPRESSION [shape="hexagon" label="if (is_cram)" style="dashed" ] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/gatk4-germline-snps-indels.dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/examples/gatk-best-practices-project/workflow-diagrams/gatk4-germline-snps-indels.dot.png -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/gatk4-rnadeq-germline-snps-indels.dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/examples/gatk-best-practices-project/workflow-diagrams/gatk4-rnadeq-germline-snps-indels.dot.png -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/interleaved-to-paired-fastq.dot: -------------------------------------------------------------------------------- 1 | digraph UninterleaveFastqs { 2 | #rankdir=LR; 3 | compound=true; 4 | 5 | # Links 6 | 7 | 8 | # Nodes 9 | CALL_uninterleave_fqs [label="call uninterleave_fqs"] 10 | } 11 | -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/interleaved-to-paired-fastq.dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/examples/gatk-best-practices-project/workflow-diagrams/interleaved-to-paired-fastq.dot.png -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/paired-fastq-to-unmapped-bam.dot: -------------------------------------------------------------------------------- 1 | digraph ConvertPairedFastQsToUnmappedBamWf { 2 | #rankdir=LR; 3 | compound=true; 4 | 5 | # Links 6 | CALL_PairedFastQsToUnmappedBAM -> CALL_CreateFoFN 7 | 8 | # Nodes 9 | CALL_PairedFastQsToUnmappedBAM [label="call PairedFastQsToUnmappedBAM"] 10 | subgraph cluster_0 { 11 | style="filled,dashed"; 12 | fillcolor=white; 13 | CALL_CreateFoFN [label="call CreateFoFN"] 14 | CONDITIONAL_0_EXPRESSION [shape="hexagon" label="if (make_fofn)" style="dashed" ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/paired-fastq-to-unmapped-bam.dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/examples/gatk-best-practices-project/workflow-diagrams/paired-fastq-to-unmapped-bam.dot.png -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/seq-format-validation.dot: -------------------------------------------------------------------------------- 1 | digraph ValidateBamsWf { 2 | #rankdir=LR; 3 | compound=true; 4 | 5 | # Links 6 | SCATTER_0_VARIABLE_input_bam -> CALL_ValidateBAM 7 | 8 | # Nodes 9 | subgraph cluster_0 { 10 | style="filled,solid"; 11 | fillcolor=white; 12 | CALL_ValidateBAM [label="call ValidateBAM"] 13 | SCATTER_0_VARIABLE_input_bam [shape="hexagon" label="scatter over File as input_bam"] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/gatk-best-practices-project/workflow-diagrams/seq-format-validation.dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/examples/gatk-best-practices-project/workflow-diagrams/seq-format-validation.dot.png -------------------------------------------------------------------------------- /examples/nf-core-project/README.md: -------------------------------------------------------------------------------- 1 | ## Introduction 2 | 3 | This project uses workflows from the [nf-core](https://nf-co.re/) repository. For licensing terms, credits and citation of individual 4 | workflows please refer to the following links: 5 | 6 | * https://github.com/nf-core/rnaseq 7 | * https://github.com/nf-core/sarek 8 | * https://github.com/nf-core/atacseq 9 | 10 | ## Example Workflow Runtimes 11 | 12 | These times were recorded using the project's `bigMemCtx` context in `us-east-1` with a maximum of 256 vCPUs. Times include the time from workflow submission 13 | to completion and for the AWS Batch service to provision compute resources (cold start time). Not included is the time required for the Nextflow headnode startup. 14 | The results are indicative only and runtimes will vary based on the resources allocated by AWS Batch as well as any automated retries 15 | of tasks due to task failures. Caching of tasks was not used in this evaluation. 16 | 17 | Workflow inputs were those defined in the respective `*inputs.json` files 18 | 19 | 20 | | Workflow | Runtime (minutes) | 21 | | -------- | ----------------- | 22 | | atacseq | 139 | 23 | | rnaseq | 458 | 24 | | sarek | 359 | -------------------------------------------------------------------------------- /examples/nf-core-project/workflows/atacseq/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "https://github.com/nf-core/atacseq.git", 3 | "inputFileURLs": [ 4 | "inputs.json" 5 | ], 6 | "engineOptions": "-resume" 7 | } 8 | -------------------------------------------------------------------------------- /examples/nf-core-project/workflows/atacseq/design.csv: -------------------------------------------------------------------------------- 1 | group,replicate,fastq_1,fastq_2 2 | control,1,s3://encode-public/2018/03/28/fcd337b8-eb68-41dd-be1f-c188446aa240/ENCFF793VAW.fastq.gz, 3 | control,2,s3://encode-public/2018/03/28/289c587c-9025-4048-86f2-5d0eca510b03/ENCFF022FVS.fastq.gz, 4 | control,3,s3://encode-public/2018/03/28/a5e6b7cd-be1e-474d-a5a2-1ca5388fea29/ENCFF224EAV.fastq.gz, 5 | treatment,1,s3://encode-public/2018/03/28/60f71ff2-2204-4f95-a527-2f10757fba57/ENCFF744SXE.fastq.gz, 6 | treatment,2,s3://encode-public/2018/03/28/cf5895e3-7a84-42f7-aee6-9b0206d588c7/ENCFF888HBH.fastq.gz, 7 | treatment,3,s3://encode-public/2018/03/28/1f08c2ac-21a7-4851-9afb-db28114bb41f/ENCFF799HXV.fastq.gz, -------------------------------------------------------------------------------- /examples/nf-core-project/workflows/atacseq/inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "input": "s3://healthai-public-assets-us-east-1/agc-demo-data/atacseq/design.csv", 3 | "genome": "GRCh38", 4 | "single_end": true 5 | } 6 | -------------------------------------------------------------------------------- /examples/nf-core-project/workflows/rnaseq/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "https://github.com/nf-core/rnaseq.git", 3 | "inputFileURLs": ["inputs.json"], 4 | "engineOptions": "-resume -r 3.4" 5 | } 6 | -------------------------------------------------------------------------------- /examples/nf-core-project/workflows/rnaseq/inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "input": "https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/samplesheet/v3.4/samplesheet_full.csv", 3 | "genome": "GRCh37" 4 | } 5 | -------------------------------------------------------------------------------- /examples/nf-core-project/workflows/sarek/MANIFEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainWorkflowURL": "https://github.com/nf-core/sarek.git", 3 | "inputFileURLs": [ 4 | "inputs.json" 5 | ], 6 | "engineOptions": "-resume" 7 | } 8 | -------------------------------------------------------------------------------- /examples/nf-core-project/workflows/sarek/inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "input": "s3://healthai-public-assets-us-east-1/agc-demo-data/sarek/fastq_list.tsv" 3 | } 4 | -------------------------------------------------------------------------------- /extras/agc-minimal-permissions/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /extras/agc-minimal-permissions/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /extras/agc-minimal-permissions/README.md: -------------------------------------------------------------------------------- 1 | # AGC minimal permissions 2 | 3 | This CDK project will create two policies that represent minimal permissions for: 4 | 5 | * Admins - roles that perform 6 | * `agc account *` 7 | * Users - roles that peform 8 | * `agc context *` 9 | * `agc workflow *` 10 | * `agc logs *` 11 | 12 | To install dependencies: 13 | 14 | ```bash 15 | npm install 16 | ``` 17 | 18 | To deploy this into your account run: 19 | 20 | ```bash 21 | cdk deploy 22 | ``` 23 | -------------------------------------------------------------------------------- /extras/agc-minimal-permissions/bin/permissions.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import 'source-map-support/register'; 3 | import * as cdk from '@aws-cdk/core'; 4 | import { AgcPermissionsStack } from '../lib/permissions-stack'; 5 | 6 | const app = new cdk.App(); 7 | new AgcPermissionsStack(app, 'AgcPermissionsStack', {}); 8 | -------------------------------------------------------------------------------- /extras/agc-minimal-permissions/cdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "npx ts-node --prefer-ts-exts bin/permissions.ts", 3 | "context": { 4 | "@aws-cdk/core:bootstrapQualifier": "agc", 5 | "@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true, 6 | "@aws-cdk/core:enableStackNameDuplicates": "true", 7 | "aws-cdk:enableDiffNoFail": "true", 8 | "@aws-cdk/core:stackRelativeExports": "true", 9 | "@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": true, 10 | "@aws-cdk/aws-secretsmanager:parseOwnedSecretName": true, 11 | "@aws-cdk/aws-kms:defaultKeyPolicies": true, 12 | "@aws-cdk/aws-s3:grantWriteWithoutAcl": true, 13 | "@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount": true, 14 | "@aws-cdk/aws-rds:lowercaseDbIdentifier": true, 15 | "@aws-cdk/aws-efs:defaultEncryptionAtRest": true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /extras/agc-minimal-permissions/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | roots: ['/test'], 3 | testMatch: ['**/*.test.ts'], 4 | transform: { 5 | '^.+\\.tsx?$': 'ts-jest' 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /extras/agc-minimal-permissions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "permissions", 3 | "version": "0.1.0", 4 | "bin": { 5 | "permissions": "bin/permissions.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@aws-cdk/assert": "^2.50.0", 15 | "@types/jest": "^27.0.2", 16 | "@types/node": "16.10.3", 17 | "aws-cdk": "^2.128.0", 18 | "jest": "^27.2.4", 19 | "minimatch": ">=3.0.5", 20 | "ts-jest": "^27.0.5", 21 | "ts-node": "^10.2.1", 22 | "typescript": "~4.4.3" 23 | }, 24 | "dependencies": { 25 | "@aws-cdk/aws-iam": "^1.204.0", 26 | "@aws-cdk/cloud-assembly-schema": "^2.128.0", 27 | "@aws-cdk/core": "^1.204.0", 28 | "@aws-cdk/cx-api": "^2.128.0", 29 | "aws-cdk-lib": "^2.128.0", 30 | "constructs": "^10.1.152", 31 | "minimatch": ">=3.0.5", 32 | "source-map-support": "^0.5.20" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /extras/agc-minimal-permissions/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2018", 4 | "module": "commonjs", 5 | "lib": ["es2018"], 6 | "declaration": true, 7 | "strict": true, 8 | "noImplicitAny": true, 9 | "strictNullChecks": true, 10 | "noImplicitThis": true, 11 | "alwaysStrict": true, 12 | "noUnusedLocals": false, 13 | "noUnusedParameters": false, 14 | "noImplicitReturns": true, 15 | "noFallthroughCasesInSwitch": false, 16 | "inlineSourceMap": true, 17 | "inlineSources": true, 18 | "experimentalDecorators": true, 19 | "strictPropertyInitialization": false, 20 | "typeRoots": ["./node_modules/@types"] 21 | }, 22 | "exclude": ["cdk.out"] 23 | } 24 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amazon-genomics-cli", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "name": "amazon-genomics-cli" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/cdk/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: "@typescript-eslint/parser", // Specifies the ESLint parser 3 | extends: [ 4 | "plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin 5 | "plugin:prettier/recommended", // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. 6 | ], 7 | parserOptions: { 8 | ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features 9 | sourceType: "module", // Allows for the use of imports 10 | }, 11 | rules: { 12 | // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs 13 | // e.g. "@typescript-eslint/explicit-function-return-type": "off", 14 | "@typescript-eslint/no-use-before-define": "off", 15 | "@typescript-eslint/no-non-null-assertion": "off", 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /packages/cdk/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | !.eslintrc.js 4 | !.prettierrc.js 5 | *.d.ts 6 | node_modules 7 | .idea/ 8 | 9 | # CDK asset staging directory 10 | .cdk.staging 11 | cdk.out 12 | cdk.context.json 13 | outputs.json 14 | cdk.tgz 15 | cdk-output* 16 | 17 | # Python related 18 | *.pyc 19 | -------------------------------------------------------------------------------- /packages/cdk/.npmrc: -------------------------------------------------------------------------------- 1 | lockfile-version=1 2 | -------------------------------------------------------------------------------- /packages/cdk/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 160, 3 | }; 4 | -------------------------------------------------------------------------------- /packages/cdk/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all build test format 2 | 3 | all: format test build 4 | 5 | build: 6 | npm run build 7 | 8 | test: 9 | npm run test 10 | 11 | format: 12 | npm run format 13 | 14 | init: 15 | npm ci --loglevel error 16 | 17 | release: 18 | npm shrinkwrap && npm pack --silent | xargs -I '{}' mv {} cdk.tgz 19 | -------------------------------------------------------------------------------- /packages/cdk/README.md: -------------------------------------------------------------------------------- 1 | # AGC CDK 2 | 3 | This library provides a set of constructs and resources used by AGC to deploy the 4 | infrastructure needed to run genomics workflows. 5 | -------------------------------------------------------------------------------- /packages/cdk/apps/context/cdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "npx -p typescript -p ts-node ts-node --prefer-ts-exts app.ts", 3 | "context": { 4 | "@aws-cdk/core:bootstrapQualifier": "agc" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/cdk/apps/core/cdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "npx -p typescript -p ts-node ts-node --prefer-ts-exts app.ts", 3 | "context": { 4 | "@aws-cdk/core:bootstrapQualifier": "agc" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/cdk/go.mod: -------------------------------------------------------------------------------- 1 | // Exclude CDK directory from Go module parsing 2 | module ignore 3 | 4 | go 1.19 5 | 6 | require ( 7 | github.com/aws/aws-cdk-go/awscdk/v2 v2.17.0 8 | github.com/aws/constructs-go/constructs/v10 v10.0.92 9 | github.com/aws/jsii-runtime-go v1.55.1 10 | ) 11 | 12 | require ( 13 | github.com/Masterminds/semver/v3 v3.1.1 // indirect 14 | github.com/aws/aws-cdk-go/awscdk v1.149.0-devpreview // indirect 15 | github.com/aws/constructs-go/constructs/v3 v3.3.246 // indirect 16 | ) 17 | -------------------------------------------------------------------------------- /packages/cdk/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /packages/cdk/lib/artifacts/batch-artifacts/amazon-ebs-autoscale.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/packages/cdk/lib/artifacts/batch-artifacts/amazon-ebs-autoscale.tgz -------------------------------------------------------------------------------- /packages/cdk/lib/artifacts/batch-artifacts/ecs-additions/awscli-shim.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This shim is for using the AWS ClI v2 with containers that do not have full glibc 4 | # it makes the shared libraries the AWS CLI v2 findable via LD_LIBRARY_PATH 5 | # 6 | # expect to be installed as /opt/aws-cli/bin/aws 7 | # expect to actually call /opt/aws-cli/dist/aws 8 | # expect that /opt/aws-cli is mapped to containers 9 | 10 | BIN_DIR=`dirname $0` 11 | DIST_DIR=`dirname $BIN_DIR`/dist 12 | AWS=$DIST_DIR/aws 13 | 14 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIST_DIR 15 | 16 | # shellcheck disable=2068 17 | $AWS $@ 18 | -------------------------------------------------------------------------------- /packages/cdk/lib/constructs/engines/engine-job-definition.ts: -------------------------------------------------------------------------------- 1 | import { JobDefinition, JobDefinitionProps } from "@aws-cdk/aws-batch-alpha"; 2 | import { Construct } from "constructs"; 3 | import { renderBatchLogConfiguration } from "../../util"; 4 | import { ILogGroup } from "aws-cdk-lib/aws-logs"; 5 | 6 | interface EngineJobDefinitionProps extends JobDefinitionProps { 7 | readonly logGroup: ILogGroup; 8 | } 9 | 10 | export class EngineJobDefinition extends JobDefinition { 11 | constructor(scope: Construct, id: string, props: EngineJobDefinitionProps) { 12 | super(scope, id, { 13 | ...props, 14 | container: { 15 | ...props.container, 16 | logConfiguration: renderBatchLogConfiguration(scope, props.logGroup), 17 | environment: { 18 | AWS_METADATA_SERVICE_TIMEOUT: "10", 19 | AWS_METADATA_SERVICE_NUM_ATTEMPTS: "10", 20 | ...props.container.environment, 21 | }, 22 | memoryLimitMiB: props.container.memoryLimitMiB || 2048, 23 | vcpus: props.container.vcpus || 1, 24 | }, 25 | }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/cdk/lib/constructs/index.ts: -------------------------------------------------------------------------------- 1 | export { ApiProxy } from "./api-proxy"; 2 | export { Batch } from "./batch"; 3 | export { SecureService } from "./secure-service"; 4 | -------------------------------------------------------------------------------- /packages/cdk/lib/env/core-app-parameters.ts: -------------------------------------------------------------------------------- 1 | import { APP_ENV_NAME, APP_NAME } from "../constants"; 2 | import { Node } from "constructs"; 3 | import { getEnvBoolOrDefault, getEnvStringOrDefault } from "./index"; 4 | 5 | export class CoreAppParameters { 6 | /** 7 | * VPC to run resources in. 8 | */ 9 | public readonly vpcId?: string; 10 | /** 11 | * Name of the application bucket. 12 | */ 13 | public readonly bucketName: string; 14 | /** 15 | * Whether to create a new application bucket. 16 | */ 17 | public readonly createNewBucket: boolean; 18 | 19 | constructor(node: Node, account: string, region: string) { 20 | this.vpcId = getEnvStringOrDefault(node, "VPC_ID"); 21 | this.bucketName = getEnvStringOrDefault(node, `${APP_ENV_NAME}_BUCKET_NAME`, `${APP_NAME}-${account}-${region}`)!; 22 | this.createNewBucket = getEnvBoolOrDefault(node, `CREATE_${APP_ENV_NAME}_BUCKET`, true)!; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/cdk/lib/roles/cromwell-adapter-role.ts: -------------------------------------------------------------------------------- 1 | import { Role, ServicePrincipal, ManagedPolicy } from "aws-cdk-lib/aws-iam"; 2 | import { Construct } from "constructs"; 3 | import { BucketOperations } from "../common/BucketOperations"; 4 | 5 | export interface CromwellAdapterRoleProps { 6 | readOnlyBucketArns: string[]; 7 | readWriteBucketArns: string[]; 8 | } 9 | 10 | export class CromwellAdapterRole extends Role { 11 | constructor(scope: Construct, id: string, props: CromwellAdapterRoleProps) { 12 | super(scope, id, { 13 | assumedBy: new ServicePrincipal("lambda.amazonaws.com"), 14 | managedPolicies: [ManagedPolicy.fromAwsManagedPolicyName("service-role/AWSLambdaVPCAccessExecutionRole")], 15 | }); 16 | 17 | BucketOperations.grantBucketAccess(this, this, props.readOnlyBucketArns, true); 18 | BucketOperations.grantBucketAccess(this, this, props.readWriteBucketArns); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/cdk/lib/roles/policies/batch-policies.ts: -------------------------------------------------------------------------------- 1 | import { PolicyStatement, Effect } from "aws-cdk-lib/aws-iam"; 2 | 3 | export class BatchPolicies { 4 | static readonly listAndDescribe = new PolicyStatement({ 5 | effect: Effect.ALLOW, 6 | actions: ["batch:Describe*", "batch:ListJobs"], 7 | resources: ["*"], 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /packages/cdk/lib/roles/policies/head-job-batch-policy.ts: -------------------------------------------------------------------------------- 1 | import { Policy, PolicyStatement, Effect } from "aws-cdk-lib/aws-iam"; 2 | import { Construct } from "constructs"; 3 | import { batchArn } from "../../util"; 4 | import { BatchPolicies } from "./batch-policies"; 5 | 6 | export class HeadJobBatchPolicy extends Policy { 7 | constructor(scope: Construct, id: string) { 8 | super(scope, id, { 9 | statements: [ 10 | BatchPolicies.listAndDescribe, 11 | new PolicyStatement({ 12 | effect: Effect.ALLOW, 13 | actions: ["batch:RegisterJobDefinition", "batch:DeregisterJobDefinition"], 14 | resources: [batchArn(scope, "job-definition")], 15 | }), 16 | ], 17 | }); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/cdk/lib/roles/policies/nextflow-adapter-batch-policy.ts: -------------------------------------------------------------------------------- 1 | import { PolicyDocument, PolicyStatement, Effect } from "aws-cdk-lib/aws-iam"; 2 | 3 | export interface NextflowSubmitJobBatchPolicyProps { 4 | batchJobPolicyArns: string[]; 5 | } 6 | 7 | export class NextflowAdapterBatchPolicy extends PolicyDocument { 8 | constructor(props: NextflowSubmitJobBatchPolicyProps) { 9 | super({ 10 | assignSids: true, 11 | statements: [ 12 | new PolicyStatement({ 13 | effect: Effect.ALLOW, 14 | actions: ["batch:SubmitJob", "batch:TerminateJob"], 15 | resources: props.batchJobPolicyArns, 16 | }), 17 | ], 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/cdk/lib/roles/policies/nextflow-describe-jobs-batch-policy.ts: -------------------------------------------------------------------------------- 1 | import { PolicyDocument, PolicyStatement, Effect } from "aws-cdk-lib/aws-iam"; 2 | 3 | export class NextflowDescribeJobsBatchPolicy extends PolicyDocument { 4 | constructor() { 5 | super({ 6 | assignSids: true, 7 | statements: [ 8 | new PolicyStatement({ 9 | effect: Effect.ALLOW, 10 | actions: ["batch:DescribeJobs"], 11 | resources: ["*"], 12 | }), 13 | ], 14 | }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/cdk/lib/roles/policies/nextflow-engine-batch-policy.ts: -------------------------------------------------------------------------------- 1 | import { PolicyDocument, PolicyStatement, Effect } from "aws-cdk-lib/aws-iam"; 2 | 3 | export interface NextflowBatchPolicyProps { 4 | nextflowJobArn: string; 5 | } 6 | 7 | export class NextflowEngineBatchPolicy extends PolicyDocument { 8 | constructor(props: NextflowBatchPolicyProps) { 9 | super({ 10 | assignSids: true, 11 | statements: [ 12 | new PolicyStatement({ 13 | effect: Effect.ALLOW, 14 | actions: ["batch:DescribeJobDefinitions", "batch:ListJobs", "batch:DescribeJobs", "batch:DescribeJobQueues", "batch:DescribeComputeEnvironments"], 15 | resources: ["*"], 16 | }), 17 | new PolicyStatement({ 18 | effect: Effect.ALLOW, 19 | actions: ["batch:RegisterJobDefinition"], 20 | resources: [props.nextflowJobArn], 21 | }), 22 | ], 23 | }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/cdk/lib/roles/policies/nextflow-submit-job-batch-policy.ts: -------------------------------------------------------------------------------- 1 | import { PolicyDocument, PolicyStatement, Effect } from "aws-cdk-lib/aws-iam"; 2 | 3 | export interface NextflowSubmitJobBatchPolicyProps { 4 | headJobDefinitionArn: string; 5 | jobQueueArn: string; 6 | } 7 | 8 | export class NextflowSubmitJobBatchPolicy extends PolicyDocument { 9 | constructor(props: NextflowSubmitJobBatchPolicyProps) { 10 | super({ 11 | assignSids: true, 12 | statements: [ 13 | new PolicyStatement({ 14 | effect: Effect.ALLOW, 15 | actions: ["batch:SubmitJob"], 16 | resources: [props.headJobDefinitionArn, props.jobQueueArn], 17 | }), 18 | ], 19 | }); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/cdk/lib/roles/policies/toil-batch-policy.ts: -------------------------------------------------------------------------------- 1 | import { PolicyStatement, Effect } from "aws-cdk-lib/aws-iam"; 2 | import { CromwellBatchPolicy } from "./cromwell-batch-policy"; 3 | 4 | export interface ToilBatchPolicyProps { 5 | jobQueueArn: string; 6 | toilJobArnPattern: string; 7 | } 8 | 9 | export class ToilBatchPolicy extends CromwellBatchPolicy { 10 | constructor(props: ToilBatchPolicyProps) { 11 | // To avoid adding more policies allowing access to "*", we are based on 12 | // the Cromwell policy set. When the permissions for that get locked 13 | // down to the minimum required to use Batch, we will inherit those 14 | // improvements. 15 | super({ 16 | jobQueueArn: props.jobQueueArn, 17 | cromwellJobArn: props.toilJobArnPattern, 18 | }); 19 | 20 | // The only additional thing we need is to be able to deregister job 21 | // definitions, which Cromwell doesn't do. 22 | this.addStatements( 23 | new PolicyStatement({ 24 | effect: Effect.ALLOW, 25 | actions: ["batch:DeregisterJobDefinition"], 26 | resources: [props.toilJobArnPattern], 27 | }) 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/cdk/lib/stacks/index.ts: -------------------------------------------------------------------------------- 1 | export { CoreStack } from "./core-stack"; 2 | export { BatchConstruct } from "./engines/batch-construct"; 3 | export { CromwellEngineConstruct } from "./engines/cromwell-engine-construct"; 4 | export { NextflowEngineConstruct } from "./engines/nextflow-engine-construct"; 5 | -------------------------------------------------------------------------------- /packages/cdk/lib/types/engine-options.ts: -------------------------------------------------------------------------------- 1 | import { RoleProps } from "aws-cdk-lib/aws-iam"; 2 | import { IMachineImage, IVpc, SubnetSelection } from "aws-cdk-lib/aws-ec2"; 3 | import { ContextAppParameters } from "../env"; 4 | import { Size } from "aws-cdk-lib"; 5 | 6 | export type PolicyOptions = Pick; 7 | 8 | export interface EngineOptions { 9 | /** 10 | * Policies to add to the task role for the engine. 11 | * 12 | * @default - No policies are added. 13 | */ 14 | policyOptions: PolicyOptions; 15 | /** 16 | * VPC to run resources in. 17 | */ 18 | readonly vpc: IVpc; 19 | /** 20 | * VPC subnets to run resources in 21 | */ 22 | readonly subnets: SubnetSelection; 23 | /** 24 | * Filesystem provisioned throughput to use for EFS. 25 | */ 26 | readonly iops?: Size; 27 | /** 28 | * Parameters determined by the context. 29 | */ 30 | readonly contextParameters: ContextAppParameters; 31 | /** 32 | * The AMI to use for compute environments. Ignored for Fargate environments 33 | */ 34 | readonly computeEnvImage?: IMachineImage; 35 | } 36 | -------------------------------------------------------------------------------- /packages/cdk/lib/types/index.ts: -------------------------------------------------------------------------------- 1 | export type Maybe = T | undefined; 2 | 3 | export { EngineOptions } from "./engine-options"; 4 | export { ServiceContainer } from "./service-container"; 5 | -------------------------------------------------------------------------------- /packages/cdk/lib/types/tagged-resource-types.ts: -------------------------------------------------------------------------------- 1 | export type TaggedResourceTypes = Array<"instance" | "volume" | "elastic-gpu" | "spot-instances-request" | "network-interface">; 2 | -------------------------------------------------------------------------------- /packages/cdk/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk", 3 | "version": "0.1.1", 4 | "main": "lib/index.js", 5 | "types": "lib/index.d.ts", 6 | "scripts": { 7 | "build": "tsc", 8 | "format": "prettier --write '{**/*,*}.{ts,tsx}'", 9 | "pretest": "eslint --ignore-path .gitignore '{**/*,*}.{ts,tsx}'", 10 | "test": "echo 'No tests here'", 11 | "cdk": "cd $INIT_CWD && cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^26.0.10", 15 | "@types/node": "^10.17.27", 16 | "@typescript-eslint/eslint-plugin": "^4.26.1", 17 | "@typescript-eslint/parser": "^4.26.1", 18 | "eslint": "^7.28.0", 19 | "eslint-config-prettier": "^8.3.0", 20 | "eslint-plugin-prettier": "^3.4.0", 21 | "jest": "^26.4.2", 22 | "prettier": "2.3.1", 23 | "ts-jest": "^26.2.0", 24 | "ts-node": "^10.2.0", 25 | "typescript": "^3.9.9", 26 | "aws-cdk": "^2.128.0" 27 | }, 28 | "dependencies": { 29 | "aws-cdk-lib": "^2.128.0", 30 | "@aws-cdk/aws-batch-alpha": "2.67.0-alpha.0", 31 | "@aws-cdk/aws-lambda-python-alpha": "2.128.0-alpha.0", 32 | "constructs": "^10.1.86" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/cdk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2018", 4 | "module": "commonjs", 5 | "lib": ["es2019"], 6 | "declaration": true, 7 | "strict": true, 8 | "noImplicitAny": false, 9 | "strictNullChecks": true, 10 | "noImplicitThis": true, 11 | "alwaysStrict": true, 12 | "noUnusedLocals": false, 13 | "noUnusedParameters": false, 14 | "noImplicitReturns": true, 15 | "noFallthroughCasesInSwitch": false, 16 | "inlineSourceMap": true, 17 | "inlineSources": true, 18 | "experimentalDecorators": true, 19 | "strictPropertyInitialization": false, 20 | "typeRoots": ["./node_modules/@types"] 21 | }, 22 | "exclude": ["cdk.out"] 23 | } 24 | -------------------------------------------------------------------------------- /packages/cli/.dockerignore: -------------------------------------------------------------------------------- 1 | cf-custom-resources/node_modules 2 | .idea -------------------------------------------------------------------------------- /packages/cli/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | bin/ 3 | local/ 4 | coverage.out 5 | **/.idea 6 | .vscode/* 7 | *.swp 8 | node_modules/ 9 | .DS_Store 10 | site/node_modules/ 11 | 12 | internal/pkg/infra/base/build 13 | internal/pkg/infra/base/cdk.context.json 14 | internal/pkg/infra/base/outputs.json 15 | 16 | internal/pkg/infra/rsc/build 17 | internal/pkg/infra/rsc/cdk.context.json 18 | internal/pkg/infra/rsc/outputs.json 19 | 20 | internal/pkg/infra/data/build 21 | internal/pkg/infra/data/cdk.context.json 22 | internal/pkg/infra/data/outputs.json -------------------------------------------------------------------------------- /packages/cli/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.19.3 2 | 3 | RUN apt-get update 4 | RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - 5 | RUN apt-get update && apt-get install -y nodejs 6 | 7 | WORKDIR /rosalind 8 | COPY . . 9 | RUN go env -w GOPROXY=direct 10 | RUN make release 11 | -------------------------------------------------------------------------------- /packages/cli/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /packages/cli/TESTING.md: -------------------------------------------------------------------------------- 1 | ## Testing 2 | 3 | Test against the CLI (i.e. built commands) should be written in the [e2e directory](e2e). 4 | Everything else can go along side the file under test. 5 | 6 | ### Basics 7 | 8 | Tests can be run by executing `make test`. 9 | 10 | Alternatively, you can run `go test ./...` from the repository root to recursively run tests over all sub directories. 11 | 12 | For basic code coverage, use the `-cover` flag to the total % coverage across your code. 13 | 14 | You can visualize the test coverage by running the following commands: 15 | 16 | ```bash 17 | # Generate a coverage profile 18 | go test -coverprofile=coverage.out 19 | # Visualize test coverage in browser 20 | go tool cover -html=coverage.out 21 | ``` 22 | 23 | ### Mocks 24 | 25 | Class mocks are generated by [gomock](https://github.com/golang/mock). 26 | See the linked repository for installation and usage instructions. 27 | 28 | Run the following to generate (or regenerate) mocks for an interface: 29 | 30 | ```bash 31 | mockgen -source interfaces.go -destination mocks/mock_interfaces.go -package mocks 32 | ``` 33 | -------------------------------------------------------------------------------- /packages/cli/cmd/application/description.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 5 | // SPDX-License-Identifier: Apache-2.0 6 | 7 | package main 8 | 9 | const ( 10 | shortDescription = "\U0001F9EC Launch and manage genomics workloads on AWS." 11 | ) 12 | -------------------------------------------------------------------------------- /packages/cli/cmd/application/description_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | const ( 7 | shortDescription = "Launch and manage genomics workloads on AWS." 8 | ) 9 | -------------------------------------------------------------------------------- /packages/cli/cmd/application/set_format.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/format" 7 | "github.com/rs/zerolog/log" 8 | ) 9 | 10 | func setFormatter(f formatVars) string { 11 | configClient, err := newConfigClient() 12 | if err != nil { 13 | log.Error().Err(err) 14 | return "" 15 | } 16 | if f.format == "" { 17 | f.format = defaultFormat 18 | configFormat, err := configClient.GetFormat() 19 | if err != nil { 20 | log.Error().Err(err) 21 | } else { 22 | f.format = configFormat 23 | } 24 | } 25 | if err := ValidateFormat(format.FormatterType(f.format)); err != nil { 26 | fmt.Println(err.Error()) 27 | } 28 | format.SetFormatter(format.FormatterType(f.format)) 29 | return f.format 30 | } 31 | 32 | func ValidateFormat(f format.FormatterType) error { 33 | if err := f.ValidateFormatter(); err != nil { 34 | return err 35 | } 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/batch/client.go: -------------------------------------------------------------------------------- 1 | package batch 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go-v2/aws" 5 | "github.com/aws/aws-sdk-go-v2/service/batch" 6 | ) 7 | 8 | type Client struct { 9 | Interface 10 | batch batchInterface 11 | } 12 | 13 | func New(cfg aws.Config) *Client { 14 | return &Client{ 15 | batch: batch.NewFromConfig(cfg), 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/batch/client_test.go: -------------------------------------------------------------------------------- 1 | package batch 2 | 3 | import "github.com/stretchr/testify/mock" 4 | 5 | type BatchMock struct { 6 | batchInterface 7 | mock.Mock 8 | } 9 | 10 | func NewMockClient() Client { 11 | return Client{ 12 | batch: new(BatchMock), 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/batch/interface.go: -------------------------------------------------------------------------------- 1 | package batch 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/aws-sdk-go-v2/service/batch" 7 | ) 8 | 9 | type Interface interface { 10 | GetJobs(jobIds []string) ([]Job, error) 11 | } 12 | 13 | type batchInterface interface { 14 | DescribeJobs(context.Context, *batch.DescribeJobsInput, ...func(*batch.Options)) (*batch.DescribeJobsOutput, error) 15 | } 16 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cdk/append_context_arguments.go: -------------------------------------------------------------------------------- 1 | package cdk 2 | 3 | func appendContextArguments(arguments []string, contextArguments []string) []string { 4 | for _, envVar := range contextArguments { 5 | arguments = append(arguments, "-c", envVar) 6 | } 7 | return arguments 8 | } 9 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cdk/clear_context.go: -------------------------------------------------------------------------------- 1 | package cdk 2 | 3 | import ( 4 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 5 | "github.com/rs/zerolog/log" 6 | ) 7 | 8 | func (client Client) ClearContext(appDir string) error { 9 | log.Debug().Msgf("executeCDKClearContext(%s)", appDir) 10 | 11 | cmdArgs := []string{ 12 | "context", 13 | "--clear", 14 | } 15 | 16 | stream, err := ExecuteCdkCommand(appDir, cmdArgs, "clear-context") 17 | if err != nil { 18 | return actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 19 | } 20 | for event := range stream { 21 | if event.Err != nil { 22 | return actionableerror.FindSuggestionForError(event.Err, actionableerror.AwsErrorMessageToSuggestedActionMap) 23 | } 24 | } 25 | 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cdk/clear_context_test.go: -------------------------------------------------------------------------------- 1 | package cdk 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestClearContext(t *testing.T) { 10 | client := NewClient(testDeployProfile) 11 | realExecuteCdkCommand := ExecuteCdkCommand 12 | ExecuteCdkCommand = func(appDir string, cmdArgs []string, executionName string) (ProgressStream, error) { 13 | stream := make(ProgressStream) 14 | assert.Equal(t, testDeployAppPath, appDir) 15 | assert.Equal(t, []string{ 16 | "context", 17 | "--clear", 18 | }, cmdArgs) 19 | close(stream) 20 | return stream, nil 21 | } 22 | defer func() { ExecuteCdkCommand = realExecuteCdkCommand }() 23 | 24 | err := client.ClearContext(testDeployAppPath) 25 | assert.NoError(t, err) 26 | } 27 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cdk/deploy_app.go: -------------------------------------------------------------------------------- 1 | package cdk 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/awsresources" 7 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 8 | ) 9 | 10 | var mkDirTemp = os.MkdirTemp 11 | 12 | func (client Client) DeployApp(appDir string, context []string, executionName string) (ProgressStream, error) { 13 | tmpDir, _ := mkDirTemp(appDir, "cdk-output") 14 | cmdArgs := []string{ 15 | "deploy", 16 | "--all", 17 | "--profile", client.profile, 18 | "--require-approval", "never", 19 | "--toolkit-stack-name", awsresources.RenderBootstrapStackName(), 20 | "--output", tmpDir, 21 | } 22 | cmdArgs = appendContextArguments(cmdArgs, context) 23 | progressStream, err := executeCdkCommandAndCleanupDirectory(appDir, cmdArgs, tmpDir, executionName) 24 | return progressStream, actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 25 | } 26 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cdk/destroy_app.go: -------------------------------------------------------------------------------- 1 | package cdk 2 | 3 | import ( 4 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/awsresources" 5 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 6 | ) 7 | 8 | func (client Client) DestroyApp(appDir string, context []string, executionName string) (ProgressStream, error) { 9 | tmpDir, _ := mkDirTemp(appDir, "cdk-output") 10 | cmdArgs := []string{ 11 | "destroy", 12 | "--all", 13 | "--force", 14 | "--toolkit-stack-name", awsresources.RenderBootstrapStackName(), 15 | "--profile", client.profile, 16 | "--output", tmpDir, 17 | } 18 | cmdArgs = appendContextArguments(cmdArgs, context) 19 | progressStream, err := executeCdkCommandAndCleanupDirectory(appDir, cmdArgs, tmpDir, executionName) 20 | return progressStream, actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 21 | } 22 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cdk/new_client.go: -------------------------------------------------------------------------------- 1 | package cdk 2 | 3 | type Interface interface { 4 | Bootstrap(appDir string, context []string, executionName string) (ProgressStream, error) 5 | ClearContext(appDir string) error 6 | DeployApp(appDir string, context []string, executionName string) (ProgressStream, error) 7 | DestroyApp(appDir string, context []string, executionName string) (ProgressStream, error) 8 | } 9 | 10 | type Client struct { 11 | Interface 12 | profile string 13 | } 14 | 15 | func NewClient(profile string) Interface { 16 | return Client{ 17 | profile: profile, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cfn/client.go: -------------------------------------------------------------------------------- 1 | package cfn 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go-v2/aws" 5 | "github.com/aws/aws-sdk-go-v2/service/cloudformation" 6 | ) 7 | 8 | type Client struct { 9 | Interface 10 | cfn cfnInterface 11 | } 12 | 13 | func New(cfg aws.Config) *Client { 14 | return &Client{ 15 | cfn: cloudformation.NewFromConfig(cfg), 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cfn/client_test.go: -------------------------------------------------------------------------------- 1 | package cfn 2 | 3 | import ( 4 | "github.com/stretchr/testify/mock" 5 | ) 6 | 7 | type CfnMock struct { 8 | cfnInterface 9 | mock.Mock 10 | } 11 | 12 | func NewMockClient() Client { 13 | return Client{ 14 | cfn: new(CfnMock), 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cfn/errors.go: -------------------------------------------------------------------------------- 1 | package cfn 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var StackDoesNotExistError = errors.New("stack does not exist") 8 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cfn/get_stack_exports.go: -------------------------------------------------------------------------------- 1 | package cfn 2 | 3 | func (c Client) GetStackOutputs(stackName string) (map[string]string, error) { 4 | info, err := c.GetStackInfo(stackName) 5 | return info.Outputs, err 6 | } 7 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cfn/get_stack_status.go: -------------------------------------------------------------------------------- 1 | package cfn 2 | 3 | import ( 4 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 5 | "github.com/aws/aws-sdk-go-v2/service/cloudformation/types" 6 | ) 7 | 8 | func (c Client) GetStackStatus(stackName string) (types.StackStatus, error) { 9 | info, err := c.GetStackInfo(stackName) 10 | return info.Status, actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 11 | } 12 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cfn/get_stack_tags.go: -------------------------------------------------------------------------------- 1 | package cfn 2 | 3 | func (c Client) GetStackTags(stackName string) (map[string]string, error) { 4 | info, err := c.GetStackInfo(stackName) 5 | return info.Tags, err 6 | } 7 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cfn/interface.go: -------------------------------------------------------------------------------- 1 | package cfn 2 | 3 | import ( 4 | "context" 5 | "regexp" 6 | 7 | "github.com/aws/aws-sdk-go-v2/service/cloudformation" 8 | "github.com/aws/aws-sdk-go-v2/service/cloudformation/types" 9 | ) 10 | 11 | type Interface interface { 12 | GetStackInfo(stackName string) (StackInfo, error) 13 | GetStackOutputs(stackName string) (map[string]string, error) 14 | GetStackStatus(stackName string) (types.StackStatus, error) 15 | GetStackTags(stackName string) (map[string]string, error) 16 | ListStacks(regexNameFilter *regexp.Regexp, statusFilter []types.StackStatus) ([]Stack, error) 17 | DeleteStack(stackId string) (chan DeletionResult, error) 18 | } 19 | 20 | type cfnInterface interface { 21 | cloudformation.DescribeStacksAPIClient 22 | cloudformation.ListStacksAPIClient 23 | DeleteStack(ctx context.Context, input *cloudformation.DeleteStackInput, opts ...func(*cloudformation.Options)) (*cloudformation.DeleteStackOutput, error) 24 | } 25 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cwl/client.go: -------------------------------------------------------------------------------- 1 | package cwl 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go-v2/aws" 5 | "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs" 6 | ) 7 | 8 | type Client struct { 9 | Interface 10 | cwl cwlInterface 11 | } 12 | 13 | func New(cfg aws.Config) *Client { 14 | return &Client{ 15 | cwl: cloudwatchlogs.NewFromConfig(cfg), 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cwl/client_test.go: -------------------------------------------------------------------------------- 1 | package cwl 2 | 3 | import ( 4 | "github.com/stretchr/testify/mock" 5 | ) 6 | 7 | type CwlMock struct { 8 | cwlInterface 9 | mock.Mock 10 | } 11 | 12 | func NewMockClient() Client { 13 | return Client{ 14 | cwl: new(CwlMock), 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/cwl/interface.go: -------------------------------------------------------------------------------- 1 | package cwl 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs" 7 | ) 8 | 9 | type LogPaginator interface { 10 | HasMoreLogs() bool 11 | NextLogs() ([]string, error) 12 | } 13 | 14 | type Interface interface { 15 | GetLogsPaginated(input GetLogsInput) LogPaginator 16 | StreamLogs(ctx context.Context, logGroupName string, streams ...string) <-chan StreamEvent 17 | } 18 | 19 | type cwlInterface interface { 20 | cloudwatchlogs.FilterLogEventsAPIClient 21 | } 22 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/ddb/client.go: -------------------------------------------------------------------------------- 1 | package ddb 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go-v2/aws" 5 | "github.com/aws/aws-sdk-go-v2/service/dynamodb" 6 | ) 7 | 8 | const ( 9 | TableName = "Agc" 10 | Lsi1Name = "lsi1" 11 | Lsi2Name = "lsi2" 12 | Lsi3Name = "lsi3" 13 | 14 | pkAttrName = "PK" 15 | skAttrName = "SK" 16 | gsi1PkAttrName = "GSI1_PK" //nolint:deadcode,varcheck 17 | gsi1SkAttrName = "GSI1_SK" //nolint:deadcode,varcheck 18 | lsi1SkAttrName = "LSI1_SK" 19 | lsi2SkAttrName = "LSI2_SK" 20 | lsi3SkAttrName = "LSI3_SK" 21 | ) 22 | 23 | type Client struct { 24 | svc ApiInterface 25 | } 26 | 27 | func New(cfg aws.Config) *Client { 28 | return &Client{svc: dynamodb.NewFromConfig(cfg)} 29 | } 30 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/ddb/interface.go: -------------------------------------------------------------------------------- 1 | package ddb 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/aws-sdk-go-v2/service/dynamodb" 7 | ) 8 | 9 | type Interface interface { 10 | WriteWorkflowInstance(ctx context.Context, instance WorkflowInstance) error 11 | ListWorkflows(ctx context.Context, project, user string) ([]WorkflowSummary, error) 12 | ListWorkflowInstancesByName(ctx context.Context, project, user, workflowName string, limit int) ([]WorkflowInstance, error) 13 | ListWorkflowInstancesByContext(ctx context.Context, project, user, contextName string, limit int) ([]WorkflowInstance, error) 14 | ListWorkflowInstances(ctx context.Context, project, user string, limit int) ([]WorkflowInstance, error) 15 | GetWorkflowInstanceById(ctx context.Context, project, user, runId string) (WorkflowInstance, error) 16 | } 17 | 18 | type ApiInterface interface { 19 | dynamodb.QueryAPIClient 20 | PutItem(ctx context.Context, params *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error) 21 | GetItem(ctx context.Context, params *dynamodb.GetItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error) 22 | } 23 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/ecr/Interface.go: -------------------------------------------------------------------------------- 1 | package ecr 2 | 3 | import "github.com/aws/aws-sdk-go-v2/service/ecr" 4 | 5 | type Interface interface { 6 | ImageListable(string, string, string, string) (bool, error) 7 | VerifyImageExists(reference ImageReference) error 8 | } 9 | 10 | type ecrInterface interface { 11 | ecr.ListImagesAPIClient 12 | } 13 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/ecr/ecr_client.go: -------------------------------------------------------------------------------- 1 | package ecr 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go-v2/aws" 5 | "github.com/aws/aws-sdk-go-v2/service/ecr" 6 | ) 7 | 8 | type Client struct { 9 | ecr ecrInterface 10 | } 11 | 12 | func New(cfg aws.Config) *Client { 13 | return &Client{ 14 | ecr: ecr.NewFromConfig(cfg), 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/ecr/ecr_client_test.go: -------------------------------------------------------------------------------- 1 | package ecr 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/aws-sdk-go-v2/service/ecr" 7 | "github.com/stretchr/testify/mock" 8 | ) 9 | 10 | type EcrMock struct { 11 | ecr.ListImagesAPIClient 12 | mock.Mock 13 | } 14 | 15 | func NewMockClient() *Client { 16 | return &Client{ 17 | ecr: new(EcrMock), 18 | } 19 | } 20 | 21 | func (m *EcrMock) ListImages(ctx context.Context, input *ecr.ListImagesInput, opts ...func(*ecr.Options)) (*ecr.ListImagesOutput, error) { 22 | args := m.Called(ctx, input) 23 | output := args.Get(0) 24 | err := args.Error(1) 25 | 26 | if output != nil { 27 | return output.(*ecr.ListImagesOutput), err 28 | } 29 | return nil, err 30 | } 31 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/ecr/image_listable.go: -------------------------------------------------------------------------------- 1 | package ecr 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 7 | "github.com/aws/aws-sdk-go-v2/aws" 8 | "github.com/aws/aws-sdk-go-v2/service/ecr" 9 | ) 10 | 11 | func (c *Client) ImageListable(registry string, repositoryName string, imageTag string, repositoryRegion string) (bool, error) { 12 | input := &ecr.ListImagesInput{ 13 | RepositoryName: aws.String(repositoryName), 14 | RegistryId: aws.String(registry), 15 | } 16 | paginator := ecr.NewListImagesPaginator(c.ecr, input) 17 | for paginator.HasMorePages() { 18 | listImagesOutput, err := paginator.NextPage(context.Background(), func(options *ecr.Options) { 19 | options.Region = repositoryRegion 20 | }) 21 | if err != nil { 22 | return false, actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 23 | } 24 | 25 | for _, image := range listImagesOutput.ImageIds { 26 | if image.ImageTag != nil && *image.ImageTag == imageTag { 27 | return true, nil 28 | } 29 | } 30 | } 31 | 32 | return false, nil 33 | } 34 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/s3/bucket_exists.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "context" 5 | "errors" 6 | 7 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 8 | "github.com/aws/aws-sdk-go-v2/aws" 9 | "github.com/aws/aws-sdk-go-v2/service/s3" 10 | "github.com/aws/aws-sdk-go-v2/service/s3/types" 11 | ) 12 | 13 | func (c *Client) BucketExists(bucketName string) (bool, error) { 14 | _, err := c.s3.HeadBucket(context.Background(), &s3.HeadBucketInput{Bucket: aws.String(bucketName)}) 15 | if err != nil { 16 | var errorType *types.NotFound 17 | if errors.As(err, &errorType) { 18 | return false, nil 19 | } 20 | return false, actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 21 | } 22 | return true, nil 23 | } 24 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/s3/client.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go-v2/aws" 5 | "github.com/aws/aws-sdk-go-v2/service/s3" 6 | ) 7 | 8 | type Client struct { 9 | s3 s3Interface 10 | } 11 | 12 | func New(cfg aws.Config) *Client { 13 | return &Client{ 14 | s3: s3.NewFromConfig(cfg), 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/s3/client_test.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "github.com/stretchr/testify/mock" 5 | ) 6 | 7 | type S3Mock struct { 8 | s3Interface 9 | mock.Mock 10 | } 11 | 12 | func NewMockClient() Client { 13 | return Client{ 14 | s3: new(S3Mock), 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/s3/delete_bucket.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 7 | "github.com/aws/aws-sdk-go-v2/aws" 8 | "github.com/aws/aws-sdk-go-v2/service/s3" 9 | ) 10 | 11 | func (c *Client) DeleteBucket(bucketName string) error { 12 | _, err := c.s3.DeleteBucket(context.Background(), &s3.DeleteBucketInput{ 13 | Bucket: aws.String(bucketName), 14 | }) 15 | 16 | if err != nil { 17 | return actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 18 | } 19 | 20 | return nil 21 | } 22 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/s3/delete_object.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 7 | "github.com/aws/aws-sdk-go-v2/aws" 8 | "github.com/aws/aws-sdk-go-v2/service/s3" 9 | ) 10 | 11 | func (c *Client) DeleteObject(bucketName, key string) error { 12 | _, err := c.s3.DeleteObject(context.Background(), &s3.DeleteObjectInput{ 13 | Bucket: aws.String(bucketName), 14 | Key: aws.String(key), 15 | }) 16 | 17 | if err != nil { 18 | return actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 19 | } 20 | 21 | return nil 22 | } 23 | 24 | func (c *Client) DeleteObjectVersion(bucketName, key, versionId string) error { 25 | _, err := c.s3.DeleteObject(context.Background(), &s3.DeleteObjectInput{ 26 | Bucket: aws.String(bucketName), 27 | Key: aws.String(key), 28 | VersionId: aws.String(versionId), 29 | }) 30 | 31 | if err != nil { 32 | return actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 33 | } 34 | 35 | return nil 36 | } 37 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/s3/interface.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/aws-sdk-go-v2/feature/s3/manager" 7 | "github.com/aws/aws-sdk-go-v2/service/s3" 8 | ) 9 | 10 | type Interface interface { 11 | BucketExists(string) (bool, error) 12 | SyncFile(bucketName, key, filePath string) error 13 | UploadFile(bucketName, key, filePath string) error 14 | DeleteBucket(bucketName string) error 15 | EmptyBucket(bucketName string) error 16 | DeleteObject(bucketName, key string) error 17 | DeleteObjectVersion(bucketName, key, versionId string) error 18 | } 19 | 20 | type s3Interface interface { 21 | s3.HeadBucketAPIClient 22 | s3.HeadObjectAPIClient 23 | s3.ListObjectsV2APIClient 24 | manager.UploadAPIClient 25 | DeleteBucket(ctx context.Context, params *s3.DeleteBucketInput, optFns ...func(*s3.Options)) (*s3.DeleteBucketOutput, error) 26 | DeleteObject(ctx context.Context, params *s3.DeleteObjectInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectOutput, error) 27 | ListObjectVersions(ctx context.Context, params *s3.ListObjectVersionsInput, optFns ...func(*s3.Options)) (*s3.ListObjectVersionsOutput, error) 28 | } 29 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/s3/upload_file.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "context" 5 | "os" 6 | 7 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 8 | "github.com/aws/aws-sdk-go-v2/aws" 9 | "github.com/aws/aws-sdk-go-v2/feature/s3/manager" 10 | "github.com/aws/aws-sdk-go-v2/service/s3" 11 | ) 12 | 13 | func (c *Client) UploadFile(bucketName, key, filePath string) error { 14 | file, err := os.Open(filePath) 15 | if err != nil { 16 | return err 17 | } 18 | defer file.Close() 19 | uploader := manager.NewUploader(c.s3) 20 | _, err = uploader.Upload(context.Background(), &s3.PutObjectInput{ 21 | Bucket: aws.String(bucketName), 22 | Key: aws.String(key), 23 | Body: file, 24 | }) 25 | return actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 26 | } 27 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/s3/util.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "fmt" 5 | "net/url" 6 | ) 7 | 8 | const s3Scheme = "s3" 9 | 10 | func IsS3Uri(value string) bool { 11 | urlParts, err := url.Parse(value) 12 | if err != nil { 13 | return false 14 | } 15 | return s3Scheme == urlParts.Scheme 16 | } 17 | 18 | func UriToArn(uri string) (string, error) { 19 | urlParts, err := url.Parse(uri) 20 | if err != nil { 21 | return "", err 22 | } 23 | if s3Scheme != urlParts.Scheme { 24 | return "", fmt.Errorf("expected an S3 URI but got '%s'", urlParts.Scheme) 25 | } 26 | return fmt.Sprintf("arn:aws:s3:::%s%s", urlParts.Host, urlParts.Path), nil 27 | } 28 | 29 | func RenderS3Uri(bucketName, objectKey string) string { 30 | uri := url.URL{ 31 | Scheme: s3Scheme, 32 | Host: bucketName, 33 | Path: objectKey, 34 | } 35 | return uri.String() 36 | } 37 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/ssm/client.go: -------------------------------------------------------------------------------- 1 | package ssm 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go-v2/aws" 5 | "github.com/aws/aws-sdk-go-v2/service/ssm" 6 | ) 7 | 8 | type Client struct { 9 | ssm ssmInterface 10 | } 11 | 12 | func New(cfg aws.Config) *Client { 13 | return &Client{ 14 | ssm: ssm.NewFromConfig(cfg), 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/ssm/client_test.go: -------------------------------------------------------------------------------- 1 | package ssm 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/aws-sdk-go-v2/service/ssm" 7 | "github.com/stretchr/testify/mock" 8 | ) 9 | 10 | type ssmMockClient struct { 11 | mock.Mock 12 | } 13 | 14 | func (s *ssmMockClient) GetParameter(ctx context.Context, input *ssm.GetParameterInput, _ ...func(options *ssm.Options)) (*ssm.GetParameterOutput, error) { 15 | args := s.Called(ctx, input) 16 | return args.Get(0).(*ssm.GetParameterOutput), args.Error(1) 17 | } 18 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/ssm/interface.go: -------------------------------------------------------------------------------- 1 | package ssm 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/aws-sdk-go-v2/service/ssm" 7 | ) 8 | 9 | type Interface interface { 10 | GetOutputBucket() (string, error) 11 | GetCommonParameter(parameterSuffix string) (string, error) 12 | GetCustomTags() string 13 | } 14 | 15 | type ssmInterface interface { 16 | GetParameter(context.Context, *ssm.GetParameterInput, ...func(options *ssm.Options)) (*ssm.GetParameterOutput, error) 17 | } 18 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/sts/get_account.go: -------------------------------------------------------------------------------- 1 | package sts 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | 7 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 8 | "github.com/aws/aws-sdk-go-v2/service/sts" 9 | ) 10 | 11 | func (client Client) GetAccount() (string, error) { 12 | output, err := client.sts.GetCallerIdentity(context.Background(), &sts.GetCallerIdentityInput{}) 13 | if err != nil { 14 | return "", actionableerror.FindSuggestionForError(err, actionableerror.AwsErrorMessageToSuggestedActionMap) 15 | } 16 | if output.Account == nil || *output.Account == "" { 17 | return "", fmt.Errorf("unable to determine account ID") 18 | } 19 | return *output.Account, nil 20 | } 21 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/sts/new_client.go: -------------------------------------------------------------------------------- 1 | package sts 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/aws-sdk-go-v2/aws" 7 | "github.com/aws/aws-sdk-go-v2/service/sts" 8 | ) 9 | 10 | type Interface interface { 11 | GetAccount() (string, error) 12 | } 13 | 14 | type stsInterface interface { 15 | GetCallerIdentity(context.Context, *sts.GetCallerIdentityInput, ...func(*sts.Options)) (*sts.GetCallerIdentityOutput, error) 16 | } 17 | 18 | type Client struct { 19 | Interface 20 | sts stsInterface 21 | } 22 | 23 | func NewClient(cfg aws.Config) Interface { 24 | return Client{ 25 | sts: sts.NewFromConfig(cfg), 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/sts/new_client_test.go: -------------------------------------------------------------------------------- 1 | package sts 2 | 3 | import ( 4 | "github.com/stretchr/testify/mock" 5 | ) 6 | 7 | type StsMock struct { 8 | stsInterface 9 | mock.Mock 10 | } 11 | 12 | func NewMockClient() Client { 13 | return Client{ 14 | sts: new(StsMock), 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/util/time.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/aws/aws-sdk-go-v2/aws" 7 | ) 8 | 9 | func TimeToAws(someTime *time.Time) *int64 { 10 | if someTime == nil { 11 | return nil 12 | } 13 | return aws.Int64(nanoToMilli(someTime.UnixNano())) 14 | } 15 | 16 | func TimeFromAws(someTime *int64) time.Time { 17 | return time.Unix(0, milliToNano(aws.ToInt64(someTime))) 18 | } 19 | 20 | func nanoToMilli(nano int64) int64 { 21 | return nano / 1000000 22 | } 23 | 24 | func milliToNano(milli int64) int64 { 25 | return milli * 1000000 26 | } 27 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/aws/util/time_test.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestTimeToAws_WithTime(t *testing.T) { 11 | timestampSeconds := int64(766134000) 12 | someTime := time.Unix(timestampSeconds, 0) 13 | awsTime := TimeToAws(&someTime) 14 | assert.Equal(t, timestampSeconds*1000, *awsTime) 15 | } 16 | 17 | func TestTimeToAws_WithNil(t *testing.T) { 18 | awsTime := TimeToAws(nil) 19 | assert.Nil(t, awsTime) 20 | } 21 | 22 | func TestTimeFromAws_WithTime(t *testing.T) { 23 | timestampMillis := int64(766134000000) 24 | someTime := time.Unix(timestampMillis/1000, 0) 25 | awsTime := TimeFromAws(×tampMillis) 26 | assert.True(t, someTime.Equal(awsTime)) 27 | } 28 | 29 | func TestTimeFromAws_WithNil(t *testing.T) { 30 | awsTime := TimeFromAws(nil) 31 | assert.Equal(t, time.Unix(0, 0), awsTime) 32 | } 33 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/cli.go: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package cli 5 | 6 | import ( 7 | "os" 8 | "strings" 9 | 10 | "github.com/spf13/cobra" 11 | ) 12 | 13 | var profile string 14 | 15 | func sanitizeProjectName(projectName string) string { 16 | return strings.Replace(projectName, "-", "", -1) 17 | } 18 | 19 | func generateBucketName(accountId, region string) string { 20 | bucketName := strings.Join([]string{bucketPrefix, accountId, region}, "-") 21 | return bucketName 22 | } 23 | 24 | // runCmdE wraps one of the run error methods, PreRunE, RunE, of a cobra command so that if a user 25 | // types "help" in the arguments the usage string is printed instead of running the command. 26 | func runCmdE(f func(cmd *cobra.Command, args []string) error) func(cmd *cobra.Command, args []string) error { 27 | return func(cmd *cobra.Command, args []string) error { 28 | if len(args) == 1 && args[0] == "help" { 29 | _ = cmd.Help() // Help always returns nil. 30 | os.Exit(0) 31 | } 32 | return f(cmd, args) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/clierror/actionableerror/error.go: -------------------------------------------------------------------------------- 1 | package actionableerror 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | type Error struct { 9 | Cause error 10 | SuggestedAction string 11 | } 12 | 13 | func (e *Error) Error() string { 14 | return fmt.Sprintf("an error occurred caused by: %s\nsuggestion: %s\n", e.Cause, e.SuggestedAction) 15 | } 16 | 17 | func New(cause error, suggestedAction string) error { 18 | err := new(Error) 19 | err.SuggestedAction = suggestedAction 20 | err.Cause = cause 21 | 22 | return err 23 | } 24 | 25 | func FindSuggestionForError(cause error, errorToSuggestionMap map[string]string) error { 26 | if cause == nil { 27 | return nil 28 | } 29 | 30 | errorMessage := cause.Error() 31 | 32 | for expectedErrorMessage, suggestedAction := range errorToSuggestionMap { 33 | if strings.Contains(errorMessage, expectedErrorMessage) { 34 | return &Error{ 35 | SuggestedAction: suggestedAction, 36 | Cause: cause, 37 | } 38 | } 39 | } 40 | 41 | return cause 42 | } 43 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/config/config.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | type User struct { 4 | Email string `yaml:"email"` 5 | // UserId is generated from the email stored in the config file we're not saving UserId back to config file 6 | // so nobody would be tempted to change that in the config file and get inconsistency in between email and userid 7 | Id string `yaml:"-"` 8 | } 9 | type Format struct { 10 | Name string 11 | } 12 | type Config struct { 13 | User User `yaml:"user"` 14 | Format Format `yaml:"format"` 15 | } 16 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/config/io.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "os" 5 | 6 | "gopkg.in/yaml.v3" 7 | ) 8 | 9 | var ( 10 | writeFile = os.WriteFile 11 | readFile = os.ReadFile 12 | ) 13 | 14 | const ( 15 | defaultFormat = "text" 16 | ) 17 | 18 | func configToYaml(filePath string, configData Config) error { 19 | bytes, err := yaml.Marshal(configData) 20 | if err != nil { 21 | return err 22 | } 23 | return writeFile(filePath, bytes, 0644) 24 | } 25 | 26 | func configFromYaml(filePath string, configData Config) (Config, error) { 27 | bytes, err := readFile(filePath) 28 | if err != nil { 29 | return Config{}, err 30 | } 31 | if err := yaml.Unmarshal(bytes, &configData); err != nil { 32 | return Config{}, err 33 | } 34 | return configData, nil 35 | } 36 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/configure.go: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package cli 5 | 6 | import ( 7 | "github.com/aws/amazon-genomics-cli/cmd/application/template" 8 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/group" 9 | "github.com/spf13/cobra" 10 | ) 11 | 12 | // BuildConfigureCommand builds the top level configure command 13 | func BuildConfigureCommand() *cobra.Command { 14 | cmd := &cobra.Command{ 15 | Use: "configure", 16 | Short: `Commands for configuration. 17 | Configuration is stored per user.`, 18 | Long: `Commands for configuration. 19 | Configure local settings and preferences to customize the CLI experience.`, 20 | } 21 | 22 | cmd.AddCommand(BuildConfigureEmailCommand()) 23 | cmd.AddCommand(BuildDescribeShowCommand()) 24 | cmd.AddCommand(BuildConfigureFormatCommand()) 25 | 26 | cmd.SetUsageTemplate(template.Usage) 27 | cmd.Annotations = map[string]string{ 28 | "group": group.Settings, 29 | } 30 | 31 | cmd.PersistentFlags().StringVarP(&profile, AWSProfileFlag, AWSProfileFlagShort, "", AWSProfileFlagDescription) 32 | 33 | return cmd 34 | } 35 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/configure_describe_test.go: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package cli 5 | 6 | import ( 7 | "reflect" 8 | "testing" 9 | 10 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/config" 11 | "github.com/stretchr/testify/require" 12 | ) 13 | 14 | func TestConfigureDescribeContextOpts_Execute(t *testing.T) { 15 | mocks := createMocks(t) 16 | defer mocks.ctrl.Finish() 17 | 18 | describeContextOpts, err := newConfigureDescribeContextOpts() 19 | require.NoError(t, err) 20 | 21 | mockedConfig := config.Config{ 22 | User: config.User{ 23 | Email: "test-email@amazon.com", 24 | Id: "testemail123", 25 | }, 26 | Format: config.Format{ 27 | Name: "text", 28 | }, 29 | } 30 | 31 | mocks.configMock.EXPECT().Read().Return(mockedConfig, nil) 32 | describeContextOpts.configClient = mocks.configMock 33 | configReturned, err := describeContextOpts.Execute() 34 | require.NoError(t, err) 35 | require.True(t, reflect.DeepEqual(configReturned, mockedConfig)) 36 | } 37 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/context/interface.go: -------------------------------------------------------------------------------- 1 | package context 2 | 3 | type Interface interface { 4 | Deploy(contexts []string) []ProgressResult 5 | Info(contextName string) (Detail, error) 6 | List() (map[string]Summary, error) 7 | StatusList() ([]Instance, error) 8 | Destroy(contexts []string) []ProgressResult 9 | } 10 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/context/manager_list.go: -------------------------------------------------------------------------------- 1 | package context 2 | 3 | func (m *Manager) List() (map[string]Summary, error) { 4 | m.readProjectSpec() 5 | m.readConfig() 6 | m.initContexts() 7 | m.getLocalContexts() 8 | return m.contexts, m.err 9 | } 10 | 11 | func (m *Manager) initContexts() { 12 | if m.err != nil { 13 | return 14 | } 15 | m.contexts = make(map[string]Summary) 16 | } 17 | 18 | func (m *Manager) getLocalContexts() { 19 | if m.err != nil { 20 | return 21 | } 22 | for contextName := range m.projectSpec.Contexts { 23 | engines := m.projectSpec.Contexts[contextName].Engines 24 | m.contexts[contextName] = Summary{Name: contextName, Engines: engines} 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/context/util.go: -------------------------------------------------------------------------------- 1 | package context 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/aws/amazon-genomics-cli/internal/pkg/aws/cdk" 7 | ) 8 | 9 | func environmentMapToList(environmentMap map[string]string) []string { 10 | var environmentList []string 11 | for key, value := range environmentMap { 12 | environmentList = append(environmentList, fmt.Sprintf("%s=%s", key, value)) 13 | } 14 | return environmentList 15 | } 16 | 17 | func cdkResultsToContextResults(cdkResults []cdk.Result) []ProgressResult { 18 | var results []ProgressResult 19 | for _, cdkResult := range cdkResults { 20 | progressResult := ProgressResult{ 21 | cdkResult.ExecutionName, 22 | cdkResult.Outputs, 23 | cdkResult.Err, 24 | } 25 | results = append(results, progressResult) 26 | } 27 | 28 | return results 29 | } 30 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/context_auto_complete.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/context" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | type ContextAutoComplete struct { 9 | ctxManagerFactory func() context.Interface 10 | } 11 | 12 | func NewContextAutoComplete() *ContextAutoComplete { 13 | return &ContextAutoComplete{ 14 | ctxManagerFactory: func() context.Interface { 15 | return context.NewManager(profile) 16 | }, 17 | } 18 | } 19 | 20 | func (c *ContextAutoComplete) GetContextAutoComplete() func(command *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { 21 | return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { 22 | if len(args) != 0 { 23 | return nil, cobra.ShellCompDirectiveNoFileComp 24 | } 25 | contexts, err := c.ctxManagerFactory().List() 26 | if err != nil { 27 | return nil, cobra.ShellCompDirectiveError 28 | } 29 | contextNames := make([]string, 0) 30 | for k := range contexts { 31 | contextNames = append(contextNames, k) 32 | } 33 | return contextNames, cobra.ShellCompDirectiveNoFileComp 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/context_test.go: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package cli 5 | 6 | const ( 7 | testContextName1 = "test-context-name-1" 8 | testContextName2 = "test-context-name-2" 9 | testDataName1 = "test-dataset-name-1" 10 | ) 11 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/flag.go: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package cli 5 | 6 | const ( 7 | argsFlag = "args" 8 | ) 9 | 10 | const ( 11 | optionFileFlag = "optionsFile" 12 | optionFileFlagShort = "o" 13 | optionFileFlagDescription = "Options file to use." 14 | ) 15 | 16 | const ( 17 | VerboseFlag = "verbose" 18 | VerboseFlagShort = "v" 19 | VerboseFlagDescription = "Display verbose diagnostic information." 20 | ) 21 | 22 | const ( 23 | SilentFlag = "silent" 24 | SilentFlagDescription = "Suppresses all diagnostic information." 25 | ) 26 | 27 | const ( 28 | FormatFlag = "format" 29 | FormatFlagDescription = "Format option for output. Valid options are: text, table, json" 30 | ) 31 | 32 | const ( 33 | AWSProfileFlag = "awsProfile" 34 | AWSProfileFlagShort = "p" 35 | AWSProfileFlagDescription = "Use the provided AWS CLI profile." 36 | ) 37 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/format/common_types.go: -------------------------------------------------------------------------------- 1 | package format 2 | 3 | type testEmptyStruct struct{} 4 | 5 | // field name prefix enforcing the ordering 6 | type testSimpleFields struct { 7 | AIntField int 8 | BStringField string 9 | CBoolField bool 10 | } 11 | 12 | type testStructWithCollections struct { 13 | AName string 14 | BItems1 []testSimpleFields 15 | CItems2 []testEmptyStruct 16 | DSomeNumber int 17 | } 18 | 19 | type testNestedStruct struct { 20 | AId int 21 | BName string 22 | } 23 | 24 | //nolint:structcheck 25 | type testStructWithNestedStruct struct { 26 | AId int 27 | BSubStruct testNestedStruct 28 | } 29 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/format/json.go: -------------------------------------------------------------------------------- 1 | package format 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "io" 7 | ) 8 | 9 | type Json struct { 10 | writer io.Writer 11 | } 12 | 13 | func (f *Json) write(bytes []byte) { 14 | _, _ = fmt.Fprint(f.writer, string(bytes)) 15 | } 16 | 17 | func (f *Json) newLine() { 18 | _, _ = fmt.Fprintln(f.writer) 19 | } 20 | 21 | func (f *Json) Write(o interface{}) { 22 | jsons, err := json.MarshalIndent(o, "", "\t") 23 | if err != nil { 24 | SetFormatter(DefaultFormat) 25 | Default.Write(o) 26 | } else { 27 | f.write(jsons) 28 | f.newLine() 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/group/group.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 5 | // SPDX-License-Identifier: Apache-2.0 6 | 7 | // Package group contains the names of command groups. 8 | package group 9 | 10 | // Categories for each top level command in the CLI. 11 | const ( 12 | GettingStarted = "Getting Started 🌱" 13 | Contexts = "Contexts" 14 | Logs = "Logs" 15 | Projects = "Projects" 16 | Workflows = "Workflows" 17 | Settings = "Settings ⚙️" 18 | ) 19 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/group/group_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Package groups contains the names of command groups. 5 | package group 6 | 7 | // Categories for each top level command in the CLI. 8 | const ( 9 | GettingStarted = "Getting Started" 10 | Contexts = "Contexts" 11 | Logs = "Logs" 12 | Projects = "Projects" 13 | Workflows = "Workflows" 14 | WorkflowSpecifications = "Workflow specifications" 15 | Settings = "Settings" 16 | ) 17 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/group/key.go: -------------------------------------------------------------------------------- 1 | package group 2 | 3 | const Key = "group" 4 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/project_test.go: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package cli 5 | 6 | const ( 7 | testProjectName = "testProjectName1" 8 | testBadProjectName = "bad-project-name#!@" 9 | testBadProjectName2 = "bad-project-name" 10 | ) 11 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/spec/context.go: -------------------------------------------------------------------------------- 1 | package spec 2 | 3 | const DefaultMaxVCpus = 256 4 | 5 | type FSConfig struct { 6 | FSProvisionedThroughput int `yaml:"provisionedThroughput"` 7 | } 8 | type Filesystem struct { 9 | FSType string `yaml:"fsType"` 10 | Configuration FSConfig `yaml:"configuration,omitempty"` 11 | } 12 | type Engine struct { 13 | Type string `yaml:"type"` 14 | Engine string `yaml:"engine"` 15 | Filesystem Filesystem `yaml:"filesystem,omitempty"` 16 | } 17 | type Context struct { 18 | InstanceTypes []string `yaml:"instanceTypes,omitempty"` 19 | RequestSpotInstances bool `yaml:"requestSpotInstances,omitempty"` 20 | MaxVCpus int `yaml:"maxVCpus,omitempty"` 21 | UsePublicSubnets bool `yaml:"usePublicSubnets,omitempty"` 22 | Engines []Engine `yaml:"engines"` 23 | } 24 | 25 | func (context *Context) UnmarshalYAML(unmarshal func(interface{}) error) error { 26 | 27 | type defValContext Context 28 | defaults := defValContext{MaxVCpus: DefaultMaxVCpus} 29 | if err := unmarshal(&defaults); err != nil { 30 | return err 31 | } 32 | 33 | *context = Context(defaults) 34 | return nil 35 | } 36 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/spec/data.go: -------------------------------------------------------------------------------- 1 | package spec 2 | 3 | type Data struct { 4 | Location string `yaml:"location"` 5 | ReadOnly bool `yaml:"readOnly,omitempty"` 6 | } 7 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/spec/manifest.go: -------------------------------------------------------------------------------- 1 | package spec 2 | 3 | type Manifest struct { 4 | MainWorkflowUrl string `json:"mainWorkflowURL,omitempty"` 5 | InputFileUrls []string `json:"inputFileURLs,omitempty"` 6 | OptionFileUrl string `json:"optionFileURL,omitempty"` 7 | EngineOptions string `json:"engineOptions,omitempty"` 8 | } 9 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/spec/project.go: -------------------------------------------------------------------------------- 1 | package spec 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/clierror/actionableerror" 7 | ) 8 | 9 | const LatestVersion = 1 10 | 11 | type Project struct { 12 | Name string `yaml:"name"` 13 | SchemaVersion int `yaml:"schemaVersion"` 14 | Workflows map[string]Workflow `yaml:"workflows,omitempty"` 15 | Data []Data `yaml:"data,omitempty"` 16 | Contexts map[string]Context `yaml:"contexts,omitempty"` 17 | } 18 | 19 | func (projectSpec *Project) GetContext(contextName string) (Context, error) { 20 | contextSpec, ok := projectSpec.Contexts[contextName] 21 | if !ok { 22 | return Context{}, actionableerror.New( 23 | fmt.Errorf("context '%s' is not defined in Project '%s' specification", contextName, projectSpec.Name), 24 | "Please add the context to your project spec and deploy it or specify a different context from the command 'agc context list'", 25 | ) 26 | } 27 | 28 | return contextSpec, nil 29 | } 30 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/spec/workflow.go: -------------------------------------------------------------------------------- 1 | package spec 2 | 3 | type Workflow struct { 4 | Type WorkflowType `yaml:"type"` 5 | SourceURL string `yaml:"sourceURL"` 6 | } 7 | 8 | type WorkflowType struct { 9 | Language string `yaml:"language"` 10 | Version string `yaml:"version"` 11 | } 12 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/types/context.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type Context struct { 4 | Name string 5 | Status string 6 | StatusReason string 7 | MaxVCpus int 8 | RequestSpotInstances bool 9 | InstanceTypes []InstanceType 10 | Output OutputLocation 11 | WesEndpoint WesEndpoint 12 | } 13 | 14 | type ContextInstance struct { 15 | Id string 16 | Name string 17 | RunStatus string 18 | ErrorStatus string 19 | StartTime string 20 | RunTime string 21 | Info string 22 | } 23 | 24 | type ContextSummary struct { 25 | Name string 26 | EngineName string 27 | } 28 | 29 | type OutputLocation struct { 30 | Url string 31 | } 32 | 33 | type WesEndpoint struct { 34 | Url string 35 | } 36 | 37 | type InstanceType struct { 38 | Value string 39 | } 40 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/types/data_ref.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type Data struct { 4 | Location string 5 | ReadOnly bool 6 | } 7 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/types/engine.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type Engine struct { 4 | Name string 5 | Spec EngineSpec 6 | } 7 | 8 | type EngineSpec struct { 9 | Raw string //TODO: update with actual structure when Project specification if finalized 10 | } 11 | 12 | type EngineInstance struct { 13 | Id string 14 | Name string 15 | Status string 16 | Error string 17 | Start string 18 | Duration string 19 | Log EngineLog 20 | } 21 | 22 | type EngineLog struct { 23 | Raw string 24 | } 25 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/types/project.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type Project struct { 4 | Name string 5 | Data []Data 6 | } 7 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/types/workflow.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type Workflow struct { 4 | Name string 5 | TypeLanguage string 6 | TypeVersion string 7 | Source string 8 | } 9 | 10 | type WorkflowName struct { 11 | Name string 12 | } 13 | 14 | type WorkflowInstance struct { 15 | Id string 16 | WorkflowName string 17 | ContextName string 18 | State string 19 | SubmittedTime string 20 | InProject bool 21 | Request string 22 | } 23 | 24 | type Output struct { 25 | Path string 26 | Value string 27 | } 28 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/workflow/input.go: -------------------------------------------------------------------------------- 1 | package workflow 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | type Input map[string]interface{} 8 | 9 | func (i Input) String() string { 10 | jsonBytes, err := json.Marshal(i) 11 | if err != nil { 12 | panic(err) 13 | } 14 | return string(jsonBytes) 15 | } 16 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/workflow/interface.go: -------------------------------------------------------------------------------- 1 | package workflow 2 | 3 | type Interface interface { 4 | ListWorkflows() (map[string]Summary, error) 5 | RunWorkflow(contextName, workflowName, argumentsUrl string, optionFileUrl string) (string, error) 6 | StatusWorkflowByInstanceId(instanceId string) ([]InstanceSummary, error) 7 | StatusWorkflowByName(workflowName string, numInstances int) ([]InstanceSummary, error) 8 | StatusWorkflowByContext(contextName string, numInstances int) ([]InstanceSummary, error) 9 | StatusWorkflowAll(numInstances int) ([]InstanceSummary, error) 10 | StopWorkflowInstance(runId string) 11 | GetWorkflowTasks(runId string) ([]Task, error) 12 | } 13 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/workflow/workflow_describe.go: -------------------------------------------------------------------------------- 1 | package workflow 2 | 3 | func (m *Manager) DescribeWorkflow(workflowName string) (Details, error) { 4 | m.readProjectSpec() 5 | m.setWorkflowSpec(workflowName) 6 | m.readConfig() 7 | 8 | return m.renderWorkflowDetails(workflowName) 9 | } 10 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/workflow/workflow_details.go: -------------------------------------------------------------------------------- 1 | package workflow 2 | 3 | import "github.com/rsc/wes_client" 4 | 5 | type Details struct { 6 | Name string 7 | TypeLanguage string 8 | TypeVersion string 9 | Source string 10 | } 11 | type InstanceSummary struct { 12 | Id string 13 | WorkflowName string 14 | ContextName string 15 | SubmitTime string 16 | State string 17 | InProject bool 18 | Request string 19 | } 20 | 21 | func (i *InstanceSummary) IsInstanceRunning() bool { 22 | return i.State == string(wes_client.RUNNING) || i.State == string(wes_client.INITIALIZING) 23 | } 24 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/workflow/workflow_engine.go: -------------------------------------------------------------------------------- 1 | package workflow 2 | 3 | import ( 4 | "github.com/rsc/wes_client" 5 | ) 6 | 7 | type EngineLog struct { 8 | WorkflowRunId string 9 | StdOut string 10 | StdErr string 11 | WorkflowStatus wes_client.State 12 | } 13 | 14 | func (m *Manager) GetEngineLogByRunId(runId string) (EngineLog, error) { 15 | m.readProjectSpec() 16 | m.readConfig() 17 | m.setContextForRun(runId) 18 | m.setContext(m.runContextName) 19 | m.setEngineForWorkflowType(m.runContextName) 20 | m.setContextStackInfo(m.runContextName) 21 | m.setWesUrl() 22 | m.setWesClient() 23 | m.getRunLog(runId) 24 | 25 | return m.buildEngineLog() 26 | } 27 | 28 | func (m *Manager) buildEngineLog() (EngineLog, error) { 29 | if m.err != nil { 30 | return EngineLog{}, m.err 31 | } 32 | 33 | return EngineLog{ 34 | WorkflowRunId: m.taskProps.runLog.RunId, 35 | StdOut: m.taskProps.runLog.RunLog.Stdout, 36 | StdErr: m.taskProps.runLog.RunLog.Stderr, 37 | WorkflowStatus: m.taskProps.runLog.State, 38 | }, nil 39 | } 40 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/workflow/workflow_list.go: -------------------------------------------------------------------------------- 1 | package workflow 2 | 3 | func (m *Manager) ListWorkflows() (map[string]Summary, error) { 4 | m.readProjectSpec() 5 | m.readConfig() 6 | m.initWorkflows() 7 | m.readWorkflowsFromSpec() 8 | return m.workflows, m.err 9 | } 10 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/workflow/workflow_output.go: -------------------------------------------------------------------------------- 1 | package workflow 2 | 3 | type OutputManager interface { 4 | OutputByInstanceId(instanceId string) (map[string]interface{}, error) 5 | } 6 | 7 | func (m *Manager) OutputByInstanceId(instanceId string) (map[string]interface{}, error) { 8 | m.readProjectSpec() 9 | m.readConfig() 10 | m.loadInstance(instanceId) 11 | m.setInstanceSummary() 12 | m.setContext(m.instanceSummary.ContextName) 13 | m.setContextStackInfo(m.instanceSummary.ContextName) 14 | m.setWesUrl() 15 | m.setWesClient() 16 | m.setWorkflowRunLogOutputs() 17 | 18 | return m.workflowRunLogOutputs, m.err 19 | } 20 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/workflow/workflow_stop.go: -------------------------------------------------------------------------------- 1 | package workflow 2 | 3 | func (m *Manager) StopWorkflowInstance(runId string) { 4 | m.readProjectSpec() 5 | m.readConfig() 6 | m.setInstanceToStop(runId) 7 | m.setContext(m.instanceToStop.ContextName) 8 | m.setEngineForWorkflowType(m.instanceToStop.ContextName) 9 | m.setContextStackInfo(m.instanceToStop.ContextName) 10 | m.setWesUrl() 11 | m.setWesClient() 12 | m.stopWorkflowInstance(runId) 13 | } 14 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/cli/workflow/workflow_summary.go: -------------------------------------------------------------------------------- 1 | package workflow 2 | 3 | type Summary struct { 4 | Name string 5 | } 6 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/constants/engines.go: -------------------------------------------------------------------------------- 1 | package constants 2 | 3 | const ( 4 | CROMWELL = "cromwell" 5 | NEXTFLOW = "nextflow" 6 | MINIWDL = "miniwdl" 7 | SNAKEMAKE = "snakemake" 8 | TOIL = "toil" 9 | 10 | WES = "wes" 11 | ) 12 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/constants/product.go: -------------------------------------------------------------------------------- 1 | package constants 2 | 3 | const ( 4 | ProductName = "Agc" 5 | AppTagKey = "application-name" 6 | AppTagValue = "agc" 7 | AgcVersionKey = "agc-version" 8 | 9 | CustomTagEnvKey = "CUSTOM_TAGS" 10 | AgcBucketNameEnvKey = "AGC_BUCKET_NAME" 11 | CreateBucketEnvKey = "CREATE_AGC_BUCKET" 12 | AgcVersionEnvKey = "AGC_VERSION" 13 | VpcIdEnvKey = "VPC_ID" 14 | PublicSubnetsEnvKey = "AGC_USE_PUBLIC_SUBNETS" 15 | AgcVpcSubnetsEnvKey = "AGC_VPC_SUBNETS" 16 | AgcAmiEnvKey = "AGC_AMI" 17 | ) 18 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/environment/environment_test.go: -------------------------------------------------------------------------------- 1 | package environment 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestUsesWesAdapterConsistency(t *testing.T) { 10 | for _, engine := range AllEngines { 11 | _, found := UsesWesAdapter[engine] 12 | assert.True(t, found) 13 | } 14 | assert.Equal(t, len(UsesWesAdapter), len(AllEngines)) 15 | } 16 | 17 | func TestDefaultRepositoriesConsistency(t *testing.T) { 18 | for _, component := range AllComponents { 19 | _, found := DefaultRepositories[component] 20 | assert.True(t, found) 21 | } 22 | assert.Equal(t, len(DefaultRepositories), len(AllComponents)) 23 | } 24 | 25 | func TestDefaultTagsConsistency(t *testing.T) { 26 | for _, component := range AllComponents { 27 | _, found := DefaultTags[component] 28 | assert.True(t, found) 29 | } 30 | assert.Equal(t, len(DefaultTags), len(AllComponents)) 31 | } 32 | 33 | func TestCommonImagesConsistency(t *testing.T) { 34 | for _, component := range AllComponents { 35 | _, found := CommonImages[component] 36 | assert.True(t, found) 37 | } 38 | assert.Equal(t, len(CommonImages), len(AllComponents)) 39 | } 40 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/logging/prefix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 5 | // SPDX-License-Identifier: Apache-2.0 6 | 7 | package logging 8 | 9 | // Log message prefixes. 10 | const ( 11 | successPrefix = "✔" //nolint:deadcode,varcheck 12 | errorPrefix = "✘ " 13 | warningPrefix = "⚠️ " 14 | infoPrefix = "𝒊 " 15 | debugPrefix = "↓ " 16 | fatalPrefix = "☠️ " 17 | panicPrefix = "!! " 18 | tracePrefix = "🔍 " 19 | ) 20 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/logging/prefix_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package logging 5 | 6 | const ( 7 | successPrefix = "√" 8 | errorPrefix = "X" 9 | warningPrefix = "!" 10 | infoPrefix = "i" 11 | debugPrefix = "?" 12 | fatalPrefix = "X️" 13 | tracePrefix = "*" 14 | panicPrefix = "!!" 15 | ) 16 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/mocks/context/interfaces.go: -------------------------------------------------------------------------------- 1 | package contextmocks 2 | 3 | import ( 4 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/context" 5 | ) 6 | 7 | type ContextManager interface { 8 | context.Interface 9 | } 10 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/mocks/manager/interfaces.go: -------------------------------------------------------------------------------- 1 | package managermocks 2 | 3 | import ( 4 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/workflow" 5 | ) 6 | 7 | type WorkflowManager interface { 8 | workflow.TasksManager 9 | workflow.StatusManager 10 | workflow.OutputManager 11 | } 12 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/mocks/storage/interfaces.go: -------------------------------------------------------------------------------- 1 | package storagemocks 2 | 3 | import "github.com/aws/amazon-genomics-cli/internal/pkg/storage" 4 | 5 | type ProjectClient interface { 6 | storage.ProjectClient 7 | } 8 | type ConfigClient interface { 9 | storage.ConfigClient 10 | } 11 | type StorageClient interface { 12 | storage.StorageClient 13 | } 14 | type InputClient interface { 15 | storage.InputClient 16 | } 17 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/mocks/wes/interfaces.go: -------------------------------------------------------------------------------- 1 | package wesmocks 2 | 3 | import ( 4 | "github.com/aws/amazon-genomics-cli/internal/pkg/wes" 5 | ) 6 | 7 | type WesClient interface { 8 | wes.Interface 9 | } 10 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/mocks/workflow/interfaces.go: -------------------------------------------------------------------------------- 1 | package workflowmocks 2 | 3 | import "github.com/aws/amazon-genomics-cli/internal/pkg/cli/workflow" 4 | 5 | type WorkflowManager interface { 6 | workflow.Interface 7 | } 8 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/storage/manifest_client.go: -------------------------------------------------------------------------------- 1 | package storage 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "github.com/aws/amazon-genomics-cli/internal/pkg/cli/spec" 8 | ) 9 | 10 | const ManifestFileName = "MANIFEST.json" 11 | 12 | var specFromJson = spec.FromJson 13 | var osStat = os.Stat 14 | 15 | func ReadManifestInDirectory(directory string) (spec.Manifest, error) { 16 | return specFromJson(getManifestFilepath(directory)) 17 | } 18 | 19 | func DoesManifestExistInDirectory(directory string) bool { 20 | if _, err := osStat(getManifestFilepath(directory)); err != nil { 21 | return false 22 | } 23 | return true 24 | } 25 | 26 | func getManifestFilepath(directory string) string { 27 | return fmt.Sprintf("%s/%s", directory, ManifestFileName) 28 | } 29 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/unicode/utils.go: -------------------------------------------------------------------------------- 1 | package unicode 2 | 3 | import "sort" 4 | 5 | // DeDuplicateStrings sorts and de-duplicates a slice of strings 6 | func DeDuplicateStrings(strs []string) []string { 7 | if len(strs) == 0 { 8 | return strs 9 | } 10 | sort.Strings(strs) 11 | 12 | var last string 13 | firstItem := true 14 | var dedupped []string 15 | for _, s := range strs { 16 | if firstItem { 17 | dedupped = append(dedupped, s) 18 | firstItem = false 19 | } else { 20 | if s != last { 21 | dedupped = append(dedupped, s) 22 | } 23 | } 24 | last = s 25 | } 26 | 27 | return dedupped 28 | } 29 | 30 | // SubString performs a unicode aware substring operation on 'str'. Will panic if start or length are out of bounds 31 | func SubString(str string, start int, length int) string { 32 | runes := []rune(str) 33 | return string(runes[start : start+length]) 34 | } 35 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/version/info.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | type Info struct { 4 | Name string 5 | Deprecated bool 6 | DeprecationMessage string 7 | Highlight string 8 | } 9 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/version/interfaces.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "context" 5 | "time" 6 | 7 | "github.com/aws/aws-sdk-go-v2/service/s3" 8 | ) 9 | 10 | type S3Api interface { 11 | s3.ListObjectsV2APIClient 12 | GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error) 13 | } 14 | 15 | type Store interface { 16 | ReadVersions(version string, currentTime time.Time) ([]Info, error) 17 | } 18 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/version/store.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/rs/zerolog/log" 7 | ) 8 | 9 | type cachedStore struct { 10 | ReplenishFunc func(versionString string) ([]Info, error) 11 | } 12 | 13 | func (s *cachedStore) ReadVersions(version string, currentTime time.Time) ([]Info, error) { 14 | infos, err := readFromCache(version, currentTime) 15 | if err != nil { 16 | log.Debug().Msgf("failed to read local cache: %v", err) 17 | infos, err = s.ReplenishFunc(version) 18 | if err != nil { 19 | return nil, err 20 | } 21 | err = writeToCache(version, infos, currentTime) 22 | if err != nil { 23 | log.Debug().Msgf("failed to write local cache %v", err) 24 | } 25 | } 26 | return infos, nil 27 | } 28 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/version/version.go: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Package version holds variables for generating version information 5 | package version 6 | 7 | var Version string 8 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/version/version_check_result.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | type Result struct { 4 | CurrentVersion string 5 | LatestVersion string 6 | CurrentVersionDeprecated bool 7 | CurrentVersionDeprecationMessage string 8 | NewerVersionHighlights []string 9 | } 10 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/wes/interface.go: -------------------------------------------------------------------------------- 1 | package wes 2 | 3 | import ( 4 | "context" 5 | "io" 6 | 7 | "github.com/aws/amazon-genomics-cli/internal/pkg/wes/option" 8 | wes "github.com/rsc/wes_client" 9 | ) 10 | 11 | type Interface interface { 12 | RunWorkflow(ctx context.Context, options ...option.Func) (string, error) 13 | GetRunStatus(ctx context.Context, runId string) (string, error) 14 | StopWorkflow(ctx context.Context, runId string) error 15 | GetRunLog(ctx context.Context, runId string) (wes.RunLog, error) 16 | GetRunLogData(ctx context.Context, runId string, dataUrl string) (*io.ReadCloser, error) 17 | } 18 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/wes/option/option_func.go: -------------------------------------------------------------------------------- 1 | package option 2 | 3 | import wes "github.com/rsc/wes_client" 4 | 5 | type Func func(*wes.RunWorkflowOpts) error 6 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/wes/option/workflow_attachment.go: -------------------------------------------------------------------------------- 1 | package option 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/antihax/optional" 7 | wes "github.com/rsc/wes_client" 8 | ) 9 | 10 | func WorkflowAttachment(attachmentPaths []string) Func { 11 | return func(opts *wes.RunWorkflowOpts) error { 12 | var fileDescriptors []*os.File 13 | for _, attachmentPath := range attachmentPaths { 14 | fileDescriptor, err := os.Open(attachmentPath) 15 | if err != nil { 16 | return err 17 | } 18 | fileDescriptors = append(fileDescriptors, fileDescriptor) 19 | } 20 | opts.WorkflowAttachment = optional.NewInterface(fileDescriptors) 21 | return nil 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/wes/option/workflow_engine_params.go: -------------------------------------------------------------------------------- 1 | package option 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/antihax/optional" 7 | wes "github.com/rsc/wes_client" 8 | ) 9 | 10 | func WorkflowEngineParams(params map[string]string) Func { 11 | return func(opts *wes.RunWorkflowOpts) error { 12 | if len(params) == 0 { 13 | return nil 14 | } 15 | 16 | workflowEngineParamsJsonBytes, err := json.Marshal(params) 17 | if err != nil { 18 | return err 19 | } 20 | 21 | opts.WorkflowEngineParameters = optional.NewString(string(workflowEngineParamsJsonBytes)) 22 | return nil 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/wes/option/workflow_params.go: -------------------------------------------------------------------------------- 1 | package option 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/antihax/optional" 7 | wes "github.com/rsc/wes_client" 8 | ) 9 | 10 | func WorkflowParams(params map[string]string) Func { 11 | return func(opts *wes.RunWorkflowOpts) error { 12 | workflowParamsJsonBytes, err := json.Marshal(params) 13 | if err != nil { 14 | return err 15 | } 16 | opts.WorkflowParams = optional.NewString(string(workflowParamsJsonBytes)) 17 | return nil 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/wes/option/workflow_type.go: -------------------------------------------------------------------------------- 1 | package option 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/antihax/optional" 7 | wes "github.com/rsc/wes_client" 8 | ) 9 | 10 | func WorkflowType(workflowType string) Func { 11 | return func(opts *wes.RunWorkflowOpts) error { 12 | opts.WorkflowType = optional.NewString(strings.ToUpper(workflowType)) 13 | return nil 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/wes/option/workflow_type_version.go: -------------------------------------------------------------------------------- 1 | package option 2 | 3 | import ( 4 | "github.com/antihax/optional" 5 | wes "github.com/rsc/wes_client" 6 | ) 7 | 8 | func WorkflowTypeVersion(version string) Func { 9 | return func(opts *wes.RunWorkflowOpts) error { 10 | opts.WorkflowTypeVersion = optional.NewString(version) 11 | return nil 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/cli/internal/pkg/wes/option/workflow_url.go: -------------------------------------------------------------------------------- 1 | package option 2 | 3 | import ( 4 | "github.com/antihax/optional" 5 | wes "github.com/rsc/wes_client" 6 | ) 7 | 8 | func WorkflowUrl(url string) Func { 9 | return func(opts *wes.RunWorkflowOpts) error { 10 | opts.WorkflowUrl = optional.NewString(url) 11 | return nil 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/engines/cromwell/Dockerfile: -------------------------------------------------------------------------------- 1 | # Running this container will require a number of environment variables with sensible values provided at run time. e.g. 2 | # docker run -e ROOT_DIR=foo -e S3BUCKET="s3://foo" -e JOB_QUEUE_ARN="arn:aws::foo" -e AWS_REGION=us-east-1 cromwell:latest 3 | 4 | FROM public.ecr.aws/amazonlinux/amazonlinux:2 5 | 6 | COPY cromwell.jar cromwell.jar 7 | COPY cromwell.conf cromwell.conf 8 | COPY THIRD-PARTY /opt/ 9 | COPY LICENSE /opt/ 10 | 11 | RUN yum update -y 12 | RUN yum install java-11-amazon-corretto-headless -y 13 | 14 | ENTRYPOINT ["java", "-Dconfig.file=cromwell.conf", "-XX:MaxRAMPercentage=90.0", "-jar", "cromwell.jar", "server"] 15 | -------------------------------------------------------------------------------- /packages/engines/miniwdl/Dockerfile: -------------------------------------------------------------------------------- 1 | # use the upstream miniwdl container as a base image 2 | ARG MINIWDL_VERSION=v0.7.0 3 | FROM ghcr.io/miniwdl-ext/miniwdl-aws:$MINIWDL_VERSION 4 | 5 | RUN yum update -y \ 6 | && yum install -y \ 7 | unzip \ 8 | jq \ 9 | && yum clean -y all 10 | RUN rm -rf /var/cache/yum 11 | 12 | COPY THIRD-PARTY /opt/ 13 | COPY LICENSE /opt/ 14 | COPY miniwdl.aws.sh /opt/bin/miniwdl.aws.sh 15 | RUN chmod +x /opt/bin/miniwdl.aws.sh 16 | 17 | WORKDIR /opt/work 18 | ENTRYPOINT ["/opt/bin/miniwdl.aws.sh"] 19 | -------------------------------------------------------------------------------- /packages/engines/miniwdl/README.md: -------------------------------------------------------------------------------- 1 | ## MiniWDL AWS Mirror 2 | 3 | An AWS-friendly mirror of MiniWDL. 4 | 5 | ### Running locally with CodeBuild 6 | 7 | This package is buildable with AWS CodeBuild. You can use the AWS CodeBuild agent to run CodeBuild builds on a local 8 | machine. 9 | 10 | You only need to set up the build image the first time you run the agent, or when the image has changed. To set up the 11 | build image, use the following commands: 12 | 13 | ```bash 14 | git clone https://github.com/aws/aws-codebuild-docker-images.git 15 | cd aws-codebuild-docker-images/ubuntu/standard/5.0 16 | docker build -t aws/codebuild/standard:5.0 . 17 | docker pull amazon/aws-codebuild-local:latest --disable-content-trust=false 18 | ``` 19 | 20 | In the root directory for this package, download and run the CodeBuild build script: 21 | 22 | ```bash 23 | wget https://raw.githubusercontent.com/aws/aws-codebuild-docker-images/master/local_builds/codebuild_build.sh 24 | chmod +x codebuild_build.sh 25 | ./codebuild_build.sh -i aws/codebuild/standard:5.0 -a ./output -c 26 | ``` 27 | -------------------------------------------------------------------------------- /packages/engines/miniwdl/buildspec.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | env: 4 | shell: bash 5 | variables: 6 | # These variables may be over-ridden as appropriate by the CI/CD pipeline 7 | MINIWDL_IMAGE_NAME: "miniwdl" 8 | MINIWDL_VERSION: "v0.7.0" 9 | 10 | phases: 11 | pre_build: 12 | commands: 13 | - MINIWDL_IMAGE_URI=${MINIWDL_IMAGE_NAME}:${MINIWDL_VERSION} 14 | build: 15 | commands: 16 | - docker build -t ${MINIWDL_IMAGE_URI} --build-arg MINIWDL_VERSION=${MINIWDL_VERSION} ./packages/engines/miniwdl 17 | post_build: 18 | commands: 19 | - docker save -o miniwdl_image.tar ${MINIWDL_IMAGE_URI} 20 | 21 | artifacts: 22 | files: 23 | - miniwdl_image.tar 24 | -------------------------------------------------------------------------------- /packages/engines/new-engine-template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM public.ecr.aws/amazonlinux/amazonlinux:2 AS final 2 | 3 | # COPY THIRD-PARTY /opt/ 4 | COPY LICENSE /opt/ 5 | 6 | RUN yum update -y \ 7 | && yum install -y \ 8 | curl \ 9 | hostname \ 10 | "java-11-amazon-corretto-headless(x86-64)" \ 11 | unzip \ 12 | jq \ 13 | && yum clean -y all 14 | RUN rm -rf /var/cache/yum 15 | 16 | # install awscli v2 17 | RUN curl -s "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip" \ 18 | && unzip -q /tmp/awscliv2.zip -d /tmp \ 19 | && /tmp/aws/install -b /usr/bin \ 20 | && rm -rf /tmp/aws* 21 | 22 | ##### MODIFY ####### 23 | ## In this area install your new engine into the container as well as any requirements for that engine. 24 | ## Dockerfile documentation is found here: https://docs.docker.com/engine/reference/builder/ 25 | 26 | 27 | # copy the entrypoint script to the image 28 | COPY .aws.sh /opt/bin/.aws.sh 29 | RUN chmod +x /opt/bin/.aws.sh 30 | 31 | # set the path for the new engine 32 | ENV PATH :${PATH} 33 | 34 | #### END MODIFY ###### 35 | 36 | WORKDIR /opt/work 37 | ENTRYPOINT ["/opt/bin/.aws.sh"] -------------------------------------------------------------------------------- /packages/engines/new-engine-template/THIRD-PARTY: -------------------------------------------------------------------------------- 1 | Add third-party licenses here. -------------------------------------------------------------------------------- /packages/engines/new-engine-template/buildspec.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | env: 4 | shell: bash 5 | variables: 6 | _IMAGE_NAME: "" 7 | phases: 8 | pre_build: 9 | commands: 10 | - _IMAGE_URI=${_IMAGE_NAME}:latest 11 | build: 12 | commands: 13 | - docker build -t ${_IMAGE_URI} ./ 14 | post_build: 15 | commands: 16 | - docker save -o _image.tar ${_IMAGE_URI} 17 | 18 | artifacts: 19 | files: 20 | - _image.tar -------------------------------------------------------------------------------- /packages/engines/nextflow/README.md: -------------------------------------------------------------------------------- 1 | ## Nextflow AWS Mirror 2 | 3 | An AWS-friendly mirror of Nextflow. 4 | 5 | ### Running locally with CodeBuild 6 | 7 | This package is buildable with AWS CodeBuild. You can use the AWS CodeBuild agent to run CodeBuild builds on a local 8 | machine. 9 | 10 | You only need to set up the build image the first time you run the agent, or when the image has changed. To set up the 11 | build image, use the following commands: 12 | 13 | ```bash 14 | git clone https://github.com/aws/aws-codebuild-docker-images.git 15 | cd aws-codebuild-docker-images/ubuntu/standard/5.0 16 | docker build -t aws/codebuild/standard:5.0 . 17 | docker pull amazon/aws-codebuild-local:latest --disable-content-trust=false 18 | ``` 19 | 20 | In the root directory for this package, download and run the CodeBuild build script: 21 | 22 | ```bash 23 | wget https://raw.githubusercontent.com/aws/aws-codebuild-docker-images/master/local_builds/codebuild_build.sh 24 | chmod +x codebuild_build.sh 25 | ./codebuild_build.sh -i aws/codebuild/standard:5.0 -a ./output -c 26 | ``` 27 | -------------------------------------------------------------------------------- /packages/engines/nextflow/buildspec.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | env: 4 | shell: bash 5 | variables: 6 | # These variables may be over-ridden as appropriate by the CI/CD pipeline 7 | NEXTFLOW_IMAGE_NAME: "nextflow" 8 | NEXTFLOW_VERSION: "22.04.3" 9 | 10 | phases: 11 | pre_build: 12 | commands: 13 | - NEXTFLOW_IMAGE_URI=${NEXTFLOW_IMAGE_NAME}:${NEXTFLOW_VERSION} 14 | build: 15 | commands: 16 | - docker build -t ${NEXTFLOW_IMAGE_URI} --build-arg NEXTFLOW_VERSION=${NEXTFLOW_VERSION} ./packages/engines/nextflow 17 | post_build: 18 | commands: 19 | - docker save -o nextflow_image.tar ${NEXTFLOW_IMAGE_URI} 20 | 21 | artifacts: 22 | files: 23 | - nextflow_image.tar 24 | -------------------------------------------------------------------------------- /packages/engines/snakemake/.gitignore: -------------------------------------------------------------------------------- 1 | codebuild_build.sh 2 | output/ 3 | .DS_Store -------------------------------------------------------------------------------- /packages/engines/snakemake/THIRD-PARTY: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2019 Johannes Köster 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /packages/engines/snakemake/buildspec.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | env: 4 | shell: bash 5 | variables: 6 | # These variables may be over-ridden as appropriate by the CI/CD pipeline 7 | SNAKEMAKE_IMAGE_NAME: "snakemake" 8 | SNAKEMAKE_VERSION: "internal-fork" 9 | 10 | phases: 11 | pre_build: 12 | commands: 13 | - SNAKEMAKE_IMAGE_URI=${SNAKEMAKE_IMAGE_NAME}:${SNAKEMAKE_VERSION} 14 | build: 15 | commands: 16 | - aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 680431765560.dkr.ecr.us-west-2.amazonaws.com 17 | - docker pull 680431765560.dkr.ecr.us-west-2.amazonaws.com/aws/agc-snakemake:latest 18 | - docker build --build-arg SNAKEMAKE_VERSION=${SNAKEMAKE_VERSION} -t ${SNAKEMAKE_IMAGE_URI} ./packages/engines/snakemake 19 | post_build: 20 | commands: 21 | - docker save -o snakemake_image.tar ${SNAKEMAKE_IMAGE_URI} 22 | 23 | artifacts: 24 | files: 25 | - snakemake_image.tar -------------------------------------------------------------------------------- /packages/engines/toil/buildspec.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | env: 4 | shell: bash 5 | variables: 6 | TOIL_IMAGE_NAME: "toil" 7 | TOIL_VERSION_PREFIX: "5.8.0a1-" 8 | TOIL_VERSION: "bf2c046b5b1d38bdfc3043a4ea05f72db279ab64" 9 | phases: 10 | pre_build: 11 | commands: 12 | - TOIL_IMAGE_URI=${TOIL_IMAGE_NAME}:${TOIL_VERSION_PREFIX}${TOIL_VERSION} 13 | build: 14 | commands: 15 | - docker build -t ${TOIL_IMAGE_URI} --build-arg TOIL_VERSION=${TOIL_VERSION} ./packages/engines/toil 16 | post_build: 17 | commands: 18 | - docker save -o toil_image.tar ${TOIL_IMAGE_URI} 19 | 20 | artifacts: 21 | files: 22 | - toil_image.tar 23 | -------------------------------------------------------------------------------- /packages/wes_adapter/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /dist/ 3 | *.js 4 | __pycache__/ 5 | -------------------------------------------------------------------------------- /packages/wes_adapter/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all build format test 2 | 3 | all: build format test 4 | 5 | build: 6 | rm -rf ./dist && mkdir ./dist 7 | python3 -m pip install -r requirements.txt --target ./dist 8 | 9 | format: 10 | ./format-code.sh 11 | 12 | test: 13 | echo 'No tests here' 14 | 15 | init: 16 | ./init-local-server.sh 17 | 18 | release: 19 | ./install.sh 20 | -------------------------------------------------------------------------------- /packages/wes_adapter/amazon_genomics/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/packages/wes_adapter/amazon_genomics/__init__.py -------------------------------------------------------------------------------- /packages/wes_adapter/amazon_genomics/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/packages/wes_adapter/amazon_genomics/tests/__init__.py -------------------------------------------------------------------------------- /packages/wes_adapter/amazon_genomics/util/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/packages/wes_adapter/amazon_genomics/util/__init__.py -------------------------------------------------------------------------------- /packages/wes_adapter/amazon_genomics/wes/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/packages/wes_adapter/amazon_genomics/wes/__init__.py -------------------------------------------------------------------------------- /packages/wes_adapter/amazon_genomics/wes/adapters/__init__.py: -------------------------------------------------------------------------------- 1 | from .AbstractWESAdapter import AbstractWESAdapter 2 | from .CromwellWESAdapter import CromwellWESAdapter 3 | from .NextflowWESAdapter import NextflowWESAdapter 4 | from .MiniWdlWESAdapter import MiniWdlWESAdapter 5 | from .SnakemakeWESAdapter import SnakemakeWESAdapter 6 | -------------------------------------------------------------------------------- /packages/wes_adapter/amazon_genomics/wes/adapters/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/packages/wes_adapter/amazon_genomics/wes/adapters/config/__init__.py -------------------------------------------------------------------------------- /packages/wes_adapter/amazon_genomics/wes/adapters/util/__init__.py: -------------------------------------------------------------------------------- 1 | from .util import describe_batch_jobs_with_tag 2 | from .util import job_id_from_arn 3 | -------------------------------------------------------------------------------- /packages/wes_adapter/format-code.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | ./venv/bin/pip install black 4 | ./venv/bin/python3 -m black ./amazon_genomics 5 | ./venv/bin/python3 -m black ./rest_api/controllers 6 | -------------------------------------------------------------------------------- /packages/wes_adapter/index.py: -------------------------------------------------------------------------------- 1 | import serverless_wsgi 2 | from rest_api import create_app 3 | 4 | app = create_app() 5 | 6 | # stops wsgi from sending Json as a Base64 string 7 | serverless_wsgi.TEXT_MIME_TYPES.append("application/problem+json") 8 | 9 | def handler(event, context): 10 | return serverless_wsgi.handle_request(app, event, context) 11 | -------------------------------------------------------------------------------- /packages/wes_adapter/init-local-server.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | python3 --version 3 | python3 -m venv ./venv 4 | 5 | ./venv/bin/pip install waitress 6 | ./venv/bin/pip install -r requirements.txt 7 | -------------------------------------------------------------------------------- /packages/wes_adapter/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if ! hash python3.9; then 4 | echo "python3.9 is not installed" 5 | exit 1 6 | fi 7 | 8 | rm -rf ./dist && mkdir ./dist 9 | python3.9 -m pip install -r requirements.txt --target ./dist && (cd ./dist && zip -r ./wes_adapter.zip .) 10 | zip -gr ./dist/wes_adapter.zip ./rest_api ./amazon_genomics ./index.py 11 | -------------------------------------------------------------------------------- /packages/wes_adapter/local-server.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | from waitress import serve 4 | from rest_api import create_app 5 | 6 | 7 | def main(): 8 | app = create_app() 9 | serve(app, host="0.0.0.0", port=80) 10 | 11 | 12 | if __name__ == '__main__': 13 | main() 14 | -------------------------------------------------------------------------------- /packages/wes_adapter/requirements.txt: -------------------------------------------------------------------------------- 1 | boto3 2 | boto3-stubs[batch,logs,resourcegroupstaggingapi,s3] 3 | connexion==2.14.2 4 | docker 5 | flask 6 | jsonschema==4.17.3 7 | paste 8 | pytest 9 | python_dateutil 10 | requests 11 | serverless-wsgi 12 | setuptools 13 | swagger-ui-bundle 14 | werkzeug 15 | -------------------------------------------------------------------------------- /packages/wes_adapter/rest_api/__init__.py: -------------------------------------------------------------------------------- 1 | import connexion 2 | 3 | from rest_api import encoder 4 | from paste.translogger import TransLogger 5 | import logging 6 | 7 | def create_app(config=None): 8 | app = connexion.App(__name__, specification_dir="openapi/") 9 | app.app.json_encoder = encoder.JSONEncoder 10 | app.add_api("openapi.yaml", 11 | arguments={"title": "Workflow Execution Service"}, 12 | pythonic_params=True) 13 | 14 | logger = logging.getLogger('waitress') 15 | logger.setLevel(logging.INFO) 16 | return TransLogger(app) 17 | -------------------------------------------------------------------------------- /packages/wes_adapter/rest_api/controllers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/packages/wes_adapter/rest_api/controllers/__init__.py -------------------------------------------------------------------------------- /packages/wes_adapter/rest_api/encoder.py: -------------------------------------------------------------------------------- 1 | from connexion.apps.flask_app import FlaskJSONEncoder 2 | import six 3 | 4 | from rest_api.models.base_model_ import Model 5 | 6 | 7 | class JSONEncoder(FlaskJSONEncoder): 8 | include_nulls = False 9 | 10 | def default(self, o): 11 | if isinstance(o, Model): 12 | dikt = {} 13 | for attr, _ in six.iteritems(o.openapi_types): 14 | value = getattr(o, attr) 15 | if value is None and not self.include_nulls: 16 | continue 17 | attr = o.attribute_map[attr] 18 | dikt[attr] = value 19 | return dikt 20 | return FlaskJSONEncoder.default(self, o) 21 | -------------------------------------------------------------------------------- /packages/wes_adapter/rest_api/error_handling.py: -------------------------------------------------------------------------------- 1 | from rest_api.models import ErrorResponse 2 | 3 | 4 | def handle_invalid_request(error): 5 | return __generate_error_response(error, 400) 6 | 7 | 8 | def handle_internal_error(error): 9 | return __generate_error_response(error, 500) 10 | 11 | 12 | def __generate_error_response(error, status_code): 13 | return ErrorResponse(msg=str(error), status_code=status_code) 14 | -------------------------------------------------------------------------------- /packages/wes_adapter/rest_api/exception/Exceptions.py: -------------------------------------------------------------------------------- 1 | import werkzeug 2 | 3 | 4 | class InvalidRequestError(werkzeug.exceptions.BadRequest): 5 | """ 6 | This exception is raised when we receive an invalid request. 7 | """ 8 | pass 9 | 10 | 11 | class InternalServerError(werkzeug.exceptions.InternalServerError): 12 | """ 13 | This exception is raised internal server error occurred. 14 | """ 15 | pass -------------------------------------------------------------------------------- /packages/wes_adapter/rest_api/exception/__init__.py: -------------------------------------------------------------------------------- 1 | from . import Exceptions -------------------------------------------------------------------------------- /packages/wes_adapter/rest_api/models/__init__.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | from __future__ import absolute_import 5 | # import models into model package 6 | from rest_api.models.default_workflow_engine_parameter import DefaultWorkflowEngineParameter 7 | from rest_api.models.error_response import ErrorResponse 8 | from rest_api.models.log import Log 9 | from rest_api.models.run_id import RunId 10 | from rest_api.models.run_list_response import RunListResponse 11 | from rest_api.models.run_log import RunLog 12 | from rest_api.models.run_request import RunRequest 13 | from rest_api.models.run_status import RunStatus 14 | from rest_api.models.service_info import ServiceInfo 15 | from rest_api.models.state import State 16 | from rest_api.models.workflow_type_version import WorkflowTypeVersion 17 | -------------------------------------------------------------------------------- /packages/wes_adapter/rest_api/typing_utils.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | import sys 4 | 5 | if sys.version_info < (3, 7): 6 | import typing 7 | 8 | def is_generic(klass): 9 | """ Determine whether klass is a generic class """ 10 | return type(klass) == typing.GenericMeta 11 | 12 | def is_dict(klass): 13 | """ Determine whether klass is a Dict """ 14 | return klass.__extra__ == dict 15 | 16 | def is_list(klass): 17 | """ Determine whether klass is a List """ 18 | return klass.__extra__ == list 19 | 20 | else: 21 | 22 | def is_generic(klass): 23 | """ Determine whether klass is a generic class """ 24 | return hasattr(klass, '__origin__') 25 | 26 | def is_dict(klass): 27 | """ Determine whether klass is a Dict """ 28 | return klass.__origin__ == dict 29 | 30 | def is_list(klass): 31 | """ Determine whether klass is a List """ 32 | return klass.__origin__ == list 33 | -------------------------------------------------------------------------------- /packages/wes_adapter/rest_api/workflow/input.json: -------------------------------------------------------------------------------- 1 | { 2 | "myWorkflow.myTaskA.addressee": "Foo", 3 | "myWorkflow.myTaskB.addressee": "Bar" 4 | } -------------------------------------------------------------------------------- /packages/wes_adapter/rest_api/workflow/sampleWorkFlow.wdl: -------------------------------------------------------------------------------- 1 | version 1.0 2 | 3 | workflow myWorkflow { 4 | call myTaskA 5 | call myTaskB 6 | } 7 | 8 | task myTaskA { 9 | input { 10 | String addressee 11 | } 12 | 13 | command { 14 | echo "hello world ${addressee} from myTaskA" 15 | } 16 | output { 17 | String out = read_string(stdout()) 18 | } 19 | } 20 | 21 | task myTaskB { 22 | input { 23 | String addressee 24 | } 25 | 26 | command { 27 | echo "hello world ${addressee} from myTaskB" 28 | } 29 | output { 30 | String out = read_string(stdout()) 31 | } 32 | } -------------------------------------------------------------------------------- /packages/wes_adapter/start-local-server.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | export ENGINE_NAME=nextflow # cromwell / miniwdl / snakemake / nextflow 3 | export JOB_QUEUE= 4 | export JOB_DEFINITION= 5 | export ENGINE_LOG_GROUP= 6 | 7 | export AWS_DEFAULT_REGION=us-west-2 8 | export AWS_REGION=us-west-2 9 | 10 | echo "Starting local WES endpoint at http://localhost:80/ga4gh/wes/v1/ui/" 11 | ./venv/bin/python ./local-server.py 12 | -------------------------------------------------------------------------------- /packages/wes_api/client/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /packages/wes_api/client/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /packages/wes_api/client/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | .gitignore 2 | .openapi-generator-ignore 3 | .travis.yml 4 | README.md 5 | api/openapi.yaml 6 | api_workflow_execution_service.go 7 | client.go 8 | configuration.go 9 | docs/WorkflowExecutionServiceApi.md 10 | git_push.sh 11 | go.mod 12 | go.sum 13 | response.go 14 | -------------------------------------------------------------------------------- /packages/wes_api/client/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 5.0.0-SNAPSHOT -------------------------------------------------------------------------------- /packages/wes_api/client/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | install: 4 | - go get -d -v . 5 | 6 | script: 7 | - go build -v ./ 8 | 9 | -------------------------------------------------------------------------------- /packages/wes_api/client/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/GIT_USER_ID/GIT_REPO_ID 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/antihax/optional v1.0.0 7 | github.com/aws/aws-sdk-go-v2 v1.8.1 8 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 9 | ) 10 | 11 | require ( 12 | github.com/aws/smithy-go v1.7.0 // indirect 13 | github.com/golang/protobuf v1.2.0 // indirect 14 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e // indirect 15 | google.golang.org/appengine v1.4.0 // indirect 16 | ) 17 | -------------------------------------------------------------------------------- /packages/wes_api/client/model_default_workflow_engine_parameter.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Workflow Execution Service 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * API version: 1.0.0 7 | * Generated by: OpenAPI Generator (https://openapi-generator.tech) 8 | */ 9 | 10 | package wes_client 11 | 12 | // DefaultWorkflowEngineParameter - A message that allows one to describe default parameters for a workflow engine. 13 | type DefaultWorkflowEngineParameter struct { 14 | 15 | // The name of the parameter 16 | Name string `json:"name,omitempty"` 17 | 18 | // Describes the type of the parameter, e.g. float. 19 | Type string `json:"type,omitempty"` 20 | 21 | // The stringified version of the default parameter. e.g. \"2.45\". 22 | DefaultValue string `json:"default_value,omitempty"` 23 | } 24 | -------------------------------------------------------------------------------- /packages/wes_api/client/model_error_response.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Workflow Execution Service 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * API version: 1.0.0 7 | * Generated by: OpenAPI Generator (https://openapi-generator.tech) 8 | */ 9 | 10 | package wes_client 11 | 12 | // ErrorResponse - An object that can optionally include information about the error. 13 | type ErrorResponse struct { 14 | 15 | // A detailed error message. 16 | Msg string `json:"msg,omitempty"` 17 | 18 | // The integer representing the HTTP status code (e.g. 200, 404). 19 | StatusCode int32 `json:"status_code,omitempty"` 20 | } 21 | -------------------------------------------------------------------------------- /packages/wes_api/client/model_run_id.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Workflow Execution Service 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * API version: 1.0.0 7 | * Generated by: OpenAPI Generator (https://openapi-generator.tech) 8 | */ 9 | 10 | package wes_client 11 | 12 | type RunId struct { 13 | 14 | // workflow run ID 15 | RunId string `json:"run_id,omitempty"` 16 | } 17 | -------------------------------------------------------------------------------- /packages/wes_api/client/model_run_list_response.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Workflow Execution Service 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * API version: 1.0.0 7 | * Generated by: OpenAPI Generator (https://openapi-generator.tech) 8 | */ 9 | 10 | package wes_client 11 | 12 | // RunListResponse - The service will return a RunListResponse when receiving a successful RunListRequest. 13 | type RunListResponse struct { 14 | 15 | // A list of workflow runs that the service has executed or is executing. The list is filtered to only include runs that the caller has permission to see. 16 | Runs []RunStatus `json:"runs,omitempty"` 17 | 18 | // A token which may be supplied as `page_token` in workflow run list request to get the next page of results. An empty string indicates there are no more items to return. 19 | NextPageToken string `json:"next_page_token,omitempty"` 20 | } 21 | -------------------------------------------------------------------------------- /packages/wes_api/client/model_run_log.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Workflow Execution Service 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * API version: 1.0.0 7 | * Generated by: OpenAPI Generator (https://openapi-generator.tech) 8 | */ 9 | 10 | package wes_client 11 | 12 | type RunLog struct { 13 | 14 | // workflow run ID 15 | RunId string `json:"run_id,omitempty"` 16 | 17 | Request RunRequest `json:"request,omitempty"` 18 | 19 | State State `json:"state,omitempty"` 20 | 21 | RunLog Log `json:"run_log,omitempty"` 22 | 23 | // The logs, and other key info like timing and exit code, for each step in the workflow run. 24 | TaskLogs []Log `json:"task_logs,omitempty"` 25 | 26 | // The outputs from the workflow run. 27 | Outputs map[string]interface{} `json:"outputs,omitempty"` 28 | } 29 | -------------------------------------------------------------------------------- /packages/wes_api/client/model_run_status.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Workflow Execution Service 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * API version: 1.0.0 7 | * Generated by: OpenAPI Generator (https://openapi-generator.tech) 8 | */ 9 | 10 | package wes_client 11 | 12 | // RunStatus - Small description of a workflow run, returned by server during listing 13 | type RunStatus struct { 14 | RunId string `json:"run_id"` 15 | 16 | State State `json:"state,omitempty"` 17 | } 18 | -------------------------------------------------------------------------------- /packages/wes_api/client/model_workflow_type_version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Workflow Execution Service 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * API version: 1.0.0 7 | * Generated by: OpenAPI Generator (https://openapi-generator.tech) 8 | */ 9 | 10 | package wes_client 11 | 12 | // WorkflowTypeVersion - Available workflow types supported by a given instance of the service. 13 | type WorkflowTypeVersion struct { 14 | 15 | // an array of one or more acceptable types for the `workflow_type` 16 | WorkflowTypeVersion []string `json:"workflow_type_version,omitempty"` 17 | } 18 | -------------------------------------------------------------------------------- /scripts/cli/uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | USER_BIN_DIR="$HOME/bin" 6 | BASE_DIR="$HOME/.agc" 7 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 8 | 9 | uninstall_cli () { 10 | rm -f $USER_BIN_DIR/agc 11 | } 12 | 13 | uninstall_cdk () { 14 | rm -rf $BASE_DIR 15 | } 16 | 17 | uninstall_cdk && uninstall_cli && echo "AGC has been uninstalled." 18 | -------------------------------------------------------------------------------- /scripts/context-deploy-benchmark/cromwell/agc-project.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: CromwellContextBenchmarkTest 3 | schemaVersion: 1 4 | contexts: 5 | cromwell1: 6 | engines: 7 | - type: wdl 8 | engine: cromwell 9 | cromwell2: 10 | engines: 11 | - type: wdl 12 | engine: cromwell 13 | cromwell3: 14 | engines: 15 | - type: wdl 16 | engine: cromwell 17 | cromwell4: 18 | engines: 19 | - type: wdl 20 | engine: cromwell 21 | cromwell5: 22 | engines: 23 | - type: wdl 24 | engine: cromwell -------------------------------------------------------------------------------- /scripts/context-deploy-benchmark/nextflow/agc-project.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: NextflowContextBenchmarkTest 3 | schemaVersion: 1 4 | contexts: 5 | nextflow1: 6 | engines: 7 | - type: nextflow 8 | engine: nextflow 9 | nextflow2: 10 | engines: 11 | - type: nextflow 12 | engine: nextflow 13 | nextflow3: 14 | engines: 15 | - type: nextflow 16 | engine: nextflow 17 | nextflow4: 18 | engines: 19 | - type: nextflow 20 | engine: nextflow 21 | nextflow5: 22 | engines: 23 | - type: nextflow 24 | engine: nextflow 25 | -------------------------------------------------------------------------------- /scripts/fiximports.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | find . -type f -name "*.go" -not -path "*/vendor*" -exec sed -i ' 6 | /^import/,/)/ { 7 | /^$/ d 8 | } 9 | ' "{}" + 10 | -------------------------------------------------------------------------------- /scripts/package-release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | RELEASE_DIR="dist/amazon-genomics-cli" 6 | 7 | if ! command -v jq &> /dev/null 8 | then 9 | echo "Missing required jq package" 10 | exit 1 11 | fi 12 | 13 | mkdir -p ${RELEASE_DIR} 14 | cp ./{LICENSE,THIRD-PARTY,CHANGELOG.md} ${RELEASE_DIR} 15 | cp packages/cdk/cdk.tgz ${RELEASE_DIR} 16 | mkdir -p ${RELEASE_DIR}/wes 17 | cp packages/wes_adapter/dist/wes_adapter.zip ${RELEASE_DIR}/wes 18 | cp -a scripts/cli/. ${RELEASE_DIR} 19 | cp -a examples ${RELEASE_DIR} 20 | cp -a extras ${RELEASE_DIR} 21 | cp -a packages/cli/bin/local/. ${RELEASE_DIR} 22 | version=$(jq .version -r < version.json) 23 | commit="${CODEBUILD_RESOLVED_SOURCE_VERSION:-$(git rev-parse --verify HEAD)}" 24 | 25 | cat > ${RELEASE_DIR}/build.json < ${RELEASE_DIR}/nightly-build.json <=3.0.5" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /site/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | public/ 3 | resources/ 4 | node_modules/ 5 | tech-doc-hugo 6 | -------------------------------------------------------------------------------- /site/archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /site/assets/scss/_variables_project.scss: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Add styles or override variables from the theme here. 4 | 5 | */ 6 | 7 | -------------------------------------------------------------------------------- /site/content/en/about/_index.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: About Amazon Genomics CLI 3 | linkTitle: About 4 | menu: 5 | main: 6 | weight: 40 7 | 8 | --- 9 | 10 | 11 | {{< blocks/cover title="About Amazon Genomics CLI" image_anchor="bottom" height="min" >}} 12 | 13 | {{< /blocks/cover >}} 14 | 15 | {{% blocks/section %}} 16 | Amazon Genomics CLI is an open-source command line tool developed by the AWS Health AI team to simplify running genomics workflows in the cloud. 17 | 18 | Amazon Genomics CLI takes care of deploying and managing the cloud infrastructure required to run workflows in common bioinformatics workflow languages such as WDL and 19 | Nextflow DSL allowing you to focus on analytics and workflow development. 20 | {{% /blocks/section %}} 21 | 22 | -------------------------------------------------------------------------------- /site/content/en/about/featured-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/about/featured-background.png -------------------------------------------------------------------------------- /site/content/en/community/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Community 3 | menu: 4 | main: 5 | weight: 30 6 | --- 7 | 8 | Amazon Genomics CLI is an open-source project licensed under the Apache license. We welcome code contributions, bug reports, 9 | communications and suggestions for improvements. 10 | 11 | ## Amazon Genomics CLI on GitHub 12 | 13 | ### Source 14 | 15 | Source code for the Amazon Genomics CLI project, including this documentation can be found in [GitHub](https://github.com/aws/amazon-genomics-cli) 16 | 17 | ### Bug Reports and Feature Requests 18 | 19 | You can submit a bug report or make a feature request [here](https://github.com/aws/amazon-genomics-cli/issues) 20 | 21 | ### Pull Requests 22 | 23 | If you would like to contribute to the code base, fork the repository and submit a [pull request](https://github.com/aws/amazon-genomics-cli/pulls) 24 | 25 | ### Join the Conversation 26 | 27 | Chat with the community of Amazon Genomics CLI users on [Gitter](https://gitter.im/aws/amazon-genomics-cli) 28 | 29 | ## AWS Healthcare and Life Sciences 30 | 31 | Find out more about the [AWS Healthcare and Life Sciences community](https://aws.amazon.com/health/) -------------------------------------------------------------------------------- /site/content/en/docs/Best practices/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Best Practices" 3 | date: 2021-09-17T17:55:46-04:00 4 | draft: false 5 | weight: 9 6 | description: > 7 | Best practices when using Amazon Genomics CLI 8 | --- 9 | 10 | Things to consider so that you can get the most out of Amazon Genomics CLI -------------------------------------------------------------------------------- /site/content/en/docs/Concepts/accounts/AccountActivateArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/docs/Concepts/accounts/AccountActivateArchitecture.png -------------------------------------------------------------------------------- /site/content/en/docs/Concepts/contexts/ContextGeneralArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/docs/Concepts/contexts/ContextGeneralArchitecture.png -------------------------------------------------------------------------------- /site/content/en/docs/Getting started/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Getting Started" 3 | linkTitle: "Getting Started" 4 | weight: 2 5 | description: > 6 | What does your user need to know to try your project? 7 | --- 8 | 9 | {{% alert title="Attention" color="warning" %}} 10 | **The Amazon Genomics CLI project has entered its End Of Life (EOL) phase**. The code is no longer actively maintained and the **Github repository will be archived on May 31 2024**. During this time, we encourage customers to migrate to [AWS HealthOmics](https://aws.amazon.com/healthomics/) to run their genomics workflows on AWS, or [reach out to their AWS account team](https://aws.amazon.com/contact-us/?nc2=h_header) for alternative solutions. While the source code of AGC will still be available after the EOL date, we will not make any updates inclusive of addressing issues or accepting Pull Requests. 11 | {{% /alert %}} 12 | 13 | 14 | {{% pageinfo %}} 15 | The following links will help you install Amazon Genomics CLI and quickly run a demo workflow. 16 | {{% /pageinfo %}} 17 | 18 | -------------------------------------------------------------------------------- /site/content/en/docs/Getting started/installation/agc-cannot-open-popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/docs/Getting started/installation/agc-cannot-open-popup.png -------------------------------------------------------------------------------- /site/content/en/docs/Getting started/installation/agc-cannot-verify-developer-popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/docs/Getting started/installation/agc-cannot-verify-developer-popup.png -------------------------------------------------------------------------------- /site/content/en/docs/Reference/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Reference" 3 | linkTitle: "Reference" 4 | weight: 10 5 | description: > 6 | Command reference. 7 | --- 8 | 9 | {{% alert title="Attention" color="warning" %}} 10 | **The Amazon Genomics CLI project has entered its End Of Life (EOL) phase**. The code is no longer actively maintained and the **Github repository will be archived on May 31 2024**. During this time, we encourage customers to migrate to [AWS HealthOmics](https://aws.amazon.com/healthomics/) to run their genomics workflows on AWS, or [reach out to their AWS account team](https://aws.amazon.com/contact-us/?nc2=h_header) for alternative solutions. While the source code of AGC will still be available after the EOL date, we will not make any updates inclusive of addressing issues or accepting Pull Requests. 11 | {{% /alert %}} 12 | 13 | ## Command Reference 14 | -------------------------------------------------------------------------------- /site/content/en/docs/Tutorials/_index.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | title: "Tutorials" 4 | linkTitle: "Tutorials" 5 | weight: 8 6 | date: 2017-01-04 7 | description: > 8 | Work through some end to end examples. 9 | --- 10 | 11 | {{% alert title="Attention" color="warning" %}} 12 | **The Amazon Genomics CLI project has entered its End Of Life (EOL) phase**. The code is no longer actively maintained and the **Github repository will be archived on May 31 2024**. During this time, we encourage customers to migrate to [AWS HealthOmics](https://aws.amazon.com/healthomics/) to run their genomics workflows on AWS, or [reach out to their AWS account team](https://aws.amazon.com/contact-us/?nc2=h_header) for alternative solutions. While the source code of AGC will still be available after the EOL date, we will not make any updates inclusive of addressing issues or accepting Pull Requests. 13 | {{% /alert %}} 14 | 15 | The following are **complete worked examples** made up of **multiple tasks** that guide you through a relatively simple but realistic scenarios using Amazon Genomics CLI. 16 | 17 | -------------------------------------------------------------------------------- /site/content/en/docs/Workflow engines/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Workflow Engines" 3 | linkTitle: "Workflow Engines" 4 | weight: 10 5 | date: 2021-10-01T17:23:58-04:00 6 | draft: false 7 | description: > 8 | Supported Workflow Engines 9 | --- 10 | 11 | {{% alert title="Attention" color="warning" %}} 12 | **The Amazon Genomics CLI project has entered its End Of Life (EOL) phase**. The code is no longer actively maintained and the **Github repository will be archived on May 31 2024**. During this time, we encourage customers to migrate to [AWS HealthOmics](https://aws.amazon.com/healthomics/) to run their genomics workflows on AWS, or [reach out to their AWS account team](https://aws.amazon.com/contact-us/?nc2=h_header) for alternative solutions. While the source code of AGC will still be available after the EOL date, we will not make any updates inclusive of addressing issues or accepting Pull Requests. 13 | {{% /alert %}} 14 | 15 | The following pages provide details on the workflow engines that are currently supported by Amazon Genomics CLI. 16 | 17 | 18 | -------------------------------------------------------------------------------- /site/content/en/docs/Workflow engines/cromwell/CromwellContextArch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/docs/Workflow engines/cromwell/CromwellContextArch.png -------------------------------------------------------------------------------- /site/content/en/docs/Workflow engines/miniwdl/MiniWDLContextArch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/docs/Workflow engines/miniwdl/MiniWDLContextArch.png -------------------------------------------------------------------------------- /site/content/en/docs/Workflow engines/nextflow/NextflowContextArch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/docs/Workflow engines/nextflow/NextflowContextArch.png -------------------------------------------------------------------------------- /site/content/en/docs/Workflow engines/snakemake/SnakeMakeContextArch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/docs/Workflow engines/snakemake/SnakeMakeContextArch.png -------------------------------------------------------------------------------- /site/content/en/docs/Workflow engines/toil/ToilContextArch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/docs/Workflow engines/toil/ToilContextArch.png -------------------------------------------------------------------------------- /site/content/en/docs/_index.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | title: "Documentation" 4 | linkTitle: "Documentation" 5 | weight: 10 6 | menu: 7 | main: 8 | weight: 10 9 | --- 10 | 11 | 12 | -------------------------------------------------------------------------------- /site/content/en/featured-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/content/en/featured-background.png -------------------------------------------------------------------------------- /site/content/en/search.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Search Results 3 | layout: search 4 | 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /site/layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ define "main"}} 2 |
3 |
4 |

Not found

5 |

Oops! This page doesn't exist. Try going back to our home page.

6 |
7 |
8 | {{ end }} 9 | -------------------------------------------------------------------------------- /site/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tech-doc-hugo", 3 | "version": "0.0.1", 4 | "description": "Hugo theme for technical documentation.", 5 | "main": "none.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/google/docsy-example.git" 12 | }, 13 | "author": "", 14 | "license": "ISC", 15 | "bugs": { 16 | "url": "https://github.com/google/docsy-example/issues" 17 | }, 18 | "homepage": "https://github.com/google/docsy-example#readme", 19 | "dependencies": {}, 20 | "devDependencies": { 21 | "autoprefixer": "^9.8.6", 22 | "postcss-cli": "^7.1.2" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /site/static/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/static/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /site/static/favicons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/static/favicons/android-chrome-512x512.png -------------------------------------------------------------------------------- /site/static/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/static/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /site/static/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/static/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /site/static/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/static/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /site/static/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-genomics-cli/f9774847cee3a8b1e6ad3d9dbcee78919841639b/site/static/favicons/favicon.ico -------------------------------------------------------------------------------- /site/static/favicons/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /version.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.6.0" 3 | } 4 | --------------------------------------------------------------------------------