miga-base 1.3.15.0 → 1.3.15.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: c98ad5733d0f008f1aa18156c20f0fe59c7b30f1c2a7fadb213840c46bdd91fc
4
- data.tar.gz: 794e59380b68c9dc2f62e3f5241e7fb0aa7436f7837693dea90da56c4d4b371c
3
+ metadata.gz: f897211099d0c1b049576951a3810ed33185d5b4519d72a5b7490b8b41bc0b6f
4
+ data.tar.gz: 6858281155d41c5954c144cda09156994640cf6ea3b34764456961dfa8554f4a
5
5
  SHA512:
6
- metadata.gz: e44d171e1ab9313d67f2fd3782335c3467ec9b61f425483539fd1c9691c572ecaee229a10529faac5cfd9314b350d54d427dd94c19496d1d71c81a554e7c6687
7
- data.tar.gz: 8b7f5b9ad54e08c3ad0ebdc2a6b24022a275259bddc6c579a1313f113d54a31a35f4fc761059491ec79e50d29fc3dd85687c53cd63479c8a1938f492a4bac9fa
6
+ metadata.gz: 292bdf4161b612675fd39e454d64c00bba54b0ac6e9b02471e32e2dfebd19321a6008304490b78c3b3926a25bd2f4a7d92bf7f407541c0069d9171caec7efc1b
7
+ data.tar.gz: e2705c2f55c776b4f117f2549d1b6d7d212be7c73b9efb08030ee9732179a09347df431512ad2fa794661d2e2a1005e4908bf273b18b95802afe4a2828484a2b
@@ -261,10 +261,12 @@ module MiGA::Dataset::Result::Add
261
261
  def add_result_distances_nonref(base)
262
262
  return nil unless
263
263
  result_files_exist?(base, %w[.aai-medoids.tsv .aai.db]) ||
264
- result_files_exist?(base, %w[.ani-medoids.tsv .ani.db])
264
+ result_files_exist?(base, %w[.ani-medoids.tsv .ani.db]) ||
265
+ result_files_exist?(base, %w[.empty])
265
266
 
266
267
  add_files_to_ds_result(
267
268
  MiGA::Result.new("#{base}.json"), name,
269
+ empty: '.empty',
268
270
  aai_medoids: '.aai-medoids.tsv',
269
271
  haai_db: '.haai.db',
270
272
  aai_db: '.aai.db',
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, 0].freeze
15
+ VERSION = [1.3, 15, 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(2024, 5, 2)
23
+ VERSION_DATE = Date.new(2024, 5, 21)
24
24
 
25
25
  ##
26
26
  # References of MiGA
data/scripts/cds.bash CHANGED
@@ -64,7 +64,7 @@ fi
64
64
 
65
65
  # Gzip
66
66
  for ext in gff3 faa fna ; do
67
- [[ -e "$DATASET.$ext" ]] && gzip -9 -f "$DATASET.$ext"
67
+ [[ -e "$DATASET.$ext" ]] && gzip -9f "$DATASET.$ext"
68
68
  done
69
69
 
70
70
  # Finalize
@@ -29,44 +29,46 @@ blast=no
29
29
  blat=no
30
30
  diamond=no
31
31
  fastani=no
32
- case $(miga option -P "$PROJECT" -k haai_p) in
33
- fastaai)
34
- fastaai=yes
35
- ;;
36
- diamond)
37
- diamond=yes
38
- aai=yes
39
- ;;
40
- blast)
41
- blast=yes
42
- aai=yes
43
- ;;
44
- esac
32
+ if [[ ! -s "${DATASET}.empty" ]] ; then
33
+ case $(miga option -P "$PROJECT" -k haai_p) in
34
+ fastaai)
35
+ fastaai=yes
36
+ ;;
37
+ diamond)
38
+ diamond=yes
39
+ aai=yes
40
+ ;;
41
+ blast)
42
+ blast=yes
43
+ aai=yes
44
+ ;;
45
+ esac
45
46
 
46
- case $(miga option -P "$PROJECT" -k aai_p) in
47
- diamond)
48
- diamond=yes
49
- aai=yes
50
- ;;
51
- blast)
52
- blast=yes
53
- aai=yes
54
- ;;
55
- esac
47
+ case $(miga option -P "$PROJECT" -k aai_p) in
48
+ diamond)
49
+ diamond=yes
50
+ aai=yes
51
+ ;;
52
+ blast)
53
+ blast=yes
54
+ aai=yes
55
+ ;;
56
+ esac
56
57
 
57
- case $(miga option -P "$PROJECT" -k ani_p) in
58
- blast)
59
- blast=yes
60
- ani=yes
61
- ;;
62
- blat)
63
- blat=yes
64
- ani=yes
65
- ;;
66
- fastani)
67
- fastani=yes
68
- ;;
69
- esac
58
+ case $(miga option -P "$PROJECT" -k ani_p) in
59
+ blast)
60
+ blast=yes
61
+ ani=yes
62
+ ;;
63
+ blat)
64
+ blat=yes
65
+ ani=yes
66
+ ;;
67
+ fastani)
68
+ fastani=yes
69
+ ;;
70
+ esac
71
+ fi
70
72
 
71
73
 
72
74
  miga date > "${DATASET}.done"
data/scripts/miga.bash CHANGED
@@ -15,6 +15,11 @@ function exists { [[ -e "$1" ]] ; }
15
15
  # Evaluates if the first passed argument is a function
