viral_seq 1.0.13 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7816fd2b8da8109a24a33b8663e5f4fa5f098ed590c7403f909b593ebdd78c2f
4
- data.tar.gz: adaffa3e35268eaed0bb2d0c5a6ba387f8b09bc04561a3714f9e155a55466cd5
3
+ metadata.gz: '048e85ab67fbb667919d02d4509a15111798b116b3f927c921d203dc8565a1a2'
4
+ data.tar.gz: 6951e410bd4f9b727a44fab1aa88f9cc263151cf9aed2a9c25ae9d866ed72450
5
5
  SHA512:
6
- metadata.gz: 5bfbb3c2e78ae8ef01b1750b5135a76b7fdf65ecc00ccfe141e488154adfc9b0ddff42a58ee9f682f46576060632d12cd6e540bea26e81d8bd9e346f5e7bca84
7
- data.tar.gz: 3b491d3070f2e7aacc73c1c9f4942fe770f2c0e4eebe5c021e5558ce7fa0e4299c44ddde51b07b4c3118d7832236be9703707209ea0ebfb6591a576871ad0804
6
+ metadata.gz: 02cc87e245918a5c8f1b16b0db978da66e3bf7e83c6c6140c394c560d31c86ab1845b337a4f53b4b7883ff8e452e8caef0b036ea113c4416d6a29d16f419eb81
7
+ data.tar.gz: 9f53bd6c46f4a49b5c14b8b8019ffa3e1abcf442bf0a6cc09a7dbc768a474f2afd81d5cf168f38eb8ab5abbd601c60f1f824f753bc77dbcc0d3c0d93568b9ae3
data/README.md CHANGED
@@ -86,20 +86,24 @@ qc_seqhash.sdrm_hiv_pr(cut_off)
86
86
 
87
87
  ## Updates
88
88
 
89
- ### Version 1.1.3-03032021
89
+ ### Version 1.0.14-03052021
90
90
 
91
- 1. Fixed the conflict with rails.
91
+ 1. Add a function `ViralSeq::TcsCore.validate_file_name` to check MiSeq paired-end file names.
92
92
 
93
- ### Version 1.1.2-03032021
93
+ ### Version 1.0.13-03032021
94
+
95
+ 1. Fixed the conflict with rails.
96
+
97
+ ### Version 1.0.12-03032021
94
98
 
95
99
  1. Fixed an issue that may cause conflicts with ActiveRecord.
96
100
 
97
- ### Version 1.1.1-03022021
101
+ ### Version 1.0.11-03022021
98
102
 
99
103
  1. Fixed an issue when calculating Poisson cutoff for minority mutations `ViralSeq::SeqHash.pm`.
100
104
  2. fixed an issue loading class 'OptionParser'in some ruby environments.
101
105
 
102
- ### Version 1.1.0-11112020:
106
+ ### Version 1.0.10-11112020:
103
107
 
104
108
  1. Modularize TCS pipeline. Move key functions into /viral_seq/tcs_core.rb
105
109
  2. `tcs_json_generator` is removed. This CLI is delivered within the `tcs` pipeline, by running `tcs -j`. The scripts are included in the /viral_seq/tcs_json.rb
@@ -102,9 +102,9 @@ module ViralSeq
102
102
  end
103
103
 
104
104
  # sort array of file names to determine if there is potential errors
105
- # input name_array array of file names
106
- # output hash { }
107
- # need to change for each file name have an error code. and a bool to show if all pass
105
+ # @param name_array [Array] array of file names
106
+ # @return [hash] name check results
107
+
108
108
  def validate_file_name(name_array)
109
109
  errors = {
110
110
  file_type_error: [] ,
@@ -165,6 +165,13 @@ module ViralSeq
165
165
  end
166
166
  end
167
167
 
168
+ file_name_with_lib_name = {}
169
+ passed_libs.each do |lib_name, files|
170
+ files.each do |f|
171
+ file_name_with_lib_name[f] = lib_name
172
+ end
173
+ end
174
+
168
175
  passed_names = []
169
176
 
170
177
  passed_libs.values.each { |names| passed_names += names}
@@ -175,7 +182,27 @@ module ViralSeq
175
182
  pass = true
176
183
  end
177
184
 
178
- return { errors: errors, all_pass: pass, passed_names: passed_names, passed_libs: passed_libs }
185
+ file_name_with_error_type = {}
186
+
187
+ errors.each do |type, files|
188
+ files.each do |f|
189
+ file_name_with_error_type[f] ||= []
190
+ file_name_with_error_type[f] << type.to_s.tr("_", "\s")
191
+ end
192
+ end
193
+
194
+ file_check = []
195
+
196
+ name_array.each do |name|
197
+ file_check_hash = {}
198
+ file_check_hash[:fileName] = name
199
+ file_check_hash[:errors] = file_name_with_error_type[name]
200
+ file_check_hash[:libName] = file_name_with_lib_name[name]
201
+
202
+ file_check << file_check_hash
203
+ end
204
+
205
+ return { allPass: pass, files: file_check }
179
206
  end
180
207
 
181
208
  # filter r1 raw sequences for non-specific primers.
@@ -2,6 +2,6 @@
2
2
  # version info and histroy
3
3
 
4
4
  module ViralSeq
5
- VERSION = "1.0.13"
5
+ VERSION = "1.0.14"
6
6
  TCS_VERSION = "2.1.1"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viral_seq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shuntai Zhou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-04 00:00:00.000000000 Z
12
+ date: 2021-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler