bacterial-annotator 0.3.9 → 0.4.0

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
  SHA1:
3
- metadata.gz: b46c0c48f45550ea7deb1580acb72927435df345
4
- data.tar.gz: b5511795149b832c27fc8867dc3904c9c96d9561
3
+ metadata.gz: cd091580560639a95025ce9d6d188068ebd5518c
4
+ data.tar.gz: 3c470334e7aff680a48fe4132236d2bb646dedc5
5
5
  SHA512:
6
- metadata.gz: ac790dd5249a74cf559912dc88ebaad614d3f934a43c297848e1bda2db146c682b11862489170ddc21683fed070509f505cdc6759530ab0e1d2f8c80d8951ac7
7
- data.tar.gz: 0de96df50d2e3a1ad4274134969007b8efef2f1a63b24e7063c45f102c9020ba3e6c337de2214bc1a2f26ae1d33057d9ec7c6ef0ea182e23c77633b3cd8d5e0a
6
+ metadata.gz: 3ed95c575eb03b791c5f848a1417f4690f0141720992f2832ede949c1e81a7d8d74d3528d0951105affc3abcb2f4418ab89948c3cd4512cad1afeb7f3570d8d3
7
+ data.tar.gz: 90a71c6d106aef5fd570d7a3b497e5426bde5f72aad1eba533dde1b55530bb0c9e6282ceb54f174c80a68291b45161a5661d56ffd1dc0105456c57909f504095
@@ -176,9 +176,10 @@ class RemoteNCBI
176
176
  split("; Flags:")[0].
177
177
  split(" ; Short=")[0].strip
178
178
  gi = hit.hit_id.to_s.split("|")[1]
179
+ accession = hit.hit_accession.to_s
179
180
  organism = ""
180
181
  definition_clean = hit.definition.split(">")[0]
181
- if ! definition_clean[/\[.*\]/].nil?
182
+ if ! definition_clean[/\[.*\]/].nil?
182
183
  organism = definition_clean[/\[.*\]/].gsub("[","").gsub("]","")
183
184
  end
184
185
  @aln_hits[prot_id] = {
@@ -186,7 +187,7 @@ class RemoteNCBI
186
187
  length: hit.target_len.to_i,
187
188
  evalue: hit.evalue,
188
189
  score: hit.bit_score.to_f,
189
- hits: [{gi: gi, product: product, org: organism}]
190
+ hits: [{gi: gi, accession: accession, product: product, org: organism}]
190
191
  }
191
192
  end
192
193
  end
@@ -118,9 +118,7 @@ class BacterialAnnotator
118
118
  @rna_synteny.extract_hits_dna :rna
119
119
  @contig_annotations_rna = {}
120
120
  @fasta.prodigal_files[:contigs].each_with_index do |contig, contig_index|
121
- puts "adding rna_annotation for contig #{contig}"
122
121
  @contig_annotations_rna[contig] = @rna_synteny.get_annotation_for_contig contig
123
- p @contig_annotations_rna[contig]
124
122
  end
125
123
 
126
124
  else # no reference genome
@@ -250,7 +248,7 @@ class BacterialAnnotator
250
248
  gbk_to_annotate.add_annotations contig_prot_annotations, "inplace", reference_locus
251
249
 
252
250
  if @contig_annotations_rna.has_key? contig
253
- puts "Trying RNA annotation"
251
+ # puts "RNA annotation"
254
252
  gbk_to_annotate.add_annotations @contig_annotations_rna[contig], "new"
255
253
  end
256
254
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bacterial-annotator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime Deraspe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-13 00:00:00.000000000 Z
11
+ date: 2017-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bio