viral_seq 1.2.6 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -0
- data/bin/tcs +10 -5
- data/lib/viral_seq/math.rb +1 -1
- data/lib/viral_seq/seq_hash.rb +5 -1
- data/lib/viral_seq/tcs_core.rb +2 -1
- data/lib/viral_seq/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6ff64bcbe0e019c4e6842feae4c775e5975307a51ca111ea6629de5f918a163
|
4
|
+
data.tar.gz: 464d2eeacc49243722c8f8121df7a118c9a433da8df0e2f02e6c5195aa03e1a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b0da2b42f7c1fb039995fa017cd6535a1253c6352be2f502ecf3ef25cbdc4bcdd7b8497e68ed00eab82e67007751be9474cc8a6f06ace3386a81456dae19a4e
|
7
|
+
data.tar.gz: df93fd5689cfc8e6b5248febd0a57961cb6773b0e939cb3c980b9b13cae60ca9177209f24acd13e94748733c6c7dee165b89a86c4505f961618d68c4a05782d2
|
data/README.md
CHANGED
@@ -179,6 +179,25 @@ qc_seqhash.sdrm_hiv_pr(cut_off)
|
|
179
179
|
|
180
180
|
## Updates
|
181
181
|
|
182
|
+
### Version 1.3.0-08302021
|
183
|
+
|
184
|
+
1. Fixed a bug in the `tcs` pipeline.
|
185
|
+
|
186
|
+
### Version 1.2.9-08022021
|
187
|
+
|
188
|
+
1. Fixed a bug when reading the input primer sequences in lowercases.
|
189
|
+
2. Fix a bug in the method ViralSeq::Math::RandomGaussian
|
190
|
+
|
191
|
+
### Version 1.2.8-07292021
|
192
|
+
|
193
|
+
1. Fixed an issue when reading .fastq files containing blank_lines.
|
194
|
+
|
195
|
+
### Version 1.2.7-07152021
|
196
|
+
|
197
|
+
1. Optimzed the workflow of the `tcs` pipeline on raw data with uneven lengths.
|
198
|
+
`tcs` version to v2.3.6.
|
199
|
+
|
200
|
+
|
182
201
|
### Version 1.2.6-07122021
|
183
202
|
|
184
203
|
1. Optimized the workflow of the `tcs` pipeline in the "end-join/QC/Trimming" section.
|
data/bin/tcs
CHANGED
@@ -152,8 +152,8 @@ begin
|
|
152
152
|
primer[:region] ? region = primer[:region] : region = "region"
|
153
153
|
summary_json[:primer_set_name] = region
|
154
154
|
|
155
|
-
cdna_primer = primer[:cdna]
|
156
|
-
forward_primer = primer[:forward]
|
155
|
+
cdna_primer = primer[:cdna].upcase
|
156
|
+
forward_primer = primer[:forward].upcase
|
157
157
|
|
158
158
|
export_raw = primer[:export_raw]
|
159
159
|
limit_raw = primer[:limit_raw]
|
@@ -353,7 +353,8 @@ begin
|
|
353
353
|
r1_seq_length = consensus_filtered.values[0][0].size
|
354
354
|
r2_seq_length = consensus_filtered.values[0][1].size
|
355
355
|
else
|
356
|
-
|
356
|
+
r1_seq_length = "n/a"
|
357
|
+
r2_seq_length = "n/a"
|
357
358
|
end
|
358
359
|
log.puts Time.now.to_s + "\t" + "R1 sequence #{r1_seq_length} bp"
|
359
360
|
log.puts Time.now.to_s + "\t" + "R1 sequence #{r2_seq_length} bp"
|
@@ -400,7 +401,11 @@ begin
|
|
400
401
|
when 4
|
401
402
|
joined_sh = shp.join2(model: :indiv)
|
402
403
|
end
|
403
|
-
|
404
|
+
if joined_sh
|
405
|
+
return joined_sh
|
406
|
+
else
|
407
|
+
joined_sh = ViralSeq::SeqHash.new
|
408
|
+
end
|
404
409
|
end
|
405
410
|
|
406
411
|
if primer[:end_join]
|
@@ -426,7 +431,7 @@ begin
|
|
426
431
|
if ref_end == 0
|
427
432
|
ref_end = 0..(ViralSeq::RefSeq.get(ref_genome).size - 1)
|
428
433
|
end
|
429
|
-
if primer[:end_join_option] == 1
|
434
|
+
if primer[:end_join_option] == 1
|
430
435
|
r1_sh = ViralSeq::SeqHash.fa(outfile_r1)
|
431
436
|
r2_sh = ViralSeq::SeqHash.fa(outfile_r2)
|
432
437
|
r1_sh = r1_sh.hiv_seq_qc(ref_start, (0..(ViralSeq::RefSeq.get(ref_genome).size - 1)), indel, ref_genome)
|
data/lib/viral_seq/math.rb
CHANGED
@@ -31,7 +31,7 @@ module ViralSeq
|
|
31
31
|
def rand
|
32
32
|
if (@compute_next_pair = !@compute_next_pair)
|
33
33
|
theta = 2 * ::Math::PI * @rng.call
|
34
|
-
scale = @sd * ::Math.sqrt(-2 * Math.log(1 - @rng.call))
|
34
|
+
scale = @sd * ::Math.sqrt(-2 * ::Math.log(1 - @rng.call))
|
35
35
|
@g1 = @mean + scale * ::Math.sin(theta)
|
36
36
|
@g0 = @mean + scale * ::Math.cos(theta)
|
37
37
|
else
|
data/lib/viral_seq/seq_hash.rb
CHANGED
@@ -116,6 +116,8 @@ module ViralSeq
|
|
116
116
|
|
117
117
|
File.open(fastq_file,'r') do |file|
|
118
118
|
file.readlines.collect do |line|
|
119
|
+
line.tr!("\u0000","")
|
120
|
+
next if line == "\n"
|
119
121
|
count +=1
|
120
122
|
count_m = count % 4
|
121
123
|
if count_m == 1
|
@@ -397,7 +399,9 @@ module ViralSeq
|
|
397
399
|
(0..(seq_length - 1)).each do |position|
|
398
400
|
all_base = []
|
399
401
|
seq_array.each do |seq|
|
400
|
-
|
402
|
+
if seq[position]
|
403
|
+
all_base << seq[position]
|
404
|
+
end
|
401
405
|
end
|
402
406
|
base_count = all_base.count_freq
|
403
407
|
max_base_list = []
|
data/lib/viral_seq/tcs_core.rb
CHANGED
@@ -305,7 +305,8 @@ module ViralSeq
|
|
305
305
|
end
|
306
306
|
|
307
307
|
def general_filter(seq)
|
308
|
-
|
308
|
+
return false unless seq
|
309
|
+
if seq.size < ($platform_sequencing_length - 10)
|
309
310
|
return false
|
310
311
|
elsif seq[1..-2] =~ /N/ # sequences with ambiguities except the 1st and last position removed
|
311
312
|
return false
|
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.
|
4
|
+
version: 1.3.0
|
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-
|
12
|
+
date: 2021-08-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|