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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 727ed9feb929e077b25cfd2a83661dccb88f1fd8c503635f14c948d71f6f2519
4
- data.tar.gz: 6f1a69d0abeeabcad8107c3bbe515e9f909cd46b6732cdff66827ff4993e7efd
3
+ metadata.gz: 47084d565b9a9a468d76ed163f0d664ac804824674bfbaa2541dc874dc28ceb5
4
+ data.tar.gz: 2972f176263e0bcb76b3fb7e7534f2f29b7f3b2385977b2bc0e448bb72f5bf2f
5
5
  SHA512:
6
- metadata.gz: a2a7dd1af8b9022f2b6cadec96be4f49985681d6d98e2b152fc2a12844573218eff17cf6db089ebacb84ea5284c47be254981ddf406e22989647eb4c07fb3285
7
- data.tar.gz: 024f6066ecec3c5caed0277e10f0aaba596b3d95487e342885a325a1f9bfec7feb1c777eec2a4fbe26c2eb0ad55c8d437c6df6511a5c1c523d43a5d089eeef91
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 -o sequence.fasta.csv
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
@@ -2,6 +2,6 @@
2
2
  # version info and histroy
3
3
 
4
4
  module ViralSeq
5
- VERSION = "1.10.3"
5
+ VERSION = "1.10.4"
6
6
  TCS_VERSION = "2.7.4"
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.10.3
4
+ version: 1.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shuntai Zhou