miga-base 1.0.5.2 → 1.1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,19 +36,15 @@ HMM.essential.rb \
36
36
  > "${DATASET}.ess/log"
37
37
 
38
38
  # Index for FastAAI
39
- NOMULTI=$(miga list_datasets -P "$PROJECT" -D "$DATASET" --no-multi \
39
+ NOMULTI=$(miga ls -P "$PROJECT" -D "$DATASET" --no-multi \
40
40
  | wc -l | awk '{print $1}')
41
41
  if [[ "$NOMULTI" -eq "1" ]] ; then
42
- if [[ "$FAA" == *.gz ]] ; then
43
- gzip -cd "$FAA" > "${DATASET}.faix"
44
- else
45
- cp "$FAA" "${DATASET}.faix"
46
- fi
47
- FastAAI --qp "${DATASET}.faix" --output "${DATASET}.faix" \
48
- --ext ".faix" --index --input-paths --all-vs-all --threads "$CORES"
49
- rm "${DATASET}.faix"
50
- rm "${DATASET}.faix.hmm"
51
- rm "${DATASET}.faix.hmm.filt"
42
+ echo "$FAA" > "$DATASET"
43
+ FastAAI build_db --protein_file "$DATASET" \
44
+ -o "${DATASET}.faix.d" --threads "$CORES"
45
+ rm "$DATASET"
46
+ mv "${DATASET}.faix.d/database/FastAAI_database.sqlite.db" "${DATASET}.faix"
47
+ rm -r "${DATASET}.faix.d"
52
48
  fi
53
49
 
54
50
  # Reduce files
data/scripts/miga.bash CHANGED
@@ -3,8 +3,8 @@
3
3
  ###
4
4
  # Setup environment
5
5
  set -e
6
- eval "$("$MIGA/bin/miga" env)"
7
- SCRIPT=${SCRIPT:-$(basename "$0" .bash)}
6
+ eval "$("$MIGA/bin/miga-env")"
7
+ SCRIPT=${SCRIPT:-"$(basename "$0" .bash)"}
8
8
 
9
9
  ###
10
10
  # Ancillary functions
data/test/common_test.rb CHANGED
@@ -78,21 +78,21 @@ class CommonTest < Test::Unit::TestCase
78
78
 
79
79
  # Check advance when missing total
80
80
  o = capture_stderr { m.advance('x', 0) }.string
81
- assert_match(/\] x *\r/, o)
81
+ assert_match(%r{\] x *\r}, o)
82
82
 
83
83
  # Initialize advance
84
- o = capture_stderr { m.advance('x', 0, 10) }.string
85
- assert_match(/\] x 0\.0% \(0\/10\) *\r/, o)
84
+ o = capture_stderr { m.advance('x', 0, 1001) }.string
85
+ assert_match(%r{\] x 0\.0% \(0/1001\) *\r}, o)
86
86
 
87
87
  # Insufficient data for prediction
88
88
  sleep(1)
89
- o = capture_stderr { m.advance('x', 1, 10) }.string
90
- assert_match(/\] x 10\.0% \(1\/10\) *\r/, o)
89
+ o = capture_stderr { m.advance('x', 1, 1000) }.string
90
+ assert_match(%r{\] x 0\.1% \(1/1000\) *\r}, o)
91
91
 
92
92
  # Predict time
93
93
  sleep(1)
94
- o = capture_stderr { m.advance('x', 2, 10) }.string
95
- assert_match(/\] x 20\.0% \(2\/10\) [7-9]s left *\r/, o)
94
+ o = capture_stderr { m.advance('x', 2, 1000) }.string
95
+ assert_match(%r{\] x 0\.2% \(2/1000\) 1\d\.\dm left *\r}, o)
96
96
  end
97
97
 
98
98
  def test_num_suffix