dxpy 0.366.0__tar.gz → 0.367.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.
Files changed (181) hide show
  1. {dxpy-0.366.0 → dxpy-0.367.0}/PKG-INFO +1 -1
  2. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/dataset.py +3 -2
  3. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/cli/dataset_utilities.py +2 -2
  4. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/filter_to_payload.py +9 -0
  5. dxpy-0.367.0/dxpy/toolkit_version.py +1 -0
  6. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy.egg-info/PKG-INFO +1 -1
  7. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_extract_expression.py +5 -2
  8. dxpy-0.366.0/dxpy/toolkit_version.py +0 -1
  9. {dxpy-0.366.0 → dxpy-0.367.0}/MANIFEST.in +0 -0
  10. {dxpy-0.366.0 → dxpy-0.367.0}/Readme.md +0 -0
  11. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/__init__.py +0 -0
  12. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/api.py +0 -0
  13. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/app_builder.py +0 -0
  14. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/app_categories.py +0 -0
  15. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/asset_builder.py +0 -0
  16. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/__init__.py +0 -0
  17. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/__init__.py +0 -0
  18. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/cmd_line_options_validator.py +0 -0
  19. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/data_transformations.py +0 -0
  20. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/json_validation_by_schema.py +0 -0
  21. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/schemas/__init__.py +0 -0
  22. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/schemas/assay_filtering_conditions.py +0 -0
  23. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/schemas/assay_filtering_json_schemas.py +0 -0
  24. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/schemas/input_arguments_validation_schemas.py +0 -0
  25. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/vizclient.py +0 -0
  26. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/vizserver_filters_from_json_parser.py +0 -0
  27. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/apollo/vizserver_payload_builder.py +0 -0
  28. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/auth.py +0 -0
  29. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/download_all_inputs.py +0 -0
  30. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxanalysis.py +0 -0
  31. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxapp.py +0 -0
  32. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxapp_container_functions.py +0 -0
  33. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxapplet.py +0 -0
  34. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxdatabase.py +0 -0
  35. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxdatabase_functions.py +0 -0
  36. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxdataobject_functions.py +0 -0
  37. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxfile.py +0 -0
  38. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxfile_functions.py +0 -0
  39. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxglobalworkflow.py +0 -0
  40. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxjob.py +0 -0
  41. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxproject.py +0 -0
  42. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxrecord.py +0 -0
  43. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/dxworkflow.py +0 -0
  44. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/mount_all_inputs.py +0 -0
  45. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/bindings/search.py +0 -0
  46. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/cli/__init__.py +0 -0
  47. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/cli/cp.py +0 -0
  48. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/cli/download.py +0 -0
  49. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/cli/exec_io.py +0 -0
  50. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/cli/help_messages.py +0 -0
  51. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/cli/org.py +0 -0
  52. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/cli/output_handling.py +0 -0
  53. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/cli/parsers.py +0 -0
  54. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/cli/workflow.py +0 -0
  55. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/compat.py +0 -0
  56. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/Homo_sapiens_genes_manifest.json +0 -0
  57. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/Homo_sapiens_genes_manifest_staging.json +0 -0
  58. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/Homo_sapiens_genes_manifest_staging_vep.json +0 -0
  59. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/Homo_sapiens_genes_manifest_vep.json +0 -0
  60. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/__init__.py +0 -0
  61. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/cohort_filter_payload.py +0 -0
  62. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/column_conditions.json +0 -0
  63. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/column_conversion.json +0 -0
  64. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/input_validation.py +0 -0
  65. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/input_validation_somatic.py +0 -0
  66. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/retrieve_allele_schema.json +0 -0
  67. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/retrieve_annotation_schema.json +0 -0
  68. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/retrieve_bins.py +0 -0
  69. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/retrieve_genotype_schema.json +0 -0
  70. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/return_columns_allele.json +0 -0
  71. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/return_columns_annotation.json +0 -0
  72. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/return_columns_genotype.json +0 -0
  73. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dx_extract_utils/somatic_filter_payload.py +0 -0
  74. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/dxlog.py +0 -0
  75. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/exceptions.py +0 -0
  76. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/executable_builder.py +0 -0
  77. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/ImageRef.py +0 -0
  78. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/ImageRefFactory.py +0 -0
  79. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/__init__.py +0 -0
  80. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/collect_images.py +0 -0
  81. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/nextaur_assets.json +0 -0
  82. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/nextaur_assets.staging.json +0 -0
  83. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/nextflow_assets.json +0 -0
  84. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/nextflow_assets.staging.json +0 -0
  85. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/nextflow_builder.py +0 -0
  86. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/nextflow_templates.py +0 -0
  87. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/nextflow/nextflow_utils.py +0 -0
  88. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/packages/__init__.py +0 -0
  89. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/scripts/__init__.py +0 -0
  90. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/scripts/dx.py +0 -0
  91. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/scripts/dx_app_wizard.py +0 -0
  92. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/scripts/dx_build_app.py +0 -0
  93. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/scripts/dx_build_applet.py +0 -0
  94. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/ssh_tunnel_app_support.py +0 -0
  95. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/system_requirements.py +0 -0
  96. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/__init__.py +0 -0
  97. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/bash.py +0 -0
  98. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/python.py +0 -0
  99. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/Readme.md +0 -0
  100. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/bash/basic/dxapp.json +0 -0
  101. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/bash/basic/src/code.sh +0 -0
  102. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/bash/parallelized/dxapp.json +0 -0
  103. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/bash/parallelized/src/code.sh +0 -0
  104. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/bash/scatter-process-gather/dxapp.json +0 -0
  105. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/bash/scatter-process-gather/src/code.sh +0 -0
  106. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/nextflow/dxapp.json +0 -0
  107. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/nextflow/src/nextflow.sh +0 -0
  108. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/python/basic/dxapp.json +0 -0
  109. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/python/basic/src/code.py +0 -0
  110. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/python/basic/test/test.py +0 -0
  111. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/python/parallelized/dxapp.json +0 -0
  112. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/python/parallelized/src/code.py +0 -0
  113. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/python/parallelized/test/test.py +0 -0
  114. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/python/scatter-process-gather/dxapp.json +0 -0
  115. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/python/scatter-process-gather/src/code.py +0 -0
  116. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/templates/python/scatter-process-gather/test/test.py +0 -0
  117. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/templating/utils.py +0 -0
  118. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/__init__.py +0 -0
  119. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/batch_utils.py +0 -0
  120. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/completer.py +0 -0
  121. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/config.py +0 -0
  122. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/describe.py +0 -0
  123. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/exec_utils.py +0 -0
  124. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/executable_unbuilder.py +0 -0
  125. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/file_handle.py +0 -0
  126. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/file_load_utils.py +0 -0
  127. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/genomic_utils.py +0 -0
  128. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/job_log_client.py +0 -0
  129. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/local_exec_utils.py +0 -0
  130. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/pathmatch.py +0 -0
  131. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/pretty_print.py +0 -0
  132. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/printing.py +0 -0
  133. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/resolver.py +0 -0
  134. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/utils/spelling_corrector.py +0 -0
  135. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy/workflow_builder.py +0 -0
  136. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy.egg-info/SOURCES.txt +0 -0
  137. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy.egg-info/dependency_links.txt +0 -0
  138. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy.egg-info/entry_points.txt +0 -0
  139. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy.egg-info/not-zip-safe +0 -0
  140. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy.egg-info/requires.txt +0 -0
  141. {dxpy-0.366.0 → dxpy-0.367.0}/dxpy.egg-info/top_level.txt +0 -0
  142. {dxpy-0.366.0 → dxpy-0.367.0}/requirements.txt +0 -0
  143. {dxpy-0.366.0 → dxpy-0.367.0}/requirements_setuptools.txt +0 -0
  144. {dxpy-0.366.0 → dxpy-0.367.0}/requirements_test.txt +0 -0
  145. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-clone-asset +0 -0
  146. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-docker +0 -0
  147. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-download-all-inputs +0 -0
  148. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-fetch-bundled-depends +0 -0
  149. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-generate-dxapp +0 -0
  150. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-jobutil-add-output +0 -0
  151. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-jobutil-dxlink +0 -0
  152. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-jobutil-new-job +0 -0
  153. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-jobutil-parse-link +0 -0
  154. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-jobutil-report-error +0 -0
  155. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-log-stream +0 -0
  156. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-mount-all-inputs +0 -0
  157. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-notebook-reconnect +0 -0
  158. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-print-bash-vars +0 -0
  159. {dxpy-0.366.0 → dxpy-0.367.0}/scripts/dx-upload-all-outputs +0 -0
  160. {dxpy-0.366.0 → dxpy-0.367.0}/setup.cfg +0 -0
  161. {dxpy-0.366.0 → dxpy-0.367.0}/setup.py +0 -0
  162. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_batch.py +0 -0
  163. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_create_cohort.py +0 -0
  164. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_describe.py +0 -0
  165. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dx-docker.py +0 -0
  166. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dx_app_wizard.py +0 -0
  167. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dx_bash_helpers.py +0 -0
  168. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dx_completion.py +0 -0
  169. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dx_symlink.py +0 -0
  170. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dxabs.py +0 -0
  171. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dxasset.py +0 -0
  172. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dxclient.py +0 -0
  173. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dxpy.py +0 -0
  174. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dxpy_utils.py +0 -0
  175. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_dxunpack.py +0 -0
  176. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_extract_assay.py +0 -0
  177. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_extract_dataset.py +0 -0
  178. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_extract_somatic.py +0 -0
  179. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_nextflow.py +0 -0
  180. {dxpy-0.366.0 → dxpy-0.367.0}/test/test_nextflow_ImageRef.py +0 -0
  181. {dxpy-0.366.0 → dxpy-0.367.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.366.0
3
+ Version: 0.367.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
@@ -109,8 +109,9 @@ class Dataset(DXRecord):
109
109
 
110
110
  def assay_names_list(self, assay_type):
111
111
  assay_names_list = []
112
- for assay in self.assays_info_dict[assay_type]:
113
- assay_names_list.append(assay["name"])
112
+ if self.assays_info_dict.get(assay_type):
113
+ for assay in self.assays_info_dict.get(assay_type):
114
+ assay_names_list.append(assay["name"])
114
115
  return assay_names_list
115
116
 
116
117
  def is_assay_name_valid(self, assay_name, assay_type):
@@ -1221,7 +1221,7 @@ def extract_assay_expression(args):
1221
1221
  )
