viral_seq 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -1
- data/bin/tcs +7 -3
- data/lib/viral_seq/constant.rb +5 -1
- data/lib/viral_seq/hivdr.rb +1 -1
- data/lib/viral_seq/sdrm.rb +43 -0
- data/lib/viral_seq/seq_hash.rb +2 -2
- data/lib/viral_seq/tcs_core.rb +5 -3
- data/lib/viral_seq/version.rb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb5906a2a3f0c98fa84a15f7fd4b35160f766317a6603b18c62e2e2476af01fd
|
4
|
+
data.tar.gz: 435a32d9ce5078b18b633c14c1585c30835b48d3f013d24bc6b9cc98fef51a55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a65fcfe551b59d2f022f96d009f089941a3bd293545e840ba294ce43b3cb087b2f3a7fef26829fe3b229c9469ca4e5c907362bbf05a5384947af97a12409a5aa
|
7
|
+
data.tar.gz: e4283b03e33aa67feb1dcf623d2613440bcc7299ab33ff77b7dce1ef9617b46e1763d17dda64d54b5fb3c6de37da66880abe43baae932ac36b70d0e2b0cc88d1
|
data/README.md
CHANGED
@@ -78,9 +78,17 @@ Examine for drug resistance mutations for HIV PR region
|
|
78
78
|
```ruby
|
79
79
|
qc_seqhash.sdrm_hiv_pr(cut_off)
|
80
80
|
```
|
81
|
+
## Known issues
|
82
|
+
|
83
|
+
1. have a conflict with rails.
|
81
84
|
|
82
85
|
## Updates
|
83
86
|
|
87
|
+
### Version 1.1.1-03022021
|
88
|
+
|
89
|
+
1. Fixed a issue when calculating Poisson cutoff for minority mutations `ViralSeq::SeqHash.pm`.
|
90
|
+
2. fixed an issue loading class 'OptionParser'in some ruby environments.
|
91
|
+
|
84
92
|
### Version 1.1.0-11112020:
|
85
93
|
|
86
94
|
1. Modularize TCS pipeline. Move key functions into /viral_seq/tcs_core.rb
|
@@ -88,7 +96,7 @@ qc_seqhash.sdrm_hiv_pr(cut_off)
|
|
88
96
|
3. consensus model now includes a true simple majority model, where no nt needs to be over 50% to be called.
|
89
97
|
4. a few optimizations.
|
90
98
|
5. TCS 2.1.0 delivered.
|
91
|
-
6. Tried parallel processing. Cannot achieve the goal because `parallel` gem by default can't pool data from memory of child processors and `in_threads` does not help with the speed.
|
99
|
+
6. Tried parallel processing. Cannot achieve the goal because `parallel` gem by default can't pool data from memory of child processors and `in_threads` does not help with the speed.
|
92
100
|
|
93
101
|
### Version 1.0.9-07182020:
|
94
102
|
|
data/bin/tcs
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
require 'viral_seq'
|
29
29
|
require 'json'
|
30
30
|
require 'colorize'
|
31
|
-
require '
|
31
|
+
require 'optparse'
|
32
32
|
|
33
33
|
options = {}
|
34
34
|
|
@@ -317,8 +317,12 @@ primers.each do |primer|
|
|
317
317
|
f1 = File.open(outfile_r1, 'w')
|
318
318
|
f2 = File.open(outfile_r2, 'w')
|
319
319
|
primer_id_in_use = {}
|
320
|
-
|
321
|
-
|
320
|
+
if n_con > 0
|
321
|
+
r1_seq_length = consensus_filtered.values[0][0].size
|
322
|
+
r2_seq_length = consensus_filtered.values[0][1].size
|
323
|
+
else
|
324
|
+
next
|
325
|
+
end
|
322
326
|
log.puts Time.now.to_s + "\t" + "R1 sequence #{r1_seq_length} bp"
|
323
327
|
log.puts Time.now.to_s + "\t" + "R1 sequence #{r2_seq_length} bp"
|
324
328
|
consensus_filtered.each do |seq_name,seq|
|
data/lib/viral_seq/constant.rb
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
module ViralSeq
|
2
|
-
|
2
|
+
|
3
3
|
# array for all amino acid one letter abbreviations
|
4
4
|
|
5
5
|
AMINO_ACID_LIST = ["A", "C", "D", "E", "F", "G", "H", "I", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "Y", "*"]
|
6
6
|
|
7
|
+
SDRM_HIV_PR_LIST = {}
|
8
|
+
SDRM_HIV_RT_LIST = {}
|
9
|
+
SDRM_HIV_IN_LIST = {}
|
10
|
+
|
7
11
|
end
|
data/lib/viral_seq/hivdr.rb
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
module ViralSeq
|
2
|
+
class DRMs
|
3
|
+
def initialize (mutation_list = {})
|
4
|
+
@mutation_list = mutation_list
|
5
|
+
end
|
6
|
+
|
7
|
+
attr_accessor :mutation_list
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.sdrm_hiv_pr(seq_hash)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.sdrm_hiv_rt(seq_hash)
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.sdrm_hiv_in(seq_hash)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.list_from_json(file)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.list_from_csv(file)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.export_list_hiv_pr(file, format = :json)
|
26
|
+
if foramt == :json
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.export_list_hiv_rt(file, format = :json)
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.export_list_hiv_in(file, format = :json)
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
def drm_analysis(seq_hash)
|
40
|
+
mutation_list = self.mutation_list
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
data/lib/viral_seq/seq_hash.rb
CHANGED
@@ -549,7 +549,7 @@ module ViralSeq
|
|
549
549
|
if sequences.size == 0
|
550
550
|
return 0
|
551
551
|
else
|
552
|
-
cut_off =
|
552
|
+
cut_off = Float::INFINITY
|
553
553
|
l = sequences[0].size
|
554
554
|
rate = sequences.size * error_rate
|
555
555
|
count_mut = variant_for_poisson(sequences)
|
@@ -558,7 +558,7 @@ module ViralSeq
|
|
558
558
|
|
559
559
|
poisson_hash.each do |k,v|
|
560
560
|
cal = l * v
|
561
|
-
obs = count_mut[k] ? count_mut[k] :
|
561
|
+
obs = count_mut[k] ? count_mut[k] : 1
|
562
562
|
if obs >= fold_cutoff * cal
|
563
563
|
cut_off = k
|
564
564
|
break
|
data/lib/viral_seq/tcs_core.rb
CHANGED
@@ -104,14 +104,16 @@ module ViralSeq
|
|
104
104
|
# sort array of file names to determine if there is potential errors
|
105
105
|
# input name_array array of file names
|
106
106
|
# output hash { }
|
107
|
-
|
107
|
+
# need to change for each file name have an error code. and a bool to show if all pass
|
108
108
|
def validate_file_name(name_array)
|
109
|
-
errors = {
|
109
|
+
errors = {
|
110
|
+
file_type_error: [] ,
|
110
111
|
missing_r1_file: [] ,
|
111
112
|
missing_r2_file: [] ,
|
112
113
|
extra_r1_r2_file: [],
|
113
114
|
no_region_tag: [] ,
|
114
|
-
multiple_region_tag: []
|
115
|
+
multiple_region_tag: []
|
116
|
+
}
|
115
117
|
|
116
118
|
passed_libs = {}
|
117
119
|
|
data/lib/viral_seq/version.rb
CHANGED
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.
|
4
|
+
version: 1.0.11
|
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:
|
12
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- lib/viral_seq/pid.rb
|
115
115
|
- lib/viral_seq/ref_seq.rb
|
116
116
|
- lib/viral_seq/rubystats.rb
|
117
|
+
- lib/viral_seq/sdrm.rb
|
117
118
|
- lib/viral_seq/seq_hash.rb
|
118
119
|
- lib/viral_seq/seq_hash_pair.rb
|
119
120
|
- lib/viral_seq/sequence.rb
|
@@ -142,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
143
|
version: '0'
|
143
144
|
requirements:
|
144
145
|
- R required for some functions
|
145
|
-
rubygems_version: 3.
|
146
|
+
rubygems_version: 3.2.2
|
146
147
|
signing_key:
|
147
148
|
specification_version: 4
|
148
149
|
summary: A Ruby Gem containing bioinformatics tools for processing viral NGS data.
|