arctrl 3.0.0a3__py3-none-any.whl
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.
- arctrl/__init__.py +18 -0
- arctrl/py/CWL/__init__.py +0 -0
- arctrl/py/CWL/cwltypes.py +150 -0
- arctrl/py/CWL/decode.py +973 -0
- arctrl/py/CWL/encode.py +1 -0
- arctrl/py/CWL/inputs.py +88 -0
- arctrl/py/CWL/outputs.py +85 -0
- arctrl/py/CWL/requirements.py +77 -0
- arctrl/py/CWL/tool_description.py +103 -0
- arctrl/py/CWL/workflow_description.py +104 -0
- arctrl/py/CWL/workflow_steps.py +113 -0
- arctrl/py/Contract/__init__.py +0 -0
- arctrl/py/Contract/arc.py +60 -0
- arctrl/py/Contract/arc_assay.py +125 -0
- arctrl/py/Contract/arc_investigation.py +88 -0
- arctrl/py/Contract/arc_run.py +125 -0
- arctrl/py/Contract/arc_study.py +126 -0
- arctrl/py/Contract/arc_workflow.py +125 -0
- arctrl/py/Contract/contract.py +153 -0
- arctrl/py/Contract/datamap.py +372 -0
- arctrl/py/Contract/git.py +118 -0
- arctrl/py/Contract/validation_packages_config.py +107 -0
- arctrl/py/ContractIO/__init__.py +0 -0
- arctrl/py/ContractIO/contract_io.py +344 -0
- arctrl/py/ContractIO/file_system_helper.py +264 -0
- arctrl/py/Core/Helper/__init__.py +0 -0
- arctrl/py/Core/Helper/collections_.py +438 -0
- arctrl/py/Core/Helper/date_time.py +26 -0
- arctrl/py/Core/Helper/hash_codes.py +60 -0
- arctrl/py/Core/Helper/identifier.py +248 -0
- arctrl/py/Core/Helper/orcid.py +42 -0
- arctrl/py/Core/Helper/printer.py +13 -0
- arctrl/py/Core/Helper/regex.py +554 -0
- arctrl/py/Core/Helper/sem_ver.py +71 -0
- arctrl/py/Core/Helper/url.py +148 -0
- arctrl/py/Core/Process/__init__.py +0 -0
- arctrl/py/Core/Process/column_index.py +280 -0
- arctrl/py/Core/Process/component.py +200 -0
- arctrl/py/Core/Process/factor.py +151 -0
- arctrl/py/Core/Process/factor_value.py +182 -0
- arctrl/py/Core/Process/material.py +74 -0
- arctrl/py/Core/Process/material_attribute.py +95 -0
- arctrl/py/Core/Process/material_attribute_value.py +184 -0
- arctrl/py/Core/Process/material_type.py +45 -0
- arctrl/py/Core/Process/process.py +477 -0
- arctrl/py/Core/Process/process_input.py +265 -0
- arctrl/py/Core/Process/process_output.py +235 -0
- arctrl/py/Core/Process/process_parameter_value.py +200 -0
- arctrl/py/Core/Process/process_sequence.py +435 -0
- arctrl/py/Core/Process/protocol.py +175 -0
- arctrl/py/Core/Process/protocol_parameter.py +98 -0
- arctrl/py/Core/Process/sample.py +82 -0
- arctrl/py/Core/Process/source.py +62 -0
- arctrl/py/Core/Table/__init__.py +0 -0
- arctrl/py/Core/Table/arc_table.py +1264 -0
- arctrl/py/Core/Table/arc_table_aux.py +575 -0
- arctrl/py/Core/Table/arc_tables.py +591 -0
- arctrl/py/Core/Table/composite_cell.py +319 -0
- arctrl/py/Core/Table/composite_column.py +73 -0
- arctrl/py/Core/Table/composite_header.py +739 -0
- arctrl/py/Core/__init__.py +0 -0
- arctrl/py/Core/arc_types.py +5064 -0
- arctrl/py/Core/comment.py +128 -0
- arctrl/py/Core/comment_list.py +127 -0
- arctrl/py/Core/conversion.py +1313 -0
- arctrl/py/Core/data.py +245 -0
- arctrl/py/Core/data_context.py +157 -0
- arctrl/py/Core/data_file.py +112 -0
- arctrl/py/Core/data_map.py +225 -0
- arctrl/py/Core/identifier_setters.py +31 -0
- arctrl/py/Core/iproperty_value.py +36 -0
- arctrl/py/Core/ontology_annotation.py +299 -0
- arctrl/py/Core/ontology_source_reference.py +114 -0
- arctrl/py/Core/person.py +259 -0
- arctrl/py/Core/publication.py +161 -0
- arctrl/py/Core/template.py +231 -0
- arctrl/py/Core/templates.py +148 -0
- arctrl/py/Core/uri.py +11 -0
- arctrl/py/Core/value.py +188 -0
- arctrl/py/FileSystem/__init__.py +0 -0
- arctrl/py/FileSystem/commit.py +21 -0
- arctrl/py/FileSystem/default_gitattributes.py +5 -0
- arctrl/py/FileSystem/default_gitignore.py +5 -0
- arctrl/py/FileSystem/file_system.py +58 -0
- arctrl/py/FileSystem/file_system_tree.py +426 -0
- arctrl/py/FileSystem/path.py +64 -0
- arctrl/py/Json/DataMap/__init__.py +0 -0
- arctrl/py/Json/DataMap/data_context.py +101 -0
- arctrl/py/Json/DataMap/data_map.py +53 -0
- arctrl/py/Json/Process/__init__.py +0 -0
- arctrl/py/Json/Process/assay_materials.py +46 -0
- arctrl/py/Json/Process/component.py +79 -0
- arctrl/py/Json/Process/factor.py +107 -0
- arctrl/py/Json/Process/factor_value.py +101 -0
- arctrl/py/Json/Process/material.py +226 -0
- arctrl/py/Json/Process/material_attribute.py +79 -0
- arctrl/py/Json/Process/material_attribute_value.py +101 -0
- arctrl/py/Json/Process/material_type.py +53 -0
- arctrl/py/Json/Process/process.py +296 -0
- arctrl/py/Json/Process/process_input.py +83 -0
- arctrl/py/Json/Process/process_output.py +67 -0
- arctrl/py/Json/Process/process_parameter_value.py +81 -0
- arctrl/py/Json/Process/protocol.py +354 -0
- arctrl/py/Json/Process/protocol_parameter.py +79 -0
- arctrl/py/Json/Process/sample.py +277 -0
- arctrl/py/Json/Process/source.py +214 -0
- arctrl/py/Json/Process/study_materials.py +52 -0
- arctrl/py/Json/Process/value.py +56 -0
- arctrl/py/Json/ROCrate/__init__.py +0 -0
- arctrl/py/Json/ROCrate/ldcontext.py +133 -0
- arctrl/py/Json/ROCrate/ldgraph.py +111 -0
- arctrl/py/Json/ROCrate/ldnode.py +290 -0
- arctrl/py/Json/ROCrate/ldref.py +44 -0
- arctrl/py/Json/ROCrate/ldvalue.py +102 -0
- arctrl/py/Json/Table/__init__.py +0 -0
- arctrl/py/Json/Table/arc_table.py +393 -0
- arctrl/py/Json/Table/cell_table.py +83 -0
- arctrl/py/Json/Table/composite_cell.py +136 -0
- arctrl/py/Json/Table/composite_header.py +67 -0
- arctrl/py/Json/Table/iotype.py +24 -0
- arctrl/py/Json/Table/oatable.py +82 -0
- arctrl/py/Json/Table/templates.py +281 -0
- arctrl/py/Json/__init__.py +0 -0
- arctrl/py/Json/assay.py +600 -0
- arctrl/py/Json/comment.py +206 -0
- arctrl/py/Json/context/rocrate/__init__.py +0 -0
- arctrl/py/Json/context/rocrate/isa_assay_context.py +101 -0
- arctrl/py/Json/context/rocrate/isa_comment_context.py +60 -0
- arctrl/py/Json/context/rocrate/isa_component_context.py +77 -0
- arctrl/py/Json/context/rocrate/isa_data_context.py +74 -0
- arctrl/py/Json/context/rocrate/isa_factor_context.py +74 -0
- arctrl/py/Json/context/rocrate/isa_factor_value_context.py +84 -0
- arctrl/py/Json/context/rocrate/isa_investigation_context.py +110 -0
- arctrl/py/Json/context/rocrate/isa_material_attribute_context.py +64 -0
- arctrl/py/Json/context/rocrate/isa_material_attribute_value_context.py +80 -0
- arctrl/py/Json/context/rocrate/isa_material_context.py +71 -0
- arctrl/py/Json/context/rocrate/isa_ontology_annotation_context.py +68 -0
- arctrl/py/Json/context/rocrate/isa_ontology_source_reference_context.py +75 -0
- arctrl/py/Json/context/rocrate/isa_organization_context.py +55 -0
- arctrl/py/Json/context/rocrate/isa_person_context.py +131 -0
- arctrl/py/Json/context/rocrate/isa_process_context.py +94 -0
- arctrl/py/Json/context/rocrate/isa_process_parameter_value_context.py +80 -0
- arctrl/py/Json/context/rocrate/isa_protocol_context.py +97 -0
- arctrl/py/Json/context/rocrate/isa_protocol_parameter_context.py +64 -0
- arctrl/py/Json/context/rocrate/isa_publication_context.py +78 -0
- arctrl/py/Json/context/rocrate/isa_sample_context.py +65 -0
- arctrl/py/Json/context/rocrate/isa_source_context.py +66 -0
- arctrl/py/Json/context/rocrate/isa_study_context.py +125 -0
- arctrl/py/Json/context/rocrate/property_value_context.py +73 -0
- arctrl/py/Json/context/rocrate/rocrate_context.py +81 -0
- arctrl/py/Json/converter_options.py +23 -0
- arctrl/py/Json/data.py +356 -0
- arctrl/py/Json/data_file.py +63 -0
- arctrl/py/Json/decode.py +155 -0
- arctrl/py/Json/encode.py +92 -0
- arctrl/py/Json/idtable.py +44 -0
- arctrl/py/Json/investigation.py +695 -0
- arctrl/py/Json/ontology_annotation.py +404 -0
- arctrl/py/Json/ontology_source_reference.py +255 -0
- arctrl/py/Json/person.py +658 -0
- arctrl/py/Json/property_value.py +359 -0
- arctrl/py/Json/publication.py +279 -0
- arctrl/py/Json/string_table.py +76 -0
- arctrl/py/Json/study.py +793 -0
- arctrl/py/JsonIO/DataMap/__init__.py +0 -0
- arctrl/py/JsonIO/DataMap/data_map.py +53 -0
- arctrl/py/JsonIO/Process/__init__.py +0 -0
- arctrl/py/JsonIO/Process/component.py +60 -0
- arctrl/py/JsonIO/Process/factor.py +36 -0
- arctrl/py/JsonIO/Process/factor_value.py +38 -0
- arctrl/py/JsonIO/Process/material.py +60 -0
- arctrl/py/JsonIO/Process/material_attribute.py +38 -0
- arctrl/py/JsonIO/Process/material_attribute_value.py +60 -0
- arctrl/py/JsonIO/Process/material_type.py +36 -0
- arctrl/py/JsonIO/Process/process.py +60 -0
- arctrl/py/JsonIO/Process/process_input.py +38 -0
- arctrl/py/JsonIO/Process/process_output.py +60 -0
- arctrl/py/JsonIO/Process/process_parameter_value.py +60 -0
- arctrl/py/JsonIO/Process/process_sequence.py +71 -0
- arctrl/py/JsonIO/Process/protocol.py +60 -0
- arctrl/py/JsonIO/Process/protocol_parameter.py +36 -0
- arctrl/py/JsonIO/Process/sample.py +60 -0
- arctrl/py/JsonIO/Process/source.py +60 -0
- arctrl/py/JsonIO/Process/study_materials.py +52 -0
- arctrl/py/JsonIO/Process/value.py +32 -0
- arctrl/py/JsonIO/Table/__init__.py +0 -0
- arctrl/py/JsonIO/Table/arc_table.py +121 -0
- arctrl/py/JsonIO/Table/composite_cell.py +36 -0
- arctrl/py/JsonIO/Table/composite_header.py +36 -0
- arctrl/py/JsonIO/Table/compression.py +85 -0
- arctrl/py/JsonIO/Table/iotype.py +36 -0
- arctrl/py/JsonIO/Table/templates.py +113 -0
- arctrl/py/JsonIO/__init__.py +0 -0
- arctrl/py/JsonIO/assay.py +113 -0
- arctrl/py/JsonIO/comment.py +80 -0
- arctrl/py/JsonIO/data.py +60 -0
- arctrl/py/JsonIO/data_file.py +58 -0
- arctrl/py/JsonIO/decode.py +9 -0
- arctrl/py/JsonIO/encode.py +1 -0
- arctrl/py/JsonIO/investigation.py +113 -0
- arctrl/py/JsonIO/ldobject.py +106 -0
- arctrl/py/JsonIO/ontology_annotation.py +80 -0
- arctrl/py/JsonIO/ontology_source_reference.py +80 -0
- arctrl/py/JsonIO/person.py +82 -0
- arctrl/py/JsonIO/publication.py +82 -0
- arctrl/py/JsonIO/study.py +114 -0
- arctrl/py/ROCrate/Generic/__init__.py +0 -0
- arctrl/py/ROCrate/Generic/comment.py +131 -0
- arctrl/py/ROCrate/Generic/dataset.py +817 -0
- arctrl/py/ROCrate/Generic/defined_term.py +131 -0
- arctrl/py/ROCrate/Generic/file.py +237 -0
- arctrl/py/ROCrate/Generic/lab_process.py +324 -0
- arctrl/py/ROCrate/Generic/lab_protocol.py +338 -0
- arctrl/py/ROCrate/Generic/organization.py +83 -0
- arctrl/py/ROCrate/Generic/person.py +484 -0
- arctrl/py/ROCrate/Generic/postal_address.py +195 -0
- arctrl/py/ROCrate/Generic/property_value.py +696 -0
- arctrl/py/ROCrate/Generic/sample.py +202 -0
- arctrl/py/ROCrate/Generic/scholarly_article.py +229 -0
- arctrl/py/ROCrate/ISAProfile/__init__.py +0 -0
- arctrl/py/ROCrate/ISAProfile/assay.py +70 -0
- arctrl/py/ROCrate/ISAProfile/data.py +65 -0
- arctrl/py/ROCrate/ISAProfile/dataset.py +24 -0
- arctrl/py/ROCrate/ISAProfile/investigation.py +73 -0
- arctrl/py/ROCrate/ISAProfile/lab_process.py +162 -0
- arctrl/py/ROCrate/ISAProfile/lab_protocol.py +37 -0
- arctrl/py/ROCrate/ISAProfile/person.py +72 -0
- arctrl/py/ROCrate/ISAProfile/property_value.py +98 -0
- arctrl/py/ROCrate/ISAProfile/sample.py +64 -0
- arctrl/py/ROCrate/ISAProfile/scholarly_article.py +98 -0
- arctrl/py/ROCrate/ISAProfile/study.py +74 -0
- arctrl/py/ROCrate/__init__.py +0 -0
- arctrl/py/ROCrate/arc_rocrate_metadata.py +39 -0
- arctrl/py/ROCrate/dyn_obj_extensions.py +1 -0
- arctrl/py/ROCrate/helper.py +8 -0
- arctrl/py/ROCrate/ldcontext.py +362 -0
- arctrl/py/ROCrate/ldobject.py +1247 -0
- arctrl/py/ROCrate/rocrate_context.py +51 -0
- arctrl/py/Spreadsheet/AnnotationTable/__init__.py +0 -0
- arctrl/py/Spreadsheet/AnnotationTable/arc_table.py +193 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_cell.py +78 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_column.py +210 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_header.py +623 -0
- arctrl/py/Spreadsheet/DataMapTable/__init__.py +0 -0
- arctrl/py/Spreadsheet/DataMapTable/data_map_column.py +114 -0
- arctrl/py/Spreadsheet/DataMapTable/data_map_header.py +618 -0
- arctrl/py/Spreadsheet/DataMapTable/data_map_table.py +119 -0
- arctrl/py/Spreadsheet/Metadata/__init__.py +0 -0
- arctrl/py/Spreadsheet/Metadata/assays.py +125 -0
- arctrl/py/Spreadsheet/Metadata/comment.py +77 -0
- arctrl/py/Spreadsheet/Metadata/contacts.py +134 -0
- arctrl/py/Spreadsheet/Metadata/conversions.py +190 -0
- arctrl/py/Spreadsheet/Metadata/design_descriptors.py +34 -0
- arctrl/py/Spreadsheet/Metadata/factors.py +107 -0
- arctrl/py/Spreadsheet/Metadata/ontology_annotation.py +88 -0
- arctrl/py/Spreadsheet/Metadata/ontology_source_reference.py +96 -0
- arctrl/py/Spreadsheet/Metadata/protocols.py +146 -0
- arctrl/py/Spreadsheet/Metadata/publication.py +122 -0
- arctrl/py/Spreadsheet/Metadata/run.py +122 -0
- arctrl/py/Spreadsheet/Metadata/sparse_table.py +508 -0
- arctrl/py/Spreadsheet/Metadata/study.py +312 -0
- arctrl/py/Spreadsheet/Metadata/workflow.py +151 -0
- arctrl/py/Spreadsheet/__init__.py +0 -0
- arctrl/py/Spreadsheet/arc_assay.py +233 -0
- arctrl/py/Spreadsheet/arc_investigation.py +418 -0
- arctrl/py/Spreadsheet/arc_run.py +190 -0
- arctrl/py/Spreadsheet/arc_study.py +144 -0
- arctrl/py/Spreadsheet/arc_workflow.py +176 -0
- arctrl/py/Spreadsheet/assembly_info.py +1 -0
- arctrl/py/Spreadsheet/collection_aux.py +167 -0
- arctrl/py/Spreadsheet/data_map.py +44 -0
- arctrl/py/Spreadsheet/template.py +460 -0
- arctrl/py/ValidationPackages/__init__.py +0 -0
- arctrl/py/ValidationPackages/validation_package.py +82 -0
- arctrl/py/ValidationPackages/validation_packages_config.py +132 -0
- arctrl/py/WebRequest/__init__.py +0 -0
- arctrl/py/WebRequest/web_request.py +9 -0
- arctrl/py/WebRequest/web_request_py.py +135 -0
- arctrl/py/Yaml/__init__.py +0 -0
- arctrl/py/Yaml/decode.py +1 -0
- arctrl/py/Yaml/encode.py +10 -0
- arctrl/py/Yaml/validation_package.py +77 -0
- arctrl/py/Yaml/validation_packages_config.py +86 -0
- arctrl/py/__init__.py +0 -0
- arctrl/py/arc.py +1400 -0
- arctrl/py/column_index.py +280 -0
- arctrl/py/conversion.py +2184 -0
- arctrl/py/cross_async.py +76 -0
- arctrl/py/fable_modules/dynamic_obj/__init__.py +0 -0
- arctrl/py/fable_modules/dynamic_obj/dyn_obj.py +136 -0
- arctrl/py/fable_modules/dynamic_obj/dynamic_obj.py +415 -0
- arctrl/py/fable_modules/dynamic_obj/fable_js.py +1 -0
- arctrl/py/fable_modules/dynamic_obj/fable_py.py +288 -0
- arctrl/py/fable_modules/dynamic_obj/hash_codes.py +82 -0
- arctrl/py/fable_modules/dynamic_obj/property_helper.py +25 -0
- arctrl/py/fable_modules/dynamic_obj/reflection_utils.py +87 -0
- arctrl/py/fable_modules/fable_library/__init__.py +0 -0
- arctrl/py/fable_modules/fable_library/array_.py +1528 -0
- arctrl/py/fable_modules/fable_library/async_.py +377 -0
- arctrl/py/fable_modules/fable_library/async_builder.py +379 -0
- arctrl/py/fable_modules/fable_library/big_int.py +330 -0
- arctrl/py/fable_modules/fable_library/bit_converter.py +131 -0
- arctrl/py/fable_modules/fable_library/boolean.py +26 -0
- arctrl/py/fable_modules/fable_library/char.py +237 -0
- arctrl/py/fable_modules/fable_library/choice.py +212 -0
- arctrl/py/fable_modules/fable_library/date.py +779 -0
- arctrl/py/fable_modules/fable_library/date_offset.py +79 -0
- arctrl/py/fable_modules/fable_library/decimal_.py +190 -0
- arctrl/py/fable_modules/fable_library/diagnostics.py +54 -0
- arctrl/py/fable_modules/fable_library/double.py +87 -0
- arctrl/py/fable_modules/fable_library/encoding.py +41 -0
- arctrl/py/fable_modules/fable_library/event.py +206 -0
- arctrl/py/fable_modules/fable_library/file.py +107 -0
- arctrl/py/fable_modules/fable_library/fsharp_collections.py +52 -0
- arctrl/py/fable_modules/fable_library/fsharp_core.py +123 -0
- arctrl/py/fable_modules/fable_library/global_.py +63 -0
- arctrl/py/fable_modules/fable_library/guid.py +41 -0
- arctrl/py/fable_modules/fable_library/int32.py +73 -0
- arctrl/py/fable_modules/fable_library/list.py +1788 -0
- arctrl/py/fable_modules/fable_library/long.py +240 -0
- arctrl/py/fable_modules/fable_library/mailbox_processor.py +179 -0
- arctrl/py/fable_modules/fable_library/map.py +1854 -0
- arctrl/py/fable_modules/fable_library/map_util.py +148 -0
- arctrl/py/fable_modules/fable_library/mutable_map.py +397 -0
- arctrl/py/fable_modules/fable_library/mutable_set.py +279 -0
- arctrl/py/fable_modules/fable_library/native.py +45 -0
- arctrl/py/fable_modules/fable_library/numeric.py +46 -0
- arctrl/py/fable_modules/fable_library/observable.py +222 -0
- arctrl/py/fable_modules/fable_library/option.py +128 -0
- arctrl/py/fable_modules/fable_library/path.py +62 -0
- arctrl/py/fable_modules/fable_library/range.py +117 -0
- arctrl/py/fable_modules/fable_library/reflection.py +463 -0
- arctrl/py/fable_modules/fable_library/reg_exp.py +137 -0
- arctrl/py/fable_modules/fable_library/resize_array.py +31 -0
- arctrl/py/fable_modules/fable_library/result.py +212 -0
- arctrl/py/fable_modules/fable_library/seq.py +1979 -0
- arctrl/py/fable_modules/fable_library/seq2.py +221 -0
- arctrl/py/fable_modules/fable_library/set.py +2414 -0
- arctrl/py/fable_modules/fable_library/singleton_local_time_zone.py +36 -0
- arctrl/py/fable_modules/fable_library/string_.py +573 -0
- arctrl/py/fable_modules/fable_library/system_collections_generic.py +462 -0
- arctrl/py/fable_modules/fable_library/system_text.py +237 -0
- arctrl/py/fable_modules/fable_library/task.py +116 -0
- arctrl/py/fable_modules/fable_library/task_builder.py +122 -0
- arctrl/py/fable_modules/fable_library/thread.py +5 -0
- arctrl/py/fable_modules/fable_library/time_span.py +283 -0
- arctrl/py/fable_modules/fable_library/timer.py +24 -0
- arctrl/py/fable_modules/fable_library/types.py +401 -0
- arctrl/py/fable_modules/fable_library/uri.py +109 -0
- arctrl/py/fable_modules/fable_library/util.py +2735 -0
- arctrl/py/fable_modules/fable_openpyxl/__init__.py +0 -0
- arctrl/py/fable_modules/fable_openpyxl/openpyxl.py +362 -0
- arctrl/py/fable_modules/fable_python/cognite-sdk/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/cognite-sdk/cognite_sdk.py +22 -0
- arctrl/py/fable_modules/fable_python/flask/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/flask/flask.py +34 -0
- arctrl/py/fable_modules/fable_python/jupyter/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/jupyter/ipy_widgets.py +47 -0
- arctrl/py/fable_modules/fable_python/jupyter/ipython.py +13 -0
- arctrl/py/fable_modules/fable_python/stdlib/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/stdlib/ast.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/events.py +17 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/futures.py +52 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/tasks.py +38 -0
- arctrl/py/fable_modules/fable_python/stdlib/base64_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/builtins_.py +38 -0
- arctrl/py/fable_modules/fable_python/stdlib/html.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/json.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/math_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/os_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/queue_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/string_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/sys_.py +30 -0
- arctrl/py/fable_modules/fable_python/stdlib/time_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/tk_inter.py +1 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cell.py +338 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cells_collection.py +469 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/cell_builder.py +214 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/column_builder.py +139 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/dsl.py +50 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/expression.py +65 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/operators.py +9 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/row_builder.py +139 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/sheet_builder.py +118 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/table_builder.py +122 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/transform.py +464 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/types.py +314 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/workbook_builder.py +106 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/cell.py +103 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/column.py +70 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/row.py +70 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/table.py +57 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/value.py +93 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/workbook.py +71 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/worksheet.py +217 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range.py +47 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_address.py +186 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_base.py +90 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_column.py +78 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_row.py +48 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table.py +393 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_field.py +127 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_row.py +23 -0
- arctrl/py/fable_modules/fs_spreadsheet/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_address.py +218 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_column.py +172 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_row.py +183 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_workbook.py +180 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_worksheet.py +600 -0
- arctrl/py/fable_modules/fs_spreadsheet/sheet_builder.py +330 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/cell.py +63 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/cell_type.py +50 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/fs_extension.py +60 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/json.py +47 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/table.py +53 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/workbook.py +40 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/worksheet.py +54 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/xlsx.py +37 -0
- arctrl/py/fable_modules/thoth_json_core/__init__.py +0 -0
- arctrl/py/fable_modules/thoth_json_core/decode.py +1588 -0
- arctrl/py/fable_modules/thoth_json_core/encode.py +261 -0
- arctrl/py/fable_modules/thoth_json_core/types.py +181 -0
- arctrl/py/fable_modules/thoth_json_python/__init__.py +0 -0
- arctrl/py/fable_modules/thoth_json_python/decode.py +112 -0
- arctrl/py/fable_modules/thoth_json_python/encode.py +72 -0
- arctrl/py/fable_modules/thoth_json_python/python.py +1 -0
- arctrl/py/fable_modules/yamlicious/Interop/__init__.py +0 -0
- arctrl/py/fable_modules/yamlicious/Interop/js_interop.py +1 -0
- arctrl/py/fable_modules/yamlicious/Interop/py_interop.py +7 -0
- arctrl/py/fable_modules/yamlicious/__init__.py +0 -0
- arctrl/py/fable_modules/yamlicious/decode.py +1784 -0
- arctrl/py/fable_modules/yamlicious/encode.py +84 -0
- arctrl/py/fable_modules/yamlicious/library.py +10 -0
- arctrl/py/fable_modules/yamlicious/persil.py +57 -0
- arctrl/py/fable_modules/yamlicious/preprocessing.py +99 -0
- arctrl/py/fable_modules/yamlicious/reader.py +665 -0
- arctrl/py/fable_modules/yamlicious/regex.py +21 -0
- arctrl/py/fable_modules/yamlicious/regex_active_patterns.py +256 -0
- arctrl/py/fable_modules/yamlicious/writer.py +175 -0
- arctrl/py/fable_modules/yamlicious/yamlicious_types.py +128 -0
- arctrl/py/json.py +213 -0
- arctrl/py/rocrate_io.py +72 -0
- arctrl/py/template_web.py +23 -0
- arctrl/py/xlsx.py +148 -0
- arctrl/rocrate.py +21 -0
- arctrl-3.0.0a3.dist-info/LICENSE +21 -0
- arctrl-3.0.0a3.dist-info/METADATA +119 -0
- arctrl-3.0.0a3.dist-info/RECORD +456 -0
- arctrl-3.0.0a3.dist-info/WHEEL +4 -0
arctrl/py/arc.py
ADDED
|
@@ -0,0 +1,1400 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from typing import Any
|
|
4
|
+
from .Contract.arc import try_isaread_contract_from_path
|
|
5
|
+
from .Contract.arc_assay import (ARCtrl_ArcAssay__ArcAssay_ToDeleteContract, ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49, ARCtrl_ArcAssay__ArcAssay_ToUpdateContract, ARCtrl_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F)
|
|
6
|
+
from .Contract.arc_investigation import (ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract, ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F)
|
|
7
|
+
from .Contract.arc_run import (ARCtrl_ArcRun__ArcRun_ToCreateContract_6FCE9E49, ARCtrl_ArcRun__ArcRun_ToUpdateContract, ARCtrl_ArcRun__ArcRun_tryFromReadContract_Static_7570923F)
|
|
8
|
+
from .Contract.arc_study import (ARCtrl_ArcStudy__ArcStudy_ToUpdateContract, ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49, ARCtrl_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F)
|
|
9
|
+
from .Contract.arc_workflow import (ARCtrl_ArcWorkflow__ArcWorkflow_ToCreateContract_6FCE9E49, ARCtrl_ArcWorkflow__ArcWorkflow_ToUpdateContract, ARCtrl_ArcWorkflow__ArcWorkflow_tryFromReadContract_Static_7570923F)
|
|
10
|
+
from .Contract.contract import (Contract, DTOType, DTO)
|
|
11
|
+
from .Contract.datamap import (ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForWorkflow_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForWorkflow_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForRun_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForRun_Z721C83C5, ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static, ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static, ARCtrl_DataMap__DataMap_tryFromReadContractForWorkflow_Static, ARCtrl_DataMap__DataMap_tryFromReadContractForRun_Static)
|
|
12
|
+
from .Contract.git import (Init_createInitContract_6DFDD678, gitattributes_contract, gitignore_contract, Init_createAddRemoteContract_Z721C83C5, Clone_createCloneContract_5000466F)
|
|
13
|
+
from .Contract.validation_packages_config import (ValidationPackagesConfigHelper_ConfigFilePath, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toCreateContract_Static_724DAE55, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toDeleteContract_Static_724DAE55, ValidationPackagesConfigHelper_ReadContract, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_tryFromReadContract_Static_7570923F)
|
|
14
|
+
from .Core.arc_types import (ArcInvestigation, ArcAssay, ArcStudy, ArcWorkflow, ArcRun, ArcWorkflow__get_Identifier, ArcWorkflow__get_DataMap, ArcWorkflow__set_DataMap_51F1E59E, ArcWorkflow__set_StaticHash_Z524259A4, ArcWorkflow__GetLightHashCode, ArcWorkflow__get_StaticHash, ArcWorkflow__Copy_6FCE9E49, ArcInvestigation_reflection)
|
|
15
|
+
from .Core.comment import (Comment, Remark)
|
|
16
|
+
from .Core.data import Data
|
|
17
|
+
from .Core.data_context import DataContext
|
|
18
|
+
from .Core.data_map import (DataMap__get_DataContexts, DataMap, DataMap__set_StaticHash_Z524259A4, DataMap__get_StaticHash)
|
|
19
|
+
from .Core.Helper.collections_ import ResizeArray_map
|
|
20
|
+
from .Core.Helper.identifier import (create_missing_identifier, Study_fileNameFromIdentifier, Study_datamapFileNameFromIdentifier, Assay_fileNameFromIdentifier, Assay_datamapFileNameFromIdentifier, Workflow_fileNameFromIdentifier, Workflow_datamapFileNameFromIdentifier, Run_fileNameFromIdentifier, Run_datamapFileNameFromIdentifier)
|
|
21
|
+
from .Core.identifier_setters import set_investigation_identifier
|
|
22
|
+
from .Core.ontology_source_reference import OntologySourceReference
|
|
23
|
+
from .Core.person import Person
|
|
24
|
+
from .Core.publication import Publication
|
|
25
|
+
from .Core.Table.arc_table import ArcTable
|
|
26
|
+
from .Core.Table.arc_tables import ArcTables
|
|
27
|
+
from .Core.Table.composite_cell import CompositeCell
|
|
28
|
+
from .Core.Table.composite_column import CompositeColumn
|
|
29
|
+
from .FileSystem.file_system import FileSystem
|
|
30
|
+
from .FileSystem.file_system_tree import FileSystemTree
|
|
31
|
+
from .FileSystem.path import (get_assay_folder_path, get_study_folder_path)
|
|
32
|
+
from .Json.encode import default_spaces
|
|
33
|
+
from .Spreadsheet.arc_assay import ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F
|
|
34
|
+
from .Spreadsheet.arc_investigation import ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF
|
|
35
|
+
from .Spreadsheet.arc_run import ARCtrl_ArcRun__ArcRun_toFsWorkbook_Static_Z3EFAF6F8
|
|
36
|
+
from .Spreadsheet.arc_study import ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522
|
|
37
|
+
from .Spreadsheet.arc_workflow import ARCtrl_ArcWorkflow__ArcWorkflow_toFsWorkbook_Static_Z1C75CB0E
|
|
38
|
+
from .Spreadsheet.data_map import to_fs_workbook
|
|
39
|
+
from .ValidationPackages.validation_packages_config import ValidationPackagesConfig
|
|
40
|
+
from .ContractIO.contract_io import full_fill_contract_batch_async
|
|
41
|
+
from .ContractIO.file_system_helper import get_all_file_paths_async
|
|
42
|
+
from .fable_modules.thoth_json_python.decode import Decode_fromString
|
|
43
|
+
from .fable_modules.thoth_json_python.encode import to_string
|
|
44
|
+
from .fable_modules.fable_library.array_ import (filter, map as map_1, iterate, choose, exists, fold, concat, contains as contains_2, append as append_1, try_pick, exactly_one)
|
|
45
|
+
from .fable_modules.fable_library.async_ import run_synchronously
|
|
46
|
+
from .fable_modules.fable_library.async_builder import (Async, singleton)
|
|
47
|
+
from .fable_modules.fable_library.list import FSharpList
|
|
48
|
+
from .fable_modules.fable_library.map import of_seq as of_seq_1
|
|
49
|
+
from .fable_modules.fable_library.map_util import add_to_dict
|
|
50
|
+
from .fable_modules.fable_library.option import (value as value_3, default_arg, bind)
|
|
51
|
+
from .fable_modules.fable_library.reflection import (TypeInfo, class_type)
|
|
52
|
+
from .fable_modules.fable_library.result import FSharpResult_2
|
|
53
|
+
from .fable_modules.fable_library.seq import (to_array, contains, delay, append, singleton as singleton_1, map, iterate as iterate_1, try_find, find, empty, collect, to_list)
|
|
54
|
+
from .fable_modules.fable_library.set import (of_seq, contains as contains_1, union_many, FSharpSet__Contains)
|
|
55
|
+
from .fable_modules.fable_library.string_ import (starts_with_exact, replace, join, to_fail, printf, to_text)
|
|
56
|
+
from .fable_modules.fable_library.types import (Array, FSharpRef)
|
|
57
|
+
from .fable_modules.fable_library.util import (string_hash, IEnumerable_1, compare_primitives, curry2, ignore, safe_hash, get_enumerator, dispose, to_enumerable)
|
|
58
|
+
from .fable_modules.fs_spreadsheet.Cells.fs_cells_collection import Dictionary_tryGet
|
|
59
|
+
from .fable_modules.fs_spreadsheet.fs_workbook import FsWorkbook
|
|
60
|
+
from .fable_modules.thoth_json_core.types import IEncodable
|
|
61
|
+
from .rocrate_io import (ROCrate_get_decoderDeprecated, ROCrate_get_decoder, ROCrate_encoder_8A8D439)
|
|
62
|
+
|
|
63
|
+
def _expr3867() -> TypeInfo:
|
|
64
|
+
return class_type("ARCtrl.ARC", None, ARC, ArcInvestigation_reflection())
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class ARC(ArcInvestigation):
|
|
68
|
+
def __init__(self, identifier: str, title: str | None=None, description: str | None=None, submission_date: str | None=None, public_release_date: str | None=None, ontology_source_references: Array[OntologySourceReference] | None=None, publications: Array[Publication] | None=None, contacts: Array[Person] | None=None, assays: Array[ArcAssay] | None=None, studies: Array[ArcStudy] | None=None, workflows: Array[ArcWorkflow] | None=None, runs: Array[ArcRun] | None=None, registered_study_identifiers: Array[str] | None=None, comments: Array[Comment] | None=None, remarks: Array[Remark] | None=None, cwl: None | None=None, fs: FileSystem | None=None) -> None:
|
|
69
|
+
super().__init__(identifier, title, description, submission_date, public_release_date, ontology_source_references, publications, contacts, assays, studies, workflows, runs, registered_study_identifiers, comments, remarks)
|
|
70
|
+
this: FSharpRef[ARC] = FSharpRef(None)
|
|
71
|
+
this.contents = self
|
|
72
|
+
self._cwl: None | None = cwl
|
|
73
|
+
def _arrow3866(__unit: None=None) -> FileSystem:
|
|
74
|
+
fs_1: FileSystem = default_arg(fs, FileSystem.create(tree = FileSystemTree(1, "", [])))
|
|
75
|
+
return ARCAux_updateFSByISA(this.contents, fs_1)
|
|
76
|
+
|
|
77
|
+
self._fs: FileSystem = _arrow3866()
|
|
78
|
+
self.init_004089: int = 1
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def FileSystem(self, __unit: None=None) -> FileSystem:
|
|
82
|
+
this: ARC = self
|
|
83
|
+
return this._fs
|
|
84
|
+
|
|
85
|
+
@FileSystem.setter
|
|
86
|
+
def FileSystem(self, fs: FileSystem) -> None:
|
|
87
|
+
this: ARC = self
|
|
88
|
+
this._fs = fs
|
|
89
|
+
|
|
90
|
+
@staticmethod
|
|
91
|
+
def from_arc_investigation(isa: ArcInvestigation, cwl: None | None=None, fs: FileSystem | None=None) -> ARC:
|
|
92
|
+
return ARC(isa.Identifier, isa.Title, isa.Description, isa.SubmissionDate, isa.PublicReleaseDate, isa.OntologySourceReferences, isa.Publications, isa.Contacts, isa.Assays, isa.Studies, isa.Workflows, isa.Runs, isa.RegisteredStudyIdentifiers, isa.Comments, isa.Remarks, cwl, fs)
|
|
93
|
+
|
|
94
|
+
def TryWriteAsync(self, arc_path: str) -> Async[FSharpResult_2[Array[Contract], Array[str]]]:
|
|
95
|
+
this: ARC = self
|
|
96
|
+
return full_fill_contract_batch_async(arc_path, this.GetWriteContracts())
|
|
97
|
+
|
|
98
|
+
def TryUpdateAsync(self, arc_path: str) -> Async[FSharpResult_2[Array[Contract], Array[str]]]:
|
|
99
|
+
this: ARC = self
|
|
100
|
+
return full_fill_contract_batch_async(arc_path, this.GetUpdateContracts())
|
|
101
|
+
|
|
102
|
+
@staticmethod
|
|
103
|
+
def try_load_async(arc_path: str) -> Async[FSharpResult_2[ARC, Array[str]]]:
|
|
104
|
+
def _arrow3774(__unit: None=None) -> Async[FSharpResult_2[ARC, Array[str]]]:
|
|
105
|
+
def _arrow3773(_arg: Array[str]) -> Async[FSharpResult_2[ARC, Array[str]]]:
|
|
106
|
+
arc: ARC = ARC.from_file_paths(to_array(_arg))
|
|
107
|
+
contracts: Array[Contract] = arc.GetReadContracts()
|
|
108
|
+
def _arrow3772(_arg_1: FSharpResult_2[Array[Contract], Array[str]]) -> Async[FSharpResult_2[ARC, Array[str]]]:
|
|
109
|
+
ful_filled_contracts: FSharpResult_2[Array[Contract], Array[str]] = _arg_1
|
|
110
|
+
if ful_filled_contracts.tag == 1:
|
|
111
|
+
return singleton.Return(FSharpResult_2(1, ful_filled_contracts.fields[0]))
|
|
112
|
+
|
|
113
|
+
else:
|
|
114
|
+
arc.SetISAFromContracts(ful_filled_contracts.fields[0])
|
|
115
|
+
return singleton.Return(FSharpResult_2(0, arc))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
return singleton.Bind(full_fill_contract_batch_async(arc_path, contracts), _arrow3772)
|
|
119
|
+
|
|
120
|
+
return singleton.Bind(get_all_file_paths_async(arc_path), _arrow3773)
|
|
121
|
+
|
|
122
|
+
return singleton.Delay(_arrow3774)
|
|
123
|
+
|
|
124
|
+
def GetAssayRemoveContracts(self, assay_identifier: str) -> Array[Contract]:
|
|
125
|
+
this: ARC = self
|
|
126
|
+
class ObjectExpr3776:
|
|
127
|
+
@property
|
|
128
|
+
def Equals(self) -> Callable[[str, str], bool]:
|
|
129
|
+
def _arrow3775(x: str, y: str) -> bool:
|
|
130
|
+
return x == y
|
|
131
|
+
|
|
132
|
+
return _arrow3775
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def GetHashCode(self) -> Callable[[str], int]:
|
|
136
|
+
return string_hash
|
|
137
|
+
|
|
138
|
+
if not contains(assay_identifier, this.AssayIdentifiers, ObjectExpr3776()):
|
|
139
|
+
raise Exception("ARC does not contain assay with given name")
|
|
140
|
+
|
|
141
|
+
assay: ArcAssay = this.GetAssay(assay_identifier)
|
|
142
|
+
studies: Array[ArcStudy] = assay.StudiesRegisteredIn
|
|
143
|
+
super().RemoveAssay(assay_identifier)
|
|
144
|
+
paths: Array[str] = this.FileSystem.Tree.ToFilePaths()
|
|
145
|
+
assay_folder_path: str = get_assay_folder_path(assay_identifier)
|
|
146
|
+
def predicate(p: str) -> bool:
|
|
147
|
+
return not starts_with_exact(p, assay_folder_path)
|
|
148
|
+
|
|
149
|
+
filtered_paths: Array[str] = filter(predicate, paths)
|
|
150
|
+
this.SetFilePaths(filtered_paths)
|
|
151
|
+
def _arrow3779(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
152
|
+
def _arrow3778(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
153
|
+
def _arrow3777(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
154
|
+
return map(ARCtrl_ArcStudy__ArcStudy_ToUpdateContract, studies)
|
|
155
|
+
|
|
156
|
+
return append(singleton_1(ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract(this)), delay(_arrow3777))
|
|
157
|
+
|
|
158
|
+
return append(singleton_1(ARCtrl_ArcAssay__ArcAssay_ToDeleteContract(assay)), delay(_arrow3778))
|
|
159
|
+
|
|
160
|
+
return to_array(delay(_arrow3779))
|
|
161
|
+
|
|
162
|
+
def TryRemoveAssayAsync(self, arc_path: str, assay_identifier: str) -> Async[FSharpResult_2[Array[Contract], Array[str]]]:
|
|
163
|
+
this: ARC = self
|
|
164
|
+
return full_fill_contract_batch_async(arc_path, this.GetAssayRemoveContracts(assay_identifier))
|
|
165
|
+
|
|
166
|
+
def GetAssayRenameContracts(self, old_assay_identifier: str, new_assay_identifier: str) -> Array[Contract]:
|
|
167
|
+
this: ARC = self
|
|
168
|
+
class ObjectExpr3781:
|
|
169
|
+
@property
|
|
170
|
+
def Equals(self) -> Callable[[str, str], bool]:
|
|
171
|
+
def _arrow3780(x: str, y: str) -> bool:
|
|
172
|
+
return x == y
|
|
173
|
+
|
|
174
|
+
return _arrow3780
|
|
175
|
+
|
|
176
|
+
@property
|
|
177
|
+
def GetHashCode(self) -> Callable[[str], int]:
|
|
178
|
+
return string_hash
|
|
179
|
+
|
|
180
|
+
if not contains(old_assay_identifier, this.AssayIdentifiers, ObjectExpr3781()):
|
|
181
|
+
raise Exception("ARC does not contain assay with given name")
|
|
182
|
+
|
|
183
|
+
super().RenameAssay(old_assay_identifier, new_assay_identifier)
|
|
184
|
+
paths: Array[str] = this.FileSystem.Tree.ToFilePaths()
|
|
185
|
+
old_assay_folder_path: str = get_assay_folder_path(old_assay_identifier)
|
|
186
|
+
new_assay_folder_path: str = get_assay_folder_path(new_assay_identifier)
|
|
187
|
+
def mapping(p: str) -> str:
|
|
188
|
+
return replace(p, old_assay_folder_path, new_assay_folder_path)
|
|
189
|
+
|
|
190
|
+
renamed_paths: Array[str] = map_1(mapping, paths, None)
|
|
191
|
+
this.SetFilePaths(renamed_paths)
|
|
192
|
+
def _arrow3783(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
193
|
+
def _arrow3782(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
194
|
+
return this.GetUpdateContracts()
|
|
195
|
+
|
|
196
|
+
return append(singleton_1(Contract.create_rename(old_assay_folder_path, new_assay_folder_path)), delay(_arrow3782))
|
|
197
|
+
|
|
198
|
+
return to_array(delay(_arrow3783))
|
|
199
|
+
|
|
200
|
+
def TryRenameAssayAsync(self, arc_path: str, old_assay_identifier: str, new_assay_identifier: str) -> Async[FSharpResult_2[Array[Contract], Array[str]]]:
|
|
201
|
+
this: ARC = self
|
|
202
|
+
return full_fill_contract_batch_async(arc_path, this.GetAssayRenameContracts(old_assay_identifier, new_assay_identifier))
|
|
203
|
+
|
|
204
|
+
def GetStudyRemoveContracts(self, study_identifier: str) -> Array[Contract]:
|
|
205
|
+
this: ARC = self
|
|
206
|
+
super().RemoveStudy(study_identifier)
|
|
207
|
+
paths: Array[str] = this.FileSystem.Tree.ToFilePaths()
|
|
208
|
+
study_folder_path: str = get_study_folder_path(study_identifier)
|
|
209
|
+
def predicate(p: str) -> bool:
|
|
210
|
+
return not starts_with_exact(p, study_folder_path)
|
|
211
|
+
|
|
212
|
+
filtered_paths: Array[str] = filter(predicate, paths)
|
|
213
|
+
this.SetFilePaths(filtered_paths)
|
|
214
|
+
return [Contract.create_delete(study_folder_path), ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract(this)]
|
|
215
|
+
|
|
216
|
+
def TryRemoveStudyAsync(self, arc_path: str, study_identifier: str) -> Async[FSharpResult_2[Array[Contract], Array[str]]]:
|
|
217
|
+
this: ARC = self
|
|
218
|
+
return full_fill_contract_batch_async(arc_path, this.GetStudyRemoveContracts(study_identifier))
|
|
219
|
+
|
|
220
|
+
def GetStudyRenameContracts(self, old_study_identifier: str, new_study_identifier: str) -> Array[Contract]:
|
|
221
|
+
this: ARC = self
|
|
222
|
+
class ObjectExpr3785:
|
|
223
|
+
@property
|
|
224
|
+
def Equals(self) -> Callable[[str, str], bool]:
|
|
225
|
+
def _arrow3784(x: str, y: str) -> bool:
|
|
226
|
+
return x == y
|
|
227
|
+
|
|
228
|
+
return _arrow3784
|
|
229
|
+
|
|
230
|
+
@property
|
|
231
|
+
def GetHashCode(self) -> Callable[[str], int]:
|
|
232
|
+
return string_hash
|
|
233
|
+
|
|
234
|
+
if not contains(old_study_identifier, this.StudyIdentifiers, ObjectExpr3785()):
|
|
235
|
+
raise Exception("ARC does not contain study with given name")
|
|
236
|
+
|
|
237
|
+
super().RenameStudy(old_study_identifier, new_study_identifier)
|
|
238
|
+
paths: Array[str] = this.FileSystem.Tree.ToFilePaths()
|
|
239
|
+
old_study_folder_path: str = get_study_folder_path(old_study_identifier)
|
|
240
|
+
new_study_folder_path: str = get_study_folder_path(new_study_identifier)
|
|
241
|
+
def mapping(p: str) -> str:
|
|
242
|
+
return replace(p, old_study_folder_path, new_study_folder_path)
|
|
243
|
+
|
|
244
|
+
renamed_paths: Array[str] = map_1(mapping, paths, None)
|
|
245
|
+
this.SetFilePaths(renamed_paths)
|
|
246
|
+
def _arrow3787(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
247
|
+
def _arrow3786(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
248
|
+
return this.GetUpdateContracts()
|
|
249
|
+
|
|
250
|
+
return append(singleton_1(Contract.create_rename(old_study_folder_path, new_study_folder_path)), delay(_arrow3786))
|
|
251
|
+
|
|
252
|
+
return to_array(delay(_arrow3787))
|
|
253
|
+
|
|
254
|
+
def TryRenameStudyAsync(self, arc_path: str, old_study_identifier: str, new_study_identifier: str) -> Async[FSharpResult_2[Array[Contract], Array[str]]]:
|
|
255
|
+
this: ARC = self
|
|
256
|
+
return full_fill_contract_batch_async(arc_path, this.GetStudyRenameContracts(old_study_identifier, new_study_identifier))
|
|
257
|
+
|
|
258
|
+
def WriteAsync(self, arc_path: str) -> Async[None]:
|
|
259
|
+
this: ARC = self
|
|
260
|
+
def _arrow3789(__unit: None=None) -> Async[None]:
|
|
261
|
+
def _arrow3788(_arg: FSharpResult_2[Array[Contract], Array[str]]) -> Async[None]:
|
|
262
|
+
result: FSharpResult_2[Array[Contract], Array[str]] = _arg
|
|
263
|
+
if result.tag == 1:
|
|
264
|
+
def mapping(e: str) -> str:
|
|
265
|
+
return e
|
|
266
|
+
|
|
267
|
+
appended: str = join("\n", map_1(mapping, result.fields[0], None))
|
|
268
|
+
to_fail(printf("Could not write ARC, failed with the following errors %s"))(appended)
|
|
269
|
+
return singleton.Zero()
|
|
270
|
+
|
|
271
|
+
else:
|
|
272
|
+
return singleton.Zero()
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
return singleton.Bind(this.TryWriteAsync(arc_path), _arrow3788)
|
|
276
|
+
|
|
277
|
+
return singleton.Delay(_arrow3789)
|
|
278
|
+
|
|
279
|
+
def UpdateAsync(self, arc_path: str) -> Async[None]:
|
|
280
|
+
this: ARC = self
|
|
281
|
+
def _arrow3791(__unit: None=None) -> Async[None]:
|
|
282
|
+
def _arrow3790(_arg: FSharpResult_2[Array[Contract], Array[str]]) -> Async[None]:
|
|
283
|
+
result: FSharpResult_2[Array[Contract], Array[str]] = _arg
|
|
284
|
+
if result.tag == 1:
|
|
285
|
+
def mapping(e: str) -> str:
|
|
286
|
+
return e
|
|
287
|
+
|
|
288
|
+
appended: str = join("\n", map_1(mapping, result.fields[0], None))
|
|
289
|
+
to_fail(printf("Could not update ARC, failed with the following errors %s"))(appended)
|
|
290
|
+
return singleton.Zero()
|
|
291
|
+
|
|
292
|
+
else:
|
|
293
|
+
return singleton.Zero()
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
return singleton.Bind(this.TryUpdateAsync(arc_path), _arrow3790)
|
|
297
|
+
|
|
298
|
+
return singleton.Delay(_arrow3791)
|
|
299
|
+
|
|
300
|
+
def RemoveAssayAsync(self, arc_path: str, assay_identifier: str) -> Async[None]:
|
|
301
|
+
this: ARC = self
|
|
302
|
+
def _arrow3793(__unit: None=None) -> Async[None]:
|
|
303
|
+
def _arrow3792(_arg: FSharpResult_2[Array[Contract], Array[str]]) -> Async[None]:
|
|
304
|
+
result: FSharpResult_2[Array[Contract], Array[str]] = _arg
|
|
305
|
+
if result.tag == 1:
|
|
306
|
+
def mapping(e: str) -> str:
|
|
307
|
+
return e
|
|
308
|
+
|
|
309
|
+
appended: str = join("\n", map_1(mapping, result.fields[0], None))
|
|
310
|
+
to_fail(printf("Could not remove assay, failed with the following errors %s"))(appended)
|
|
311
|
+
return singleton.Zero()
|
|
312
|
+
|
|
313
|
+
else:
|
|
314
|
+
return singleton.Zero()
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
return singleton.Bind(this.TryRemoveAssayAsync(arc_path, assay_identifier), _arrow3792)
|
|
318
|
+
|
|
319
|
+
return singleton.Delay(_arrow3793)
|
|
320
|
+
|
|
321
|
+
def RenameAssayAsync(self, arc_path: str, old_assay_identifier: str, new_assay_identifier: str) -> Async[None]:
|
|
322
|
+
this: ARC = self
|
|
323
|
+
def _arrow3795(__unit: None=None) -> Async[None]:
|
|
324
|
+
def _arrow3794(_arg: FSharpResult_2[Array[Contract], Array[str]]) -> Async[None]:
|
|
325
|
+
result: FSharpResult_2[Array[Contract], Array[str]] = _arg
|
|
326
|
+
if result.tag == 1:
|
|
327
|
+
def mapping(e: str) -> str:
|
|
328
|
+
return e
|
|
329
|
+
|
|
330
|
+
appended: str = join("\n", map_1(mapping, result.fields[0], None))
|
|
331
|
+
to_fail(printf("Could not rename assay, failed with the following errors %s"))(appended)
|
|
332
|
+
return singleton.Zero()
|
|
333
|
+
|
|
334
|
+
else:
|
|
335
|
+
return singleton.Zero()
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
return singleton.Bind(this.TryRenameAssayAsync(arc_path, old_assay_identifier, new_assay_identifier), _arrow3794)
|
|
339
|
+
|
|
340
|
+
return singleton.Delay(_arrow3795)
|
|
341
|
+
|
|
342
|
+
def RemoveStudyAsync(self, arc_path: str, study_identifier: str) -> Async[None]:
|
|
343
|
+
this: ARC = self
|
|
344
|
+
def _arrow3797(__unit: None=None) -> Async[None]:
|
|
345
|
+
def _arrow3796(_arg: FSharpResult_2[Array[Contract], Array[str]]) -> Async[None]:
|
|
346
|
+
result: FSharpResult_2[Array[Contract], Array[str]] = _arg
|
|
347
|
+
if result.tag == 1:
|
|
348
|
+
def mapping(e: str) -> str:
|
|
349
|
+
return e
|
|
350
|
+
|
|
351
|
+
appended: str = join("\n", map_1(mapping, result.fields[0], None))
|
|
352
|
+
to_fail(printf("Could not remove study, failed with the following errors %s"))(appended)
|
|
353
|
+
return singleton.Zero()
|
|
354
|
+
|
|
355
|
+
else:
|
|
356
|
+
return singleton.Zero()
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
return singleton.Bind(this.TryRemoveStudyAsync(arc_path, study_identifier), _arrow3796)
|
|
360
|
+
|
|
361
|
+
return singleton.Delay(_arrow3797)
|
|
362
|
+
|
|
363
|
+
def RenameStudyAsync(self, arc_path: str, old_study_identifier: str, new_study_identifier: str) -> Async[None]:
|
|
364
|
+
this: ARC = self
|
|
365
|
+
def _arrow3799(__unit: None=None) -> Async[None]:
|
|
366
|
+
def _arrow3798(_arg: FSharpResult_2[Array[Contract], Array[str]]) -> Async[None]:
|
|
367
|
+
result: FSharpResult_2[Array[Contract], Array[str]] = _arg
|
|
368
|
+
if result.tag == 1:
|
|
369
|
+
def mapping(e: str) -> str:
|
|
370
|
+
return e
|
|
371
|
+
|
|
372
|
+
appended: str = join("\n", map_1(mapping, result.fields[0], None))
|
|
373
|
+
to_fail(printf("Could not rename study, failed with the following errors %s"))(appended)
|
|
374
|
+
return singleton.Zero()
|
|
375
|
+
|
|
376
|
+
else:
|
|
377
|
+
return singleton.Zero()
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
return singleton.Bind(this.TryRenameStudyAsync(arc_path, old_study_identifier, new_study_identifier), _arrow3798)
|
|
381
|
+
|
|
382
|
+
return singleton.Delay(_arrow3799)
|
|
383
|
+
|
|
384
|
+
@staticmethod
|
|
385
|
+
def load_async(arc_path: str) -> Async[ARC]:
|
|
386
|
+
def _arrow3801(__unit: None=None) -> Async[ARC]:
|
|
387
|
+
def _arrow3800(_arg: FSharpResult_2[ARC, Array[str]]) -> Async[ARC]:
|
|
388
|
+
result: FSharpResult_2[ARC, Array[str]] = _arg
|
|
389
|
+
if result.tag == 1:
|
|
390
|
+
def mapping(e: str) -> str:
|
|
391
|
+
return e
|
|
392
|
+
|
|
393
|
+
appended: str = join("\n", map_1(mapping, result.fields[0], None))
|
|
394
|
+
to_fail(printf("Could not load ARC, failed with the following errors %s"))(appended)
|
|
395
|
+
return singleton.Return(ARC(create_missing_identifier()))
|
|
396
|
+
|
|
397
|
+
else:
|
|
398
|
+
return singleton.Return(result.fields[0])
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
return singleton.Bind(ARC.try_load_async(arc_path), _arrow3800)
|
|
402
|
+
|
|
403
|
+
return singleton.Delay(_arrow3801)
|
|
404
|
+
|
|
405
|
+
def Write(self, arc_path: str) -> None:
|
|
406
|
+
this: ARC = self
|
|
407
|
+
run_synchronously(this.WriteAsync(arc_path))
|
|
408
|
+
|
|
409
|
+
def Update(self, arc_path: str) -> None:
|
|
410
|
+
this: ARC = self
|
|
411
|
+
run_synchronously(this.UpdateAsync(arc_path))
|
|
412
|
+
|
|
413
|
+
def RemoveAssay(self, arc_path: str, assay_identifier: str) -> None:
|
|
414
|
+
this: ARC = self
|
|
415
|
+
run_synchronously(this.RemoveAssayAsync(arc_path, assay_identifier))
|
|
416
|
+
|
|
417
|
+
def RenameAssay(self, arc_path: str, old_assay_identifier: str, new_assay_identifier: str) -> None:
|
|
418
|
+
this: ARC = self
|
|
419
|
+
run_synchronously(this.RenameAssayAsync(arc_path, old_assay_identifier, new_assay_identifier))
|
|
420
|
+
|
|
421
|
+
def RemoveStudy(self, arc_path: str, study_identifier: str) -> None:
|
|
422
|
+
this: ARC = self
|
|
423
|
+
run_synchronously(this.RemoveStudyAsync(arc_path, study_identifier))
|
|
424
|
+
|
|
425
|
+
def RenameStudy(self, arc_path: str, old_study_identifier: str, new_study_identifier: str) -> None:
|
|
426
|
+
this: ARC = self
|
|
427
|
+
run_synchronously(this.RenameStudyAsync(arc_path, old_study_identifier, new_study_identifier))
|
|
428
|
+
|
|
429
|
+
@staticmethod
|
|
430
|
+
def load(arc_path: str) -> ARC:
|
|
431
|
+
return run_synchronously(ARC.load_async(arc_path))
|
|
432
|
+
|
|
433
|
+
def MakeDataFilesAbsolute(self, __unit: None=None) -> None:
|
|
434
|
+
this: ARC = self
|
|
435
|
+
class ObjectExpr3802:
|
|
436
|
+
@property
|
|
437
|
+
def Compare(self) -> Callable[[str, str], int]:
|
|
438
|
+
return compare_primitives
|
|
439
|
+
|
|
440
|
+
files_paths: Any = of_seq(this.FileSystem.Tree.ToFilePaths(), ObjectExpr3802())
|
|
441
|
+
def check_existence_from_root(p: str) -> bool:
|
|
442
|
+
return contains_1(p, files_paths)
|
|
443
|
+
|
|
444
|
+
def update_column_option(data_name_function: Callable[[Data], str], col: CompositeColumn | None=None) -> None:
|
|
445
|
+
(pattern_matching_result, col_2) = (None, None)
|
|
446
|
+
if col is not None:
|
|
447
|
+
def _arrow3803(__unit: None=None, data_name_function: Any=data_name_function, col: Any=col) -> bool:
|
|
448
|
+
col_1: CompositeColumn = col
|
|
449
|
+
return col_1.Header.IsDataColumn
|
|
450
|
+
|
|
451
|
+
if _arrow3803():
|
|
452
|
+
pattern_matching_result = 0
|
|
453
|
+
col_2 = col
|
|
454
|
+
|
|
455
|
+
else:
|
|
456
|
+
pattern_matching_result = 1
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
else:
|
|
460
|
+
pattern_matching_result = 1
|
|
461
|
+
|
|
462
|
+
if pattern_matching_result == 0:
|
|
463
|
+
def action(c: CompositeCell, data_name_function: Any=data_name_function, col: Any=col) -> None:
|
|
464
|
+
if c.AsData.FilePath is not None:
|
|
465
|
+
new_file_path: str = data_name_function(c.AsData)
|
|
466
|
+
c.AsData.FilePath = new_file_path
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
iterate(action, col_2.Cells)
|
|
470
|
+
|
|
471
|
+
elif pattern_matching_result == 1:
|
|
472
|
+
pass
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
def update_table(data_name_function_1: Callable[[Data], str], t: ArcTable) -> None:
|
|
476
|
+
update_column_option(data_name_function_1, t.TryGetInputColumn())
|
|
477
|
+
update_column_option(data_name_function_1, t.TryGetOutputColumn())
|
|
478
|
+
|
|
479
|
+
def update_data_map(data_name_function_2: Callable[[Data], str], dm: DataMap) -> None:
|
|
480
|
+
def action_1(c_1: DataContext, data_name_function_2: Any=data_name_function_2, dm: Any=dm) -> None:
|
|
481
|
+
if c_1.FilePath is not None:
|
|
482
|
+
new_file_path_1: str = data_name_function_2(c_1)
|
|
483
|
+
c_1.FilePath = new_file_path_1
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
iterate_1(action_1, DataMap__get_DataContexts(dm))
|
|
487
|
+
|
|
488
|
+
def action_3(s: ArcStudy) -> None:
|
|
489
|
+
def f(d: Data, s: Any=s) -> str:
|
|
490
|
+
return d.GetAbsolutePathForStudy(s.Identifier, check_existence_from_root)
|
|
491
|
+
|
|
492
|
+
source_1: Array[ArcTable] = s.Tables
|
|
493
|
+
iterate_1(curry2(update_table)(f), source_1)
|
|
494
|
+
if s.DataMap is not None:
|
|
495
|
+
update_data_map(f, value_3(s.DataMap))
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
iterate_1(action_3, this.Studies)
|
|
499
|
+
def action_5(a: ArcAssay) -> None:
|
|
500
|
+
def f_1(d_1: Data, a: Any=a) -> str:
|
|
501
|
+
return d_1.GetAbsolutePathForAssay(a.Identifier, check_existence_from_root)
|
|
502
|
+
|
|
503
|
+
source_3: Array[ArcTable] = a.Tables
|
|
504
|
+
iterate_1(curry2(update_table)(f_1), source_3)
|
|
505
|
+
if a.DataMap is not None:
|
|
506
|
+
update_data_map(f_1, value_3(a.DataMap))
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
iterate_1(action_5, this.Assays)
|
|
510
|
+
|
|
511
|
+
@staticmethod
|
|
512
|
+
def from_file_paths(file_paths: Array[str]) -> ARC:
|
|
513
|
+
fs: FileSystem = FileSystem.from_file_paths(file_paths)
|
|
514
|
+
return ARC(create_missing_identifier(), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, fs)
|
|
515
|
+
|
|
516
|
+
def SetFilePaths(self, file_paths: Array[str]) -> None:
|
|
517
|
+
this: ARC = self
|
|
518
|
+
tree: FileSystemTree = FileSystemTree.from_file_paths(file_paths)
|
|
519
|
+
this._fs = FileSystem(tree, this._fs.History)
|
|
520
|
+
|
|
521
|
+
def GetReadContracts(self, __unit: None=None) -> Array[Contract]:
|
|
522
|
+
this: ARC = self
|
|
523
|
+
return choose(try_isaread_contract_from_path, this._fs.Tree.ToFilePaths(), None)
|
|
524
|
+
|
|
525
|
+
def SetISAFromContracts(self, contracts: Array[Contract]) -> None:
|
|
526
|
+
this: ARC = self
|
|
527
|
+
investigation: ArcInvestigation = ARCAux_getArcInvestigationFromContracts(contracts)
|
|
528
|
+
ignore(set_investigation_identifier(investigation.Identifier, this))
|
|
529
|
+
this.Title = investigation.Title
|
|
530
|
+
this.Description = investigation.Description
|
|
531
|
+
this.SubmissionDate = investigation.SubmissionDate
|
|
532
|
+
this.PublicReleaseDate = investigation.PublicReleaseDate
|
|
533
|
+
this.OntologySourceReferences = investigation.OntologySourceReferences
|
|
534
|
+
this.Publications = investigation.Publications
|
|
535
|
+
this.Contacts = investigation.Contacts
|
|
536
|
+
this.Comments = investigation.Comments
|
|
537
|
+
this.Remarks = investigation.Remarks
|
|
538
|
+
this.RegisteredStudyIdentifiers = investigation.RegisteredStudyIdentifiers
|
|
539
|
+
def mapping(tuple: tuple[ArcStudy, FSharpList[ArcAssay]]) -> ArcStudy:
|
|
540
|
+
return tuple[0]
|
|
541
|
+
|
|
542
|
+
studies: Array[ArcStudy] = map_1(mapping, ARCAux_getArcStudiesFromContracts(contracts), None)
|
|
543
|
+
assays: Array[ArcAssay] = ARCAux_getArcAssaysFromContracts(contracts)
|
|
544
|
+
workflows: Array[ArcWorkflow] = ARCAux_getArcWorkflowsFromContracts(contracts)
|
|
545
|
+
runs: Array[ArcRun] = ARCAux_getArcRunsFromContracts(contracts)
|
|
546
|
+
def action(ai: str) -> None:
|
|
547
|
+
def predicate(a: ArcAssay, ai: Any=ai) -> bool:
|
|
548
|
+
return a.Identifier == ai
|
|
549
|
+
|
|
550
|
+
if not exists(predicate, assays):
|
|
551
|
+
this.DeleteAssay(ai)
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
iterate(action, this.AssayIdentifiers)
|
|
555
|
+
def action_1(si: str) -> None:
|
|
556
|
+
def predicate_1(s: ArcStudy, si: Any=si) -> bool:
|
|
557
|
+
return s.Identifier == si
|
|
558
|
+
|
|
559
|
+
if not exists(predicate_1, studies):
|
|
560
|
+
this.DeleteStudy(si)
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
iterate(action_1, this.StudyIdentifiers)
|
|
564
|
+
def action_2(study: ArcStudy) -> None:
|
|
565
|
+
def predicate_2(s_1: ArcStudy, study: Any=study) -> bool:
|
|
566
|
+
return s_1.Identifier == study.Identifier
|
|
567
|
+
|
|
568
|
+
registered_study_opt: ArcStudy | None = try_find(predicate_2, this.Studies)
|
|
569
|
+
if registered_study_opt is None:
|
|
570
|
+
this.AddStudy(study)
|
|
571
|
+
|
|
572
|
+
else:
|
|
573
|
+
registered_study: ArcStudy = registered_study_opt
|
|
574
|
+
registered_study.UpdateReferenceByStudyFile(study, True)
|
|
575
|
+
|
|
576
|
+
datamap: DataMap | None = ARCAux_getAssayDataMapFromContracts(study.Identifier, contracts)
|
|
577
|
+
if study.DataMap is None:
|
|
578
|
+
study.DataMap = datamap
|
|
579
|
+
|
|
580
|
+
study.StaticHash = study.GetLightHashCode() or 0
|
|
581
|
+
|
|
582
|
+
iterate(action_2, studies)
|
|
583
|
+
def action_3(assay: ArcAssay) -> None:
|
|
584
|
+
def predicate_3(a_1: ArcAssay, assay: Any=assay) -> bool:
|
|
585
|
+
return a_1.Identifier == assay.Identifier
|
|
586
|
+
|
|
587
|
+
registered_assay_opt: ArcAssay | None = try_find(predicate_3, this.Assays)
|
|
588
|
+
if registered_assay_opt is None:
|
|
589
|
+
this.AddAssay(assay)
|
|
590
|
+
|
|
591
|
+
else:
|
|
592
|
+
registered_assay: ArcAssay = registered_assay_opt
|
|
593
|
+
registered_assay.UpdateReferenceByAssayFile(assay, True)
|
|
594
|
+
|
|
595
|
+
def predicate_4(a_2: ArcAssay, assay: Any=assay) -> bool:
|
|
596
|
+
return a_2.Identifier == assay.Identifier
|
|
597
|
+
|
|
598
|
+
assay_1: ArcAssay = find(predicate_4, this.Assays)
|
|
599
|
+
updated_tables: ArcTables
|
|
600
|
+
array_6: Array[ArcStudy] = assay_1.StudiesRegisteredIn
|
|
601
|
+
def folder(tables: ArcTables, study_1: ArcStudy, assay: Any=assay) -> ArcTables:
|
|
602
|
+
return ArcTables.update_reference_tables_by_sheets(ArcTables(study_1.Tables), tables, False)
|
|
603
|
+
|
|
604
|
+
updated_tables = fold(folder, ArcTables(assay_1.Tables), array_6)
|
|
605
|
+
datamap_1: DataMap | None = ARCAux_getAssayDataMapFromContracts(assay_1.Identifier, contracts)
|
|
606
|
+
if assay_1.DataMap is None:
|
|
607
|
+
assay_1.DataMap = datamap_1
|
|
608
|
+
|
|
609
|
+
assay_1.Tables = updated_tables.Tables
|
|
610
|
+
|
|
611
|
+
iterate(action_3, assays)
|
|
612
|
+
def action_4(workflow: ArcWorkflow) -> None:
|
|
613
|
+
datamap_2: DataMap | None = ARCAux_getWorkflowDataMapFromContracts(ArcWorkflow__get_Identifier(workflow), contracts)
|
|
614
|
+
if ArcWorkflow__get_DataMap(workflow) is None:
|
|
615
|
+
ArcWorkflow__set_DataMap_51F1E59E(workflow, datamap_2)
|
|
616
|
+
|
|
617
|
+
this.AddWorkflow(workflow)
|
|
618
|
+
ArcWorkflow__set_StaticHash_Z524259A4(workflow, ArcWorkflow__GetLightHashCode(workflow))
|
|
619
|
+
|
|
620
|
+
iterate(action_4, workflows)
|
|
621
|
+
def action_5(run: ArcRun) -> None:
|
|
622
|
+
datamap_3: DataMap | None = ARCAux_getRunDataMapFromContracts(run.Identifier, contracts)
|
|
623
|
+
if run.DataMap is None:
|
|
624
|
+
run.DataMap = datamap_3
|
|
625
|
+
|
|
626
|
+
this.AddRun(run)
|
|
627
|
+
run.StaticHash = run.GetLightHashCode() or 0
|
|
628
|
+
|
|
629
|
+
iterate(action_5, runs)
|
|
630
|
+
def action_6(a_3: ArcAssay) -> None:
|
|
631
|
+
a_3.StaticHash = a_3.GetLightHashCode() or 0
|
|
632
|
+
|
|
633
|
+
iterate_1(action_6, this.Assays)
|
|
634
|
+
def action_7(s_2: ArcStudy) -> None:
|
|
635
|
+
s_2.StaticHash = s_2.GetLightHashCode() or 0
|
|
636
|
+
|
|
637
|
+
iterate_1(action_7, this.Studies)
|
|
638
|
+
this.StaticHash = this.GetLightHashCode() or 0
|
|
639
|
+
|
|
640
|
+
def UpdateFileSystem(self, __unit: None=None) -> None:
|
|
641
|
+
this: ARC = self
|
|
642
|
+
new_fs: FileSystem = ARCAux_updateFSByISA(this, this._fs)
|
|
643
|
+
this._fs = new_fs
|
|
644
|
+
|
|
645
|
+
def GetWriteContracts(self, skip_update_fs: bool | None=None) -> Array[Contract]:
|
|
646
|
+
this: ARC = self
|
|
647
|
+
if not default_arg(skip_update_fs, False):
|
|
648
|
+
this.UpdateFileSystem()
|
|
649
|
+
|
|
650
|
+
workbooks: Any = dict([])
|
|
651
|
+
add_to_dict(workbooks, "isa.investigation.xlsx", (DTOType(4), ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(this)))
|
|
652
|
+
this.StaticHash = this.GetLightHashCode() or 0
|
|
653
|
+
def action(s: ArcStudy) -> None:
|
|
654
|
+
s.StaticHash = s.GetLightHashCode() or 0
|
|
655
|
+
add_to_dict(workbooks, Study_fileNameFromIdentifier(s.Identifier), (DTOType(1), ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522(s)))
|
|
656
|
+
if s.DataMap is not None:
|
|
657
|
+
dm: DataMap = value_3(s.DataMap)
|
|
658
|
+
DataMap__set_StaticHash_Z524259A4(dm, safe_hash(dm))
|
|
659
|
+
add_to_dict(workbooks, Study_datamapFileNameFromIdentifier(s.Identifier), (DTOType(5), to_fs_workbook(dm)))
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
iterate_1(action, this.Studies)
|
|
663
|
+
def action_1(a: ArcAssay) -> None:
|
|
664
|
+
a.StaticHash = a.GetLightHashCode() or 0
|
|
665
|
+
add_to_dict(workbooks, Assay_fileNameFromIdentifier(a.Identifier), (DTOType(0), ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F(a)))
|
|
666
|
+
if a.DataMap is not None:
|
|
667
|
+
dm_1: DataMap = value_3(a.DataMap)
|
|
668
|
+
DataMap__set_StaticHash_Z524259A4(dm_1, safe_hash(dm_1))
|
|
669
|
+
add_to_dict(workbooks, Assay_datamapFileNameFromIdentifier(a.Identifier), (DTOType(5), to_fs_workbook(dm_1)))
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
iterate_1(action_1, this.Assays)
|
|
673
|
+
def action_2(w: ArcWorkflow) -> None:
|
|
674
|
+
ArcWorkflow__set_StaticHash_Z524259A4(w, ArcWorkflow__GetLightHashCode(w))
|
|
675
|
+
add_to_dict(workbooks, Workflow_fileNameFromIdentifier(ArcWorkflow__get_Identifier(w)), (DTOType(2), ARCtrl_ArcWorkflow__ArcWorkflow_toFsWorkbook_Static_Z1C75CB0E(w)))
|
|
676
|
+
if ArcWorkflow__get_DataMap(w) is not None:
|
|
677
|
+
dm_2: DataMap = value_3(ArcWorkflow__get_DataMap(w))
|
|
678
|
+
DataMap__set_StaticHash_Z524259A4(dm_2, safe_hash(dm_2))
|
|
679
|
+
add_to_dict(workbooks, Workflow_datamapFileNameFromIdentifier(ArcWorkflow__get_Identifier(w)), (DTOType(5), to_fs_workbook(dm_2)))
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
iterate_1(action_2, this.Workflows)
|
|
683
|
+
def action_3(r: ArcRun) -> None:
|
|
684
|
+
r.StaticHash = r.GetLightHashCode() or 0
|
|
685
|
+
add_to_dict(workbooks, Run_fileNameFromIdentifier(r.Identifier), (DTOType(3), ARCtrl_ArcRun__ArcRun_toFsWorkbook_Static_Z3EFAF6F8(r)))
|
|
686
|
+
if r.DataMap is not None:
|
|
687
|
+
dm_3: DataMap = value_3(r.DataMap)
|
|
688
|
+
DataMap__set_StaticHash_Z524259A4(dm_3, safe_hash(dm_3))
|
|
689
|
+
add_to_dict(workbooks, Run_datamapFileNameFromIdentifier(r.Identifier), (DTOType(5), to_fs_workbook(dm_3)))
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
iterate_1(action_3, this.Runs)
|
|
693
|
+
def mapping(fp: str) -> Contract:
|
|
694
|
+
match_value: tuple[DTOType, FsWorkbook] | None = Dictionary_tryGet(fp, workbooks)
|
|
695
|
+
if match_value is None:
|
|
696
|
+
return Contract.create_create(fp, DTOType(10))
|
|
697
|
+
|
|
698
|
+
else:
|
|
699
|
+
wb: FsWorkbook = match_value[1]
|
|
700
|
+
dto: DTOType = match_value[0]
|
|
701
|
+
return Contract.create_create(fp, dto, DTO(0, wb))
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
return map_1(mapping, this._fs.Tree.ToFilePaths(True), None)
|
|
705
|
+
|
|
706
|
+
def GetUpdateContracts(self, skip_update_fs: bool | None=None) -> Array[Contract]:
|
|
707
|
+
this: ARC = self
|
|
708
|
+
if this.StaticHash == 0:
|
|
709
|
+
this.StaticHash = this.GetLightHashCode() or 0
|
|
710
|
+
return this.GetWriteContracts(skip_update_fs)
|
|
711
|
+
|
|
712
|
+
else:
|
|
713
|
+
def _arrow3828(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
714
|
+
hash_1: int = this.GetLightHashCode() or 0
|
|
715
|
+
def _arrow3827(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
716
|
+
this.StaticHash = hash_1 or 0
|
|
717
|
+
def _arrow3808(s: ArcStudy) -> IEnumerable_1[Contract]:
|
|
718
|
+
hash_2: int = s.GetLightHashCode() or 0
|
|
719
|
+
def _arrow3807(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
720
|
+
s.StaticHash = hash_2 or 0
|
|
721
|
+
match_value: DataMap | None = s.DataMap
|
|
722
|
+
(pattern_matching_result, dm_2, dm_3) = (None, None, None)
|
|
723
|
+
if match_value is not None:
|
|
724
|
+
if DataMap__get_StaticHash(match_value) == 0:
|
|
725
|
+
pattern_matching_result = 0
|
|
726
|
+
dm_2 = match_value
|
|
727
|
+
|
|
728
|
+
else:
|
|
729
|
+
def _arrow3806(__unit: None=None) -> bool:
|
|
730
|
+
dm_1: DataMap = match_value
|
|
731
|
+
return DataMap__get_StaticHash(dm_1) != safe_hash(dm_1)
|
|
732
|
+
|
|
733
|
+
if _arrow3806():
|
|
734
|
+
pattern_matching_result = 1
|
|
735
|
+
dm_3 = match_value
|
|
736
|
+
|
|
737
|
+
else:
|
|
738
|
+
pattern_matching_result = 2
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
else:
|
|
743
|
+
pattern_matching_result = 2
|
|
744
|
+
|
|
745
|
+
if pattern_matching_result == 0:
|
|
746
|
+
def _arrow3804(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
747
|
+
DataMap__set_StaticHash_Z524259A4(dm_2, safe_hash(dm_2))
|
|
748
|
+
return empty()
|
|
749
|
+
|
|
750
|
+
return append(singleton_1(ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5(dm_2, s.Identifier)), delay(_arrow3804))
|
|
751
|
+
|
|
752
|
+
elif pattern_matching_result == 1:
|
|
753
|
+
def _arrow3805(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
754
|
+
DataMap__set_StaticHash_Z524259A4(dm_3, safe_hash(dm_3))
|
|
755
|
+
return empty()
|
|
756
|
+
|
|
757
|
+
return append(singleton_1(ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5(dm_3, s.Identifier)), delay(_arrow3805))
|
|
758
|
+
|
|
759
|
+
elif pattern_matching_result == 2:
|
|
760
|
+
return empty()
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
return append(ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49(s, True) if (s.StaticHash == 0) else (singleton_1(ARCtrl_ArcStudy__ArcStudy_ToUpdateContract(s)) if (s.StaticHash != hash_2) else empty()), delay(_arrow3807))
|
|
764
|
+
|
|
765
|
+
def _arrow3826(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
766
|
+
def _arrow3813(a: ArcAssay) -> IEnumerable_1[Contract]:
|
|
767
|
+
hash_3: int = a.GetLightHashCode() or 0
|
|
768
|
+
def _arrow3812(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
769
|
+
a.StaticHash = hash_3 or 0
|
|
770
|
+
match_value_1: DataMap | None = a.DataMap
|
|
771
|
+
(pattern_matching_result_1, dm_6, dm_7) = (None, None, None)
|
|
772
|
+
if match_value_1 is not None:
|
|
773
|
+
if DataMap__get_StaticHash(match_value_1) == 0:
|
|
774
|
+
pattern_matching_result_1 = 0
|
|
775
|
+
dm_6 = match_value_1
|
|
776
|
+
|
|
777
|
+
else:
|
|
778
|
+
def _arrow3811(__unit: None=None) -> bool:
|
|
779
|
+
dm_5: DataMap = match_value_1
|
|
780
|
+
return DataMap__get_StaticHash(dm_5) != safe_hash(dm_5)
|
|
781
|
+
|
|
782
|
+
if _arrow3811():
|
|
783
|
+
pattern_matching_result_1 = 1
|
|
784
|
+
dm_7 = match_value_1
|
|
785
|
+
|
|
786
|
+
else:
|
|
787
|
+
pattern_matching_result_1 = 2
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
else:
|
|
792
|
+
pattern_matching_result_1 = 2
|
|
793
|
+
|
|
794
|
+
if pattern_matching_result_1 == 0:
|
|
795
|
+
def _arrow3809(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
796
|
+
DataMap__set_StaticHash_Z524259A4(dm_6, safe_hash(dm_6))
|
|
797
|
+
return empty()
|
|
798
|
+
|
|
799
|
+
return append(singleton_1(ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5(dm_6, a.Identifier)), delay(_arrow3809))
|
|
800
|
+
|
|
801
|
+
elif pattern_matching_result_1 == 1:
|
|
802
|
+
def _arrow3810(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
803
|
+
DataMap__set_StaticHash_Z524259A4(dm_7, safe_hash(dm_7))
|
|
804
|
+
return empty()
|
|
805
|
+
|
|
806
|
+
return append(singleton_1(ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5(dm_7, a.Identifier)), delay(_arrow3810))
|
|
807
|
+
|
|
808
|
+
elif pattern_matching_result_1 == 2:
|
|
809
|
+
return empty()
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
return append(ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49(a, True) if (a.StaticHash == 0) else (singleton_1(ARCtrl_ArcAssay__ArcAssay_ToUpdateContract(a)) if (a.StaticHash != hash_3) else empty()), delay(_arrow3812))
|
|
813
|
+
|
|
814
|
+
def _arrow3825(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
815
|
+
def _arrow3818(w: ArcWorkflow) -> IEnumerable_1[Contract]:
|
|
816
|
+
hash_4: int = ArcWorkflow__GetLightHashCode(w) or 0
|
|
817
|
+
def _arrow3817(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
818
|
+
ArcWorkflow__set_StaticHash_Z524259A4(w, hash_4)
|
|
819
|
+
match_value_2: DataMap | None = ArcWorkflow__get_DataMap(w)
|
|
820
|
+
(pattern_matching_result_2, dm_10, dm_11) = (None, None, None)
|
|
821
|
+
if match_value_2 is not None:
|
|
822
|
+
if DataMap__get_StaticHash(match_value_2) == 0:
|
|
823
|
+
pattern_matching_result_2 = 0
|
|
824
|
+
dm_10 = match_value_2
|
|
825
|
+
|
|
826
|
+
else:
|
|
827
|
+
def _arrow3816(__unit: None=None) -> bool:
|
|
828
|
+
dm_9: DataMap = match_value_2
|
|
829
|
+
return DataMap__get_StaticHash(dm_9) != safe_hash(dm_9)
|
|
830
|
+
|
|
831
|
+
if _arrow3816():
|
|
832
|
+
pattern_matching_result_2 = 1
|
|
833
|
+
dm_11 = match_value_2
|
|
834
|
+
|
|
835
|
+
else:
|
|
836
|
+
pattern_matching_result_2 = 2
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
else:
|
|
841
|
+
pattern_matching_result_2 = 2
|
|
842
|
+
|
|
843
|
+
if pattern_matching_result_2 == 0:
|
|
844
|
+
def _arrow3814(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
845
|
+
DataMap__set_StaticHash_Z524259A4(dm_10, safe_hash(dm_10))
|
|
846
|
+
return empty()
|
|
847
|
+
|
|
848
|
+
return append(singleton_1(ARCtrl_DataMap__DataMap_ToCreateContractForWorkflow_Z721C83C5(dm_10, ArcWorkflow__get_Identifier(w))), delay(_arrow3814))
|
|
849
|
+
|
|
850
|
+
elif pattern_matching_result_2 == 1:
|
|
851
|
+
def _arrow3815(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
852
|
+
DataMap__set_StaticHash_Z524259A4(dm_11, safe_hash(dm_11))
|
|
853
|
+
return empty()
|
|
854
|
+
|
|
855
|
+
return append(singleton_1(ARCtrl_DataMap__DataMap_ToUpdateContractForWorkflow_Z721C83C5(dm_11, ArcWorkflow__get_Identifier(w))), delay(_arrow3815))
|
|
856
|
+
|
|
857
|
+
elif pattern_matching_result_2 == 2:
|
|
858
|
+
return empty()
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
return append(ARCtrl_ArcWorkflow__ArcWorkflow_ToCreateContract_6FCE9E49(w, True) if (ArcWorkflow__get_StaticHash(w) == 0) else (singleton_1(ARCtrl_ArcWorkflow__ArcWorkflow_ToUpdateContract(w)) if (ArcWorkflow__get_StaticHash(w) != hash_4) else empty()), delay(_arrow3817))
|
|
862
|
+
|
|
863
|
+
def _arrow3824(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
864
|
+
def _arrow3823(r: ArcRun) -> IEnumerable_1[Contract]:
|
|
865
|
+
hash_5: int = r.GetLightHashCode() or 0
|
|
866
|
+
def _arrow3822(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
867
|
+
r.StaticHash = hash_5 or 0
|
|
868
|
+
match_value_3: DataMap | None = r.DataMap
|
|
869
|
+
(pattern_matching_result_3, dm_14, dm_15) = (None, None, None)
|
|
870
|
+
if match_value_3 is not None:
|
|
871
|
+
if DataMap__get_StaticHash(match_value_3) == 0:
|
|
872
|
+
pattern_matching_result_3 = 0
|
|
873
|
+
dm_14 = match_value_3
|
|
874
|
+
|
|
875
|
+
else:
|
|
876
|
+
def _arrow3821(__unit: None=None) -> bool:
|
|
877
|
+
dm_13: DataMap = match_value_3
|
|
878
|
+
return DataMap__get_StaticHash(dm_13) != safe_hash(dm_13)
|
|
879
|
+
|
|
880
|
+
if _arrow3821():
|
|
881
|
+
pattern_matching_result_3 = 1
|
|
882
|
+
dm_15 = match_value_3
|
|
883
|
+
|
|
884
|
+
else:
|
|
885
|
+
pattern_matching_result_3 = 2
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
else:
|
|
890
|
+
pattern_matching_result_3 = 2
|
|
891
|
+
|
|
892
|
+
if pattern_matching_result_3 == 0:
|
|
893
|
+
def _arrow3819(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
894
|
+
DataMap__set_StaticHash_Z524259A4(dm_14, safe_hash(dm_14))
|
|
895
|
+
return empty()
|
|
896
|
+
|
|
897
|
+
return append(singleton_1(ARCtrl_DataMap__DataMap_ToCreateContractForRun_Z721C83C5(dm_14, r.Identifier)), delay(_arrow3819))
|
|
898
|
+
|
|
899
|
+
elif pattern_matching_result_3 == 1:
|
|
900
|
+
def _arrow3820(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
901
|
+
DataMap__set_StaticHash_Z524259A4(dm_15, safe_hash(dm_15))
|
|
902
|
+
return empty()
|
|
903
|
+
|
|
904
|
+
return append(singleton_1(ARCtrl_DataMap__DataMap_ToUpdateContractForRun_Z721C83C5(dm_15, r.Identifier)), delay(_arrow3820))
|
|
905
|
+
|
|
906
|
+
elif pattern_matching_result_3 == 2:
|
|
907
|
+
return empty()
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
return append(ARCtrl_ArcRun__ArcRun_ToCreateContract_6FCE9E49(r, True) if (r.StaticHash == 0) else (singleton_1(ARCtrl_ArcRun__ArcRun_ToUpdateContract(r)) if (r.StaticHash != hash_5) else empty()), delay(_arrow3822))
|
|
911
|
+
|
|
912
|
+
return collect(_arrow3823, this.Runs)
|
|
913
|
+
|
|
914
|
+
return append(collect(_arrow3818, this.Workflows), delay(_arrow3824))
|
|
915
|
+
|
|
916
|
+
return append(collect(_arrow3813, this.Assays), delay(_arrow3825))
|
|
917
|
+
|
|
918
|
+
return append(collect(_arrow3808, this.Studies), delay(_arrow3826))
|
|
919
|
+
|
|
920
|
+
return append(singleton_1(ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract(this)) if (this.StaticHash != hash_1) else empty(), delay(_arrow3827))
|
|
921
|
+
|
|
922
|
+
return to_array(delay(_arrow3828))
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
def GetGitInitContracts(self, branch: str | None=None, repository_address: str | None=None, default_gitignore: bool | None=None) -> Array[Contract]:
|
|
926
|
+
default_gitignore_1: bool = default_arg(default_gitignore, False)
|
|
927
|
+
def _arrow3832(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
928
|
+
def _arrow3831(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
929
|
+
def _arrow3830(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
930
|
+
def _arrow3829(__unit: None=None) -> IEnumerable_1[Contract]:
|
|
931
|
+
return singleton_1(Init_createAddRemoteContract_Z721C83C5(value_3(repository_address))) if (repository_address is not None) else empty()
|
|
932
|
+
|
|
933
|
+
return append(singleton_1(gitignore_contract) if default_gitignore_1 else empty(), delay(_arrow3829))
|
|
934
|
+
|
|
935
|
+
return append(singleton_1(gitattributes_contract), delay(_arrow3830))
|
|
936
|
+
|
|
937
|
+
return append(singleton_1(Init_createInitContract_6DFDD678(branch)), delay(_arrow3831))
|
|
938
|
+
|
|
939
|
+
return to_array(delay(_arrow3832))
|
|
940
|
+
|
|
941
|
+
@staticmethod
|
|
942
|
+
def get_clone_contract(remote_url: str, merge: bool | None=None, branch: str | None=None, token: tuple[str, str] | None=None, nolfs: bool | None=None) -> Contract:
|
|
943
|
+
return Clone_createCloneContract_5000466F(remote_url, merge, branch, token, nolfs)
|
|
944
|
+
|
|
945
|
+
def Copy(self, __unit: None=None) -> ARC:
|
|
946
|
+
this: ARC = self
|
|
947
|
+
next_assays: Array[ArcAssay] = []
|
|
948
|
+
next_studies: Array[ArcStudy] = []
|
|
949
|
+
next_workflows: Array[ArcWorkflow] = []
|
|
950
|
+
next_runs: Array[ArcRun] = []
|
|
951
|
+
enumerator: Any = get_enumerator(this.Assays)
|
|
952
|
+
try:
|
|
953
|
+
while enumerator.System_Collections_IEnumerator_MoveNext():
|
|
954
|
+
assay: ArcAssay = enumerator.System_Collections_Generic_IEnumerator_1_get_Current()
|
|
955
|
+
copy: ArcAssay = assay.Copy()
|
|
956
|
+
(next_assays.append(copy))
|
|
957
|
+
|
|
958
|
+
finally:
|
|
959
|
+
dispose(enumerator)
|
|
960
|
+
|
|
961
|
+
enumerator_1: Any = get_enumerator(this.Studies)
|
|
962
|
+
try:
|
|
963
|
+
while enumerator_1.System_Collections_IEnumerator_MoveNext():
|
|
964
|
+
study: ArcStudy = enumerator_1.System_Collections_Generic_IEnumerator_1_get_Current()
|
|
965
|
+
copy_1: ArcStudy = study.Copy()
|
|
966
|
+
(next_studies.append(copy_1))
|
|
967
|
+
|
|
968
|
+
finally:
|
|
969
|
+
dispose(enumerator_1)
|
|
970
|
+
|
|
971
|
+
enumerator_2: Any = get_enumerator(this.Workflows)
|
|
972
|
+
try:
|
|
973
|
+
while enumerator_2.System_Collections_IEnumerator_MoveNext():
|
|
974
|
+
workflow: ArcWorkflow = enumerator_2.System_Collections_Generic_IEnumerator_1_get_Current()
|
|
975
|
+
(next_workflows.append(ArcWorkflow__Copy_6FCE9E49(workflow)))
|
|
976
|
+
|
|
977
|
+
finally:
|
|
978
|
+
dispose(enumerator_2)
|
|
979
|
+
|
|
980
|
+
enumerator_3: Any = get_enumerator(this.Runs)
|
|
981
|
+
try:
|
|
982
|
+
while enumerator_3.System_Collections_IEnumerator_MoveNext():
|
|
983
|
+
run: ArcRun = enumerator_3.System_Collections_Generic_IEnumerator_1_get_Current()
|
|
984
|
+
copy_3: ArcRun = run.Copy()
|
|
985
|
+
(next_runs.append(copy_3))
|
|
986
|
+
|
|
987
|
+
finally:
|
|
988
|
+
dispose(enumerator_3)
|
|
989
|
+
|
|
990
|
+
def f(c: Comment) -> Comment:
|
|
991
|
+
return c.Copy()
|
|
992
|
+
|
|
993
|
+
next_comments: Array[Comment] = ResizeArray_map(f, this.Comments)
|
|
994
|
+
def f_1(c_1: Remark) -> Remark:
|
|
995
|
+
return c_1.Copy()
|
|
996
|
+
|
|
997
|
+
next_remarks: Array[Remark] = ResizeArray_map(f_1, this.Remarks)
|
|
998
|
+
def f_2(c_2: Person) -> Person:
|
|
999
|
+
return c_2.Copy()
|
|
1000
|
+
|
|
1001
|
+
next_contacts: Array[Person] = ResizeArray_map(f_2, this.Contacts)
|
|
1002
|
+
def f_3(c_3: Publication) -> Publication:
|
|
1003
|
+
return c_3.Copy()
|
|
1004
|
+
|
|
1005
|
+
next_publications: Array[Publication] = ResizeArray_map(f_3, this.Publications)
|
|
1006
|
+
def f_4(c_4: OntologySourceReference) -> OntologySourceReference:
|
|
1007
|
+
return c_4.Copy()
|
|
1008
|
+
|
|
1009
|
+
next_ontology_source_references: Array[OntologySourceReference] = ResizeArray_map(f_4, this.OntologySourceReferences)
|
|
1010
|
+
next_study_identifiers: Array[str] = list(this.RegisteredStudyIdentifiers)
|
|
1011
|
+
fs_copy: FileSystem = this._fs.Copy()
|
|
1012
|
+
return ARC(this.Identifier, this.Title, this.Description, this.SubmissionDate, this.PublicReleaseDate, next_ontology_source_references, next_publications, next_contacts, next_assays, next_studies, next_workflows, next_runs, next_study_identifiers, next_comments, next_remarks, this._cwl, fs_copy)
|
|
1013
|
+
|
|
1014
|
+
def GetRegisteredPayload(self, IgnoreHidden: bool | None=None) -> FileSystemTree:
|
|
1015
|
+
this: ARC = self
|
|
1016
|
+
copy: ARC = this.Copy()
|
|
1017
|
+
registered_studies: Array[ArcStudy] = copy.Studies[:]
|
|
1018
|
+
def mapping(s: ArcStudy) -> Array[ArcAssay]:
|
|
1019
|
+
return s.RegisteredAssays[:]
|
|
1020
|
+
|
|
1021
|
+
registered_assays: Array[ArcAssay] = concat(map_1(mapping, registered_studies, None), None)
|
|
1022
|
+
class ObjectExpr3833:
|
|
1023
|
+
@property
|
|
1024
|
+
def Compare(self) -> Callable[[str, str], int]:
|
|
1025
|
+
return compare_primitives
|
|
1026
|
+
|
|
1027
|
+
def mapping_1(s_1: ArcStudy) -> Any:
|
|
1028
|
+
study_foldername: str = ((("" + "studies") + "/") + s_1.Identifier) + ""
|
|
1029
|
+
def _arrow3840(__unit: None=None, s_1: Any=s_1) -> IEnumerable_1[str]:
|
|
1030
|
+
def _arrow3839(__unit: None=None) -> IEnumerable_1[str]:
|
|
1031
|
+
def _arrow3838(__unit: None=None) -> IEnumerable_1[str]:
|
|
1032
|
+
def _arrow3837(table: ArcTable) -> IEnumerable_1[str]:
|
|
1033
|
+
def _arrow3836(kv: Any) -> IEnumerable_1[str]:
|
|
1034
|
+
text_value: str = kv[1].ToFreeTextCell().AsFreeText
|
|
1035
|
+
def _arrow3835(__unit: None=None) -> IEnumerable_1[str]:
|
|
1036
|
+
def _arrow3834(__unit: None=None) -> IEnumerable_1[str]:
|
|
1037
|
+
return singleton_1(((((("" + study_foldername) + "/") + "protocols") + "/") + text_value) + "")
|
|
1038
|
+
|
|
1039
|
+
return append(singleton_1(((((("" + study_foldername) + "/") + "resources") + "/") + text_value) + ""), delay(_arrow3834))
|
|
1040
|
+
|
|
1041
|
+
return append(singleton_1(text_value), delay(_arrow3835))
|
|
1042
|
+
|
|
1043
|
+
return collect(_arrow3836, table.Values)
|
|
1044
|
+
|
|
1045
|
+
return collect(_arrow3837, s_1.Tables)
|
|
1046
|
+
|
|
1047
|
+
return append(singleton_1(((("" + study_foldername) + "/") + "README.md") + ""), delay(_arrow3838))
|
|
1048
|
+
|
|
1049
|
+
return append(singleton_1(((("" + study_foldername) + "/") + "isa.study.xlsx") + ""), delay(_arrow3839))
|
|
1050
|
+
|
|
1051
|
+
class ObjectExpr3841:
|
|
1052
|
+
@property
|
|
1053
|
+
def Compare(self) -> Callable[[str, str], int]:
|
|
1054
|
+
return compare_primitives
|
|
1055
|
+
|
|
1056
|
+
return of_seq(to_list(delay(_arrow3840)), ObjectExpr3841())
|
|
1057
|
+
|
|
1058
|
+
class ObjectExpr3842:
|
|
1059
|
+
@property
|
|
1060
|
+
def Compare(self) -> Callable[[str, str], int]:
|
|
1061
|
+
return compare_primitives
|
|
1062
|
+
|
|
1063
|
+
def mapping_2(a: ArcAssay) -> Any:
|
|
1064
|
+
assay_foldername: str = ((("" + "assays") + "/") + a.Identifier) + ""
|
|
1065
|
+
def _arrow3849(__unit: None=None, a: Any=a) -> IEnumerable_1[str]:
|
|
1066
|
+
def _arrow3848(__unit: None=None) -> IEnumerable_1[str]:
|
|
1067
|
+
def _arrow3847(__unit: None=None) -> IEnumerable_1[str]:
|
|
1068
|
+
def _arrow3846(table_1: ArcTable) -> IEnumerable_1[str]:
|
|
1069
|
+
def _arrow3845(kv_1: Any) -> IEnumerable_1[str]:
|
|
1070
|
+
text_value_1: str = kv_1[1].ToFreeTextCell().AsFreeText
|
|
1071
|
+
def _arrow3844(__unit: None=None) -> IEnumerable_1[str]:
|
|
1072
|
+
def _arrow3843(__unit: None=None) -> IEnumerable_1[str]:
|
|
1073
|
+
return singleton_1(((((("" + assay_foldername) + "/") + "protocols") + "/") + text_value_1) + "")
|
|
1074
|
+
|
|
1075
|
+
return append(singleton_1(((((("" + assay_foldername) + "/") + "dataset") + "/") + text_value_1) + ""), delay(_arrow3843))
|
|
1076
|
+
|
|
1077
|
+
return append(singleton_1(text_value_1), delay(_arrow3844))
|
|
1078
|
+
|
|
1079
|
+
return collect(_arrow3845, table_1.Values)
|
|
1080
|
+
|
|
1081
|
+
return collect(_arrow3846, a.Tables)
|
|
1082
|
+
|
|
1083
|
+
return append(singleton_1(((("" + assay_foldername) + "/") + "README.md") + ""), delay(_arrow3847))
|
|
1084
|
+
|
|
1085
|
+
return append(singleton_1(((("" + assay_foldername) + "/") + "isa.assay.xlsx") + ""), delay(_arrow3848))
|
|
1086
|
+
|
|
1087
|
+
class ObjectExpr3850:
|
|
1088
|
+
@property
|
|
1089
|
+
def Compare(self) -> Callable[[str, str], int]:
|
|
1090
|
+
return compare_primitives
|
|
1091
|
+
|
|
1092
|
+
return of_seq(to_list(delay(_arrow3849)), ObjectExpr3850())
|
|
1093
|
+
|
|
1094
|
+
class ObjectExpr3851:
|
|
1095
|
+
@property
|
|
1096
|
+
def Compare(self) -> Callable[[str, str], int]:
|
|
1097
|
+
return compare_primitives
|
|
1098
|
+
|
|
1099
|
+
class ObjectExpr3852:
|
|
1100
|
+
@property
|
|
1101
|
+
def Compare(self) -> Callable[[str, str], int]:
|
|
1102
|
+
return compare_primitives
|
|
1103
|
+
|
|
1104
|
+
include_files: Any = union_many(to_enumerable([of_seq(to_enumerable(["isa.investigation.xlsx", "README.md"]), ObjectExpr3833()), union_many(map_1(mapping_1, registered_studies, None), ObjectExpr3842()), union_many(map_1(mapping_2, registered_assays, None), ObjectExpr3851())]), ObjectExpr3852())
|
|
1105
|
+
ignore_hidden: bool = default_arg(IgnoreHidden, True)
|
|
1106
|
+
fs_copy: FileSystem = this._fs.Copy()
|
|
1107
|
+
def binder(tree_1: FileSystemTree) -> FileSystemTree | None:
|
|
1108
|
+
if ignore_hidden:
|
|
1109
|
+
def _arrow3853(n_1: str, tree_1: Any=tree_1) -> bool:
|
|
1110
|
+
return not starts_with_exact(n_1, ".")
|
|
1111
|
+
|
|
1112
|
+
return FileSystemTree.filter_folders(_arrow3853)(tree_1)
|
|
1113
|
+
|
|
1114
|
+
else:
|
|
1115
|
+
return tree_1
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
def _arrow3855(__unit: None=None) -> FileSystemTree | None:
|
|
1119
|
+
tree: FileSystemTree
|
|
1120
|
+
def predicate(p: str) -> bool:
|
|
1121
|
+
if True if starts_with_exact(p, "workflows") else starts_with_exact(p, "runs"):
|
|
1122
|
+
return True
|
|
1123
|
+
|
|
1124
|
+
else:
|
|
1125
|
+
return FSharpSet__Contains(include_files, p)
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
paths: Array[str] = filter(predicate, FileSystemTree.to_file_paths()(fs_copy.Tree))
|
|
1129
|
+
tree = FileSystemTree.from_file_paths(paths)
|
|
1130
|
+
def _arrow3854(n: str) -> bool:
|
|
1131
|
+
return not starts_with_exact(n, ".")
|
|
1132
|
+
|
|
1133
|
+
return FileSystemTree.filter_files(_arrow3854)(tree) if ignore_hidden else tree
|
|
1134
|
+
|
|
1135
|
+
return default_arg(bind(binder, _arrow3855()), FileSystemTree.from_file_paths([]))
|
|
1136
|
+
|
|
1137
|
+
def GetAdditionalPayload(self, IgnoreHidden: bool | None=None) -> FileSystemTree:
|
|
1138
|
+
this: ARC = self
|
|
1139
|
+
ignore_hidden: bool = default_arg(IgnoreHidden, True)
|
|
1140
|
+
class ObjectExpr3856:
|
|
1141
|
+
@property
|
|
1142
|
+
def Compare(self) -> Callable[[str, str], int]:
|
|
1143
|
+
return compare_primitives
|
|
1144
|
+
|
|
1145
|
+
registered_payload: Any = of_seq(FileSystemTree.to_file_paths()(this.GetRegisteredPayload()), ObjectExpr3856())
|
|
1146
|
+
def binder(tree_1: FileSystemTree) -> FileSystemTree | None:
|
|
1147
|
+
if ignore_hidden:
|
|
1148
|
+
def _arrow3857(n_1: str, tree_1: Any=tree_1) -> bool:
|
|
1149
|
+
return not starts_with_exact(n_1, ".")
|
|
1150
|
+
|
|
1151
|
+
return FileSystemTree.filter_folders(_arrow3857)(tree_1)
|
|
1152
|
+
|
|
1153
|
+
else:
|
|
1154
|
+
return tree_1
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
def _arrow3859(__unit: None=None) -> FileSystemTree | None:
|
|
1158
|
+
tree: FileSystemTree
|
|
1159
|
+
def predicate(p: str) -> bool:
|
|
1160
|
+
return not FSharpSet__Contains(registered_payload, p)
|
|
1161
|
+
|
|
1162
|
+
paths: Array[str] = filter(predicate, FileSystemTree.to_file_paths()(this._fs.Copy().Tree))
|
|
1163
|
+
tree = FileSystemTree.from_file_paths(paths)
|
|
1164
|
+
def _arrow3858(n: str) -> bool:
|
|
1165
|
+
return not starts_with_exact(n, ".")
|
|
1166
|
+
|
|
1167
|
+
return FileSystemTree.filter_files(_arrow3858)(tree) if ignore_hidden else tree
|
|
1168
|
+
|
|
1169
|
+
return default_arg(bind(binder, _arrow3859()), FileSystemTree.from_file_paths([]))
|
|
1170
|
+
|
|
1171
|
+
@staticmethod
|
|
1172
|
+
def DefaultContracts() -> Any:
|
|
1173
|
+
class ObjectExpr3860:
|
|
1174
|
+
@property
|
|
1175
|
+
def Compare(self) -> Callable[[str, str], int]:
|
|
1176
|
+
return compare_primitives
|
|
1177
|
+
|
|
1178
|
+
return of_seq_1(to_enumerable([(".gitignore", gitignore_contract), (".gitattributes", gitattributes_contract)]), ObjectExpr3860())
|
|
1179
|
+
|
|
1180
|
+
@staticmethod
|
|
1181
|
+
def from_deprecated_rocrate_json_string(s: str) -> ARC:
|
|
1182
|
+
try:
|
|
1183
|
+
s_1: str = replace(s, "bio:additionalProperty", "sdo:additionalProperty")
|
|
1184
|
+
isa: ArcInvestigation
|
|
1185
|
+
match_value: FSharpResult_2[ArcInvestigation, str] = Decode_fromString(ROCrate_get_decoderDeprecated(), s_1)
|
|
1186
|
+
if match_value.tag == 1:
|
|
1187
|
+
raise Exception(to_text(printf("Error decoding string: %O"))(match_value.fields[0]))
|
|
1188
|
+
|
|
1189
|
+
else:
|
|
1190
|
+
isa = match_value.fields[0]
|
|
1191
|
+
|
|
1192
|
+
return ARC.from_arc_investigation(isa)
|
|
1193
|
+
|
|
1194
|
+
except Exception as ex:
|
|
1195
|
+
arg_1: str = str(ex)
|
|
1196
|
+
return to_fail(printf("Could not parse deprecated ARC-RO-Crate metadata: \n%s"))(arg_1)
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
@staticmethod
|
|
1200
|
+
def from_rocrate_json_string(s: str) -> ARC:
|
|
1201
|
+
try:
|
|
1202
|
+
isa: ArcInvestigation
|
|
1203
|
+
match_value: FSharpResult_2[ArcInvestigation, str] = Decode_fromString(ROCrate_get_decoder(), s)
|
|
1204
|
+
if match_value.tag == 1:
|
|
1205
|
+
raise Exception(to_text(printf("Error decoding string: %O"))(match_value.fields[0]))
|
|
1206
|
+
|
|
1207
|
+
else:
|
|
1208
|
+
isa = match_value.fields[0]
|
|
1209
|
+
|
|
1210
|
+
return ARC.from_arc_investigation(isa)
|
|
1211
|
+
|
|
1212
|
+
except Exception as ex:
|
|
1213
|
+
arg_1: str = str(ex)
|
|
1214
|
+
return to_fail(printf("Could not parse ARC-RO-Crate metadata: \n%s"))(arg_1)
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
def ToROCrateJsonString(self, spaces: int | None=None) -> str:
|
|
1218
|
+
this: ARC = self
|
|
1219
|
+
this.MakeDataFilesAbsolute()
|
|
1220
|
+
value: IEncodable = ROCrate_encoder_8A8D439(this)
|
|
1221
|
+
return to_string(default_spaces(spaces), value)
|
|
1222
|
+
|
|
1223
|
+
@staticmethod
|
|
1224
|
+
def to_rocrate_json_string(spaces: int | None=None) -> Callable[[ARC], str]:
|
|
1225
|
+
def _arrow3861(obj: ARC) -> str:
|
|
1226
|
+
return obj.ToROCrateJsonString(spaces)
|
|
1227
|
+
|
|
1228
|
+
return _arrow3861
|
|
1229
|
+
|
|
1230
|
+
def GetValidationPackagesConfigWriteContract(self, vpc: ValidationPackagesConfig) -> Contract:
|
|
1231
|
+
this: ARC = self
|
|
1232
|
+
paths: Array[str] = this.FileSystem.Tree.ToFilePaths()
|
|
1233
|
+
class ObjectExpr3863:
|
|
1234
|
+
@property
|
|
1235
|
+
def Equals(self) -> Callable[[str, str], bool]:
|
|
1236
|
+
def _arrow3862(x: str, y: str) -> bool:
|
|
1237
|
+
return x == y
|
|
1238
|
+
|
|
1239
|
+
return _arrow3862
|
|
1240
|
+
|
|
1241
|
+
@property
|
|
1242
|
+
def GetHashCode(self) -> Callable[[str], int]:
|
|
1243
|
+
return string_hash
|
|
1244
|
+
|
|
1245
|
+
if not contains_2(ValidationPackagesConfigHelper_ConfigFilePath, paths, ObjectExpr3863()):
|
|
1246
|
+
file_paths: Array[str] = append_1([ValidationPackagesConfigHelper_ConfigFilePath], paths, None)
|
|
1247
|
+
this.SetFilePaths(file_paths)
|
|
1248
|
+
|
|
1249
|
+
return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toCreateContract_Static_724DAE55(vpc)
|
|
1250
|
+
|
|
1251
|
+
def GetValidationPackagesConfigDeleteContract(self, vpc: ValidationPackagesConfig) -> Contract:
|
|
1252
|
+
this: ARC = self
|
|
1253
|
+
paths: Array[str] = this.FileSystem.Tree.ToFilePaths()
|
|
1254
|
+
class ObjectExpr3865:
|
|
1255
|
+
@property
|
|
1256
|
+
def Equals(self) -> Callable[[str, str], bool]:
|
|
1257
|
+
def _arrow3864(x: str, y: str) -> bool:
|
|
1258
|
+
return x == y
|
|
1259
|
+
|
|
1260
|
+
return _arrow3864
|
|
1261
|
+
|
|
1262
|
+
@property
|
|
1263
|
+
def GetHashCode(self) -> Callable[[str], int]:
|
|
1264
|
+
return string_hash
|
|
1265
|
+
|
|
1266
|
+
if contains_2(ValidationPackagesConfigHelper_ConfigFilePath, paths, ObjectExpr3865()):
|
|
1267
|
+
def predicate(p: str) -> bool:
|
|
1268
|
+
return not (p == ValidationPackagesConfigHelper_ConfigFilePath)
|
|
1269
|
+
|
|
1270
|
+
file_paths: Array[str] = filter(predicate, paths)
|
|
1271
|
+
this.SetFilePaths(file_paths)
|
|
1272
|
+
|
|
1273
|
+
return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toDeleteContract_Static_724DAE55(vpc)
|
|
1274
|
+
|
|
1275
|
+
def GetValidationPackagesConfigReadContract(self, __unit: None=None) -> Contract:
|
|
1276
|
+
return ValidationPackagesConfigHelper_ReadContract
|
|
1277
|
+
|
|
1278
|
+
def GetValidationPackagesConfigFromReadContract(self, contract: Contract) -> ValidationPackagesConfig | None:
|
|
1279
|
+
return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_tryFromReadContract_Static_7570923F(contract)
|
|
1280
|
+
|
|
1281
|
+
def ToFilePaths(self, remove_root: bool | None=None, skip_update_fs: bool | None=None) -> Array[str]:
|
|
1282
|
+
this: ARC = self
|
|
1283
|
+
if not default_arg(skip_update_fs, False):
|
|
1284
|
+
this.UpdateFileSystem()
|
|
1285
|
+
|
|
1286
|
+
return this.FileSystem.Tree.ToFilePaths(remove_root)
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
ARC_reflection = _expr3867
|
|
1290
|
+
|
|
1291
|
+
def ARC__ctor_5BB4A6F7(identifier: str, title: str | None=None, description: str | None=None, submission_date: str | None=None, public_release_date: str | None=None, ontology_source_references: Array[OntologySourceReference] | None=None, publications: Array[Publication] | None=None, contacts: Array[Person] | None=None, assays: Array[ArcAssay] | None=None, studies: Array[ArcStudy] | None=None, workflows: Array[ArcWorkflow] | None=None, runs: Array[ArcRun] | None=None, registered_study_identifiers: Array[str] | None=None, comments: Array[Comment] | None=None, remarks: Array[Remark] | None=None, cwl: None | None=None, fs: FileSystem | None=None) -> ARC:
|
|
1292
|
+
return ARC(identifier, title, description, submission_date, public_release_date, ontology_source_references, publications, contacts, assays, studies, workflows, runs, registered_study_identifiers, comments, remarks, cwl, fs)
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
def ARCAux_getArcAssaysFromContracts(contracts: Array[Contract]) -> Array[ArcAssay]:
|
|
1296
|
+
def chooser(c: Contract, contracts: Any=contracts) -> ArcAssay | None:
|
|
1297
|
+
return ARCtrl_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F(c)
|
|
1298
|
+
|
|
1299
|
+
return choose(chooser, contracts, None)
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
def ARCAux_getArcStudiesFromContracts(contracts: Array[Contract]) -> Array[tuple[ArcStudy, FSharpList[ArcAssay]]]:
|
|
1303
|
+
def chooser(c: Contract, contracts: Any=contracts) -> tuple[ArcStudy, FSharpList[ArcAssay]] | None:
|
|
1304
|
+
return ARCtrl_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F(c)
|
|
1305
|
+
|
|
1306
|
+
return choose(chooser, contracts, None)
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
def ARCAux_getArcWorkflowsFromContracts(contracts: Array[Contract]) -> Array[ArcWorkflow]:
|
|
1310
|
+
def chooser(c: Contract, contracts: Any=contracts) -> ArcWorkflow | None:
|
|
1311
|
+
return ARCtrl_ArcWorkflow__ArcWorkflow_tryFromReadContract_Static_7570923F(c)
|
|
1312
|
+
|
|
1313
|
+
return choose(chooser, contracts, None)
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
def ARCAux_getArcRunsFromContracts(contracts: Array[Contract]) -> Array[ArcRun]:
|
|
1317
|
+
def chooser(c: Contract, contracts: Any=contracts) -> ArcRun | None:
|
|
1318
|
+
return ARCtrl_ArcRun__ArcRun_tryFromReadContract_Static_7570923F(c)
|
|
1319
|
+
|
|
1320
|
+
return choose(chooser, contracts, None)
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
def ARCAux_getAssayDataMapFromContracts(assay_identifier: str, contracts: Array[Contract]) -> DataMap | None:
|
|
1324
|
+
def chooser(c: Contract, assay_identifier: Any=assay_identifier, contracts: Any=contracts) -> DataMap | None:
|
|
1325
|
+
return ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static(assay_identifier, c)
|
|
1326
|
+
|
|
1327
|
+
return try_pick(chooser, contracts)
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
def ARCAux_getStudyDataMapFromContracts(study_identifier: str, contracts: Array[Contract]) -> DataMap | None:
|
|
1331
|
+
def chooser(c: Contract, study_identifier: Any=study_identifier, contracts: Any=contracts) -> DataMap | None:
|
|
1332
|
+
return ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static(study_identifier, c)
|
|
1333
|
+
|
|
1334
|
+
return try_pick(chooser, contracts)
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
def ARCAux_getWorkflowDataMapFromContracts(workflow_identifier: str, contracts: Array[Contract]) -> DataMap | None:
|
|
1338
|
+
def chooser(c: Contract, workflow_identifier: Any=workflow_identifier, contracts: Any=contracts) -> DataMap | None:
|
|
1339
|
+
return ARCtrl_DataMap__DataMap_tryFromReadContractForWorkflow_Static(workflow_identifier, c)
|
|
1340
|
+
|
|
1341
|
+
return try_pick(chooser, contracts)
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
def ARCAux_getRunDataMapFromContracts(run_identifier: str, contracts: Array[Contract]) -> DataMap | None:
|
|
1345
|
+
def chooser(c: Contract, run_identifier: Any=run_identifier, contracts: Any=contracts) -> DataMap | None:
|
|
1346
|
+
return ARCtrl_DataMap__DataMap_tryFromReadContractForRun_Static(run_identifier, c)
|
|
1347
|
+
|
|
1348
|
+
return try_pick(chooser, contracts)
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
def ARCAux_getArcInvestigationFromContracts(contracts: Array[Contract]) -> ArcInvestigation:
|
|
1352
|
+
def chooser(c: Contract, contracts: Any=contracts) -> ArcInvestigation | None:
|
|
1353
|
+
return ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F(c)
|
|
1354
|
+
|
|
1355
|
+
return exactly_one(choose(chooser, contracts, None))
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
def ARCAux_updateFSByISA(isa: ArcInvestigation, fs: FileSystem) -> FileSystem:
|
|
1359
|
+
assays_folder: FileSystemTree
|
|
1360
|
+
def mapping(a: ArcAssay, isa: Any=isa, fs: Any=fs) -> FileSystemTree:
|
|
1361
|
+
return FileSystemTree.create_assay_folder(a.Identifier, a.DataMap is not None)
|
|
1362
|
+
|
|
1363
|
+
assays: Array[FileSystemTree] = map_1(mapping, to_array(isa.Assays), None)
|
|
1364
|
+
assays_folder = FileSystemTree.create_assays_folder(assays)
|
|
1365
|
+
studies_folder: FileSystemTree
|
|
1366
|
+
def mapping_1(s: ArcStudy, isa: Any=isa, fs: Any=fs) -> FileSystemTree:
|
|
1367
|
+
return FileSystemTree.create_study_folder(s.Identifier, s.DataMap is not None)
|
|
1368
|
+
|
|
1369
|
+
studies: Array[FileSystemTree] = map_1(mapping_1, to_array(isa.Studies), None)
|
|
1370
|
+
studies_folder = FileSystemTree.create_studies_folder(studies)
|
|
1371
|
+
workflows_folder: FileSystemTree
|
|
1372
|
+
def mapping_2(w: ArcWorkflow, isa: Any=isa, fs: Any=fs) -> FileSystemTree:
|
|
1373
|
+
return FileSystemTree.create_workflow_folder(ArcWorkflow__get_Identifier(w), ArcWorkflow__get_DataMap(w) is not None)
|
|
1374
|
+
|
|
1375
|
+
workflows: Array[FileSystemTree] = map_1(mapping_2, to_array(isa.Workflows), None)
|
|
1376
|
+
workflows_folder = FileSystemTree.create_workflows_folder(workflows)
|
|
1377
|
+
runs_folder: FileSystemTree
|
|
1378
|
+
def mapping_3(r: ArcRun, isa: Any=isa, fs: Any=fs) -> FileSystemTree:
|
|
1379
|
+
return FileSystemTree.create_run_folder(r.Identifier, r.DataMap is not None)
|
|
1380
|
+
|
|
1381
|
+
runs: Array[FileSystemTree] = map_1(mapping_3, to_array(isa.Runs), None)
|
|
1382
|
+
runs_folder = FileSystemTree.create_runs_folder(runs)
|
|
1383
|
+
investigation: FileSystemTree = FileSystemTree.create_investigation_file()
|
|
1384
|
+
tree_1: FileSystem
|
|
1385
|
+
tree: FileSystemTree = FileSystemTree.create_root_folder([investigation, assays_folder, studies_folder, workflows_folder, runs_folder])
|
|
1386
|
+
tree_1 = FileSystem.create(tree = tree)
|
|
1387
|
+
return fs.Union(tree_1)
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
def ARCAux_updateFSByCWL(cwl: None | None, fs: FileSystem) -> FileSystem:
|
|
1391
|
+
workflows: FileSystemTree = FileSystemTree.create_workflows_folder([])
|
|
1392
|
+
runs: FileSystemTree = FileSystemTree.create_runs_folder([])
|
|
1393
|
+
tree_1: FileSystem
|
|
1394
|
+
tree: FileSystemTree = FileSystemTree.create_root_folder([workflows, runs])
|
|
1395
|
+
tree_1 = FileSystem.create(tree = tree)
|
|
1396
|
+
return fs.Union(tree_1)
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
__all__ = ["ARC_reflection", "ARCAux_getArcAssaysFromContracts", "ARCAux_getArcStudiesFromContracts", "ARCAux_getArcWorkflowsFromContracts", "ARCAux_getArcRunsFromContracts", "ARCAux_getAssayDataMapFromContracts", "ARCAux_getStudyDataMapFromContracts", "ARCAux_getWorkflowDataMapFromContracts", "ARCAux_getRunDataMapFromContracts", "ARCAux_getArcInvestigationFromContracts", "ARCAux_updateFSByISA", "ARCAux_updateFSByCWL"]
|
|
1400
|
+
|