16
16
  function fx_exists { [[ $(type -t "$1") == "function" ]] ; }
17
17
 
18
+ # Override gzip with pigz (if available)
19
+ if which -s pigz ; then
20
+ function gzip { pigz -p ${CORES:-2} "$@" ; }
21
+ fi
22
+
18
23
  # Initiate a project-wide run
19
24
  function miga_start_project_step {
20
25
  local dir="$1"
data/scripts/mytaxa.bash CHANGED
@@ -86,12 +86,10 @@ else
86
86
  ktImportText -o "$DATASET.html" -n biota "$DATASET.mytaxa.krona,$DATASET"
87
87
 
88
88
  # Gzip and cleanup
89
- [[ -e "../../../06.cds/$DATASET.gff2" ]] \
90
- && gzip -9 -f "../../../06.cds/$DATASET.gff2"
91
- [[ -e "../../../06.cds/$DATASET.gff3" ]] \
92
- && gzip -9 -f "../../../06.cds/$DATASET.gff3"
93
- gzip -9 -f "$DATASET.mytaxain"
94
- gzip -9 -f "$DATASET.blast"
89
+ for i in "../../../06.cds/$DATASET.gff2" "../../../06.cds/$DATASET.gff3" \
90
+ "$DATASET.mytaxain" "$DATASET.blast" ; do
91
+ [[ -e $i ]] && gzip -9f $i
92
+ done
95
93
  rm "$DATASET.daa"
96
94
  fi
97
95
 
@@ -72,7 +72,7 @@ else
72
72
  awk "NR==$win" "$DATASET.wintax.genes" | tr "\\t" "\\n" \
73
73
  > "$DATASET.reg/$i.ids"
74
74
  if [[ "$FAA" == *.gz ]] ; then
75
- gzip -c -d "$FAA" \
75
+ gzip -cd "$FAA" \
76
76
  | FastA.filter.pl -q "$DATASET.reg/$i.ids" /dev/stdin \
77
77
  > "$DATASET.reg/$i.faa"
78
78
  else
@@ -81,8 +81,7 @@ else
81
81
  fi
82
82
  done
83
83
  # Archive regions
84
- tar -cf "$DATASET.reg.tar" "$DATASET.reg"
85
- gzip -9 "$DATASET.reg.tar"
84
+ tar -c "$DATASET.reg" | gzip -9c > "$DATASET.reg.tar.gz"
86
85
  rm -r "$DATASET.reg"
87
86
  fi
88
87
 
@@ -91,7 +90,7 @@ else
91
90
  [[ -e "$DATASET.$x" ]] && rm "$DATASET.$x"
92
91
  done
93
92
  [[ -s "$DATASET.mytaxa" && ! -s "$DATASET.mytaxa.gz" ]] \
94
- && gzip -9 -f "$DATASET.mytaxa"
93
+ && gzip -9f "$DATASET.mytaxa"
95
94
  fi
96
95
 
97
96
  fi
data/scripts/ssu.bash CHANGED
@@ -59,7 +59,7 @@ if [[ -s $fa ]] ; then
59
59
 
60
60
  # Gzip
61
61
  for x in gff ssu.all.fa rdp.tsv trna.txt ; do
62
- [[ -e "${DATASET}.${x}" ]] && gzip -9 -f "${DATASET}.${x}"
62
+ [[ -e "${DATASET}.${x}" ]] && gzip -9f "${DATASET}.${x}"
63
63
  done
64
64
  fi
65
65
 
@@ -30,7 +30,8 @@ FastQ.tag.rb -i "$in1" -p "$b-" -s "/1" -o "$b.1.fastq.gz"
30
30
  [[ -e "$in2" ]] && FastQ.tag.rb -i "$in2" -p "$b-" -s "/2" -o "$b.2.fastq.gz"
31
31
 
32
32
  # Multitrim
33
- CMD="multitrim.py --zip gzip --level 9 --threads $CORES -o $b"
33
+ CMD="multitrim.py --level 9 --threads $CORES -o $b"
34
+ which -s pigz && CMD="$CMD --zip pigz"
34
35
  if [[ -s "$b.2.fastq.gz" ]] ; then
35
36
  # Paired
36
37
  $CMD -1 "$b.1.fastq.gz" -2 "$b.2.fastq.gz"
@@ -35,7 +35,7 @@ class MiGA::DistanceRunner
35
35
 
36
36
  # Launch the appropriate analysis
37
37
  def go!
38
- $stderr.puts "Launching analysis"
38
+ $stderr.puts 'Launching analysis'
39
39
  return if dataset.multi?
40
40
 
41
41
  Dir.mktmpdir do |tmp_dir|
@@ -68,6 +68,14 @@ class MiGA::DistanceRunner
68
68
  # Launch analysis for query datasets
69
69
  def go_query!
70
70
  $stderr.puts 'Launching analysis for query dataset'
71
+
72
+ # Check if the project is empty
73
+ if ref_project.dataset_ref_active.empty?
74
+ out_base = File.expand_path(dataset.name, home)
75
+ File.open("#{out_base}.empty", 'w') { |fh| fh.puts 'Empty ref_project' }
76
+ return
77
+ end
78
+
71
79
  # Check if project is ready
72
80
  tsk = ref_project.clade? ? [:subclades, :ani] : [:clade_finding, :aai]
73
81
  res = ref_project.result(tsk[0])
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.0
4
+ version: 1.3.15.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: 2024-05-02 00:00:00.000000000 Z
11
+ date: 2024-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons