bacterial-annotator 0.9.3 → 0.9.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: e6b26cd37618fedd557b8d9f7fe2c27a3b95dee5404d7751a8fb10ddcb63edc8
4
- data.tar.gz: 2129f8372c3a48654cf3bdf6b75eccce3148b45f0e15191f3a555ff0769f9bd4
3
+ metadata.gz: 6873b45085524788e9ea2c82b29c5e3cfb6998c6cd7ff1f16d56dc64378c910e
4
+ data.tar.gz: 7b02f34f8ffef086ade18526db05b5fffdeabee339a4808ec09181a7cb108b53
5
5
  SHA512:
6
- metadata.gz: 2400660df26bab507b5f9a3310105514d415a4950a06fdb7a3cbc9a4de2b4268d77c3725a13507e19c92fcdcc688f2bda4184aeadb88afd4a444addce1117fb9
7
- data.tar.gz: 9caef8af954e6de43ed3eb2cd5a729065bafd2451aa5c73e00e60b400cb849666a53fb1e39d549f4b33925edbfea33f209a966da7f64d91ac1aa3d8b75e5f4d2
6
+ metadata.gz: 4b01f90fe7bc53e79a4245fbd64830a8fa967447e4a609715feef1ec21a68583531b9d1120631234204215bfa3bf6cfdd0b311704f030cf4cdf08d670fcabcf8
7
+ data.tar.gz: 15f9a395c37249bf937052d1917c89a42122a720bb1beddd1c4b2bddef3883111cb7e2e883da7757ccd9170eb3675499bbb70ac8dcfc62d4e722b9434549c92c
@@ -1,10 +1,10 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # author: maxime déraspe
3
3
  # email: maximilien1er@gmail.com
4
- # review:
4
+ # review:
5
5
  # date: 15-02-24
6
6
  # version: 0.0.1
7
- # licence:
7
+ # licence:
8
8
 
9
9
  require 'json'
10
10
  require 'zlib'
@@ -111,7 +111,7 @@ class SequenceSynteny
111
111
  system("#{@root}/diamond.linux makedb --db #{subject_file} --in #{subject_file} > /dev/null 2>&1")
112
112
  db_file = subject_file
113
113
  end
114
- system("#{@root}/diamond.linux blastp --db #{db_file} -q #{query_file} -o #{@outdir}/#{@name}.diamond.tsv -f 6 > /dev/null 2>&1")
114
+ system("#{@root}/diamond.linux blastp --masking none --db #{db_file} -q #{query_file} -o #{@outdir}/#{@name}.diamond.tsv -f 6 > /dev/null 2>&1")
115
115
  else
116
116
  # system("#{@root}/glsearch36.linux -b 3 -E 1e-25 -m 8 #{@subject_file} #{@query_file} > #{@outdir}/#{@name}.fasta36.tsv")
117
117
  end
@@ -45,6 +45,9 @@ class BacterialComparator
45
45
  min_pid = min_pid/100
46
46
  end
47
47
 
48
+ @min_cov = min_cov
49
+ @min_pid = min_pid
50
+
48
51
  @aln_opt = options[:align].downcase
49
52
  @run_phylo = 0
50
53
  if options[:phylogeny] == 1
@@ -592,8 +595,8 @@ class BacterialComparator
592
595
  query_prot_file,
593
596
  ref_prot_file,
594
597
  "Prot-Ref",
595
- 0.80,
596
- 0.80,
598
+ @min_cov,
599
+ @min_cov,
597
600
  "prot")
598
601
 
599
602
  print "# Running alignment with Reference Genome CDS (diamond).."
@@ -613,6 +616,7 @@ class BacterialComparator
613
616
  next if ! syn_val.has_key? :homology
614
617
  next if syn_val[:homology][:assert_cutoff].inject(:+) < 3
615
618
  next if ref_annotated.has_key? syn_val[:homology][:hits][0] and ref_annotated[syn_val[:homology][:hits][0]][:partial] == 0
619
+
616
620
  ref_annotated[syn_val[:homology][:hits][0]] = {
617
621
  key: prot,
618
622
  pId: syn_val[:homology][:pId],
@@ -622,6 +626,7 @@ class BacterialComparator
622
626
  length: syn_val[:homology][:length][0],
623
627
  partial: (syn_val[:partial] ? 1 : 0)
624
628
  }
629
+
625
630
  # ref_annotated[syn_val[:homology][:hits][0]] = {
626
631
  # key: prot,
627
632
  # pId: syn_val[:homology][:pId],
@@ -631,6 +636,7 @@ class BacterialComparator
631
636
  # length: syn_val[:homology][:length][0],
632
637
  # partial: (syn_val[:partial] ? 1 : 0)
633
638
  # }
639
+
634
640
  end
635
641
 
636
642
  # print ref_annotated
@@ -642,13 +648,21 @@ class BacterialComparator
642
648
  coverage_query = ""
643
649
  query_length = ""
644
650
  pId = ""
651
+
645
652
  if ref_annotated[ref_v[:protId]] != nil
646
- gene = ref_annotated[ref_v[:protId]][:key]
647
- coverage_ref = ref_annotated[ref_v[:protId]][:cov_subject]
648
- query_length = query_lengths[ref_annotated[ref_v[:protId]][:key]]
649
- coverage_query = ref_annotated[ref_v[:protId]][:cov_query]
650
- pId = ref_annotated[ref_v[:protId]][:pId]
651
- partial = ref_annotated[ref_v[:protId]][:partial]
653
+
654
+ if ref_annotated[ref_v[:protId]][:pId] >= @min_pid and
655
+ ref_annotated[ref_v[:protId]][:cov_query] >= @min_cov and
656
+ ref_annotated[ref_v[:protId]][:cov_subject] >= @min_cov
657
+
658
+ gene = ref_annotated[ref_v[:protId]][:key]
659
+ coverage_ref = ref_annotated[ref_v[:protId]][:cov_subject]
660
+ query_length = query_lengths[ref_annotated[ref_v[:protId]][:key]]
661
+ coverage_query = ref_annotated[ref_v[:protId]][:cov_query]
662
+ pId = ref_annotated[ref_v[:protId]][:pId]
663
+ partial = ref_annotated[ref_v[:protId]][:partial]
664
+ end
665
+
652
666
  end
653
667
 
654
668
  _locus_tag = ref_v[:locustag] || ""
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.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime Deraspe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-19 00:00:00.000000000 Z
11
+ date: 2023-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bio