miga-base 1.3.8.1 → 1.3.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 415756b71662dd191b51679aa75a4a4c75bb5ec00d6aacfa7fa6436cdd983819
4
- data.tar.gz: a4f441f9d6ff7bb06f2a5fe5534c1d52cea5ead3b82737d3799cb65f46bf81b0
3
+ metadata.gz: 2e4abdd418e396b20fcfea4beaf4d70f3b0022808714478581e2e1f6f8a85478
4
+ data.tar.gz: 881884c4d5a933b64ac29e93397b62b7d1dc30fd599baaa8b6ac04a3ad3ab051
5
5
  SHA512:
6
- metadata.gz: f44c2506cb04763e21a9ffa81060214ca8f9d3772107b4a55820320838e08de20eac3e2d27805b62a7399b9aead3fd54eeb306a522f8886c3323bfc2149116b4
7
- data.tar.gz: '00439963a16f86a3b8539fe0e212b63b7b62ac3eaedc8adebb88f8baae0a688a41a9518e6bbc69fc8db0b58e5551edf44b4c1764e64564aca372f358a6853d78'
6
+ metadata.gz: 317022ffe39818af13d36e3bf1e1adea80b3ab3aafb265b3df6371b6b5e87efdb75199cf8bd22aea37a63e941f824d1686f85bdb7a38eda3f4ba2a76c535b86b
7
+ data.tar.gz: 0d42dadd982374f0c618d76fc030f5665075e9973ca8e8615c5b090ab1dcc6bf663901a8f7355ce3bfa6874941d9098957d31704b6369474e516dd5ebf8c0b6b
@@ -50,8 +50,8 @@ class MiGA::Cli::Action::Doctor < MiGA::Cli::Action
50
50
  # refdb: ['ref-db', 'Check index format of reference databases'],
51
51
  status: ['status', 'Update metadata status of all datasets'],
52
52
  db: ['databases', 'Check integrity of database files'],
53
- bidir: ['bidirectional', 'Check distances are bidirectional'],
54
53
  dist: ['distances', 'Check distance summary tables'],
54
+ bidir: ['bidirectional', 'Check distances are bidirectional'],
55
55
  files: ['files', 'Check for outdated files'],
56
56
  cds: ['cds', 'Check for gzipped genes and proteins'],
57
57
  ess: ['essential-genes', 'Check for outdated essential genes'],
data/lib/miga/version.rb CHANGED
@@ -12,7 +12,7 @@ module MiGA
12
12
  # - String indicating release status:
13
13
  # - rc* release candidate, not released as gem
14
14
  # - [0-9]+ stable release, released as gem
15
- VERSION = [1.3, 8, 1].freeze
15
+ VERSION = [1.3, 8, 2].freeze
16
16
 
17
17
  ##
18
18
  # Nickname for the current major.minor version.
@@ -20,7 +20,7 @@ module MiGA
20
20
 
21
21
  ##
22
22
  # Date of the current gem relese.
23
- VERSION_DATE = Date.new(2023, 7, 5)
23
+ VERSION_DATE = Date.new(2023, 8, 8)
24
24
 
25
25
  ##
26
26
  # References of MiGA
data/utils/subclades.R CHANGED
@@ -116,7 +116,8 @@ subclade_clustering <- function (out_base, thr, ani.d, dist_rds) {
116
116
  say("Subsampling large collection")
117
117
  ids <- sample(labels(ani.d), nMax)
118
118
  ani.d.ori <- ani.d
119
- ani.d <- as.dist(as.matrix(ani.d)[ids, ids])
119
+ ani.d.m <- as.matrix(ani.d)
120
+ ani.d <- as.dist(ani.d.m[ids, ids])
120
121
  }
121
122
 
122
123
  # Silhouette
@@ -157,9 +158,10 @@ subclade_clustering <- function (out_base, thr, ani.d, dist_rds) {
157
158
  ani.d <- ani.d.ori
158
159
  # Find closest medoid for missing genomes
159
160
  missing <- labels(ani.d)[!labels(ani.d) %in% names(ani.types)]
160
- for (i in missing)
161
- ani.types[i] <- which.min(as.matrix(ani.d)[ani.medoids, i])
161
+ say("- Classify:", length(missing))
162
+ for (i in missing) ani.types[i] <- which.min(ani.d.m[ani.medoids, i])
162
163
  # Reorder
164
+ say("- Reorder and save")
163
165
  ani.types <- ani.types[labels(ani.d)]
164
166
  # Save missing genomes for inspection
165
167
  write.table(
@@ -190,11 +192,16 @@ subclade_clustering <- function (out_base, thr, ani.d, dist_rds) {
190
192
  # Generate graphic report
191
193
  say("Graphic report")
192
194
  pdf(paste(out_base, ".pdf", sep = ""), 7, 12)
193
- layout(matrix(c(rep(1:3, each = 2), 4:5), byrow = TRUE, ncol = 2))
194
- plot_distances(ani.d)
195
- plot_silhouette(k, s[1, ], s[2, ], ds, top.n)
196
- if (!is.huge) plot_clustering(ani.cl, ani.d, ani.types)
197
- if (!is.large) plot_tree(ani.ph, ani.types, ani.medoids)
195
+ if (is.huge) {
196
+ plot(NULL, axes = FALSE, xlab = '', ylab = '', xlim = 0:1, ylim = 0:1)
197
+ legend('center', legend = 'Dataset too large for graphical representation')
198
+ } else {
199
+ layout(matrix(c(rep(1:3, each = 2), 4:5), byrow = TRUE, ncol = 2))
200
+ plot_distances(ani.d)
201
+ plot_silhouette(k, s[1, ], s[2, ], ds, top.n)
202
+ plot_clustering(ani.cl, ani.d, ani.types)
203
+ if (!is.large) plot_tree(ani.ph, ani.types, ani.medoids)
204
+ }
198
205
  dev.off()
199
206
 
200
207
  # Save results
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miga-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.8.1
4
+ version: 1.3.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis M. Rodriguez-R
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-05 00:00:00.000000000 Z
11
+ date: 2023-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons