miga-base 1.3.15.12 → 1.3.17.0

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: 445777ed090342dc2c61db44580712ab1a29efb3f54fe66715c7b76ed62a3310
4
- data.tar.gz: 78f5fe723814ca20585003ed866031be338fcc5d918c0abca996588ec911af67
3
+ metadata.gz: e33b9da20704a768d31e9b826676bdcb637a7636ec434fdef4af7eb653744f35
4
+ data.tar.gz: 28970fcb3723a6304c11d834f8861b37ede641fba77ddd9a2d4950b608fcb6a0
5
5
  SHA512:
6
- metadata.gz: 56eee3874cd9f7f2f8acdec2b1da0e10bb354201259721e73c0c24f3da1499830f901bee35f03d5313290f39ff27db7a3aa64f5b0454c267be9c455b949d8f8e
7
- data.tar.gz: f92b9699f7372cb493cb17ee32d66dbd6751b129de2023092c6e48f9a132a3f8370c7c010fae65bf1703904b3f654d27e106921a786cd5a975979d9607ed811e
6
+ metadata.gz: 9ff04d00d7e1d4af7b007bbf27e59b35a57678715cf89651befcab48deec95389e1c3ffb330bfae62cd8720bde752f36a9f513f37e410d1ab60158381de700f7
7
+ data.tar.gz: 33c6aaa9c088b8bfed16c1ffd765fe36d4b797bd01d4145cda989e50faf2dea4ffe93d632cde163fef1e64d4493fc9f164b85770337439c75f59d6a652b89feb
@@ -65,6 +65,24 @@ module MiGA::Cli::Action::Doctor::Operations
65
65
  cli.say
66
66
  end
67
67
 
68
+ ##
69
+ # Perform md-files operation with MiGA::Cli +cli+
70
+ def check_mdfiles(cli)
71
+ cli.say 'Looking for unregistered files in the metadata folder'
72
+ md = File.join(cli.load_project.path, 'metadata')
73
+ Dir.each_child(md) do |file|
74
+ expected_ds = File.basename(file, '.json')
75
+ next if cli.load_project.dataset_names.include?(expected_ds)
76
+ file_path = File.join(md, file)
77
+ if Dir.exist?(file_path)
78
+ cli.say " > Ignoring directory: #{file}"
79
+ else
80
+ cli.say " > Removing: #{file}"
81
+ File.unlink(File.join(md, file))
82
+ end
83
+ end
84
+ end
85
+
68
86
  ##
69
87
  # Perform cds operation with MiGA::Cli +cli+
70
88
  def check_cds(cli)
@@ -49,6 +49,7 @@ class MiGA::Cli::Action::Doctor < MiGA::Cli::Action
49
49
  # TODO Implement this check:
50
50
  # refdb: ['ref-db', 'Check index format of reference databases'],
51
51
  status: ['status', 'Update metadata status of all datasets'],
52
+ mdfiles:['md-files', 'Remove unregistered files in metadata'],
52
53
  db: ['databases', 'Check integrity of database files'],
53
54
  dist: ['distances', 'Check distance summary tables'],
54
55
  bidir: ['bidirectional', 'Check distances are bidirectional'],
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, 15, 12].freeze
15
+ VERSION = [1.3, 17, 0].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(2024, 6, 23)
23
+ VERSION_DATE = Date.new(2024, 6, 28)
24
24
 
25
25
  ##
26
26
  # References of MiGA
data/scripts/ssu.bash CHANGED
@@ -46,16 +46,17 @@ if [[ -s $fa ]] ; then
46
46
  >> "${DATASET}.rdp.tsv"
47
47
  fi
48
48
 
49
- # tRNAscan-SE
50
- dom_opt="-$(echo "$d" | perl -pe 's/(\S).*/$1/')"
51
- out="${DATASET}.trna.txt"
52
- # `echo O` is to avoid a hang from a pre-existing output file.
53
- # This is better than pre-checking (and removing), because it avoids
54
- # the (unlikely) scenario of a file racing (e.g., a file created right
55
- # before tRNAscan-SE starts, or a `rm` failure).
56
- #
57
- # The trailing `|| true` is to treat failure as non-fatal
58
- echo O | tRNAscan-SE $dom_opt -o "${DATASET}.trna.txt" -q "$fa" || true
49
+ # tRNAscan-SE (only if non-multi)
50
+ if miga ls -P "$PROJECT" -D "$DATASET" --no-multi --silent ; then
51
+ dom_opt="-$(echo "$d" | perl -pe 's/(\S).*/$1/')"
52
+ # `echo O` is to avoid a hang from a pre-existing output file.
53
+ # This is better than pre-checking (and removing), because it avoids
54
+ # the (unlikely) scenario of a file racing (e.g., a file created right
55
+ # before tRNAscan-SE starts, or a `rm` failure).
56
+ #
57
+ # The trailing `|| true` is to treat failure as non-fatal
58
+ echo O | tRNAscan-SE $dom_opt -o "${DATASET}.trna.txt" -q "$fa" || true
59
+ fi
59
60
 
60
61
  # Gzip
61
62
  for x in gff ssu.all.fa rdp.tsv trna.txt ; do
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.15.12
4
+ version: 1.3.17.0
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: 2024-06-23 00:00:00.000000000 Z
11
+ date: 2024-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons