dxpy 0.402.0__tar.gz → 0.403.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dxpy-0.402.0 → dxpy-0.403.0}/PKG-INFO +1 -1
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/app_builder.py +54 -1
- dxpy-0.403.0/dxpy/toolkit_version.py +1 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy.egg-info/PKG-INFO +1 -1
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dxpy.py +329 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_extract_expression.py +28 -32
- dxpy-0.402.0/dxpy/toolkit_version.py +0 -1
- {dxpy-0.402.0 → dxpy-0.403.0}/MANIFEST.in +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/Readme.md +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/api.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/app_categories.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/asset_builder.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/cmd_line_options_validator.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/data_transformations.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/dataset.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/json_validation_by_schema.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/schemas/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/schemas/assay_filtering_conditions.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/schemas/assay_filtering_json_schemas.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/schemas/input_arguments_validation_schemas.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/vizclient.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/vizserver_filters_from_json_parser.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/vizserver_payload_builder.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/auth.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/download_all_inputs.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxanalysis.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxapp.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxapp_container_functions.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxapplet.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxdatabase.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxdatabase_functions.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxdataobject_functions.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxfile.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxfile_functions.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxglobalworkflow.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxjob.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxproject.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxrecord.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/dxworkflow.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/mount_all_inputs.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/search.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/cli/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/cli/cp.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/cli/dataset_utilities.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/cli/download.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/cli/exec_io.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/cli/help_messages.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/cli/org.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/cli/output_handling.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/cli/parsers.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/cli/workflow.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/compat.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/Homo_sapiens_genes_manifest.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/Homo_sapiens_genes_manifest_staging.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/Homo_sapiens_genes_manifest_staging_vep.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/Homo_sapiens_genes_manifest_vep.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/cohort_filter_payload.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/column_conditions.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/column_conversion.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/filter_to_payload.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/germline_utils.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/input_validation.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/input_validation_somatic.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/retrieve_allele_schema.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/retrieve_annotation_schema.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/retrieve_bins.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/retrieve_genotype_schema.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/return_columns_allele.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/return_columns_annotation.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/return_columns_genotype.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/return_columns_genotype_only.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dx_extract_utils/somatic_filter_payload.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/dxlog.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/exceptions.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/executable_builder.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/ImageRef.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/ImageRefFactory.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/app_asset_projects_ids_prod.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/app_asset_projects_ids_staging.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/awscli_assets.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/awscli_assets.staging.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/collect_images.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/default_nextflow_instance_types.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/nextaur_assets.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/nextaur_assets.staging.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/nextflow_assets.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/nextflow_assets.staging.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/nextflow_builder.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/nextflow_templates.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/nextflow/nextflow_utils.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/packages/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/scripts/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/scripts/dx.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/scripts/dx_app_wizard.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/scripts/dx_build_app.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/scripts/dx_build_applet.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/ssh_tunnel_app_support.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/system_requirements.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/bash.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/python.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/Readme.md +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/bash/basic/dxapp.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/bash/basic/src/code.sh +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/bash/parallelized/dxapp.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/bash/parallelized/src/code.sh +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/bash/scatter-process-gather/dxapp.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/bash/scatter-process-gather/src/code.sh +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/nextflow/dxapp.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/nextflow/src/nextflow.sh +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/python/basic/dxapp.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/python/basic/src/code.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/python/basic/test/test.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/python/parallelized/dxapp.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/python/parallelized/src/code.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/python/parallelized/test/test.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/python/scatter-process-gather/dxapp.json +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/python/scatter-process-gather/src/code.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/templates/python/scatter-process-gather/test/test.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/templating/utils.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/__init__.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/batch_utils.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/completer.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/config.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/describe.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/exec_utils.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/executable_unbuilder.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/file_handle.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/file_load_utils.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/genomic_utils.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/job_log_client.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/local_exec_utils.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/pathmatch.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/pretty_print.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/printing.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/resolver.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/spelling_corrector.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/utils/version.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy/workflow_builder.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy.egg-info/SOURCES.txt +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy.egg-info/dependency_links.txt +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy.egg-info/entry_points.txt +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy.egg-info/not-zip-safe +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy.egg-info/requires.txt +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/dxpy.egg-info/top_level.txt +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/requirements.txt +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/requirements_setuptools.txt +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/requirements_test.txt +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-clone-asset +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-docker +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-download-all-inputs +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-fetch-bundled-depends +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-generate-dxapp +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-jobutil-add-output +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-jobutil-dxlink +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-jobutil-get-identity-token +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-jobutil-new-job +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-jobutil-parse-link +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-jobutil-report-error +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-log-stream +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-mount-all-inputs +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-notebook-reconnect +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-print-bash-vars +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/scripts/dx-upload-all-outputs +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/setup.cfg +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/setup.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_batch.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_create_cohort.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_describe.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dx-docker.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dx_app_wizard.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dx_bash_helpers.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dx_completion.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dx_symlink.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dxabs.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dxasset.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dxclient.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dxfile_functions.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dxpy_utils.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_dxunpack.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_extract_assay.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_extract_dataset.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_extract_somatic.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_nextflow.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_nextflow_ImageRef.py +0 -0
- {dxpy-0.402.0 → dxpy-0.403.0}/test/test_nextflow_ImageRefFactory.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dxpy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.403.0
|
|
4
4
|
Summary: DNAnexus Platform API bindings for Python
|
|
5
5
|
Home-page: https://github.com/dnanexus/dx-toolkit
|
|
6
6
|
Author: Aleksandra Zalcman, Andrey Kislyuk, Anurag Biyani, Geet Duggal, Katherine Lai, Kurt Jensen, Marek Hrvol, Ohad Rodeh, Phil Sung
|
|
@@ -64,12 +64,65 @@ class AppBuilderException(Exception):
|
|
|
64
64
|
"""
|
|
65
65
|
pass
|
|
66
66
|
|
|
67
|
+
def _validate_system_requirements(system_requirements):
|
|
68
|
+
"""
|
|
69
|
+
Validates systemRequirements section of dxapp.json for instanceTypeSelector constraints.
|
|
70
|
+
|
|
71
|
+
:param system_requirements: The systemRequirements section from runSpec
|
|
72
|
+
:type system_requirements: dict
|
|
73
|
+
:raises AppBuilderException: If validation fails
|
|
74
|
+
"""
|
|
75
|
+
if not isinstance(system_requirements, dict):
|
|
76
|
+
return
|
|
77
|
+
|
|
78
|
+
for entry_point, requirements in system_requirements.items():
|
|
79
|
+
if not isinstance(requirements, dict):
|
|
80
|
+
continue
|
|
81
|
+
|
|
82
|
+
has_instance_type = 'instanceType' in requirements
|
|
83
|
+
has_instance_type_selector = 'instanceTypeSelector' in requirements
|
|
84
|
+
has_cluster_spec = 'clusterSpec' in requirements
|
|
85
|
+
|
|
86
|
+
# Check mutual exclusivity: instanceType and instanceTypeSelector
|
|
87
|
+
if has_instance_type and has_instance_type_selector:
|
|
88
|
+
raise AppBuilderException(
|
|
89
|
+
"instanceType and instanceTypeSelector keywords are mutually exclusive "
|
|
90
|
+
"in systemRequirements for entry point '{}'".format(entry_point)
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
# Check mutual exclusivity: instanceTypeSelector and clusterSpec
|
|
94
|
+
if has_instance_type_selector and has_cluster_spec:
|
|
95
|
+
raise AppBuilderException(
|
|
96
|
+
"instanceTypeSelector and clusterSpec keywords are mutually exclusive "
|
|
97
|
+
"in systemRequirements for entry point '{}'".format(entry_point)
|
|
98
|
+
)
|
|
99
|
+
|
|
67
100
|
def _validate_applet_spec(applet_spec):
|
|
68
101
|
if 'runSpec' not in applet_spec:
|
|
69
102
|
raise AppBuilderException("Required field 'runSpec' not found in dxapp.json")
|
|
70
103
|
|
|
104
|
+
# Validate systemRequirements for instanceTypeSelector constraints in runSpec
|
|
105
|
+
if 'systemRequirements' in applet_spec.get('runSpec', {}):
|
|
106
|
+
_validate_system_requirements(applet_spec['runSpec']['systemRequirements'])
|
|
107
|
+
|
|
108
|
+
# Validate systemRequirements in regionalOptions for each region
|
|
109
|
+
regional_options = applet_spec.get('regionalOptions', {})
|
|
110
|
+
if isinstance(regional_options, dict):
|
|
111
|
+
for region, options in regional_options.items():
|
|
112
|
+
if isinstance(options, dict) and 'systemRequirements' in options:
|
|
113
|
+
_validate_system_requirements(options['systemRequirements'])
|
|
114
|
+
|
|
71
115
|
def _validate_app_spec(app_spec):
|
|
72
|
-
|
|
116
|
+
# Validate systemRequirements for instanceTypeSelector constraints in runSpec
|
|
117
|
+
if 'runSpec' in app_spec and 'systemRequirements' in app_spec['runSpec']:
|
|
118
|
+
_validate_system_requirements(app_spec['runSpec']['systemRequirements'])
|
|
119
|
+
|
|
120
|
+
# Validate systemRequirements in regionalOptions for each region
|
|
121
|
+
regional_options = app_spec.get('regionalOptions', {})
|
|
122
|
+
if isinstance(regional_options, dict):
|
|
123
|
+
for region, options in regional_options.items():
|
|
124
|
+
if isinstance(options, dict) and 'systemRequirements' in options:
|
|
125
|
+
_validate_system_requirements(options['systemRequirements'])
|
|
73
126
|
|
|
74
127
|
def _get_applet_spec(src_dir):
|
|
75
128
|
applet_spec_file = os.path.join(src_dir, "dxapp.json")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version = '0.403.0'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dxpy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.403.0
|
|
4
4
|
Summary: DNAnexus Platform API bindings for Python
|
|
5
5
|
Home-page: https://github.com/dnanexus/dx-toolkit
|
|
6
6
|
Author: Aleksandra Zalcman, Andrey Kislyuk, Anurag Biyani, Geet Duggal, Katherine Lai, Kurt Jensen, Marek Hrvol, Ohad Rodeh, Phil Sung
|
|
@@ -3191,6 +3191,335 @@ class TestAppBuilderUtils(unittest.TestCase):
|
|
|
3191
3191
|
with self.assertRaises(app_builder.AppBuilderException):
|
|
3192
3192
|
assert_consistent_regions({"aws:us-east-1": None}, ["azure:westus"], app_builder.AppBuilderException)
|
|
3193
3193
|
|
|
3194
|
+
def test_validate_system_requirements_instance_type_selector(self):
|
|
3195
|
+
"""Test that instanceTypeSelector validation works correctly"""
|
|
3196
|
+
validate = app_builder._validate_system_requirements
|
|
3197
|
+
|
|
3198
|
+
# Valid cases - should not raise exceptions
|
|
3199
|
+
|
|
3200
|
+
# instanceTypeSelector alone is valid
|
|
3201
|
+
validate({
|
|
3202
|
+
"main": {
|
|
3203
|
+
"instanceTypeSelector": {
|
|
3204
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4", "mem1_ssd1_x8"]
|
|
3205
|
+
}
|
|
3206
|
+
}
|
|
3207
|
+
})
|
|
3208
|
+
|
|
3209
|
+
# instanceType alone is valid
|
|
3210
|
+
validate({
|
|
3211
|
+
"main": {
|
|
3212
|
+
"instanceType": "mem1_ssd1_x4"
|
|
3213
|
+
}
|
|
3214
|
+
})
|
|
3215
|
+
|
|
3216
|
+
# clusterSpec alone is valid
|
|
3217
|
+
validate({
|
|
3218
|
+
"main": {
|
|
3219
|
+
"clusterSpec": {
|
|
3220
|
+
"type": "generic",
|
|
3221
|
+
"numInstances": 3
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
})
|
|
3225
|
+
|
|
3226
|
+
# instanceType and clusterSpec together is valid
|
|
3227
|
+
validate({
|
|
3228
|
+
"main": {
|
|
3229
|
+
"instanceType": "mem1_ssd1_x4",
|
|
3230
|
+
"clusterSpec": {
|
|
3231
|
+
"type": "generic",
|
|
3232
|
+
"numInstances": 3
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
})
|
|
3236
|
+
|
|
3237
|
+
# Empty requirements is valid
|
|
3238
|
+
validate({})
|
|
3239
|
+
|
|
3240
|
+
# None requirements is valid
|
|
3241
|
+
validate(None)
|
|
3242
|
+
|
|
3243
|
+
# Invalid cases - should raise AppBuilderException
|
|
3244
|
+
|
|
3245
|
+
# instanceType and instanceTypeSelector are mutually exclusive
|
|
3246
|
+
with self.assertRaises(app_builder.AppBuilderException) as cm:
|
|
3247
|
+
validate({
|
|
3248
|
+
"main": {
|
|
3249
|
+
"instanceType": "mem1_ssd1_x4",
|
|
3250
|
+
"instanceTypeSelector": {
|
|
3251
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4", "mem1_ssd1_x8"]
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
})
|
|
3255
|
+
self.assertIn("mutually exclusive", str(cm.exception))
|
|
3256
|
+
self.assertIn("instanceType", str(cm.exception))
|
|
3257
|
+
self.assertIn("instanceTypeSelector", str(cm.exception))
|
|
3258
|
+
|
|
3259
|
+
# instanceTypeSelector and clusterSpec are mutually exclusive
|
|
3260
|
+
with self.assertRaises(app_builder.AppBuilderException) as cm:
|
|
3261
|
+
validate({
|
|
3262
|
+
"main": {
|
|
3263
|
+
"instanceTypeSelector": {
|
|
3264
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4", "mem1_ssd1_x8"]
|
|
3265
|
+
},
|
|
3266
|
+
"clusterSpec": {
|
|
3267
|
+
"type": "generic",
|
|
3268
|
+
"numInstances": 3
|
|
3269
|
+
}
|
|
3270
|
+
}
|
|
3271
|
+
})
|
|
3272
|
+
self.assertIn("mutually exclusive", str(cm.exception))
|
|
3273
|
+
self.assertIn("instanceTypeSelector", str(cm.exception))
|
|
3274
|
+
self.assertIn("clusterSpec", str(cm.exception))
|
|
3275
|
+
|
|
3276
|
+
# Test with wildcard entry point
|
|
3277
|
+
with self.assertRaises(app_builder.AppBuilderException) as cm:
|
|
3278
|
+
validate({
|
|
3279
|
+
"*": {
|
|
3280
|
+
"instanceType": "mem1_ssd1_x4",
|
|
3281
|
+
"instanceTypeSelector": {
|
|
3282
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4"]
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
})
|
|
3286
|
+
self.assertIn("mutually exclusive", str(cm.exception))
|
|
3287
|
+
|
|
3288
|
+
# Test with multiple entry points - one invalid
|
|
3289
|
+
with self.assertRaises(app_builder.AppBuilderException) as cm:
|
|
3290
|
+
validate({
|
|
3291
|
+
"main": {
|
|
3292
|
+
"instanceTypeSelector": {
|
|
3293
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4"]
|
|
3294
|
+
}
|
|
3295
|
+
},
|
|
3296
|
+
"process": {
|
|
3297
|
+
"instanceType": "mem1_ssd1_x4",
|
|
3298
|
+
"instanceTypeSelector": {
|
|
3299
|
+
"allowedInstanceTypes": ["mem1_ssd1_x8"]
|
|
3300
|
+
}
|
|
3301
|
+
}
|
|
3302
|
+
})
|
|
3303
|
+
self.assertIn("mutually exclusive", str(cm.exception))
|
|
3304
|
+
self.assertIn("process", str(cm.exception))
|
|
3305
|
+
|
|
3306
|
+
def test_validate_system_requirements_in_regional_options(self):
|
|
3307
|
+
"""Test that instanceTypeSelector validation works for regionalOptions"""
|
|
3308
|
+
validate_applet = app_builder._validate_applet_spec
|
|
3309
|
+
validate_app = app_builder._validate_app_spec
|
|
3310
|
+
|
|
3311
|
+
# Valid cases - should not raise exceptions
|
|
3312
|
+
|
|
3313
|
+
# Valid: instanceTypeSelector in regionalOptions
|
|
3314
|
+
validate_applet({
|
|
3315
|
+
"name": "test_applet",
|
|
3316
|
+
"runSpec": {
|
|
3317
|
+
"interpreter": "python3",
|
|
3318
|
+
"file": "code.py"
|
|
3319
|
+
},
|
|
3320
|
+
"regionalOptions": {
|
|
3321
|
+
"aws:us-east-1": {
|
|
3322
|
+
"systemRequirements": {
|
|
3323
|
+
"main": {
|
|
3324
|
+
"instanceTypeSelector": {
|
|
3325
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4", "mem1_ssd1_x8"]
|
|
3326
|
+
}
|
|
3327
|
+
}
|
|
3328
|
+
}
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
})
|
|
3332
|
+
|
|
3333
|
+
# Valid: Different system requirements per region
|
|
3334
|
+
validate_applet({
|
|
3335
|
+
"name": "test_applet",
|
|
3336
|
+
"runSpec": {
|
|
3337
|
+
"interpreter": "python3",
|
|
3338
|
+
"file": "code.py"
|
|
3339
|
+
},
|
|
3340
|
+
"regionalOptions": {
|
|
3341
|
+
"aws:us-east-1": {
|
|
3342
|
+
"systemRequirements": {
|
|
3343
|
+
"main": {
|
|
3344
|
+
"instanceType": "mem1_ssd1_x4"
|
|
3345
|
+
}
|
|
3346
|
+
}
|
|
3347
|
+
},
|
|
3348
|
+
"azure:westus": {
|
|
3349
|
+
"systemRequirements": {
|
|
3350
|
+
"main": {
|
|
3351
|
+
"instanceTypeSelector": {
|
|
3352
|
+
"allowedInstanceTypes": ["mem1_ssd1_x8"]
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
})
|
|
3359
|
+
|
|
3360
|
+
# Valid: systemRequirements in both runSpec and regionalOptions (different entry points)
|
|
3361
|
+
validate_applet({
|
|
3362
|
+
"name": "test_applet",
|
|
3363
|
+
"runSpec": {
|
|
3364
|
+
"interpreter": "python3",
|
|
3365
|
+
"file": "code.py",
|
|
3366
|
+
"systemRequirements": {
|
|
3367
|
+
"main": {
|
|
3368
|
+
"instanceType": "mem1_ssd1_x2"
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
},
|
|
3372
|
+
"regionalOptions": {
|
|
3373
|
+
"aws:us-east-1": {
|
|
3374
|
+
"systemRequirements": {
|
|
3375
|
+
"process": {
|
|
3376
|
+
"instanceTypeSelector": {
|
|
3377
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4"]
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
}
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
})
|
|
3384
|
+
|
|
3385
|
+
# Invalid cases - should raise AppBuilderException
|
|
3386
|
+
|
|
3387
|
+
# Invalid: instanceType + instanceTypeSelector in regionalOptions
|
|
3388
|
+
with self.assertRaises(app_builder.AppBuilderException) as cm:
|
|
3389
|
+
validate_applet({
|
|
3390
|
+
"name": "test_applet",
|
|
3391
|
+
"runSpec": {
|
|
3392
|
+
"interpreter": "python3",
|
|
3393
|
+
"file": "code.py"
|
|
3394
|
+
},
|
|
3395
|
+
"regionalOptions": {
|
|
3396
|
+
"aws:us-east-1": {
|
|
3397
|
+
"systemRequirements": {
|
|
3398
|
+
"main": {
|
|
3399
|
+
"instanceType": "mem1_ssd1_x4",
|
|
3400
|
+
"instanceTypeSelector": {
|
|
3401
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4", "mem1_ssd1_x8"]
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
}
|
|
3407
|
+
})
|
|
3408
|
+
self.assertIn("mutually exclusive", str(cm.exception))
|
|
3409
|
+
self.assertIn("instanceType", str(cm.exception))
|
|
3410
|
+
self.assertIn("instanceTypeSelector", str(cm.exception))
|
|
3411
|
+
|
|
3412
|
+
# Invalid: instanceTypeSelector + clusterSpec in regionalOptions
|
|
3413
|
+
with self.assertRaises(app_builder.AppBuilderException) as cm:
|
|
3414
|
+
validate_applet({
|
|
3415
|
+
"name": "test_applet",
|
|
3416
|
+
"runSpec": {
|
|
3417
|
+
"interpreter": "python3",
|
|
3418
|
+
"file": "code.py"
|
|
3419
|
+
},
|
|
3420
|
+
"regionalOptions": {
|
|
3421
|
+
"azure:westus": {
|
|
3422
|
+
"systemRequirements": {
|
|
3423
|
+
"main": {
|
|
3424
|
+
"instanceTypeSelector": {
|
|
3425
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4"]
|
|
3426
|
+
},
|
|
3427
|
+
"clusterSpec": {
|
|
3428
|
+
"type": "generic",
|
|
3429
|
+
"numInstances": 3
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3434
|
+
}
|
|
3435
|
+
})
|
|
3436
|
+
self.assertIn("mutually exclusive", str(cm.exception))
|
|
3437
|
+
self.assertIn("instanceTypeSelector", str(cm.exception))
|
|
3438
|
+
self.assertIn("clusterSpec", str(cm.exception))
|
|
3439
|
+
|
|
3440
|
+
# Invalid: Error in one region out of multiple
|
|
3441
|
+
with self.assertRaises(app_builder.AppBuilderException) as cm:
|
|
3442
|
+
validate_applet({
|
|
3443
|
+
"name": "test_applet",
|
|
3444
|
+
"runSpec": {
|
|
3445
|
+
"interpreter": "python3",
|
|
3446
|
+
"file": "code.py"
|
|
3447
|
+
},
|
|
3448
|
+
"regionalOptions": {
|
|
3449
|
+
"aws:us-east-1": {
|
|
3450
|
+
"systemRequirements": {
|
|
3451
|
+
"main": {
|
|
3452
|
+
"instanceType": "mem1_ssd1_x4"
|
|
3453
|
+
}
|
|
3454
|
+
}
|
|
3455
|
+
},
|
|
3456
|
+
"azure:westus": {
|
|
3457
|
+
"systemRequirements": {
|
|
3458
|
+
"main": {
|
|
3459
|
+
"instanceType": "mem1_ssd1_x4",
|
|
3460
|
+
"instanceTypeSelector": {
|
|
3461
|
+
"allowedInstanceTypes": ["mem1_ssd1_x8"]
|
|
3462
|
+
}
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
}
|
|
3467
|
+
})
|
|
3468
|
+
self.assertIn("mutually exclusive", str(cm.exception))
|
|
3469
|
+
|
|
3470
|
+
# Test with app spec as well
|
|
3471
|
+
with self.assertRaises(app_builder.AppBuilderException) as cm:
|
|
3472
|
+
validate_app({
|
|
3473
|
+
"name": "test_app",
|
|
3474
|
+
"version": "1.0.0",
|
|
3475
|
+
"runSpec": {
|
|
3476
|
+
"interpreter": "python3",
|
|
3477
|
+
"file": "code.py"
|
|
3478
|
+
},
|
|
3479
|
+
"regionalOptions": {
|
|
3480
|
+
"aws:us-east-1": {
|
|
3481
|
+
"systemRequirements": {
|
|
3482
|
+
"main": {
|
|
3483
|
+
"instanceType": "mem1_ssd1_x4",
|
|
3484
|
+
"instanceTypeSelector": {
|
|
3485
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4"]
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
})
|
|
3492
|
+
self.assertIn("mutually exclusive", str(cm.exception))
|
|
3493
|
+
|
|
3494
|
+
# Invalid: Multiple entry points with error in regionalOptions
|
|
3495
|
+
with self.assertRaises(app_builder.AppBuilderException) as cm:
|
|
3496
|
+
validate_applet({
|
|
3497
|
+
"name": "test_applet",
|
|
3498
|
+
"runSpec": {
|
|
3499
|
+
"interpreter": "python3",
|
|
3500
|
+
"file": "code.py"
|
|
3501
|
+
},
|
|
3502
|
+
"regionalOptions": {
|
|
3503
|
+
"aws:us-east-1": {
|
|
3504
|
+
"systemRequirements": {
|
|
3505
|
+
"main": {
|
|
3506
|
+
"instanceTypeSelector": {
|
|
3507
|
+
"allowedInstanceTypes": ["mem1_ssd1_x4"]
|
|
3508
|
+
}
|
|
3509
|
+
},
|
|
3510
|
+
"process": {
|
|
3511
|
+
"instanceType": "mem1_ssd1_x4",
|
|
3512
|
+
"instanceTypeSelector": {
|
|
3513
|
+
"allowedInstanceTypes": ["mem1_ssd1_x8"]
|
|
3514
|
+
}
|
|
3515
|
+
}
|
|
3516
|
+
}
|
|
3517
|
+
}
|
|
3518
|
+
}
|
|
3519
|
+
})
|
|
3520
|
+
self.assertIn("mutually exclusive", str(cm.exception))
|
|
3521
|
+
self.assertIn("process", str(cm.exception))
|
|
3522
|
+
|
|
3194
3523
|
class TestWorkflowBuilderUtils(testutil.DXTestCaseBuildWorkflows):
|
|
3195
3524
|
def setUp(self):
|
|
3196
3525
|
super(TestWorkflowBuilderUtils, self).setUp()
|
|
@@ -22,57 +22,53 @@
|
|
|
22
22
|
|
|
23
23
|
from __future__ import absolute_import
|
|
24
24
|
|
|
25
|
-
import unittest
|
|
26
|
-
import subprocess
|
|
27
|
-
import sys
|
|
28
|
-
import os
|
|
29
|
-
import dxpy
|
|
30
25
|
import copy
|
|
26
|
+
import csv
|
|
31
27
|
import json
|
|
28
|
+
import os
|
|
29
|
+
import shutil
|
|
30
|
+
import subprocess
|
|
31
|
+
import sys
|
|
32
32
|
import tempfile
|
|
33
|
-
import
|
|
33
|
+
import unittest
|
|
34
34
|
from collections import OrderedDict
|
|
35
|
-
import pandas as pd
|
|
36
35
|
|
|
37
|
-
import
|
|
38
|
-
|
|
36
|
+
import dxpy
|
|
37
|
+
import pandas as pd
|
|
38
|
+
from dxpy.bindings.apollo.cmd_line_options_validator import ArgsValidator
|
|
39
|
+
from dxpy.bindings.apollo.data_transformations import transform_to_expression_matrix
|
|
40
|
+
from dxpy.bindings.apollo.dataset import Dataset
|
|
39
41
|
from dxpy.bindings.apollo.json_validation_by_schema import JSONValidator
|
|
40
|
-
from dxpy.
|
|
41
|
-
|
|
42
|
+
from dxpy.bindings.apollo.schemas.assay_filtering_conditions import (
|
|
43
|
+
EXTRACT_ASSAY_EXPRESSION_FILTERING_CONDITIONS_1_0,
|
|
44
|
+
EXTRACT_ASSAY_EXPRESSION_FILTERING_CONDITIONS_1_1,
|
|
45
|
+
EXTRACT_ASSAY_EXPRESSION_FILTERING_CONDITIONS_1_1_non_optimized,
|
|
46
|
+
)
|
|
42
47
|
from dxpy.bindings.apollo.schemas.assay_filtering_json_schemas import (
|
|
43
48
|
EXTRACT_ASSAY_EXPRESSION_JSON_SCHEMA,
|
|
44
49
|
)
|
|
45
|
-
from dxpy.bindings.apollo.cmd_line_options_validator import ArgsValidator
|
|
46
50
|
from dxpy.bindings.apollo.schemas.input_arguments_validation_schemas import (
|
|
47
51
|
EXTRACT_ASSAY_EXPRESSION_INPUT_ARGS_SCHEMA,
|
|
48
52
|
)
|
|
49
53
|
from dxpy.bindings.apollo.vizclient import VizClient
|
|
50
|
-
|
|
51
|
-
from dxpy.bindings.apollo.data_transformations import transform_to_expression_matrix
|
|
52
|
-
from dxpy.cli.output_handling import write_expression_output
|
|
53
|
-
from dxpy.cli.help_messages import EXTRACT_ASSAY_EXPRESSION_JSON_TEMPLATE
|
|
54
|
-
from dxpy.bindings.dxrecord import DXRecord
|
|
55
|
-
from dxpy.bindings.apollo.dataset import Dataset
|
|
56
|
-
|
|
57
54
|
from dxpy.bindings.apollo.vizserver_filters_from_json_parser import JSONFiltersValidator
|
|
58
|
-
from dxpy.bindings.apollo.schemas.assay_filtering_conditions import (
|
|
59
|
-
EXTRACT_ASSAY_EXPRESSION_FILTERING_CONDITIONS_1_0,
|
|
60
|
-
EXTRACT_ASSAY_EXPRESSION_FILTERING_CONDITIONS_1_1,
|
|
61
|
-
EXTRACT_ASSAY_EXPRESSION_FILTERING_CONDITIONS_1_1_non_optimized,
|
|
62
|
-
)
|
|
63
55
|
from dxpy.bindings.apollo.vizserver_payload_builder import VizPayloadBuilder
|
|
56
|
+
from dxpy.bindings.dxrecord import DXRecord
|
|
57
|
+
from dxpy.cli.help_messages import EXTRACT_ASSAY_EXPRESSION_JSON_TEMPLATE
|
|
58
|
+
from dxpy.cli.output_handling import write_expression_output
|
|
64
59
|
from dxpy.exceptions import err_exit
|
|
65
|
-
|
|
60
|
+
from dxpy.utils.resolver import resolve_existing_path
|
|
61
|
+
from dxpy_testutil import cd, chdir
|
|
66
62
|
|
|
67
63
|
dirname = os.path.dirname(__file__)
|
|
68
64
|
|
|
65
|
+
from expression_test_assets.expression_test_expected_output_dict import (
|
|
66
|
+
VIZPAYLOADERBUILDER_EXPECTED_OUTPUT,
|
|
67
|
+
)
|
|
69
68
|
from expression_test_assets.expression_test_input_dict import (
|
|
70
69
|
CLIEXPRESS_TEST_INPUT,
|
|
71
|
-
VIZPAYLOADERBUILDER_TEST_INPUT,
|
|
72
70
|
EXPRESSION_CLI_JSON_FILTERS,
|
|
73
|
-
|
|
74
|
-
from expression_test_assets.expression_test_expected_output_dict import (
|
|
75
|
-
VIZPAYLOADERBUILDER_EXPECTED_OUTPUT,
|
|
71
|
+
VIZPAYLOADERBUILDER_TEST_INPUT,
|
|
76
72
|
)
|
|
77
73
|
|
|
78
74
|
|
|
@@ -1187,9 +1183,9 @@ class TestDXExtractExpression(unittest.TestCase):
|
|
|
1187
1183
|
|
|
1188
1184
|
def test_dx_extract_cmd_location_expression_sample_sql(self):
|
|
1189
1185
|
expected_sql_query = [
|
|
1190
|
-
"SELECT `expression_1`.`feature_id` AS `feature_id`, `expression_1`.`sample_id` AS `sample_id`, `expression_1`.`value` AS `expression`, `expr_annotation_1`.`gene_name` AS `feature_name`, `expr_annotation_1`.`chr` AS `chrom`, `expr_annotation_1`.`start` AS `start` FROM `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expression` AS `expression_1` LEFT OUTER JOIN `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expr_annotation` AS `expr_annotation_1` ON `expression_1`.`feature_id` = `expr_annotation_1`.`feature_id` WHERE (`expr_annotation_1`.`chr` = '11' AND (`expr_annotation_1`.`start` BETWEEN 8693350 AND 67440200 OR `expr_annotation_1`.`end` BETWEEN 8693350 AND 67440200 OR `expr_annotation_1`.`start` <= 8693350 AND `expr_annotation_1`.`end` >= 67440200) OR `expr_annotation_1`.`chr` = 'X' AND (`expr_annotation_1`.`start` BETWEEN 148500700 AND 148994424 OR `expr_annotation_1`.`end` BETWEEN 148500700 AND 148994424 OR `expr_annotation_1`.`start` <= 148500700 AND `expr_annotation_1`.`end` >= 148994424) OR `expr_annotation_1`.`chr` = '17' AND (`expr_annotation_1`.`start` BETWEEN 75228160 AND 75235759 OR `expr_annotation_1`.`end` BETWEEN 75228160 AND 75235759 OR `expr_annotation_1`.`start` <= 75228160 AND `expr_annotation_1`.`end` >= 75235759)) AND `expression_1`.`value` >= 25.63 AND `expression_1`.`sample_id` IN ('sample_1', 'sample_2') ORDER BY `feature_id` ASC, `sample_id` ASC",
|
|
1191
|
-
"SELECT `expression_1`.`feature_id` AS `feature_id`, `expression_1`.`sample_id` AS `sample_id`, `expression_1`.`value` AS `expression`, `expr_annotation_1`.`gene_name` AS `feature_name`, `expr_annotation_1`.`chr` AS `chrom`, `expr_annotation_1`.`start` AS `start` FROM `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expression` AS `expression_1` LEFT OUTER JOIN `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expr_annotation` AS `expr_annotation_1` ON `expression_1`.`feature_id` = `expr_annotation_1`.`feature_id` WHERE (`expr_annotation_1`.`chr` = '11' AND (`expr_annotation_1`.`end` BETWEEN 8693350 AND 67440200 OR `expr_annotation_1`.`start` BETWEEN 8693350 AND 67440200 OR `expr_annotation_1`.`end` >= 67440200 AND `expr_annotation_1`.`start` <= 8693350) OR `expr_annotation_1`.`chr` = 'X' AND (`expr_annotation_1`.`end` BETWEEN 148500700 AND 148994424 OR `expr_annotation_1`.`start` BETWEEN 148500700 AND 148994424 OR `expr_annotation_1`.`end` >= 148994424 AND `expr_annotation_1`.`start` <= 148500700) OR `expr_annotation_1`.`chr` = '17' AND (`expr_annotation_1`.`end` BETWEEN 75228160 AND 75235759 OR `expr_annotation_1`.`start` BETWEEN 75228160 AND 75235759 OR `expr_annotation_1`.`end` >= 75235759 AND `expr_annotation_1`.`start` <= 75228160)) AND `expression_1`.`value` >= 25.63 AND `expression_1`.`sample_id` IN ('sample_1', 'sample_2') ORDER BY `feature_id` ASC, `sample_id` ASC",
|
|
1192
|
-
"SELECT `expression_1`.`feature_id` AS `feature_id`, `expression_1`.`sample_id` AS `sample_id`, `expression_1`.`value` AS `expression`, `expr_annotation_1`.`gene_name` AS `feature_name`, `expr_annotation_1`.`chr` AS `chrom`, `expr_annotation_1`.`start` AS `start` FROM `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expression` AS `expression_1` LEFT OUTER JOIN `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expr_annotation` AS `expr_annotation_1` ON `expression_1`.`feature_id` = `expr_annotation_1`.`feature_id` WHERE (`expr_annotation_1`.`chr` = '11' AND (`expr_annotation_1`.`end` BETWEEN 8693350 AND 67440200 OR `expr_annotation_1`.`start` BETWEEN 8693350 AND 67440200 OR `expr_annotation_1`.`end` >= 67440200 AND `expr_annotation_1`.`start` <= 8693350) OR `expr_annotation_1`.`chr` = 'X' AND (`expr_annotation_1`.`end` BETWEEN 148500700 AND 148994424 OR `expr_annotation_1`.`start` BETWEEN 148500700 AND 148994424 OR `expr_annotation_1`.`end` >= 148994424 AND `expr_annotation_1`.`start` <= 148500700) OR `expr_annotation_1`.`chr` = '17' AND (`expr_annotation_1`.`end` BETWEEN 75228160 AND 75235759 OR `expr_annotation_1`.`start` BETWEEN 75228160 AND 75235759 OR `expr_annotation_1`.`end` >= 75235759 AND `expr_annotation_1`.`start` <= 75228160)) AND `expression_1`.`sample_id` IN ('sample_1', 'sample_2') AND `expression_1`.`value` >= 25.63 ORDER BY `feature_id` ASC, `sample_id` ASC",
|
|
1186
|
+
"SELECT `expression_1`.`feature_id` AS `feature_id`, `expression_1`.`sample_id` AS `sample_id`, `expression_1`.`value` AS `expression`, `expr_annotation_1`.`gene_name` AS `feature_name`, `expr_annotation_1`.`chr` AS `chrom`, `expr_annotation_1`.`start` AS `start` FROM `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expression` AS `expression_1` LEFT OUTER JOIN `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expr_annotation` AS `expr_annotation_1` ON `expression_1`.`feature_id` = `expr_annotation_1`.`feature_id` WHERE ((`expr_annotation_1`.`chr` = '11' AND ((`expr_annotation_1`.`start` BETWEEN 8693350 AND 67440200 OR `expr_annotation_1`.`end` BETWEEN 8693350 AND 67440200) OR (`expr_annotation_1`.`start` <= 8693350 AND `expr_annotation_1`.`end` >= 67440200))) OR (`expr_annotation_1`.`chr` = 'X' AND ((`expr_annotation_1`.`start` BETWEEN 148500700 AND 148994424 OR `expr_annotation_1`.`end` BETWEEN 148500700 AND 148994424) OR (`expr_annotation_1`.`start` <= 148500700 AND `expr_annotation_1`.`end` >= 148994424))) OR (`expr_annotation_1`.`chr` = '17' AND ((`expr_annotation_1`.`start` BETWEEN 75228160 AND 75235759 OR `expr_annotation_1`.`end` BETWEEN 75228160 AND 75235759) OR (`expr_annotation_1`.`start` <= 75228160 AND `expr_annotation_1`.`end` >= 75235759)))) AND `expression_1`.`value` >= 25.63 AND `expression_1`.`sample_id` IN ('sample_1', 'sample_2') ORDER BY `feature_id` ASC, `sample_id` ASC",
|
|
1187
|
+
"SELECT `expression_1`.`feature_id` AS `feature_id`, `expression_1`.`sample_id` AS `sample_id`, `expression_1`.`value` AS `expression`, `expr_annotation_1`.`gene_name` AS `feature_name`, `expr_annotation_1`.`chr` AS `chrom`, `expr_annotation_1`.`start` AS `start` FROM `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expression` AS `expression_1` LEFT OUTER JOIN `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expr_annotation` AS `expr_annotation_1` ON `expression_1`.`feature_id` = `expr_annotation_1`.`feature_id` WHERE ((`expr_annotation_1`.`chr` = '11' AND ((`expr_annotation_1`.`end` BETWEEN 8693350 AND 67440200 OR `expr_annotation_1`.`start` BETWEEN 8693350 AND 67440200) OR (`expr_annotation_1`.`end` >= 67440200 AND `expr_annotation_1`.`start` <= 8693350))) OR (`expr_annotation_1`.`chr` = 'X' AND ((`expr_annotation_1`.`end` BETWEEN 148500700 AND 148994424 OR `expr_annotation_1`.`start` BETWEEN 148500700 AND 148994424) OR (`expr_annotation_1`.`end` >= 148994424 AND `expr_annotation_1`.`start` <= 148500700))) OR (`expr_annotation_1`.`chr` = '17' AND ((`expr_annotation_1`.`end` BETWEEN 75228160 AND 75235759 OR `expr_annotation_1`.`start` BETWEEN 75228160 AND 75235759) OR (`expr_annotation_1`.`end` >= 75235759 AND `expr_annotation_1`.`start` <= 75228160)))) AND `expression_1`.`value` >= 25.63 AND `expression_1`.`sample_id` IN ('sample_1', 'sample_2') ORDER BY `feature_id` ASC, `sample_id` ASC",
|
|
1188
|
+
"SELECT `expression_1`.`feature_id` AS `feature_id`, `expression_1`.`sample_id` AS `sample_id`, `expression_1`.`value` AS `expression`, `expr_annotation_1`.`gene_name` AS `feature_name`, `expr_annotation_1`.`chr` AS `chrom`, `expr_annotation_1`.`start` AS `start` FROM `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expression` AS `expression_1` LEFT OUTER JOIN `database_gzky7400vgpyzy621q43gkkf__molecular_expression1_db`.`expr_annotation` AS `expr_annotation_1` ON `expression_1`.`feature_id` = `expr_annotation_1`.`feature_id` WHERE ((`expr_annotation_1`.`chr` = '11' AND ((`expr_annotation_1`.`end` BETWEEN 8693350 AND 67440200 OR `expr_annotation_1`.`start` BETWEEN 8693350 AND 67440200) OR (`expr_annotation_1`.`end` >= 67440200 AND `expr_annotation_1`.`start` <= 8693350))) OR (`expr_annotation_1`.`chr` = 'X' AND ((`expr_annotation_1`.`end` BETWEEN 148500700 AND 148994424 OR `expr_annotation_1`.`start` BETWEEN 148500700 AND 148994424) OR (`expr_annotation_1`.`end` >= 148994424 AND `expr_annotation_1`.`start` <= 148500700))) OR (`expr_annotation_1`.`chr` = '17' AND ((`expr_annotation_1`.`end` BETWEEN 75228160 AND 75235759 OR `expr_annotation_1`.`start` BETWEEN 75228160 AND 75235759) OR (`expr_annotation_1`.`end` >= 75235759 AND `expr_annotation_1`.`start` <= 75228160)))) AND `expression_1`.`sample_id` IN ('sample_1', 'sample_2') AND `expression_1`.`value` >= 25.63 ORDER BY `feature_id` ASC, `sample_id` ASC",
|
|
1193
1189
|
]
|
|
1194
1190
|
response = self.run_dx_extract_assay_expression_cmd(
|
|
1195
1191
|
self.expression_dataset,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = '0.402.0'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dxpy-0.402.0 → dxpy-0.403.0}/dxpy/bindings/apollo/schemas/input_arguments_validation_schemas.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|