sushi_fabric 1.2.9 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sushi_fabric/sushiApp.rb +39 -17
- data/lib/sushi_fabric/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cad308291efa3003ad82f9145250b8ab3a1b58c540a390e76b34b5f5f4aa486
|
4
|
+
data.tar.gz: 6bb026994c95dc5a98e04fe880baed61ae6226bd2a4c9a76e46f4774cb4525bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91b181a841ecf30d19308d9287419d4384d7167ab48ea7b0642a5e33d65160cb89f631fed808c372d9f12af52b73c11ce2769f93a02fc396154999426961a44b
|
7
|
+
data.tar.gz: 197f0d52d86b044f5aa4284724b601f2598ad6903f99b970fd1a8d9f6d0236033046902cd0b3fe29fa607db46fc16237f97b12554a65aecaf803f1f76a6d312e
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
|
-
# Version = '
|
3
|
+
# Version = '20241122-134036'
|
4
4
|
|
5
5
|
require 'csv'
|
6
6
|
require 'fileutils'
|
@@ -81,6 +81,8 @@ end
|
|
81
81
|
require "#{SUSHI_APP_DIR}/app/models/data_set"
|
82
82
|
require "#{SUSHI_APP_DIR}/app/models/sample"
|
83
83
|
require "#{SUSHI_APP_DIR}/app/models/job"
|
84
|
+
require "#{SUSHI_APP_DIR}/app/jobs/application_job"
|
85
|
+
require "#{SUSHI_APP_DIR}/app/jobs/make_whole_tree_job"
|
84
86
|
else
|
85
87
|
NO_ROR = true
|
86
88
|
end
|
@@ -178,18 +180,24 @@ def save_data_set(data_set_arr, headers, rows, user=nil)
|
|
178
180
|
end
|
179
181
|
sample = Sample.new
|
180
182
|
sample.key_value = sample_hash.to_s
|
181
|
-
sample.save # skip exact-match search
|
182
183
|
data_set.samples << sample
|
183
184
|
end
|
184
185
|
|
185
186
|
data_set.md5 = data_set.md5hexdigest
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
187
|
+
if data_set_ = DataSet.find_by_md5(data_set.md5) and data_set_.project_id == data_set.project_id
|
188
|
+
data_set = data_set_
|
189
|
+
else
|
190
|
+
data_set.samples.each do |sample|
|
191
|
+
sample.save
|
192
|
+
end
|
193
|
+
project.data_sets << data_set
|
194
|
+
parent_data_set.data_sets << data_set if parent_data_set
|
195
|
+
data_set.save
|
196
|
+
if user
|
197
|
+
user.data_sets << data_set
|
198
|
+
user.save
|
199
|
+
end
|
200
|
+
end
|
193
201
|
data_set.id
|
194
202
|
end
|
195
203
|
end
|
@@ -790,7 +798,7 @@ rm -rf #{@scratch_dir} || exit 1
|
|
790
798
|
end
|
791
799
|
sample = Sample.new
|
792
800
|
sample.key_value = sample_hash.to_s
|
793
|
-
sample.save # skip exact-match search
|
801
|
+
#sample.save # skip exact-match search
|
794
802
|
data_set.samples << sample
|
795
803
|
end
|
796
804
|
|
@@ -799,13 +807,20 @@ rm -rf #{@scratch_dir} || exit 1
|
|
799
807
|
end
|
800
808
|
|
801
809
|
data_set.md5 = data_set.md5hexdigest
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
810
|
+
if data_set_ = DataSet.find_by_md5(data_set.md5) and data_set_.project_id == data_set.project_id
|
811
|
+
data_set = data_set_
|
812
|
+
else
|
813
|
+
data_set.samples.each do |sample|
|
814
|
+
sample.save
|
815
|
+
end
|
816
|
+
project.data_sets << data_set
|
817
|
+
parent_data_set.data_sets << data_set if parent_data_set
|
818
|
+
data_set.save
|
819
|
+
if user
|
820
|
+
user.data_sets << data_set
|
821
|
+
user.save
|
822
|
+
end
|
823
|
+
end
|
809
824
|
data_set.id
|
810
825
|
end
|
811
826
|
end
|
@@ -841,6 +856,7 @@ rm -rf #{@scratch_dir} || exit 1
|
|
841
856
|
@next_dataset_tsv_path = save_next_dataset_as_tsv
|
842
857
|
|
843
858
|
if @dataset_sushi_id and dataset = DataSet.find_by_id(@dataset_sushi_id.to_i)
|
859
|
+
@project_id = dataset.project.id
|
844
860
|
data_set_arr = []
|
845
861
|
headers = []
|
846
862
|
rows = []
|
@@ -899,6 +915,12 @@ rm -rf #{@scratch_dir} || exit 1
|
|
899
915
|
new_job.data_set.save
|
900
916
|
end
|
901
917
|
end
|
918
|
+
|
919
|
+
# Update dataset tree
|
920
|
+
if @project_id
|
921
|
+
puts "# Update dataset tree by ActiveJob"
|
922
|
+
MakeWholeTreeJob.perform_later(@project_id)
|
923
|
+
end
|
902
924
|
copy_nextdataset
|
903
925
|
end
|
904
926
|
def run
|
data/lib/sushi_fabric/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sushi_fabric
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Functional Genomics Center Zurich
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,7 +69,7 @@ homepage: ''
|
|
69
69
|
licenses:
|
70
70
|
- MIT
|
71
71
|
metadata: {}
|
72
|
-
post_install_message:
|
72
|
+
post_install_message:
|
73
73
|
rdoc_options: []
|
74
74
|
require_paths:
|
75
75
|
- lib
|
@@ -84,8 +84,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
|
-
rubygems_version: 3.
|
88
|
-
signing_key:
|
87
|
+
rubygems_version: 3.4.19
|
88
|
+
signing_key:
|
89
89
|
specification_version: 4
|
90
90
|
summary: workflow manager client.
|
91
91
|
test_files:
|