From 8b0e422beffac82dd0dd2c1d48e8291a735ae871 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Jan 2024 02:24:16 +0000 Subject: [PATCH 01/62] Bump vite from 4.4.12 to 4.5.2 Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.12 to 4.5.2. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v4.5.2/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v4.5.2/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9d0920057b..7468fc8050 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "jest": "^26.2.2", "miragejs": "^0.1.40", "prettier": "^2.3.0", - "vite": "^4.4.12", + "vite": "^4.5.2", "vite-plugin-ruby": "^3.2.0", "vite-plugin-vue2": "^1.9.3", "vue-jest": "^3.0.6" diff --git a/yarn.lock b/yarn.lock index 9e326e8499..81b76f96e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6578,10 +6578,10 @@ vite-plugin-vue2@^1.9.3: source-map "^0.7.3" vue-template-es2015-compiler "^1.9.1" -vite@^4.4.12: - version "4.4.12" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.4.12.tgz#e9c355d5a0d8a47afa46cb4bad10820da333da5c" - integrity sha512-KtPlUbWfxzGVul8Nut8Gw2Qe8sBzWY+8QVc5SL8iRFnpnrcoCaNlzO40c1R6hPmcdTwIPEDkq0Y9+27a5tVbdQ== +vite@^4.5.2: + version "4.5.2" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.2.tgz#d6ea8610e099851dad8c7371599969e0f8b97e82" + integrity sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w== dependencies: esbuild "^0.18.10" postcss "^8.4.27" From feebbffab29a917d6048dfc0d0d6329f3de9b84c Mon Sep 17 00:00:00 2001 From: yoldas Date: Thu, 1 Feb 2024 18:23:02 +0000 Subject: [PATCH 02/62] Loaded jsonapi from a fork branch that excludes the module that blocks Rails 6.1 update --- Gemfile | 12 +++++++++++- Gemfile.lock | 16 +++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 0edb747cf5..4dc69901b1 100644 --- a/Gemfile +++ b/Gemfile @@ -62,7 +62,17 @@ group :default do # https://github.com/JamesGlover/sequencescape/tree/depfu/update/jsonapi-resources-0.9.5 # but not only is there a failing test, but performance was tanking in a few places # due to not correctly eager loading dependencies on nested resources. - gem 'jsonapi-resources', '0.9.0' + + # Versions above 0.9.0 are incompatible and it is too much work to upgrade at + # this time. Implementing new patches for updates is not a long term solution + # as the internals keep changing. However, version 0.9.0 is blocking us from + # updating rails to version 6.1 . The following steps show the process for an + # alternative solution: + # - Fork jsonpi-resources repository + # - Create a branch off version 0.9.0 + # - Remove the ActionController::ForceSSL module + # - Load the gem from the branch + gem 'jsonapi-resources', github: 'yoldas/jsonapi-resources', branch: 'develop' # Wraps bunny with connection pooling ad consumer process handling gem 'sanger_warren' diff --git a/Gemfile.lock b/Gemfile.lock index 20ac60957e..a9a0706ecc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,6 +20,16 @@ GIT specs: sanger_barcode_format (0.2.0) +GIT + remote: https://github.com/yoldas/jsonapi-resources.git + revision: db2c5cd3f0d6bdddf990eee705b3d9efe79de2bb + branch: develop + specs: + jsonapi-resources (0.9.0) + activerecord (>= 4.1) + concurrent-ruby + railties (>= 4.1) + GEM remote: https://rubygems.org/ specs: @@ -227,10 +237,6 @@ GEM mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) json (2.6.3) - jsonapi-resources (0.9.0) - activerecord (>= 4.1) - concurrent-ruby - railties (>= 4.1) jsonapi-resources-matchers (1.0.0) jsonapi-resources (>= 0.9.0) knapsack_pro (5.7.0) @@ -555,7 +561,7 @@ DEPENDENCIES flipper-ui (~> 0.25.0) formtastic json - jsonapi-resources (= 0.9.0) + jsonapi-resources! jsonapi-resources-matchers knapsack_pro launchy From 6b787c8db9d4dbafa042eb1fa9246524b86121cd Mon Sep 17 00:00:00 2001 From: yoldas Date: Mon, 5 Feb 2024 20:30:32 +0000 Subject: [PATCH 03/62] Added Limber - scRNA Core Donor Pooling and cDNA Prep submission template record --- ...scrna_core_cdna_prep_submission_templates.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml diff --git a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml new file mode 100644 index 0000000000..811f8dab31 --- /dev/null +++ b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml @@ -0,0 +1,16 @@ +--- +# TODO: Check: submission_class_name is LinearSubmission because it represents +# a chain of request types in linear order, without branching. +# TODO: Check: request_type_keys is an array of request types. These match the +# pipeline group scRNA Core cDNA Prep in Limber. +# TODO: Check: project_name (cost code) +# TODO: Check: product_line_name +# TODO: Check: product_catalogue_name +# TODO: Check: Testing: What else other than Integration Suite? +Limber - scRNA Core Donor Pooling and cDNA Prep: + submission_class_name: "LinearSubmission" + related_records: + request_type_keys: ["limber_scrna_core_donor_pooling", "limber_scrna_core_cDNA_prep"] + project_name: "S0842" + product_line_name: Sample Preparation + product_catalogue_name: scRNA Core cDNA Prep From 4c76fbb9d4891bb0bbae9b62a6a11cb8ac1b76c1 Mon Sep 17 00:00:00 2001 From: yoldas Date: Mon, 5 Feb 2024 20:31:59 +0000 Subject: [PATCH 04/62] Added scRNA Core Donor Pooling and cDNA Prep request type records --- .../012_limber_scrna_core_cdna_prep.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml diff --git a/config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml b/config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml new file mode 100644 index 0000000000..7b652c005a --- /dev/null +++ b/config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml @@ -0,0 +1,29 @@ +--- +# TODO: Check: asset_type, is it for LRC Bank Seq/Spare +# TODO: Check: order, is it the sequence of requests in the submission +# TODO: Check: request_class_name +# TODO: Check: for_multiplexing +# TODO: Check: product_line_name +# TODO: Check: acceptable_purposes +limber_scrna_core_donor_pooling: + name: scRNA Core Donor Pooling + asset_type: SampleTube + order: 1 + request_class_name: CustomerRequest + for_multiplexing: false + billable: true + product_line_name: Sample Preparation + acceptable_purposes: + - LRC Bank Seq + - LRC Bank Spare + +limber_scrna_core_cDNA_prep: + name: scRNA Core cDNA Prep + asset_type: SampleTube + order: 2 + request_class_name: CustomerRequest + for_multiplexing: false + billable: true + product_line_name: Sample Preparation + acceptable_purposes: + - LRC PBMC Pools \ No newline at end of file From 04783fa7a74a53dd01bbb81a7f2c4ec616ac3280 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 03:44:16 +0000 Subject: [PATCH 05/62] Bump nokogiri from 1.15.4 to 1.16.2 Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.15.4 to 1.16.2. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.15.4...v1.16.2) --- updated-dependencies: - dependency-name: nokogiri dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 20ac60957e..95491bfa54 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -257,7 +257,7 @@ GEM mime-types-data (3.2023.0808) mini_magick (4.12.0) mini_mime (1.1.5) - mini_portile2 (2.8.4) + mini_portile2 (2.8.5) minitest (5.20.0) minitest-profiler (0.0.2) activesupport (>= 4.1.0) @@ -282,7 +282,7 @@ GEM net-protocol netrc (0.11.0) nio4r (2.7.0) - nokogiri (1.15.4) + nokogiri (1.16.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) parallel (1.23.0) From 7b86c47702f12bec05fa4357f1f3f8f58b71abfc Mon Sep 17 00:00:00 2001 From: yoldas Date: Tue, 6 Feb 2024 11:37:36 +0000 Subject: [PATCH 06/62] Prettier --- .../request_types/012_limber_scrna_core_cdna_prep.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml b/config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml index 7b652c005a..edeedea835 100644 --- a/config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml +++ b/config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml @@ -16,7 +16,7 @@ limber_scrna_core_donor_pooling: acceptable_purposes: - LRC Bank Seq - LRC Bank Spare - + limber_scrna_core_cDNA_prep: name: scRNA Core cDNA Prep asset_type: SampleTube @@ -26,4 +26,4 @@ limber_scrna_core_cDNA_prep: billable: true product_line_name: Sample Preparation acceptable_purposes: - - LRC PBMC Pools \ No newline at end of file + - LRC PBMC Pools From 33b885e4fc5bb4729350b2312987999e7f95cb23 Mon Sep 17 00:00:00 2001 From: yoldas Date: Tue, 6 Feb 2024 13:31:37 +0000 Subject: [PATCH 07/62] Renamed and updated the cDNA prep request types --- ...ore_cdna_prep.yml => 014_limber_scrna_core_cdna_prep.yml} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename config/default_records/request_types/{012_limber_scrna_core_cdna_prep.yml => 014_limber_scrna_core_cdna_prep.yml} (84%) diff --git a/config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml similarity index 84% rename from config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml rename to config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml index edeedea835..bf1d91036a 100644 --- a/config/default_records/request_types/012_limber_scrna_core_cdna_prep.yml +++ b/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml @@ -12,10 +12,11 @@ limber_scrna_core_donor_pooling: request_class_name: CustomerRequest for_multiplexing: false billable: true - product_line_name: Sample Preparation + product_line_name: scRNA Core acceptable_purposes: - LRC Bank Seq - LRC Bank Spare + # TODO: There will be a third purpose here LRC Bank Input in phase 3. limber_scrna_core_cDNA_prep: name: scRNA Core cDNA Prep @@ -24,6 +25,6 @@ limber_scrna_core_cDNA_prep: request_class_name: CustomerRequest for_multiplexing: false billable: true - product_line_name: Sample Preparation + product_line_name: scRNA Core acceptable_purposes: - LRC PBMC Pools From 5d05089ce683926e246966b93e625dc59334ebd3 Mon Sep 17 00:00:00 2001 From: yoldas Date: Tue, 6 Feb 2024 13:32:42 +0000 Subject: [PATCH 08/62] Lowercase request type key name limber_scrna_core_cdna_prep --- .../request_types/014_limber_scrna_core_cdna_prep.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml index bf1d91036a..e877e46eff 100644 --- a/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml +++ b/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml @@ -18,7 +18,7 @@ limber_scrna_core_donor_pooling: - LRC Bank Spare # TODO: There will be a third purpose here LRC Bank Input in phase 3. -limber_scrna_core_cDNA_prep: +limber_scrna_core_cdna_prep: name: scRNA Core cDNA Prep asset_type: SampleTube order: 2 From 82566c337af5c79a386b5c7800333e3647f8d6b9 Mon Sep 17 00:00:00 2001 From: yoldas Date: Tue, 6 Feb 2024 13:33:27 +0000 Subject: [PATCH 09/62] Changed the product line name to scRNA Core --- .../011_scrna_core_cdna_prep_submission_templates.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml index 811f8dab31..aae8dd023f 100644 --- a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml +++ b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml @@ -7,10 +7,9 @@ # TODO: Check: product_line_name # TODO: Check: product_catalogue_name # TODO: Check: Testing: What else other than Integration Suite? -Limber - scRNA Core Donor Pooling and cDNA Prep: +Limber-Htp - scRNA Core Donor Pooling and cDNA Prep: submission_class_name: "LinearSubmission" related_records: - request_type_keys: ["limber_scrna_core_donor_pooling", "limber_scrna_core_cDNA_prep"] - project_name: "S0842" - product_line_name: Sample Preparation + request_type_keys: ["limber_scrna_core_donor_pooling", "limber_scrna_core_cdna_prep"] + product_line_name: scRNA Core product_catalogue_name: scRNA Core cDNA Prep From 6645a8afe7394bf4fa1d3048f76d4e559c29be87 Mon Sep 17 00:00:00 2001 From: yoldas Date: Tue, 6 Feb 2024 21:38:16 +0000 Subject: [PATCH 10/62] Added product catalogue record for scRNA Core cDNA Prep --- .../product_catalogues/011_scrna_core_cdna_prep_catalogue.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 config/default_records/product_catalogues/011_scrna_core_cdna_prep_catalogue.yml diff --git a/config/default_records/product_catalogues/011_scrna_core_cdna_prep_catalogue.yml b/config/default_records/product_catalogues/011_scrna_core_cdna_prep_catalogue.yml new file mode 100644 index 0000000000..3011eede00 --- /dev/null +++ b/config/default_records/product_catalogues/011_scrna_core_cdna_prep_catalogue.yml @@ -0,0 +1,3 @@ +--- +scRNA Core cDNA Prep: + selection_behaviour: SingleProduct From 027f55e01b3e82873992c0e0796917ea5d5fabbc Mon Sep 17 00:00:00 2001 From: yoldas Date: Wed, 7 Feb 2024 11:22:37 +0000 Subject: [PATCH 11/62] Change asset_type to Well for limber_scrna_core_cdna_prep request type --- .../014_limber_scrna_core_cdna_prep.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml index e877e46eff..3307322d35 100644 --- a/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml +++ b/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml @@ -1,10 +1,10 @@ +# Request types for scRNA Core 'Donor Pooling' and 'cDNA Prep' submission. +# These are two stages of the pipeline for doing the submission in one go. +# - asset_type is the type of asset that is being requested. +# - order is the sequence of requests within the submission. +# - acceptable_purposes is where the request type can be used. +# --- -# TODO: Check: asset_type, is it for LRC Bank Seq/Spare -# TODO: Check: order, is it the sequence of requests in the submission -# TODO: Check: request_class_name -# TODO: Check: for_multiplexing -# TODO: Check: product_line_name -# TODO: Check: acceptable_purposes limber_scrna_core_donor_pooling: name: scRNA Core Donor Pooling asset_type: SampleTube @@ -16,11 +16,11 @@ limber_scrna_core_donor_pooling: acceptable_purposes: - LRC Bank Seq - LRC Bank Spare - # TODO: There will be a third purpose here LRC Bank Input in phase 3. + # - LRC Bank Input limber_scrna_core_cdna_prep: name: scRNA Core cDNA Prep - asset_type: SampleTube + asset_type: Well order: 2 request_class_name: CustomerRequest for_multiplexing: false @@ -28,3 +28,4 @@ limber_scrna_core_cdna_prep: product_line_name: scRNA Core acceptable_purposes: - LRC PBMC Pools + # - LRC PBMC Pools Input From 9dff83381c29396579a74eb507eda2716437d9a5 Mon Sep 17 00:00:00 2001 From: yoldas Date: Wed, 7 Feb 2024 11:23:29 +0000 Subject: [PATCH 12/62] Comments for submission template record --- ...na_core_cdna_prep_submission_templates.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml index aae8dd023f..69a5efdd20 100644 --- a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml +++ b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml @@ -1,12 +1,15 @@ +# Submission template for scRNA Core 'Donor Pooling' and 'cDNA Prep'. +# - submission_class_name is LinearSubmission because it represents a +# chain of request types in linear order. +# - request_type_keys is an array of request types. These match two stages of +# the pipeline for doing the submission in one go. +# - project_name (cost code) is not included here because it comes from the +# manual subssion. +# - product_line name is a grouping of related products. This is shown in UI +# as a category for the submission templates. +# - product_catalogue_name is the name of the product catalogue that has a +# selection_behaviour as 'SingleProduct'. --- -# TODO: Check: submission_class_name is LinearSubmission because it represents -# a chain of request types in linear order, without branching. -# TODO: Check: request_type_keys is an array of request types. These match the -# pipeline group scRNA Core cDNA Prep in Limber. -# TODO: Check: project_name (cost code) -# TODO: Check: product_line_name -# TODO: Check: product_catalogue_name -# TODO: Check: Testing: What else other than Integration Suite? Limber-Htp - scRNA Core Donor Pooling and cDNA Prep: submission_class_name: "LinearSubmission" related_records: From b2418105f148c515c32303a5d1f4b1ed042eab04 Mon Sep 17 00:00:00 2001 From: yoldas Date: Wed, 7 Feb 2024 14:26:08 +0000 Subject: [PATCH 13/62] Prettier --- .../011_scrna_core_cdna_prep_submission_templates.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml index 69a5efdd20..6de6095e13 100644 --- a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml +++ b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml @@ -1,4 +1,4 @@ -# Submission template for scRNA Core 'Donor Pooling' and 'cDNA Prep'. +# Submission template for scRNA Core 'Donor Pooling' and 'cDNA Prep'. # - submission_class_name is LinearSubmission because it represents a # chain of request types in linear order. # - request_type_keys is an array of request types. These match two stages of @@ -7,7 +7,7 @@ # manual subssion. # - product_line name is a grouping of related products. This is shown in UI # as a category for the submission templates. -# - product_catalogue_name is the name of the product catalogue that has a +# - product_catalogue_name is the name of the product catalogue that has a # selection_behaviour as 'SingleProduct'. --- Limber-Htp - scRNA Core Donor Pooling and cDNA Prep: From 392b33de489dc6a5bb10437a6d93568a0f839ad3 Mon Sep 17 00:00:00 2001 From: yoldas Date: Wed, 7 Feb 2024 14:27:31 +0000 Subject: [PATCH 14/62] Added LRC PBMC Pools purpose record for submission and request type creation --- .../011_scrna_core_cdna_prep_plate_purposes.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.yml diff --git a/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.yml b/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.yml new file mode 100644 index 0000000000..e2e7f0db4c --- /dev/null +++ b/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.yml @@ -0,0 +1,6 @@ +# We have added these purposes here to create submission and request type +# records for for scRNA Core cDNA Prep stage. +--- +LRC PBMC Pools: + stock_plate: false + cherrypickable_target: false From 2e719736ffccf71ee4acc13ec8d5b98a5488aab0 Mon Sep 17 00:00:00 2001 From: yoldas Date: Wed, 7 Feb 2024 14:28:22 +0000 Subject: [PATCH 15/62] Added LRC Bank Seq and Spare purpose records for submission and request type creation --- .../008_scrna_core_cdna_prep_tube_purposes.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.yml diff --git a/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.yml b/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.yml new file mode 100644 index 0000000000..8c1d2abc7f --- /dev/null +++ b/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.yml @@ -0,0 +1,14 @@ +# LCR Bank Seq and LCR Bank Spare are at the end of scRNA Core Cell Extraction +# pipeline and they are in control of Limber. However, we have added these +# purposes here to create submission and request type records for for scRNA +# Core cDNA Prep stage. +--- +LRC Bank Seq: + type: Tube::Purpose + target_type: SampleTube + stock_plate: false + +LRC Bank Spare: + type: Tube::Purpose + target_type: SampleTube + stock_plate: false From c8ab2bdb051ab0d79688fb80c9a588922bc44628 Mon Sep 17 00:00:00 2001 From: yoldas Date: Wed, 7 Feb 2024 14:30:23 +0000 Subject: [PATCH 16/62] Renamed record file for scRNA Core cDNA Prep request types --- ...prep.yml => 014_limber_scrna_core_cdna_prep_request_types.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/default_records/request_types/{014_limber_scrna_core_cdna_prep.yml => 014_limber_scrna_core_cdna_prep_request_types.yml} (100%) diff --git a/config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml similarity index 100% rename from config/default_records/request_types/014_limber_scrna_core_cdna_prep.yml rename to config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml From 7117fda45c8ef4e765e52af064efd44ffa1a8565 Mon Sep 17 00:00:00 2001 From: yoldas Date: Wed, 7 Feb 2024 14:57:58 +0000 Subject: [PATCH 17/62] Added Chromium single cell 5 prime HT v2 to library_types of limber_scrna_core_cdna_prep --- .../014_limber_scrna_core_cdna_prep_request_types.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml index 3307322d35..7af7805e31 100644 --- a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml +++ b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml @@ -29,3 +29,5 @@ limber_scrna_core_cdna_prep: acceptable_purposes: - LRC PBMC Pools # - LRC PBMC Pools Input + library_types: + - Chromium single cell 5 prime HT v2 From 247cc21f8946b76cb57318430e2ff85501fccc94 Mon Sep 17 00:00:00 2001 From: yoldas Date: Wed, 7 Feb 2024 21:04:49 +0000 Subject: [PATCH 18/62] Updated comments about tube and plate purposes --- .../011_scrna_core_cdna_prep_plate_purposes.yml | 5 +++-- .../008_scrna_core_cdna_prep_tube_purposes.yml | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.yml b/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.yml index e2e7f0db4c..3359a7227e 100644 --- a/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.yml +++ b/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.yml @@ -1,5 +1,6 @@ -# We have added these purposes here to create submission and request type -# records for for scRNA Core cDNA Prep stage. +# The 'LRC PBMC Pools' purpose is in control of Limber. However, it has been +# added here to create submission and request type records for scRNA Core cDNA +# Prep stage. --- LRC PBMC Pools: stock_plate: false diff --git a/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.yml b/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.yml index 8c1d2abc7f..181452ed19 100644 --- a/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.yml +++ b/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.yml @@ -1,7 +1,7 @@ -# LCR Bank Seq and LCR Bank Spare are at the end of scRNA Core Cell Extraction -# pipeline and they are in control of Limber. However, we have added these -# purposes here to create submission and request type records for for scRNA -# Core cDNA Prep stage. +# The 'LCR Bank Seq' and 'LCR Bank Spare' purposes are used the end of scRNA +# Core Cell Extraction pipeline and they are in control of Limber. However, +# they have been added here to create submission and request type records for +# scRNA Core cDNA Prep stage. --- LRC Bank Seq: type: Tube::Purpose From 52124e6b7440242cb92af39b140a37745444a68d Mon Sep 17 00:00:00 2001 From: yoldas Date: Wed, 7 Feb 2024 21:09:53 +0000 Subject: [PATCH 19/62] Added future library types --- .../014_limber_scrna_core_cdna_prep_request_types.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml index 7af7805e31..173281b2a3 100644 --- a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml +++ b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml @@ -31,3 +31,6 @@ limber_scrna_core_cdna_prep: # - LRC PBMC Pools Input library_types: - Chromium single cell 5 prime HT v2 + # - Chromium single cell 3 prime HT v3 + # - Chromium single cell BCR HT + # - Chromium single cell TCR HT From 31b073551efe0c03b2f3d925e78218ada43c2fc9 Mon Sep 17 00:00:00 2001 From: yoldas Date: Thu, 8 Feb 2024 21:08:27 +0000 Subject: [PATCH 20/62] Added tube submission UAT Action for integration testing --- .../uat_actions/tube_submission.rb | 153 ++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 app/uat_actions/uat_actions/tube_submission.rb diff --git a/app/uat_actions/uat_actions/tube_submission.rb b/app/uat_actions/uat_actions/tube_submission.rb new file mode 100644 index 0000000000..fde12acdba --- /dev/null +++ b/app/uat_actions/uat_actions/tube_submission.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# This UAT Action will generates a basic submission for tubes. Initially, it +# has been designed for generating scRNA Core Donor Pooling and cDNA Prep +# submissions on LRC Bank Seq/Spare tubes. +class UatActions::TubeSubmission < UatActions + self.title = 'Tube submission' + self.description = 'Generates a basic submission for tubes.' + self.category = :setup_and_test + + form_field :submission_template_name, + :select, + label: 'Submission Template', + help: 'Select the submission template to use.', + select_options: -> { compatible_submission_templates } + + form_field :tube_barcodes, + :text_area, + label: 'Tube barcodes', + help: 'Add the tubes which will form part of your submission.' + + form_field :library_type_name, + :select, + label: 'Library Type', + help: + 'Select the library type to use when creating the requests. ' \ + 'Leave blank to automatically use the first library type found. ' \ + 'Useful where the same request type has multiple library types.', + select_options: -> { LibraryType.alphabetical.pluck(:name) }, + options: { + include_blank: 'Using default library type...' + } + + validates :submission_template, presence: { message: 'could not be found' } + + # Returns a default copy of the UatAction which will be used to fill in the form + # + # @return [UatActions::TestSubmission] A default object for rendering a form + def self.default + new + end + + # Returns the submission templates which are compatible with the UAT action. + # These are submission templates which have a tube as an input asset type. + # + # @return [Array] The names of the compatible submission templates + def self.compatible_submission_templates + SubmissionTemplate + .visible + .each_with_object([]) do |submission_template, compatible| + next unless submission_template.input_asset_type.constantize < Tube + + compatible << submission_template.name + end + end + + # Generates tube submission for the given template. + # + # @return [Boolean] true if the submission was successfully created + def perform + order = + submission_template.create_with_submission!( + study: study, + project: project, + user: user, + assets: assets, + request_options: order_request_options + ) + fill_report(order) + order.submission.built! + true + end + + # Fills the report with the information from the submission + # + # @return [Void] + def fill_report(order) + report['tube_barcodes'] = assets.map(&:human_barcode) + report['submission_id'] = order.submission.id + report['library_type'] = order.request_options[:library_type] if order.request_options[:library_type].present? + end + + # Returns the submisssion template to use for the submission + # + # @return [SubmissionTemplate] The submission template to use + def submission_template + @submission_template = SubmissionTemplate.find_by(name: submission_template_name) + end + + # Returns the tubes to use for the submission + # + # @return [Array] The tubes to use for the submission + def assets + @assets ||= select_assets + end + + # Returns the tubes from the specified barcodes in the form field + # + # @return [Array] The tubes to use for the submission + def select_assets + tube_barcodes.gsub(/(\\[trfvn])+/, ' ').split.map { |barcode| Tube.find_by_barcode(barcode) } + end + + # Returns the request options to use for the submission + # + # @return [Hash] The request options to use for the submission + def order_request_options + default_request_options.merge(custom_request_options) + end + + # Returns the default request options to use for the submission + # + # @return [Hash] The default request options to use for the submission + def default_request_options + submission_template + .input_field_infos + .each_with_object({}) do |ifi, options| + options[ifi.key] = + ifi.default_value.nil? ? ifi.selection&.first.presence || ifi.max.presence || ifi.min : ifi.default_value + end + end + + # Returns the custom request options to use for the submission + # + # @return [Hash] The custom request options from the form + def custom_request_options + options = {} + options[:library_type] = library_type_name if library_type_name.present? + options + end + + # Returns the study to use for UAT + # + # @return [Study] The study to use for UAT + def study + UatActions::StaticRecords.study + end + + # Returns the project to use for UAT + # + # @return [Project] The project to use for UAT + def project + UatActions::StaticRecords.project + end + + # + # Returns the uat user + # + # @return [User] The UAT user can be used in any places where a user is expected. + def user + UatActions::StaticRecords.user + end +end From 2355709b0f88c712e9e4dba055dae0f3a4269117 Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 12:51:15 +0000 Subject: [PATCH 21/62] Renamed scrna core catalogue file name --- ..._core_cdna_prep_catalogue.yml => 011_scrna_core_catalogue.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/default_records/product_catalogues/{011_scrna_core_cdna_prep_catalogue.yml => 011_scrna_core_catalogue.yml} (100%) diff --git a/config/default_records/product_catalogues/011_scrna_core_cdna_prep_catalogue.yml b/config/default_records/product_catalogues/011_scrna_core_catalogue.yml similarity index 100% rename from config/default_records/product_catalogues/011_scrna_core_cdna_prep_catalogue.yml rename to config/default_records/product_catalogues/011_scrna_core_catalogue.yml From a5b8d3fcafb5da64122a7517b2cbb34b5851cb82 Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 12:55:15 +0000 Subject: [PATCH 22/62] Changed catalogue name to scRNA Core --- .../product_catalogues/011_scrna_core_catalogue.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default_records/product_catalogues/011_scrna_core_catalogue.yml b/config/default_records/product_catalogues/011_scrna_core_catalogue.yml index 3011eede00..9ad7151d1e 100644 --- a/config/default_records/product_catalogues/011_scrna_core_catalogue.yml +++ b/config/default_records/product_catalogues/011_scrna_core_catalogue.yml @@ -1,3 +1,3 @@ --- -scRNA Core cDNA Prep: +scRNA Core: selection_behaviour: SingleProduct From 2d8471138b2f82902fc4641b8c7022f5e5594063 Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 12:56:05 +0000 Subject: [PATCH 23/62] Changed product catalogue name of submission template --- .../011_scrna_core_cdna_prep_submission_templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml index 6de6095e13..495d15e5e8 100644 --- a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml +++ b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml @@ -15,4 +15,4 @@ Limber-Htp - scRNA Core Donor Pooling and cDNA Prep: related_records: request_type_keys: ["limber_scrna_core_donor_pooling", "limber_scrna_core_cdna_prep"] product_line_name: scRNA Core - product_catalogue_name: scRNA Core cDNA Prep + product_catalogue_name: scRNA Core From 8bf08102a76f3fa990547a3df7bd4afdf45307aa Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 12:57:35 +0000 Subject: [PATCH 24/62] Removed commented out LRC Bank Input from acceptable purposes --- .../014_limber_scrna_core_cdna_prep_request_types.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml index 173281b2a3..a6657f97fd 100644 --- a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml +++ b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml @@ -16,7 +16,6 @@ limber_scrna_core_donor_pooling: acceptable_purposes: - LRC Bank Seq - LRC Bank Spare - # - LRC Bank Input limber_scrna_core_cdna_prep: name: scRNA Core cDNA Prep From f975c9c218f960fdb86437e4b737a72299d8d200 Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 12:59:07 +0000 Subject: [PATCH 25/62] Changed product line name to refer team name in submission template record --- .../011_scrna_core_cdna_prep_submission_templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml index 495d15e5e8..d779b36997 100644 --- a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml +++ b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml @@ -14,5 +14,5 @@ Limber-Htp - scRNA Core Donor Pooling and cDNA Prep: submission_class_name: "LinearSubmission" related_records: request_type_keys: ["limber_scrna_core_donor_pooling", "limber_scrna_core_cdna_prep"] - product_line_name: scRNA Core + product_line_name: Sample Prep product_catalogue_name: scRNA Core From 761119a65e61f2dda06032a7a0581e45b2380b8e Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 12:59:58 +0000 Subject: [PATCH 26/62] Changed product line name to refer team name in request types --- .../014_limber_scrna_core_cdna_prep_request_types.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml index a6657f97fd..a830f83eb6 100644 --- a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml +++ b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml @@ -12,7 +12,7 @@ limber_scrna_core_donor_pooling: request_class_name: CustomerRequest for_multiplexing: false billable: true - product_line_name: scRNA Core + product_line_name: Sample Prep acceptable_purposes: - LRC Bank Seq - LRC Bank Spare @@ -24,7 +24,7 @@ limber_scrna_core_cdna_prep: request_class_name: CustomerRequest for_multiplexing: false billable: true - product_line_name: scRNA Core + product_line_name: Sample Prep acceptable_purposes: - LRC PBMC Pools # - LRC PBMC Pools Input From 4bb5fb06e8871382c8f30f10fc4df5b49505c561 Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 13:02:30 +0000 Subject: [PATCH 27/62] Changed team name reference from Sample Prep to Short Read in cDNA Prep submission and requests --- .../014_limber_scrna_core_cdna_prep_request_types.yml | 4 ++-- .../011_scrna_core_cdna_prep_submission_templates.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml index a830f83eb6..bf84d25887 100644 --- a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml +++ b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml @@ -12,7 +12,7 @@ limber_scrna_core_donor_pooling: request_class_name: CustomerRequest for_multiplexing: false billable: true - product_line_name: Sample Prep + product_line_name: Short Read acceptable_purposes: - LRC Bank Seq - LRC Bank Spare @@ -24,7 +24,7 @@ limber_scrna_core_cdna_prep: request_class_name: CustomerRequest for_multiplexing: false billable: true - product_line_name: Sample Prep + product_line_name: Short Read acceptable_purposes: - LRC PBMC Pools # - LRC PBMC Pools Input diff --git a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml index d779b36997..dbae4d74cf 100644 --- a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml +++ b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml @@ -14,5 +14,5 @@ Limber-Htp - scRNA Core Donor Pooling and cDNA Prep: submission_class_name: "LinearSubmission" related_records: request_type_keys: ["limber_scrna_core_donor_pooling", "limber_scrna_core_cdna_prep"] - product_line_name: Sample Prep + product_line_name: Short Read product_catalogue_name: scRNA Core From 58945b5f867faa86bf831a6e3fd91e0cbb3c5b98 Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 13:04:56 +0000 Subject: [PATCH 28/62] Moved cDNA plate purposes to WIP --- ...rposes.yml => 011_scrna_core_cdna_prep_plate_purposes.wip.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/default_records/plate_purposes/{011_scrna_core_cdna_prep_plate_purposes.yml => 011_scrna_core_cdna_prep_plate_purposes.wip.yml} (100%) diff --git a/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.yml b/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.wip.yml similarity index 100% rename from config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.yml rename to config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.wip.yml From 4228a75da58496ad765084a80772fa548aac2e10 Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 13:05:57 +0000 Subject: [PATCH 29/62] Moved Donor Pooling and cDNA Prep request types to WIP --- ....yml => 014_limber_scrna_core_cdna_prep_request_types.wip.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/default_records/request_types/{014_limber_scrna_core_cdna_prep_request_types.yml => 014_limber_scrna_core_cdna_prep_request_types.wip.yml} (100%) diff --git a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.wip.yml similarity index 100% rename from config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.yml rename to config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.wip.yml From ba86491a5c6cef08594e0c2b365ef5123a67be99 Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 13:06:53 +0000 Subject: [PATCH 30/62] Moved cDNA Prep submission templates to WIP --- ....yml => 011_scrna_core_cdna_prep_submission_templates.wip.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/default_records/submission_templates/{011_scrna_core_cdna_prep_submission_templates.yml => 011_scrna_core_cdna_prep_submission_templates.wip.yml} (100%) diff --git a/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml b/config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.wip.yml similarity index 100% rename from config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.yml rename to config/default_records/submission_templates/011_scrna_core_cdna_prep_submission_templates.wip.yml From 4bddda9e37da152a49b1cc1d49004ef825e5dbcf Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 13:08:32 +0000 Subject: [PATCH 31/62] Moved scRNA Core product catalogue to WIP --- ..._scrna_core_catalogue.yml => 011_scrna_core_catalogue.wip.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/default_records/product_catalogues/{011_scrna_core_catalogue.yml => 011_scrna_core_catalogue.wip.yml} (100%) diff --git a/config/default_records/product_catalogues/011_scrna_core_catalogue.yml b/config/default_records/product_catalogues/011_scrna_core_catalogue.wip.yml similarity index 100% rename from config/default_records/product_catalogues/011_scrna_core_catalogue.yml rename to config/default_records/product_catalogues/011_scrna_core_catalogue.wip.yml From e100d6586ddac70f371d9cc7fa53bf58fe9ce665 Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 13:09:35 +0000 Subject: [PATCH 32/62] Moved cDNA Prep tube purposes to WIP --- ...urposes.yml => 008_scrna_core_cdna_prep_tube_purposes.wip.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/default_records/tube_purposes/{008_scrna_core_cdna_prep_tube_purposes.yml => 008_scrna_core_cdna_prep_tube_purposes.wip.yml} (100%) diff --git a/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.yml b/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.wip.yml similarity index 100% rename from config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.yml rename to config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.wip.yml From 54dc53beb1108de16f1cdccb71f29aa1ed9d8c86 Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 13:50:17 +0000 Subject: [PATCH 33/62] Update config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.wip.yml Updated comments from review suggestion. Co-authored-by: KatyTaylor --- .../011_scrna_core_cdna_prep_plate_purposes.wip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.wip.yml b/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.wip.yml index 3359a7227e..a50ce87f06 100644 --- a/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.wip.yml +++ b/config/default_records/plate_purposes/011_scrna_core_cdna_prep_plate_purposes.wip.yml @@ -1,4 +1,4 @@ -# The 'LRC PBMC Pools' purpose is in control of Limber. However, it has been +# The 'LRC PBMC Pools' purpose is controlled by Limber. However, it has been # added here to create submission and request type records for scRNA Core cDNA # Prep stage. --- From 6ff3362c73a95312cb4d377c6c8d61946a4d653b Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 13:50:31 +0000 Subject: [PATCH 34/62] Update config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.wip.yml Updated comments from review suggestion. Co-authored-by: KatyTaylor --- .../008_scrna_core_cdna_prep_tube_purposes.wip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.wip.yml b/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.wip.yml index 181452ed19..01c1c2508e 100644 --- a/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.wip.yml +++ b/config/default_records/tube_purposes/008_scrna_core_cdna_prep_tube_purposes.wip.yml @@ -1,5 +1,5 @@ # The 'LCR Bank Seq' and 'LCR Bank Spare' purposes are used the end of scRNA -# Core Cell Extraction pipeline and they are in control of Limber. However, +# Core Cell Extraction pipeline and they are controlled by of Limber. However, # they have been added here to create submission and request type records for # scRNA Core cDNA Prep stage. --- From acb643f4263fac3376c74dc4de23c5655c6f1e0e Mon Sep 17 00:00:00 2001 From: yoldas Date: Fri, 9 Feb 2024 13:48:18 +0000 Subject: [PATCH 35/62] Fixed subclass check to include Tube while finding compatible submission templates --- app/uat_actions/uat_actions/tube_submission.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/uat_actions/uat_actions/tube_submission.rb b/app/uat_actions/uat_actions/tube_submission.rb index fde12acdba..ded0b09840 100644 --- a/app/uat_actions/uat_actions/tube_submission.rb +++ b/app/uat_actions/uat_actions/tube_submission.rb @@ -48,7 +48,7 @@ def self.compatible_submission_templates SubmissionTemplate .visible .each_with_object([]) do |submission_template, compatible| - next unless submission_template.input_asset_type.constantize < Tube + next unless submission_template.input_asset_type.constantize <= Tube compatible << submission_template.name end From 3658fc0fb8b896cb84cdfeb20f7ded5dedc07ae9 Mon Sep 17 00:00:00 2001 From: yoldas Date: Sat, 10 Feb 2024 23:40:46 +0000 Subject: [PATCH 36/62] Changed the request class name of the scRNA Core cDNA Prep request type --- .../014_limber_scrna_core_cdna_prep_request_types.wip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.wip.yml b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.wip.yml index bf84d25887..cca19ae62b 100644 --- a/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.wip.yml +++ b/config/default_records/request_types/014_limber_scrna_core_cdna_prep_request_types.wip.yml @@ -21,7 +21,7 @@ limber_scrna_core_cdna_prep: name: scRNA Core cDNA Prep asset_type: Well order: 2 - request_class_name: CustomerRequest + request_class_name: IlluminaHtp::Requests::StdLibraryRequest for_multiplexing: false billable: true product_line_name: Short Read From 8cb43e831a44c212ab6e13ad05ce4a9cefa16208 Mon Sep 17 00:00:00 2001 From: Stephen Inglis <519327+stevieing@users.noreply.github.com> Date: Tue, 13 Feb 2024 15:07:36 +0000 Subject: [PATCH 37/62] Update LICENSE Update to MIT License --- LICENSE | 68 +++++++++++++++------------------------------------------ 1 file changed, 17 insertions(+), 51 deletions(-) diff --git a/LICENSE b/LICENSE index c0a2240504..f8d7d74342 100644 --- a/LICENSE +++ b/LICENSE @@ -1,55 +1,21 @@ -Sequencescape - A open source project and lab management systems +MIT License -Authors: -Andrew Page -Andrew Sparkes -Arfon Smith -Beth Jones -Cinzia Malangone -Conny Brunnkvist -Constantine Nicolou -David Franklin -Eduardo Martin Rojo -Harriet Craven -James Glover -Jens Raaby -Kate Taylor -Lars G T Jorgensen -Luca Da Rin Fioretto -Matthew Astley -Matthew Denner -Matt Wood -Maxime Bourget -Neil Sycamore -Niels Jansen -Paul Thornthwaite -Paul Western -Sean Dunn -Simon Holroyd -Stephen Inglis -Yana Proskurina +Copyright (c) 2024 Wellcome Sanger Institute - PSD +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, see . - - -The usage of a range of years within a copyright statement contained within -this distribution should be interpreted as being equivalent to a list of years -including the first and last year specified and all consecutive years between -them. For example, a copyright statement that reads "Copyright (c) 2005, 2007- -2009, 2011-2012" should be interpreted as being identical to a statement that -reads "Copyright (c) 2005, 2007, 2008, 2009, 2011, 2012" and a copyright -statement that reads "Copyright (c) 2005-2012" should be interpreted as being -identical to a statement that reads "Copyright (c) 2005, 2006, 2007, 2008, 2009 -, 2010 , 2011 , 2012". +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From b1ec8ec80d8eb5a932be0c8dbca848163935583b Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 14 Feb 2024 15:44:10 +0000 Subject: [PATCH 38/62] feat: add received date to location report --- app/models/location_report.rb | 27 +++++++++++++- spec/models/location_report_spec.rb | 57 ++++++++++++++++++++--------- 2 files changed, 65 insertions(+), 19 deletions(-) diff --git a/app/models/location_report.rb b/app/models/location_report.rb index 99ad24714a..a66c2adf03 100644 --- a/app/models/location_report.rb +++ b/app/models/location_report.rb @@ -80,7 +80,19 @@ def check_maxlength_of_barcodes end def column_headers - %w[ScannedBarcode HumanBarcode Type Created Location Service RetentionInstructions StudyName StudyId FacultySponsor] + %w[ + ScannedBarcode + HumanBarcode + Type + Created + ReceivedDate + Location + Service + RetentionInstructions + StudyName + StudyId + FacultySponsor + ] end def generate! @@ -134,18 +146,29 @@ def plates_list end end + def received_date(cur_plate) + cur_plate + &.asset_audits + &.where(key: 'slf_receive_plates') + &.where('message LIKE ?', '%Reception fridge%') + &.first + &.created_at + &.strftime('%Y-%m-%d %H:%M:%S') #TODO: add reception fridge check on message + end + def generate_report_row(cur_plate, cur_study) row = generate_plate_cols_for_row(cur_plate) row + generate_study_cols_for_row(cur_study) end - def generate_plate_cols_for_row(cur_plate) + def generate_plate_cols_for_row(cur_plate) # rubocop:disable Metrics/AbcSize cols = [] << cur_plate.machine_barcode cols << cur_plate.human_barcode # NB. some older plates do not have a purpose cols << (cur_plate.plate_purpose&.name || 'Unknown') cols << cur_plate.created_at.strftime('%Y-%m-%d %H:%M:%S') + cols << (received_date(cur_plate) || 'Unknown') cols << cur_plate.storage_location cols << cur_plate.storage_location_service cols << (cur_plate.retention_instructions || 'Unknown') diff --git a/spec/models/location_report_spec.rb b/spec/models/location_report_spec.rb index 58d9b7ada3..8b2a7c143e 100644 --- a/spec/models/location_report_spec.rb +++ b/spec/models/location_report_spec.rb @@ -24,8 +24,16 @@ created_at: '2016-02-01 12:00:00' ) end + let!(:plt_1_asset_audit) do + create :asset_audit, + asset: plate_1, + created_at: Time.zone.parse('June 16, 2020 15:42'), + key: 'slf_receive_plates', + message: "Process '...' performed on instrument Reception fridge" + end let(:plt_1_purpose) { plate_1.plate_purpose.name } let(:plt_1_created) { plate_1.created_at.strftime('%Y-%m-%d %H:%M:%S') } + let(:plt_1_received_date) { plt_1_asset_audit.created_at.strftime('%Y-%m-%d %H:%M:%S') } # add retention instruction metadata to plate 1 custom metadatum collection let(:retention_key) { 'retention_instruction' } @@ -49,6 +57,7 @@ let(:plt_2_purpose) { plate_2.plate_purpose.name } let(:plt_2_created) { plate_2.created_at.strftime('%Y-%m-%d %H:%M:%S') } + let(:plt_2_received_date) { 'Unknown' } let(:plate_3) do create( @@ -60,6 +69,7 @@ end let(:plt_3_purpose) { plate_3.plate_purpose.name } let(:plt_3_created) { plate_3.created_at.strftime('%Y-%m-%d %H:%M:%S') } + let(:plt_3_received_date) { 'Unknown' } # add retention instruction metadata to plate 3 custom metadatum collection let(:plate_3_custom_metadatum_collection) { create :custom_metadatum_collection, asset: plate_3, user: user } @@ -71,7 +81,19 @@ end let(:headers_line) do - 'ScannedBarcode,HumanBarcode,Type,Created,Location,Service,RetentionInstructions,StudyName,StudyId,FacultySponsor' + %w[ + ScannedBarcode + HumanBarcode + Type + Created + ReceivedDate + Location + Service + RetentionInstructions + StudyName + StudyId + FacultySponsor + ].join(',') end let(:locn_prefix) { 'Sanger - Ogilvie - AA209 - Freezer 1' } @@ -186,22 +208,22 @@ let(:plt_1_line) do # rubocop:todo Layout/LineLength - "#{plate_1.machine_barcode},#{plate_1.human_barcode},#{plt_1_purpose},#{plt_1_created},#{locn_prefix} - Shelf 1,LabWhere,#{retention_value},#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" + "#{plate_1.machine_barcode},#{plate_1.human_barcode},#{plt_1_purpose},#{plt_1_created},#{plt_1_received_date},#{locn_prefix} - Shelf 1,LabWhere,#{retention_value},#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" # rubocop:enable Layout/LineLength end let(:plt_2_line_1) do # rubocop:todo Layout/LineLength - "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{locn_prefix} - Shelf 2,LabWhere,Unknown,#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" + "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{plt_2_received_date},#{locn_prefix} - Shelf 2,LabWhere,Unknown,#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" # rubocop:enable Layout/LineLength end let(:plt_2_line_2) do # rubocop:todo Layout/LineLength - "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{locn_prefix} - Shelf 2,LabWhere,Unknown,#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" + "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{plt_2_received_date},#{locn_prefix} - Shelf 2,LabWhere,Unknown,#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" # rubocop:enable Layout/LineLength end let(:plt_3_line) do # rubocop:todo Layout/LineLength - "#{plate_3.machine_barcode},#{plate_3.human_barcode},#{plt_3_purpose},#{plt_3_created},#{locn_prefix} - Shelf 3,LabWhere,#{retention_value},#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" + "#{plate_3.machine_barcode},#{plate_3.human_barcode},#{plt_3_purpose},#{plt_3_created},#{plt_3_received_date},#{locn_prefix} - Shelf 3,LabWhere,#{retention_value},#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" # rubocop:enable Layout/LineLength end @@ -328,9 +350,10 @@ let(:start_date) { '2017-01-01 00:00:00' } let(:end_date) { '2017-03-01 00:00:00' } let(:plt_4_created) { plate_4.created_at.strftime('%Y-%m-%d %H:%M:%S') } + let(:plt_4_received_date) { 'Unknown' } let(:plt_4_line) do # rubocop:todo Layout/LineLength - "#{plate_4.machine_barcode},#{plate_4.human_barcode},Unknown,#{plt_4_created},#{locn_prefix} - Shelf 1,LabWhere,Unknown,#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" + "#{plate_4.machine_barcode},#{plate_4.human_barcode},Unknown,#{plt_4_created},#{plt_4_received_date},#{locn_prefix} - Shelf 1,LabWhere,Unknown,#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" # rubocop:enable Layout/LineLength end let(:expected_lines) { [headers_line, plt_4_line] } @@ -421,7 +444,7 @@ let(:location_barcode) { 'locn-1-at-lvl-1' } let(:plt_1_line) do # rubocop:todo Layout/LineLength - "#{plate_1.machine_barcode},#{plate_1.human_barcode},#{plt_1_purpose},#{plt_1_created},#{locn_prefix} - Shelf 1,LabWhere,#{retention_value},#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" + "#{plate_1.machine_barcode},#{plate_1.human_barcode},#{plt_1_purpose},#{plt_1_created},#{plt_1_received_date},#{locn_prefix} - Shelf 1,LabWhere,#{retention_value},#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" # rubocop:enable Layout/LineLength end let(:expected_lines) { [headers_line, plt_1_line] } @@ -448,17 +471,17 @@ let(:location_barcode) { 'locn-1-at-lvl-1' } let(:plt_1_line) do # rubocop:todo Layout/LineLength - "#{plate_1.machine_barcode},#{plate_1.human_barcode},#{plt_1_purpose},#{plt_1_created},#{locn_prefix} - Shelf 1 - Box 1,LabWhere,#{retention_value},#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" + "#{plate_1.machine_barcode},#{plate_1.human_barcode},#{plt_1_purpose},#{plt_1_created},#{plt_1_received_date},#{locn_prefix} - Shelf 1 - Box 1,LabWhere,#{retention_value},#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" # rubocop:enable Layout/LineLength end let(:plt_2_line_1) do # rubocop:todo Layout/LineLength - "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{locn_prefix} - Shelf 1 - Box 1,LabWhere,Unknown,#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" + "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{plt_2_received_date},#{locn_prefix} - Shelf 1 - Box 1,LabWhere,Unknown,#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" # rubocop:enable Layout/LineLength end let(:plt_2_line_2) do # rubocop:todo Layout/LineLength - "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{locn_prefix} - Shelf 1 - Box 1,LabWhere,Unknown,#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" + "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{plt_2_received_date},#{locn_prefix} - Shelf 1 - Box 1,LabWhere,Unknown,#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" # rubocop:enable Layout/LineLength end let(:expected_lines) { [headers_line, plt_1_line, plt_2_line_1, plt_2_line_2] } @@ -507,17 +530,17 @@ let(:location_barcode) { 'locn-1-at-lvl-1' } let(:plt_1_line) do # rubocop:todo Layout/LineLength - "#{plate_1.machine_barcode},#{plate_1.human_barcode},#{plt_1_purpose},#{plt_1_created},#{locn_prefix} - Shelf 1 - Box 1,LabWhere,#{retention_value},#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" + "#{plate_1.machine_barcode},#{plate_1.human_barcode},#{plt_1_purpose},#{plt_1_created},#{plt_1_received_date},#{locn_prefix} - Shelf 1 - Box 1,LabWhere,#{retention_value},#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" # rubocop:enable Layout/LineLength end let(:plt_2_line_1) do # rubocop:todo Layout/LineLength - "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{locn_prefix} - Shelf 1 - Box 2,LabWhere,Unknown,#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" + "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{plt_2_received_date},#{locn_prefix} - Shelf 1 - Box 2,LabWhere,Unknown,#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" # rubocop:enable Layout/LineLength end let(:plt_2_line_2) do # rubocop:todo Layout/LineLength - "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{locn_prefix} - Shelf 1 - Box 2,LabWhere,Unknown,#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" + "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{plt_2_received_date},#{locn_prefix} - Shelf 1 - Box 2,LabWhere,Unknown,#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" # rubocop:enable Layout/LineLength end let(:expected_lines) { [headers_line, plt_1_line, plt_2_line_1, plt_2_line_2] } @@ -576,16 +599,16 @@ # rubocop:todo Layout/LineLength let(:plt_1_line) do - "#{plate_1.machine_barcode},#{plate_1.human_barcode},#{plt_1_purpose},#{plt_1_created},#{locn_prefix} - Shelf 1,LabWhere,#{retention_value},#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" + "#{plate_1.machine_barcode},#{plate_1.human_barcode},#{plt_1_purpose},#{plt_1_created},#{plt_1_received_date},#{locn_prefix} - Shelf 1,LabWhere,#{retention_value},#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" end let(:plt_2_line_1) do - "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{locn_prefix} - Shelf 1 - Tray 1,LabWhere,Unknown,#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" + "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{plt_2_received_date},#{locn_prefix} - Shelf 1 - Tray 1,LabWhere,Unknown,#{study_1.name},#{study_1.id},#{study_1_sponsor.name}" end let(:plt_2_line_2) do - "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{locn_prefix} - Shelf 1 - Tray 1,LabWhere,Unknown,#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" + "#{plate_2.machine_barcode},#{plate_2.human_barcode},#{plt_2_purpose},#{plt_2_created},#{plt_2_received_date},#{locn_prefix} - Shelf 1 - Tray 1,LabWhere,Unknown,#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" end let(:plt_3_line) do - "#{plate_3.machine_barcode},#{plate_3.human_barcode},#{plt_3_purpose},#{plt_3_created},#{locn_prefix} - Shelf 1 - Tray 1 - Box 1,LabWhere,#{retention_value},#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" + "#{plate_3.machine_barcode},#{plate_3.human_barcode},#{plt_3_purpose},#{plt_3_created},#{plt_3_received_date},#{locn_prefix} - Shelf 1 - Tray 1 - Box 1,LabWhere,#{retention_value},#{study_2.name},#{study_2.id},#{study_2_sponsor.name}" end # rubocop:enable Layout/LineLength From 8717af154c6a1673f338c73ef65a50263e5b1dbc Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Thu, 15 Feb 2024 13:10:29 +0000 Subject: [PATCH 39/62] style: remove old comment --- app/models/location_report.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/location_report.rb b/app/models/location_report.rb index a66c2adf03..19601ac41b 100644 --- a/app/models/location_report.rb +++ b/app/models/location_report.rb @@ -153,7 +153,7 @@ def received_date(cur_plate) &.where('message LIKE ?', '%Reception fridge%') &.first &.created_at - &.strftime('%Y-%m-%d %H:%M:%S') #TODO: add reception fridge check on message + &.strftime('%Y-%m-%d %H:%M:%S') end def generate_report_row(cur_plate, cur_study) From f9afa010568265bc055ddd01dabbab840b84d161 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Fri, 16 Feb 2024 17:28:04 +0000 Subject: [PATCH 40/62] Update Gemfile to match jsonapi-resources from sanger --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 4dc69901b1..dec770b479 100644 --- a/Gemfile +++ b/Gemfile @@ -72,7 +72,7 @@ group :default do # - Create a branch off version 0.9.0 # - Remove the ActionController::ForceSSL module # - Load the gem from the branch - gem 'jsonapi-resources', github: 'yoldas/jsonapi-resources', branch: 'develop' + gem 'jsonapi-resources', github: 'sanger/jsonapi-resources', branch: 'develop' # Wraps bunny with connection pooling ad consumer process handling gem 'sanger_warren' From 52258979f690b06e477fc24ad184880ebf19dfd5 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Mon, 19 Feb 2024 11:38:46 +0000 Subject: [PATCH 41/62] refactor: move received_date method into Labware object --- app/models/labware.rb | 9 +++++++++ app/models/location_report.rb | 12 +----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/models/labware.rb b/app/models/labware.rb index c273ba62f9..97101bb681 100644 --- a/app/models/labware.rb +++ b/app/models/labware.rb @@ -231,6 +231,15 @@ def scanned_in_date scanned_into_lab_event.try(:content) || '' end + def received_date + self + &.asset_audits + &.where(key: 'slf_receive_plates') + &.where('message LIKE ?', '%Reception fridge%') + &.first + &.created_at + end + def retention_instructions @retention_instructions ||= obtain_retention_instructions end diff --git a/app/models/location_report.rb b/app/models/location_report.rb index 19601ac41b..00d1194230 100644 --- a/app/models/location_report.rb +++ b/app/models/location_report.rb @@ -146,16 +146,6 @@ def plates_list end end - def received_date(cur_plate) - cur_plate - &.asset_audits - &.where(key: 'slf_receive_plates') - &.where('message LIKE ?', '%Reception fridge%') - &.first - &.created_at - &.strftime('%Y-%m-%d %H:%M:%S') - end - def generate_report_row(cur_plate, cur_study) row = generate_plate_cols_for_row(cur_plate) row + generate_study_cols_for_row(cur_study) @@ -168,7 +158,7 @@ def generate_plate_cols_for_row(cur_plate) # rubocop:disable Metrics/AbcSize # NB. some older plates do not have a purpose cols << (cur_plate.plate_purpose&.name || 'Unknown') cols << cur_plate.created_at.strftime('%Y-%m-%d %H:%M:%S') - cols << (received_date(cur_plate) || 'Unknown') + cols << (cur_plate.received_date&.strftime('%Y-%m-%d %H:%M:%S') || 'Unknown') cols << cur_plate.storage_location cols << cur_plate.storage_location_service cols << (cur_plate.retention_instructions || 'Unknown') From aa149290c31f8325eda660bced0167cdcd0cfb55 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Mon, 19 Feb 2024 11:50:43 +0000 Subject: [PATCH 42/62] refactor: use list definition instead of appends --- app/models/location_report.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/models/location_report.rb b/app/models/location_report.rb index 00d1194230..dc1c8177ec 100644 --- a/app/models/location_report.rb +++ b/app/models/location_report.rb @@ -151,17 +151,17 @@ def generate_report_row(cur_plate, cur_study) row + generate_study_cols_for_row(cur_study) end - def generate_plate_cols_for_row(cur_plate) # rubocop:disable Metrics/AbcSize - cols = [] << cur_plate.machine_barcode - cols << cur_plate.human_barcode - - # NB. some older plates do not have a purpose - cols << (cur_plate.plate_purpose&.name || 'Unknown') - cols << cur_plate.created_at.strftime('%Y-%m-%d %H:%M:%S') - cols << (cur_plate.received_date&.strftime('%Y-%m-%d %H:%M:%S') || 'Unknown') - cols << cur_plate.storage_location - cols << cur_plate.storage_location_service - cols << (cur_plate.retention_instructions || 'Unknown') + def generate_plate_cols_for_row(cur_plate) + [ + cur_plate.machine_barcode, + cur_plate.human_barcode, + cur_plate.plate_purpose&.name || 'Unknown', # NB. some older plates do not have a purpose + cur_plate.created_at.strftime('%Y-%m-%d %H:%M:%S'), + cur_plate.received_date&.strftime('%Y-%m-%d %H:%M:%S') || 'Unknown', + cur_plate.storage_location, + cur_plate.storage_location_service, + cur_plate.retention_instructions || 'Unknown' + ] end def generate_study_cols_for_row(cur_study) From 47299f2dd50a8512ca94369ce66c6ee70d010735 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Mon, 19 Feb 2024 11:55:54 +0000 Subject: [PATCH 43/62] fix: use last event instead of first, if there are multiple --- app/models/labware.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/labware.rb b/app/models/labware.rb index 97101bb681..5c3c0aef40 100644 --- a/app/models/labware.rb +++ b/app/models/labware.rb @@ -236,7 +236,7 @@ def received_date &.asset_audits &.where(key: 'slf_receive_plates') &.where('message LIKE ?', '%Reception fridge%') - &.first + &.last &.created_at end From a2d8379da5dc3a3594026df2414c2bdb007a8de7 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Mon, 19 Feb 2024 12:20:15 +0000 Subject: [PATCH 44/62] Adding gemfile lock update --- Gemfile.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a9a0706ecc..c524fbabcf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,6 +7,16 @@ GIT activemodel activerecord (>= 4.0.0) +GIT + remote: https://github.com/sanger/jsonapi-resources.git + revision: be2fb43f5f8da2e632fb5f48200928b2dd3d8bf9 + branch: develop + specs: + jsonapi-resources (0.9.0) + activerecord (>= 4.1) + concurrent-ruby + railties (>= 4.1) + GIT remote: https://github.com/sanger/record_loader revision: 9e7481f4d2342f042ab13465962e5d6689863198 @@ -20,16 +30,6 @@ GIT specs: sanger_barcode_format (0.2.0) -GIT - remote: https://github.com/yoldas/jsonapi-resources.git - revision: db2c5cd3f0d6bdddf990eee705b3d9efe79de2bb - branch: develop - specs: - jsonapi-resources (0.9.0) - activerecord (>= 4.1) - concurrent-ruby - railties (>= 4.1) - GEM remote: https://rubygems.org/ specs: From afc86f7caf7cde89aa40c140607d26a95878c7b5 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Mon, 19 Feb 2024 12:03:14 +0000 Subject: [PATCH 45/62] test: add multiple asset audit events --- spec/models/location_report_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/models/location_report_spec.rb b/spec/models/location_report_spec.rb index 8b2a7c143e..e1911820a7 100644 --- a/spec/models/location_report_spec.rb +++ b/spec/models/location_report_spec.rb @@ -25,11 +25,17 @@ ) end let!(:plt_1_asset_audit) do + create :asset_audit, + asset: plate_1, + created_at: Time.zone.parse('June 15, 2020 15:41'), + key: 'slf_receive_plates', + message: "Process '...' performed on instrument Reception fridge" create :asset_audit, asset: plate_1, created_at: Time.zone.parse('June 16, 2020 15:42'), key: 'slf_receive_plates', message: "Process '...' performed on instrument Reception fridge" + # return the last audit only end let(:plt_1_purpose) { plate_1.plate_purpose.name } let(:plt_1_created) { plate_1.created_at.strftime('%Y-%m-%d %H:%M:%S') } From eec878fc9a21f58a524e5bd4194a9be35f730baa Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 19:25:19 +0000 Subject: [PATCH 46/62] Update activerecord-import to version 1.5.1 --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e880bbbd57..67b09a6b99 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -86,7 +86,7 @@ GEM activerecord (6.0.6.1) activemodel (= 6.0.6.1) activesupport (= 6.0.6.1) - activerecord-import (1.5.0) + activerecord-import (1.5.1) activerecord (>= 4.2) activeresource (6.0.0) activemodel (>= 6.0) @@ -145,7 +145,7 @@ GEM choice (0.2.0) chronic (0.10.2) coderay (1.1.3) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) configatron (4.5.1) connection_pool (2.4.1) crack (0.4.5) @@ -264,7 +264,7 @@ GEM mini_magick (4.12.0) mini_mime (1.1.5) mini_portile2 (2.8.5) - minitest (5.20.0) + minitest (5.22.2) minitest-profiler (0.0.2) activesupport (>= 4.1.0) minitest (>= 5.3.3) @@ -529,7 +529,7 @@ GEM yard (0.9.34) yard-activerecord (0.0.16) yard (>= 0.8.3) - zeitwerk (2.6.12) + zeitwerk (2.6.13) PLATFORMS ruby From 79e67bd40a5203a06b54039922435a0e6236eaea Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Thu, 22 Feb 2024 08:24:26 +0000 Subject: [PATCH 47/62] Update to accept RVI barcodes in ss --- app/models/barcode.rb | 6 ++++-- app/models/barcode/format_handlers.rb | 8 ++++++++ spec/models/barcode/format_handlers_spec.rb | 9 +++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/models/barcode.rb b/app/models/barcode.rb index c7ebdf61aa..5ec53c2c9a 100644 --- a/app/models/barcode.rb +++ b/app/models/barcode.rb @@ -65,7 +65,8 @@ class Barcode < ApplicationRecord plymouth_v2: 43, leamington_spa_v3: 44, brants_bridge_v3: 45, - ibd_response: 46 + ibd_response: 46, + rvi: 47, } # Barcode formats which may be submitted via sample manifests @@ -111,7 +112,8 @@ class Barcode < ApplicationRecord plymouth_v2 leamington_spa_v3 brants_bridge_v3 - ibd_response + ibd_response, + rvi ].freeze validate :barcode_valid? diff --git a/app/models/barcode/format_handlers.rb b/app/models/barcode/format_handlers.rb index 30769033a9..57ebf61957 100644 --- a/app/models/barcode/format_handlers.rb +++ b/app/models/barcode/format_handlers.rb @@ -569,4 +569,12 @@ class EastLondonGenesAndHealthV2 < BaseRegExBarcode class IbdResponse < BaseRegExBarcode self.format = /\A(?IBDR)(?[0-9]{6})\z/ end + + # Support for RVI barcodes. + # Expected formats: + # RVI-nnnnnn + # where n is a digit + class Rvi < BaseRegExBarcode + self.format = /\A(?RVI)-(?[0-9]{6,})\z/ + end end diff --git a/spec/models/barcode/format_handlers_spec.rb b/spec/models/barcode/format_handlers_spec.rb index c5686d82d4..b363388fe1 100644 --- a/spec/models/barcode/format_handlers_spec.rb +++ b/spec/models/barcode/format_handlers_spec.rb @@ -411,5 +411,14 @@ def self.it_has_an_invalid_barcode(barcode) it_has_an_invalid_barcode 'IBD123456' it_has_an_invalid_barcode 'IBDR-123456' end + + describe Barcode::FormatHandlers::Rvi do + it_has_a_valid_barcode 'RVI-111111', prefix: 'RVI', number: 111_111 + it_has_a_valid_barcode 'RVI-000000', prefix: 'RVI', number: 0 + it_has_an_invalid_barcode 'SQPD-12345678-234233890-WD' + it_has_an_invalid_barcode 'RVI123456' + it_has_an_invalid_barcode 'IRVI-123456' + end + # rubocop:enable RSpec/EmptyExampleGroup end From bb5388d8b48f09cb2a3aa352c6134e717fd1a056 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Thu, 22 Feb 2024 08:32:27 +0000 Subject: [PATCH 48/62] Robocop fixes --- app/models/barcode.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/barcode.rb b/app/models/barcode.rb index 5ec53c2c9a..9d73d930b7 100644 --- a/app/models/barcode.rb +++ b/app/models/barcode.rb @@ -66,7 +66,7 @@ class Barcode < ApplicationRecord leamington_spa_v3: 44, brants_bridge_v3: 45, ibd_response: 46, - rvi: 47, + rvi: 47 } # Barcode formats which may be submitted via sample manifests From abb18145ae857c35cc74e8c2a61b3d3d99cc8f14 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Thu, 22 Feb 2024 08:56:12 +0000 Subject: [PATCH 49/62] Removing the addition to existing prefixes --- app/models/barcode.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/barcode.rb b/app/models/barcode.rb index 9d73d930b7..a0864dc38f 100644 --- a/app/models/barcode.rb +++ b/app/models/barcode.rb @@ -65,8 +65,7 @@ class Barcode < ApplicationRecord plymouth_v2: 43, leamington_spa_v3: 44, brants_bridge_v3: 45, - ibd_response: 46, - rvi: 47 + ibd_response: 46 } # Barcode formats which may be submitted via sample manifests From 274200e17820d21b7a2b418f65c637594b561be9 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Mon, 26 Feb 2024 07:37:23 +0000 Subject: [PATCH 50/62] Fixing the issue with idb_response FOREIGN_BARCODE_FORMATS list --- app/models/barcode.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/barcode.rb b/app/models/barcode.rb index a0864dc38f..4d2d810bc3 100644 --- a/app/models/barcode.rb +++ b/app/models/barcode.rb @@ -111,7 +111,7 @@ class Barcode < ApplicationRecord plymouth_v2 leamington_spa_v3 brants_bridge_v3 - ibd_response, + ibd_response rvi ].freeze From ebc08152806a083e71a93f98023ff70aada670d6 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Mon, 26 Feb 2024 07:56:15 +0000 Subject: [PATCH 51/62] Adding RVI index --- app/models/barcode.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/barcode.rb b/app/models/barcode.rb index 4d2d810bc3..e658e67e48 100644 --- a/app/models/barcode.rb +++ b/app/models/barcode.rb @@ -65,7 +65,8 @@ class Barcode < ApplicationRecord plymouth_v2: 43, leamington_spa_v3: 44, brants_bridge_v3: 45, - ibd_response: 46 + ibd_response: 46, + rvi: 47 } # Barcode formats which may be submitted via sample manifests From 338c6d63cabe08eafa313b3a9afae30062917caf Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Tue, 27 Feb 2024 11:35:56 +0000 Subject: [PATCH 52/62] Adding the file where the seeds are fetched from for countries list --- data/ena_sample_checklists/.gitignore | 1 + data/ena_sample_checklists/ERC000011.xml | 1213 ++++++++++++++++++++++ 2 files changed, 1214 insertions(+) create mode 100644 data/ena_sample_checklists/ERC000011.xml diff --git a/data/ena_sample_checklists/.gitignore b/data/ena_sample_checklists/.gitignore index b8818a7869..8a147fd1c5 100644 --- a/data/ena_sample_checklists/.gitignore +++ b/data/ena_sample_checklists/.gitignore @@ -1,2 +1,3 @@ # We might be able to store these in the repo, but need to double check licenses *.xml +!ERC000011.xml diff --git a/data/ena_sample_checklists/ERC000011.xml b/data/ena_sample_checklists/ERC000011.xml new file mode 100644 index 0000000000..9739dd8816 --- /dev/null +++ b/data/ena_sample_checklists/ERC000011.xml @@ -0,0 +1,1213 @@ + + + + + ERC000011 + + + + ENA default sample checklist + Minimum information required for the sample + ENA + + Part and developmental stage of organism + Anatomical and developmental descriptions of the sample site or source material + + + cell_type + cell type from which the sample was obtained + + + + optional + multiple + + + + dev_stage + if the sample was obtained from an organism in a specific developmental stage, it is specified with this qualifier + + + + optional + multiple + + + + germline + the sample described presented in the entry has not undergone somatic genomic rearrangement as part of an adaptive immune response; it is the unrearranged molecule that was inherited from the parental germline + + + + optional + multiple + + + + tissue_lib + tissue library from which sample was obtained + + + + optional + multiple + + + + tissue_type + tissue type from which the sample was obtained + + + + optional + multiple + + + + Collection event information + + + isolation_source + describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived + + + + optional + multiple + + + + lat_lon + geographical coordinates of the location where the specimen was collected + + + + optional + multiple + + + + collected_by + name of persons or institute who collected the specimen + + + + optional + multiple + + + + Event Date/Time + collection_date + collection date + The date the sample was collected with the intention of sequencing, either as an instance (single point in time) or interval. In case no exact time is available, the date/time can be right truncated i.e. all of these are valid ISO8601 compliant times: 2008-01-23T19:23:10+00:00; 2008-01-23T19:23:10; 2008-01-23; 2008-01; 2008. + + + (^[12][0-9]{3}(-(0[1-9]|1[0-2])(-(0[1-9]|[12][0-9]|3[01])(T[0-9]{2}:[0-9]{2}(:[0-9]{2})?Z?([+-][0-9]{1,2})?)?)?)?(/[0-9]{4}(-[0-9]{2}(-[0-9]{2}(T[0-9]{2}:[0-9]{2}(:[0-9]{2})?Z?([+-][0-9]{1,2})?)?)?)?)?$)|(^not collected$)|(^not provided$)|(^restricted access$)|(^missing: control sample$)|(^missing: sample group$)|(^missing: synthetic construct$)|(^missing: lab stock$)|(^missing: third party data$)|(^missing: data agreement established pre-2023$)|(^missing: endangered species$)|(^missing: human-identifiable$) + + + mandatory + multiple + + + + geographic location (country and/or sea) + The location the sample was collected from with the intention of sequencing, as defined by the country or sea. Country or sea names should be chosen from the INSDC country list (http://insdc.org/country.html). + + + + Afghanistan + + + Albania + + + Algeria + + + American Samoa + + + Andorra + + + Angola + + + Anguilla + + + Antarctica + + + Antigua and Barbuda + + + Arctic Ocean + + + Argentina + + + Armenia + + + Aruba + + + Ashmore and Cartier Islands + + + Atlantic Ocean + + + Australia + + + Austria + + + Azerbaijan + + + Bahamas + + + Bahrain + + + Baker Island + + + Baltic Sea + + + Bangladesh + + + Barbados + + + Bassas da India + + + Belarus + + + Belgium + + + Belize + + + Benin + + + Bermuda + + + Bhutan + + + Bolivia + + + Borneo + + + Bosnia and Herzegovina + + + Botswana + + + Bouvet Island + + + Brazil + + + British Virgin Islands + + + Brunei + + + Bulgaria + + + Burkina Faso + + + Burundi + + + Cambodia + + + Cameroon + + + Canada + + + Cape Verde + + + Cayman Islands + + + Central African Republic + + + Chad + + + Chile + + + China + + + Christmas Island + + + Clipperton Island + + + Cocos Islands + + + Colombia + + + Comoros + + + Cook Islands + + + Coral Sea Islands + + + Costa Rica + + + Cote d'Ivoire + + + Croatia + + + Cuba + + + Curacao + + + Cyprus + + + Czech Republic + + + Democratic Republic of the Congo + + + Denmark + + + Djibouti + + + Dominica + + + Dominican Republic + + + East Timor + + + Ecuador + + + Egypt + + + El Salvador + + + Equatorial Guinea + + + Eritrea + + + Estonia + + + Ethiopia + + + Europa Island + + + Falkland Islands (Islas Malvinas) + + + Faroe Islands + + + Fiji + + + Finland + + + France + + + French Guiana + + + French Polynesia + + + French Southern and Antarctic Lands + + + Gabon + + + Gambia + + + Gaza Strip + + + Georgia + + + Germany + + + Ghana + + + Gibraltar + + + Glorioso Islands + + + Greece + + + Greenland + + + Grenada + + + Guadeloupe + + + Guam + + + Guatemala + + + Guernsey + + + Guinea + + + Guinea-Bissau + + + Guyana + + + Haiti + + + Heard Island and McDonald Islands + + + Honduras + + + Hong Kong + + + Howland Island + + + Hungary + + + Iceland + + + India + + + Indian Ocean + + + Indonesia + + + Iran + + + Iraq + + + Ireland + + + Isle of Man + + + Israel + + + Italy + + + Jamaica + + + Jan Mayen + + + Japan + + + Jarvis Island + + + Jersey + + + Johnston Atoll + + + Jordan + + + Juan de Nova Island + + + Kazakhstan + + + Kenya + + + Kerguelen Archipelago + + + Kingman Reef + + + Kiribati + + + Kosovo + + + Kuwait + + + Kyrgyzstan + + + Laos + + + Latvia + + + Lebanon + + + Lesotho + + + Liberia + + + Libya + + + Liechtenstein + + + Lithuania + + + Luxembourg + + + Macau + + + Macedonia + + + Madagascar + + + Malawi + + + Malaysia + + + Maldives + + + Mali + + + Malta + + + Marshall Islands + + + Martinique + + + Mauritania + + + Mauritius + + + Mayotte + + + Mediterranean Sea + + + Mexico + + + Micronesia + + + Midway Islands + + + Moldova + + + Monaco + + + Mongolia + + + Montenegro + + + Montserrat + + + Morocco + + + Mozambique + + + Myanmar + + + Namibia + + + Nauru + + + Navassa Island + + + Nepal + + + Netherlands + + + New Caledonia + + + New Zealand + + + Nicaragua + + + Niger + + + Nigeria + + + Niue + + + Norfolk Island + + + North Korea + + + North Sea + + + Northern Mariana Islands + + + Norway + + + Oman + + + Pacific Ocean + + + Pakistan + + + Palau + + + Palmyra Atoll + + + Panama + + + Papua New Guinea + + + Paracel Islands + + + Paraguay + + + Peru + + + Philippines + + + Pitcairn Islands + + + Poland + + + Portugal + + + Puerto Rico + + + Qatar + + + Republic of the Congo + + + Reunion + + + Romania + + + Ross Sea + + + Russia + + + Rwanda + + + Saint Helena + + + Saint Kitts and Nevis + + + Saint Lucia + + + Saint Pierre and Miquelon + + + Saint Vincent and the Grenadines + + + Samoa + + + San Marino + + + Sao Tome and Principe + + + Saudi Arabia + + + Senegal + + + Serbia + + + Seychelles + + + Sierra Leone + + + Singapore + + + Sint Maarten + + + Slovakia + + + Slovenia + + + Solomon Islands + + + Somalia + + + South Africa + + + South Georgia and the South Sandwich Islands + + + South Korea + + + Southern Ocean + + + Spain + + + Spratly Islands + + + Sri Lanka + + + Sudan + + + Suriname + + + Svalbard + + + Swaziland + + + Sweden + + + Switzerland + + + Syria + + + Taiwan + + + Tajikistan + + + Tanzania + + + Tasman Sea + + + Thailand + + + Togo + + + Tokelau + + + Tonga + + + Trinidad and Tobago + + + Tromelin Island + + + Tunisia + + + Turkey + + + Turkmenistan + + + Turks and Caicos Islands + + + Tuvalu + + + USA + + + Uganda + + + Ukraine + + + United Arab Emirates + + + United Kingdom + + + Uruguay + + + Uzbekistan + + + Vanuatu + + + Venezuela + + + Viet Nam + + + Virgin Islands + + + Wake Island + + + Wallis and Futuna + + + West Bank + + + Western Sahara + + + Yemen + + + Zambia + + + Zimbabwe + + + missing: control sample + + + missing: data agreement established pre-2023 + + + missing: endangered species + + + missing: human-identifiable + + + missing: lab stock + + + missing: sample group + + + missing: synthetic construct + + + missing: third party data + + + not applicable + + + not collected + + + not provided + + + restricted access + + + + mandatory + multiple + + + + geographic location (region and locality) + The geographical origin of the sample as defined by the specific region name followed by the locality name. + + + + optional + multiple + + + + identified_by + name of the expert who identified the specimen taxonomically + + + + optional + multiple + + + + sample collection + + + environmental_sample + identifies sequences derived by direct molecular isolation from a bulk environmental DNA sample (by PCR with or without subsequent cloning of the product, DGGE, or other anonymous methods) with no reliable identification of the source organism + + + + No + + + Yes + + + + optional + multiple + + + + Organism characteristics + Characteristics of the source organism + + + mating_type + mating type of the organism from which the sequence was obtained; mating type is used for prokaryotes, and for eukaryotes that undergo meiosis without sexually dimorphic gametes + + + + optional + multiple + + + + sex + sex of the organism from which the sample was obtained + + + + optional + multiple + + + + host description + + + lab_host + scientific name of the laboratory host used to propagate the source organism from which the sample was obtained + + + + optional + multiple + + + + specific host + host scientific name + Scientific name of the natural (as opposed to laboratory) host to the organism from which sample was obtained. + + + + optional + multiple + + + + Pointer to physical material + References to sample or sample source material in physical resources + + + bio_material + Unique identifier that references the biological material from which the sample was obtained and that ideally exists in a curated collection (e.g. stock centres, seed banks, DNA banks). The ID should have the following structure: name of the institution (institution code) followed by the collection code (if available) and the voucher id (institution_code:collection_code:voucher_id). Please note institution codes and collection codes are taken from a controlled vocabulary maintained by the INSDC: https://ftp.ncbi.nih.gov/pub/taxonomy/biocollections/ + + + + optional + multiple + + + + culture_collection + Unique identifier that references the culture (e.g. live microbial and viral cultures and cell lines) from which the sample has been obtained and that have been deposited in curated culture collections. The ID needs to provide an institution code and the culture id, with optional collection code, in the following structure: (-institution_code:(collection_code):voucher_id. Please note institution codes (and optional collection codes) are taken from a controlled vocabulary maintained by the INSDC: https://ftp.ncbi.nih.gov/pub/taxonomy/biocollections/ + + + + optional + multiple + + + + specimen_voucher + Unique identifier that references the physical specimen that remains after the sequence has been obtained and that ideally exists in a curated collection. The ID should have the following structure: name of the institution (institution code) followed by the collection code (if available) and the voucher id (institution_code:collection_code:voucher_id). Please note institution codes and collection codes are taken from a controlled vocabulary maintained by the INSDC: https://ftp.ncbi.nih.gov/pub/taxonomy/biocollections/ + + + + optional + multiple + + + + Infraspecies information + Formal and informal infraspecies taxonomic information + + + cultivar + cultivar (cultivated variety) of plant from which sample was obtained + + + + optional + multiple + + + + ecotype + a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat. + + + + optional + multiple + + + + isolate + individual isolate from which the sample was obtained + + + + optional + multiple + + + + sub_species + name of sub-species of organism from which sample was obtained + + + + optional + multiple + + + + variety + variety (= varietas, a formal Linnaean rank) of organism from which sample was derived. + + + + optional + multiple + + + + sub_strain + name or identifier of a genetically or otherwise modified strain from which sample was obtained, derived from a parental strain (which should be annotated in the strain field; sub_strain from which sample was obtained + + + + optional + multiple + + + + cell_line + cell line from which the sample was obtained + + + + optional + multiple + + + + serotype + serological variety of a species characterized by its antigenic properties + + + + optional + multiple + + + + serovar + serological variety of a species (usually a prokaryote) characterized by its antigenic properties + + + + optional + multiple + + + + strain + Name of the strain from which the sample was obtained. + + + + optional + multiple + + + + + From 103104e34c760746cb2d193f2bf187b06cf757a1 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Wed, 28 Feb 2024 10:17:25 +0000 Subject: [PATCH 53/62] Conditioning download based on environment for minimum impact --- lib/tasks/insdc/import_countries.rake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/tasks/insdc/import_countries.rake b/lib/tasks/insdc/import_countries.rake index 8cb4917ee3..66e0f846aa 100644 --- a/lib/tasks/insdc/import_countries.rake +++ b/lib/tasks/insdc/import_countries.rake @@ -21,8 +21,10 @@ namespace :insdc do desc 'Download the sample sheet with the accession number specified by [sample_checklist] ' \ "(#{INSDC_COUNTRIES_DEFAULTS[:sample_checklist]} by default)" task :download, %i[sample_checklist ean_root] => :environment do |_t, args| - args.with_defaults(INSDC_COUNTRIES_DEFAULTS) - Insdc::ImportCountries.new(**args.to_h, priorities: INSDC_COUNTRIES_PRIORITIES).download + unless Rails.env.development? || Rails.env.test? + args.with_defaults(INSDC_COUNTRIES_DEFAULTS) + Insdc::ImportCountries.new(**args.to_h, priorities: INSDC_COUNTRIES_PRIORITIES).download + end end desc 'Download and import countries from the sample sheet with the accession number specified by ' \ From 86f631e59e9a8da05bdfe37fab2b15828c6e1c58 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Wed, 28 Feb 2024 11:15:27 +0000 Subject: [PATCH 54/62] Updating the import rake job to not include the download job as it can be executed manually if required --- lib/tasks/insdc/import_countries.rake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/tasks/insdc/import_countries.rake b/lib/tasks/insdc/import_countries.rake index 66e0f846aa..ea5a119aab 100644 --- a/lib/tasks/insdc/import_countries.rake +++ b/lib/tasks/insdc/import_countries.rake @@ -21,15 +21,13 @@ namespace :insdc do desc 'Download the sample sheet with the accession number specified by [sample_checklist] ' \ "(#{INSDC_COUNTRIES_DEFAULTS[:sample_checklist]} by default)" task :download, %i[sample_checklist ean_root] => :environment do |_t, args| - unless Rails.env.development? || Rails.env.test? - args.with_defaults(INSDC_COUNTRIES_DEFAULTS) - Insdc::ImportCountries.new(**args.to_h, priorities: INSDC_COUNTRIES_PRIORITIES).download - end + args.with_defaults(INSDC_COUNTRIES_DEFAULTS) + Insdc::ImportCountries.new(**args.to_h, priorities: INSDC_COUNTRIES_PRIORITIES).download end desc 'Download and import countries from the sample sheet with the accession number specified by ' \ "[sample_checklist] (#{INSDC_COUNTRIES_DEFAULTS[:sample_checklist]} by default)" - task :import, %i[sample_checklist ean_root] => :download do |_t, args| + task :import, %i[sample_checklist ean_root] => :environment do |_t, args| args.with_defaults(INSDC_COUNTRIES_DEFAULTS) Insdc::ImportCountries.new(**args.to_h, priorities: INSDC_COUNTRIES_PRIORITIES).import end From 9cac38046f7ddc3c9bd18068ed3e477d5e2ca0ce Mon Sep 17 00:00:00 2001 From: Sangeetha Date: Wed, 28 Feb 2024 13:16:14 +0000 Subject: [PATCH 55/62] Added the library types to limber chromium bespoke --- config/default_records/request_types/005_limber_bespoke.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/default_records/request_types/005_limber_bespoke.yml b/config/default_records/request_types/005_limber_bespoke.yml index 45037c29aa..cf58168ded 100644 --- a/config/default_records/request_types/005_limber_bespoke.yml +++ b/config/default_records/request_types/005_limber_bespoke.yml @@ -60,6 +60,10 @@ limber_chromium_bespoke: - Chromium single cell - Chromium single cell CNV - Chromium single cell ATAC + - Chromium single cell 3 prime HT v3 + - Chromium single cell 5 prime HT v2 + - Chromium single cell BCR HT + - Chromium single cell TCR HT limber_pcr_free_bespoke: <<: *limber_bespoke_library name: Limber PCR Free Bespoke From 8a7fb5e2aa506c787dbd29620294ca66582b75a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 01:36:54 +0000 Subject: [PATCH 56/62] Bump rack from 2.2.8 to 2.2.8.1 Bumps [rack](https://github.com/rack/rack) from 2.2.8 to 2.2.8.1. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.8...v2.2.8.1) --- updated-dependencies: - dependency-name: rack dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 67b09a6b99..91c55ca583 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -307,7 +307,7 @@ GEM puma (6.4.2) nio4r (~> 2.0) racc (1.7.3) - rack (2.2.8) + rack (2.2.8.1) rack-acceptable (0.1.0) rack (>= 1.1.0) rack-cors (2.0.1) From 36d941972741438287cd50efb74c83bb543bc399 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 23:46:25 +0000 Subject: [PATCH 57/62] Update yard to version 0.9.36 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 91c55ca583..b3e070431c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -526,7 +526,7 @@ GEM will_paginate (>= 3.0.3) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.34) + yard (0.9.36) yard-activerecord (0.0.16) yard (>= 0.8.3) zeitwerk (2.6.13) From 1cb0aefe0d2db0fc032acc99acbfec9f706ab167 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 00:07:01 +0000 Subject: [PATCH 58/62] Update rack-cors to version 2.0.2 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index b3e070431c..6e0e14ccf1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -310,7 +310,7 @@ GEM rack (2.2.8.1) rack-acceptable (0.1.0) rack (>= 1.1.0) - rack-cors (2.0.1) + rack-cors (2.0.2) rack (>= 2.0.0) rack-mini-profiler (3.1.1) rack (>= 1.2.0) From d0da8571a5075a50ffc384c818f8ab5e24747bf7 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Wed, 6 Mar 2024 09:42:48 +0000 Subject: [PATCH 59/62] Update .release-version --- .release-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.release-version b/.release-version index 68acbd0deb..9d01a2ec14 100644 --- a/.release-version +++ b/.release-version @@ -1 +1 @@ -14.31.0 +14.31.1 From e162c0979e42dcbc22768af34680dc0175e831f8 Mon Sep 17 00:00:00 2001 From: Sangeetha Date: Wed, 6 Mar 2024 15:09:18 +0000 Subject: [PATCH 60/62] Added validation for data_release_delay_other_comment field --- app/models/study.rb | 2 ++ spec/models/study_spec.rb | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/app/models/study.rb b/app/models/study.rb index 7a8cb710e1..f98963d873 100644 --- a/app/models/study.rb +++ b/app/models/study.rb @@ -262,6 +262,8 @@ class Study < ApplicationRecord # rubocop:todo Metrics/ClassLength # This excludes supplementary characters, which include emoji and rare kanji validates :study_abstract, :study_study_title, :study_description, :s3_email_list, utf8mb3: true + validates :data_release_delay_other_comment, length: { maximum: 255 } + # These fields are restricted further as they aren't expected to ever contain anything more than ASCII validates :study_project_id, :ega_dac_accession_number, diff --git a/spec/models/study_spec.rb b/spec/models/study_spec.rb index 9828d84086..e9b4b78cc4 100644 --- a/spec/models/study_spec.rb +++ b/spec/models/study_spec.rb @@ -660,6 +660,17 @@ metadata[:data_release_delay_reason_comment] ) end + + it 'validates the length of data_release_delay_other_comment' do + study.study_metadata.data_release_delay_other_comment = + 'Data Release delay other comment. + Data Release delay other comment. Data Release delay other comment. Data Release delay other comment. + Data Release delay other comment. Data Release delay other comment. Data Release delay other comment. + Data Release delay other comment. Data Release delay other comment. Data Release delay other comment.' + expect { study.save! }.to raise_error(ActiveRecord::RecordInvalid) + expect(study.valid?).to be false + expect(study.errors.messages.length).to eq 1 + end end context 'delayed for long time' do From 02a015ded284e893b954fc0d5365559b727eb635 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 09:58:57 +0000 Subject: [PATCH 61/62] Update bullet to version 7.1.6 --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6e0e14ccf1..a83e49989f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -113,7 +113,7 @@ GEM bootsnap (1.16.0) msgpack (~> 1.2) builder (3.2.4) - bullet (7.1.1) + bullet (7.1.6) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) bunny (2.22.0) @@ -231,7 +231,7 @@ GEM http-accept (1.7.0) http-cookie (1.0.5) domain_name (~> 0.5) - i18n (1.14.1) + i18n (1.14.4) concurrent-ruby (~> 1.0) image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) From 2872b2ab42a0f5a95d891016c6efa34c5c9cc377 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 11:01:46 +0000 Subject: [PATCH 62/62] Update delayed_job_active_record to version 4.1.8 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a83e49989f..73eecef4ca 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -194,7 +194,7 @@ GEM date (3.3.3) delayed_job (4.1.11) activesupport (>= 3.0, < 8.0) - delayed_job_active_record (4.1.7) + delayed_job_active_record (4.1.8) activerecord (>= 3.0, < 8.0) delayed_job (>= 3.0, < 5) diff-lcs (1.5.0)