1222
1222
  )
1223
1223
  elif not args.assay_name:
1224
- if len(dataset.assays_info_dict["molecular_expression"]) == 0:
1224
+ if dataset.assays_info_dict.get("molecular_expression") is None or len(dataset.assays_info_dict.get("molecular_expression")) == 0:
1225
1225
  err_exit("No molecular expression assays found in the dataset")
1226
1226
 
1227
1227
  # Load args.filter_json or args.filter_json_file into a dict
@@ -1391,7 +1391,7 @@ def extract_assay_expression(args):
1391
1391
  url = dataset.vizserver_url
1392
1392
 
1393
1393
  # Create VizClient object and get data from vizserver using generated payload
1394
- client = VizClient(url, project)
1394
+ client = VizClient(url, project, err_exit)
1395
1395
  if args.sql:
1396
1396
  vizserver_response = client.get_raw_sql(vizserver_payload, record_id)
1397
1397
  else:
@@ -228,6 +228,15 @@ def final_payload(
228
228
 
229
229
  order_by = [{"allele_id":"asc"}]
230
230
 
231
+ # In order for output to be deterministic, we need to do a secondary sort by sample_id
232
+ # if it is present in the fields
233
+ sample_id_present = False
234
+ for field in fields:
235
+ if "sample_id" in field:
236
+ sample_id_present = True
237
+ if sample_id_present:
238
+ order_by.append({"sample_id":"asc"})
239
+
231
240
  final_payload["order_by"] = order_by
232
241
  final_payload["fields"] = fields
233
242
  final_payload["adjust_geno_bins"] = False
@@ -0,0 +1 @@
1
+ version = '0.367.0'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dxpy
3
- Version: 0.366.0
3
+ Version: 0.367.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
@@ -1131,7 +1131,10 @@ class TestDXExtractExpression(unittest.TestCase):
1131
1131
  return process
1132
1132
 
1133
1133
  def test_dx_extract_cmd_location_expression_sample_sql(self):
1134
- expected_sql_query = ["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')", "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')"]
1134
+ expected_sql_query = [
1135
+ "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",
1136
+ "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",
1137
+ ]
1135
1138
  response = self.run_dx_extract_assay_expression_cmd(
1136
1139
  self.expression_dataset,
1137
1140
  EXPRESSION_CLI_JSON_FILTERS["positive_test"]["location_expression_sample"],
@@ -1187,7 +1190,7 @@ class TestDXExtractExpression(unittest.TestCase):
1187
1190
  self.assertEqual(len(expected_X_chrom_response), 5)
1188
1191
 
1189
1192
  def test_dx_extract_cmd_sample_ids_with_additional_fields(self):
1190
- expected_sql_query = "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`, `expr_annotation_1`.`end` AS `end`, `expr_annotation_1`.`strand` AS `strand` 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 `expression_1`.`sample_id` IN ('sample_1')"
1193
+ expected_sql_query = "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`, `expr_annotation_1`.`end` AS `end`, `expr_annotation_1`.`strand` AS `strand` 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 `expression_1`.`sample_id` IN ('sample_1') ORDER BY `feature_id` ASC, `sample_id` ASC"
1191
1194
  response = self.run_dx_extract_assay_expression_cmd(
1192
1195
  self.expression_dataset,
1193
1196
  EXPRESSION_CLI_JSON_FILTERS["positive_test"][
@@ -1 +0,0 @@
1
- version = '0.366.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
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
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