viral_seq 1.10.3 → 1.10.4
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/README.md +8 -2
- data/bin/locator +23 -0
- data/lib/viral_seq/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47084d565b9a9a468d76ed163f0d664ac804824674bfbaa2541dc874dc28ceb5
|
|
4
|
+
data.tar.gz: 2972f176263e0bcb76b3fb7e7534f2f29b7f3b2385977b2bc0e448bb72f5bf2f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d8d310efcd53cf519e79de99b38c16fd995e57f2f9ca8889cd681a9181616ac1e743195b66905e12cb13c2cd5ef418838c190d8ac0c5f9fc7cae1340a0588e7
|
|
7
|
+
data.tar.gz: 36c0b1099327beaca807dfc33bbf2d0133cea5ad33ac90ed17a66a04a29d7d11b851e15b45fd796ecf598aea4a6aa9419ae3ce257aa1332ebf5e9d34831f24ef
|
data/README.md
CHANGED
|
@@ -128,14 +128,20 @@ Output data in a new dir as 'libs_dir_SDRM'
|
|
|
128
128
|
|
|
129
129
|
---
|
|
130
130
|
|
|
131
|
-
### `locator`
|
|
131
|
+
### `locator` version >= 1.10.3
|
|
132
132
|
|
|
133
133
|
Use executable `locator` to get the coordinates of the sequences on HIV/SIV reference genome from a FASTA file through a terminal
|
|
134
134
|
|
|
135
135
|
```bash
|
|
136
|
-
$ locator -i sequence.fasta
|
|
136
|
+
$ locator -i sequence.fasta
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
+
Locator output defaults to a csv file with results and a new file in the same directory named {input}.direction.fasta
|
|
140
|
+
|
|
141
|
+
### `locator` version < 1.10.3
|
|
142
|
+
|
|
143
|
+
Only has the the results csv file.
|
|
144
|
+
|
|
139
145
|
---
|
|
140
146
|
|
|
141
147
|
## Some Examples
|
data/bin/locator
CHANGED
|
@@ -56,6 +56,26 @@ def myparser
|
|
|
56
56
|
return options
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
+
module ViralSeq
|
|
60
|
+
class SeqHash
|
|
61
|
+
def validate_nt_sequences
|
|
62
|
+
new_dna_hash = {}
|
|
63
|
+
self.dna_hash.each do |title, seq|
|
|
64
|
+
if seq.length < 10
|
|
65
|
+
print "[Warning] ".red.bold + "Sequence '#{title}' is too short (less than 10 nt), please check your input sequence.\n"
|
|
66
|
+
else
|
|
67
|
+
unless seq =~ /\A[ACGTURYSWKMBDHVN\-\s]+\z/i
|
|
68
|
+
print "[Warning] ".red.bold + "Sequence '#{title}' contains invalid characters (not A, C, G, T, U, R, Y, S, W, K, M, B, D, H, V, N, '-', or space), please check your input sequence.\n"
|
|
69
|
+
else
|
|
70
|
+
new_dna_hash[title] = seq
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
self.dna_hash = new_dna_hash
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
59
79
|
puts "\n" + "Sequence Locator (RubyGem::ViralSeq Version #{ViralSeq::VERSION})".red.bold + " by " + "Shuntai Zhou".blue.bold
|
|
60
80
|
puts "See details at " + "https://github.com/ViralSeq/viral_seq\n".blue
|
|
61
81
|
puts "Resembling" + " Sequence Locator ".magenta.bold + "from LANL" + " (https://www.hiv.lanl.gov/content/sequence/LOCATE/locate.html)\n".blue
|
|
@@ -86,6 +106,9 @@ begin
|
|
|
86
106
|
end
|
|
87
107
|
|
|
88
108
|
seqs = ViralSeq::SeqHash.fa(seq_file)
|
|
109
|
+
|
|
110
|
+
puts "Only sequences greater than 10 nt and containing valid nt chars will be processed.".blue.bold
|
|
111
|
+
seqs.validate_nt_sequences
|
|
89
112
|
opt = options[:ref_option] ? options[:ref_option] : :HXB2
|
|
90
113
|
|
|
91
114
|
unless [:HXB2, :SIVmm239].include? opt
|
data/lib/viral_seq/version.rb
CHANGED