viral_seq 1.8.0 → 1.8.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7e4bac6316602ccecba5ff9c6873d282a4671aeecef1533e4180470b693da21
4
- data.tar.gz: 9a03d2dd7a3843eb10fe6a235591bc5f075321ea579579cbf24d0e6a6c0b893f
3
+ metadata.gz: 11381ab74d67a54b5d922e8f1a7085866fe5349f4124a971b9dc64709fa763f1
4
+ data.tar.gz: dd578b649b9857cf1c7ff8a23fff62db51f665ef23c74c8000a2b4d7f4500f9e
5
5
  SHA512:
6
- metadata.gz: aa6afaec42384e3c9aa329e66e0225a1cdc57eb72c30f2626d8694834966e157ff188629aba2ee964f2f2da57788c5f444421bf4a726dacec014130fbfb0cc46
7
- data.tar.gz: 140fba801287305c09f95b00819f295f2513603216d91d185a69f8ce09f24d712d7cc1978c42ee22275e678bdce6a98b619de2535079650b9045a0b8ffca3c40
6
+ metadata.gz: add86e088cd1ef50c0ce546eb4f755b7b5725a072ddf1119982ec0cccd20246bc25aab077c51673032e442f098e15f4c40d9a526ff67af8a5514aab580f255a8
7
+ data.tar.gz: 4b6cdbe344c2835c3f07c10b86f33613e0d5cdba5a9405da50d9d7f208796da6cdee709993b465f72e2a14a49667ea5ddfed84ddaf8ff21bda4a09448ebdde1b
data/README.md CHANGED
@@ -187,7 +187,12 @@ qc_seqhash.sdrm_hiv_pr(cut_off)
187
187
 
188
188
  ## Updates
189
189
 
190
- ### Version-1.8.0.pre-04052024
190
+
191
+ ### Version-1.8.1-06042024
192
+
193
+ 1. Fixed a bug that causes `tcs_sdrm` pipeline to crash.
194
+
195
+ ### Version-1.8.0-04052024
191
196
 
192
197
  1. Use `muscle-v3.8.1` as default aligner because of the compatibility issues with `muscle-v5` on some platforms.
193
198
  2. Adjust the end-join model for short insert (insert size less than read length substracted by adaptor size)
@@ -49,7 +49,10 @@ module ViralSeq
49
49
  return recency
50
50
  end #end of .define
51
51
 
52
-
52
+ # function for predict Days Post Infection
53
+ # @params pi_rt [Float] average pairwise diversity at RT region
54
+ # @params pi_viv3 [Float] average pairwise diversity at V1V3 region
55
+ # @return [Array] Array of [DPI, lwr, upr] for DPI prediction as [Numerics]
53
56
  def self.dpi(pi_rt, pi_v1v3)
54
57
 
55
58
  if pi_rt.is_a? Numeric and pi_v1v3.is_a? Numeric
@@ -70,9 +73,9 @@ module ViralSeq
70
73
  path = File.join( ViralSeq.root, "viral_seq", "util", "recency_model", model_file)
71
74
  data_str = `Rscript -e 'fit = readRDS("#{path}"); test = data.frame(#{var} = #{pi}); pre= predict(fit, test, interval = "prediction", level = 0.9); cat(pre)'`
72
75
  dpi_array = data_str.split("\s")
73
- dpi = dpi_array[0].to_f
74
- lwr = dpi_array[1].to_f
75
- upr = dpi_array[2].to_f
76
+ dpi = dpi_array[0].to_f.round(1)
77
+ lwr = dpi_array[1].to_f.round(1)
78
+ upr = dpi_array[2].to_f.round(1)
76
79
  if lwr < 0
77
80
  return [dpi, 0.0, upr]
78
81
  else
@@ -80,6 +83,11 @@ module ViralSeq
80
83
  end
81
84
  end # end of .dpi
82
85
 
86
+ # given `recency` and `dpi` predict if possible dual infection exists
87
+ # @params recency [String] Recency from ViralSeq::Recency.define() function
88
+ # @params dpi [Array] DPI array from ViralSeq::Recency.dpi() function
89
+ # @return [String] "Yes", "No", or "insufficient data"
90
+
83
91
  def self.possible_dual_infection(recency, dpi)
84
92
  if ["recent", "chronic", "indeterminant"].include? recency and dpi[0].is_a? Numeric
85
93
  if recency == "indeterminant" and dpi[0] > 730
@@ -92,7 +100,7 @@ module ViralSeq
92
100
  end
93
101
  end
94
102
 
95
- end
103
+ end # end of .possible_dual_infection
96
104
 
97
105
 
98
106
  end
@@ -141,8 +141,8 @@ module ViralSeq
141
141
  },
142
142
 
143
143
  {
144
- text: log[:dpi].round(1).to_s +
145
- " (" + log[:dpi_lwr].round(1).to_s + "-" + log[:dpi_upr].round(1).to_s + ") Days",
144
+ text: log[:dpi].to_s +
145
+ " (" + log[:dpi_lwr].to_s + "-" + log[:dpi_upr].to_s + ") Days",
146
146
  styles: [:bold],
147
147
  size: 16,
148
148
  color: recency_color[log[:recency]]
@@ -2,6 +2,6 @@
2
2
  # version info and histroy
3
3
 
4
4
  module ViralSeq
5
- VERSION = "1.8.0"
6
- TCS_VERSION = "2.6.0"
5
+ VERSION = "1.8.1.1"
6
+ TCS_VERSION = "2.6.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.8.0
4
+ version: 1.8.1.1
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: 2024-05-09 00:00:00.000000000 Z
12
+ date: 2024-06-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  version: 1.3.6
223
223
  requirements:
224
224
  - R required for some functions
225
- rubygems_version: 3.5.9
225
+ rubygems_version: 3.5.10
226
226
  signing_key:
227
227
  specification_version: 4
228
228
  summary: A Ruby Gem containing bioinformatics tools for processing viral NGS data.