miga-base 0.7.12.0 → 0.7.13.2

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: f99f8fd530489d42672cdd96123f321725b9437ee4a81e822a07854ec924ad53
4
- data.tar.gz: c4d6607a4b6062b45cc94985b8bc920bb25307232851b20436ee4b9cd8a8986b
3
+ metadata.gz: 36fd2b4078044d448feccc3a1c08f4299663692c3f564fd0d390808a2d2f07e7
4
+ data.tar.gz: b57924e0a40b316f186d5089455e1d2221f3e11f559d91c0d9f5d8e8e621b257
5
5
  SHA512:
6
- metadata.gz: '03478c56a40e948ad9eb4cb09fbedc72bac331072ccf46ce5468f1f78a08e891260684771e455b92841d8af454fcab997d7d51a68360b8337ffa13c8c2ec88a4'
7
- data.tar.gz: e992d10e5de206a85ac425e15c7594629f86e8088ec6f59ba820c5ecaf6c8901af0142455501a1d8af03902a3ca559d0374692e4df9f41acdceaf45d5d750b1f
6
+ metadata.gz: 47038d85b7680fff3d74b176e1fc46125b0b76f5c7044c6ae3153f2192584e7934c480c901ab538a926ab9f5b2af9ac9d54c16ce88231043cb2e5bb0c0ad40d8
7
+ data.tar.gz: b1878fb728f2e3414e8c9ffdc8af436d50f66c64588ecbff4b991bb2df93528e7b4fd3177b47ad4a136e45a972ea07c2c48328234ec1b5579795311bcd20c2d6
@@ -189,8 +189,9 @@ class MiGA::Cli < MiGA::MiGA
189
189
  end
190
190
 
191
191
  ##
192
- # Perform the task requested (see #task)
193
- def launch
192
+ # Perform the task requested (see #task); if +abort_on_error+, abort on
193
+ # error
194
+ def launch(abort_on_error = false)
194
195
  begin
195
196
  raise "See `miga -h`" if action.nil?
196
197
 
@@ -199,6 +200,7 @@ class MiGA::Cli < MiGA::MiGA
199
200
  $stderr.puts "Exception: #{err}"
200
201
  $stderr.puts ''
201
202
  err.backtrace.each { |l| $stderr.puts "DEBUG: #{l}" }
203
+ abort if abort_on_error
202
204
  err
203
205
  end
204
206
  end
@@ -46,7 +46,9 @@ class MiGA::Cli::Action::Browse < MiGA::Cli::Action
46
46
 
47
47
  # Summaries
48
48
  summaries = Dir["#{p.path}/*.tsv"].map do |i|
49
- "<li><a href='file://#{i}'>#{File.basename(i)}</a></li>"
49
+ b = File.basename(i, '.tsv')
50
+ generate_summary_page(i, p)
51
+ "<li><a href='s-#{b}.html'>#{format_name(b)}</a></li>"
50
52
  end.join('')
51
53
 
52
54
  # Project index page
@@ -59,6 +61,32 @@ class MiGA::Cli::Action::Browse < MiGA::Cli::Action
59
61
  write_file(p, 'index.html') { build_from_template('index.html', data) }
60
62
  end
61
63
 
64
+ ##
65
+ # Create page for the summary +path+ in project +p+
66
+ def generate_summary_page(path, p)
67
+ b = File.basename(path, '.tsv')
68
+ table = '<table class="table table-hover table-responsive">'
69
+ File.open(path, 'r') do |fh|
70
+ fh.each do |ln|
71
+ r = ln.chomp.split("\t")
72
+ if $. == 1
73
+ table += '<thead><tr>' +
74
+ r.map { |i| "<th scope=col>#{format_name(i)}</th>" }.join(' ') +
75
+ '</tr></thead><tbody>'
76
+ else
77
+ table += "<tr><th scope=row>#{r.shift}</th>" +
78
+ r.map { |i| "<td>#{i}</td>" }.join(' ') + "</tr>"
79
+ end
80
+ end
81
+ end
82
+ table += '</tbody></table>'
83
+ write_file(p, "s-#{b}.html") do
84
+ build_from_template(
85
+ 'summary.html', file: "#{b}.tsv", name: format_name(b), table: table
86
+ )
87
+ end
88
+ end
89
+
62
90
  ##
63
91
  # Create page for dataset +d+ within project +p+
64
92
  def generate_dataset_page(p, d)
@@ -162,7 +190,7 @@ class MiGA::Cli::Action::Browse < MiGA::Cli::Action
162
190
  links = []
163
191
  res.each_file do |key, _|
164
192
  name = format_name(key)
165
- links << "<a href='file://#{res.file_path(key)}'>#{name}</a><br/>"
193
+ links << "<a href='../#{res.file_path(key, true)}'>#{name}</a><br/>"
166
194
  end
167
195
  links.empty? ? nil : links.join('')
168
196
  end
@@ -0,0 +1,31 @@
1
+ <h1 class="h2 border-bottom pt-3 pb-2 mb-3">About MiGA</h1>
2
+ <p>
3
+ MiGA is developed and maintained by
4
+ <a href='https://rodriguez-r.com/'>Luis M. Rodriguez-R</a>.
5
+
6
+ The MiGA codebase is
7
+ <a href='http://code.microbial-genomes.org/miga'>freely available</a> under the
8
+ terms of the terms of the
9
+ <a href='http://code.microbial-genomes.org/miga/blob/master/LICENSE'>Artistic License 2.0</a>.
10
+ </p>
11
+
12
+ <p>
13
+ MiGA is the result of a collaboration between the
14
+ <a href='http://enve-omics.gatech.edu/'>Kostas Lab</a>
15
+ (<a href='http://www.gatech.edu/'>Georgia Institute of Technology</a>) and the
16
+ <a href='http://rdp.cme.msu.edu/'>RDP team</a>
17
+ (<a href='http://cme.msu.edu/'>Center for Microbial Ecology</a>,
18
+ <a href='https://msu.edu/'>Michigan State University</a>).
19
+ The MiGA project is funded by the
20
+ <a href='http://nsf.gov/'>US National Science Foundation</a>
21
+ (Awards <a href='http://nsf.gov/awardsearch/showAward?AWD_ID=1356288'>#1356288</a> &amp;
22
+ <a href='https://xras.xsede.org/public/requests/31162-XSEDE-MCB190042-1190572'>#MCB190042</a>).
23
+ </p>
24
+
25
+ <h1 class="h2 border-bottom pt-3 pb-2 mb-3">Citation</h1>
26
+ If you use MiGA in your work, consider citing:
27
+ <blockquote class='border-left p-3'>
28
+ {{citation}}
29
+ </blockquote>
30
+
31
+
@@ -0,0 +1,5 @@
1
+ <h1 class="h2 border-bottom pt-3 pb-2 mb-3">{{unmiga_name}}</h1>
2
+ {{information}}
3
+
4
+ <h1 class="h2 border-bottom pt-3 pb-2 mb-3">Results</h1>
5
+ {{results}}
@@ -0,0 +1,3 @@
1
+ <li class="nav-item">
2
+ <a class="nav-link" href="ds_{{name}}.html">{{unmiga_name}}</a>
3
+ </li>
@@ -0,0 +1,4 @@
1
+ <h1 class="h2 border-bottom pt-3 pb-2 mb-3">{{type_name}} Datasets</h1>
2
+ <ul>
3
+ {{list}}
4
+ </ul>
@@ -0,0 +1,8 @@
1
+ <h1 class="h2 border-bottom pt-3 pb-2 mb-3">Project Information</h1>
2
+ {{information}}
3
+
4
+ <h1 class="h2 border-bottom pt-3 pb-2 mb-3">Summaries</h1>
5
+ {{summaries}}
6
+
7
+ <h1 class="h2 border-bottom pt-3 pb-2 mb-3">Project Results</h1>
8
+ {{results}}
@@ -0,0 +1,57 @@
1
+ <!doctype html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+ <title>MiGA | {{project_name}}</title>
5
+
6
+ <!-- Remote assets -->
7
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
8
+ <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
10
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
11
+
12
+ <!-- Local assets -->
13
+ <link href="style.css" rel="stylesheet">
14
+ <link rel="icon" href="favicon-32.png" sizes="32x32" type="image/png">
15
+ </head>
16
+ <body>
17
+ <nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
18
+ <a class="navbar-brand col-md-12 col-lg-12 mr-0 px-3"
19
+ href="index.html">MiGA | {{project_name}}</a>
20
+ <button class="navbar-toggler position-absolute d-md-none collapsed"
21
+ type="button" data-toggle="collapse" data-target="#sidebarMenu"
22
+ aria-controls="sidebarMenu" aria-expanded="false"
23
+ aria-label="Toggle navigation">
24
+ <span class="navbar-toggler-icon"></span>
25
+ </button>
26
+ </nav>
27
+ <div class="container-fluid">
28
+ <div class="row">
29
+ <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
30
+ <div class="sidebar-sticky pt-3">
31
+ <ul class="nav flex-column">
32
+ <li class="nav-item">
33
+ <a class="nav-link {{project_active}}" href="index.html">Project</a>
34
+ </li>
35
+ <li class="nav-item">
36
+ <a class="nav-link {{ref_datasets_active}}"
37
+ href="ref_datasets.html">Reference datasets</a>
38
+ </li>
39
+ <li class="nav-item">
40
+ <a class="nav-link {{qry_datasets_active}}"
41
+ href="qry_datasets.html">Query datasets</a>
42
+ </li>
43
+ <li class="nav-item border-top mt-4">
44
+ <a class="nav-link {{about_miga_active}}"
45
+ href="about.html">About MiGA</a>
46
+ </li>
47
+ </ul>
48
+ </div>
49
+ </nav>
50
+
51
+ <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4">
52
+ {{content}}
53
+ </main>
54
+ </div>
55
+ </div>
56
+ </body>
57
+
@@ -0,0 +1,11 @@
1
+ <!doctype html>
2
+ <head>
3
+ <title>MiGA Project</title>
4
+ <meta http-equiv = "refresh" content = "1; url = browse/index.html" />
5
+ </head>
6
+ <body>
7
+ <div style='font-size:200%; margin-top: 5em; text-align: center;'>
8
+ Redirecting to <a href='browse/index.html'>Project page</a>...
9
+ </div>
10
+ </body>
11
+
@@ -0,0 +1,97 @@
1
+ body {
2
+ font-size: .875rem;
3
+ }
4
+
5
+ /*
6
+ * Sidebar
7
+ */
8
+
9
+ .sidebar {
10
+ position: fixed;
11
+ top: 0;
12
+ bottom: 0;
13
+ left: 0;
14
+ z-index: 100; /* Behind the navbar */
15
+ padding: 48px 0 0; /* Height of navbar */
16
+ box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
17
+ }
18
+
19
+ @media (max-width: 767.98px) {
20
+ .sidebar {
21
+ top: 3rem;
22
+ }
23
+ }
24
+
25
+ .sidebar-sticky {
26
+ position: relative;
27
+ top: 0;
28
+ height: calc(100vh - 48px);
29
+ padding-top: .5rem;
30
+ overflow-x: hidden;
31
+ overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
32
+ }
33
+
34
+ @supports ((position: -webkit-sticky) or (position: sticky)) {
35
+ .sidebar-sticky {
36
+ position: -webkit-sticky;
37
+ position: sticky;
38
+ }
39
+ }
40
+
41
+ .sidebar .nav-link {
42
+ font-weight: 500;
43
+ color: #333;
44
+ }
45
+
46
+ .sidebar .nav-link .feather {
47
+ margin-right: 4px;
48
+ color: #999;
49
+ }
50
+
51
+ .sidebar .nav-link.active {
52
+ color: #007bff;
53
+ }
54
+
55
+ .sidebar .nav-link:hover .feather,
56
+ .sidebar .nav-link.active .feather {
57
+ color: inherit;
58
+ }
59
+
60
+ .sidebar-heading {
61
+ font-size: .75rem;
62
+ text-transform: uppercase;
63
+ }
64
+
65
+ /*
66
+ * Navbar
67
+ */
68
+
69
+ .navbar-brand {
70
+ padding-top: .75rem;
71
+ padding-bottom: .75rem;
72
+ font-size: 1rem;
73
+ background-color: rgba(0, 0, 0, .25);
74
+ box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
75
+ }
76
+
77
+ .navbar .navbar-toggler {
78
+ top: .25rem;
79
+ right: 1rem;
80
+ }
81
+
82
+ .navbar .form-control {
83
+ padding: .75rem 1rem;
84
+ border-width: 0;
85
+ border-radius: 0;
86
+ }
87
+
88
+ .form-control-dark {
89
+ color: #fff;
90
+ background-color: rgba(255, 255, 255, .1);
91
+ border-color: rgba(255, 255, 255, .1);
92
+ }
93
+
94
+ .form-control-dark:focus {
95
+ border-color: transparent;
96
+ box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
97
+ }
@@ -0,0 +1,5 @@
1
+ <h1 class="h2 border-bottom pt-3 pb-2 mb-3">Summary: {{name}}</h1>
2
+ <p class='m-2 mb-3'>
3
+ Based on <a href='../{{file}}'>{{file}}</a>
4
+ </p>
5
+ {{table}}
@@ -27,10 +27,13 @@ class MiGA::Cli::Action::DerepWf < MiGA::Cli::Action
27
27
  '--threshold FLOAT', Float,
28
28
  "Metric threshold (%) to dereplicate. By default: #{cli[:threshold]}"
29
29
  ) { |v| cli[:threshold] = v }
30
+ opt.on(
31
+ '--quality',
32
+ 'Use genome with highest quality as clade representatives (default)'
33
+ ) { |v| cli[:criterion] = :quality }
30
34
  opt.on(
31
35
  '--medoids',
32
- 'Use medoids as clade representatives',
33
- 'By default: Use genome with the highest quality'
36
+ 'Use medoids as clade representatives'
34
37
  ) { |v| cli[:criterion] = :medoids }
35
38
  opt.on(
36
39
  '--no-collection',
@@ -47,12 +50,18 @@ class MiGA::Cli::Action::DerepWf < MiGA::Cli::Action
47
50
 
48
51
  def perform
49
52
  # Input data
50
- p = create_project(:assembly,
51
- { run_project_stats: false, run_clades: false,
52
- gsp_metric: cli[:metric], :"gsp_#{cli[:metric]}" => cli[:threshold] },
53
- { run_mytaxa_scan: false, run_ssu: false })
53
+ p = create_project(
54
+ :assembly,
55
+ {
56
+ run_project_stats: false,
57
+ run_clades: false,
58
+ gsp_metric: cli[:metric],
59
+ :"gsp_#{cli[:metric]}" => cli[:threshold]
60
+ },
61
+ { run_mytaxa_scan: false, run_ssu: false }
62
+ )
54
63
  unless cli[:threshold] >= 0.0 && cli[:threshold] <= 100.0
55
- raise "The threshold of identity must be in the range [0,100]"
64
+ raise 'The threshold of identity must be in the range [0,100]'
56
65
  end
57
66
 
58
67
  # Run
@@ -65,8 +74,8 @@ class MiGA::Cli::Action::DerepWf < MiGA::Cli::Action
65
74
  private
66
75
 
67
76
  def dereplicate(p)
68
- cli.say "Extracting genomospecies clades"
69
- r = p.result(:clade_finding) or raise "Result unavailable: run failed"
77
+ cli.say 'Extracting genomospecies clades'
78
+ r = p.result(:clade_finding) or raise 'Result unavailable: run failed'
70
79
  c_f = r.file_path(:clades_gsp) or raise 'Result incomplete: run failed'
71
80
  clades = File.readlines(c_f).map { |i| i.chomp.split("\t") }
72
81
  rep = representatives(p)
@@ -87,7 +96,7 @@ class MiGA::Cli::Action::DerepWf < MiGA::Cli::Action
87
96
  end
88
97
 
89
98
  def representatives(p)
90
- cli.say "Identifying representatives"
99
+ cli.say 'Identifying representatives'
91
100
  f = File.expand_path('representatives.txt', cli[:outdir])
92
101
  if cli[:criterion] == :medoids
93
102
  FileUtils.cp(p.result(:clade_finding).file_path(:medoids_gsp), f)
@@ -91,7 +91,8 @@ class MiGA::Daemon < MiGA::MiGA
91
91
  flush!
92
92
  if (loop_i % 12).zero?
93
93
  purge!
94
- recalculate_status!
94
+ # TEMPORARILY DISABLED:
95
+ # recalculate_status!
95
96
  end
96
97
  save_status
97
98
  sleep(latency)
@@ -81,20 +81,22 @@ class MiGA::Result < MiGA::MiGA
81
81
  end
82
82
 
83
83
  ##
84
- # Directory containing the result
85
- def dir
86
- File.dirname(path)
84
+ # Directory containing the result; by default an absolute path, if
85
+ # +relative+ is true returns the path relative to the parent project
86
+ def dir(relative = false)
87
+ relative ? relative_dir : File.dirname(path)
87
88
  end
88
89
 
89
90
  ##
90
- # Absolute path to the file(s) defined by symbol +k+
91
- def file_path(k)
91
+ # Absolute path to the file(s) defined by symbol +k+, or relative
92
+ # path if +relative+ is true
93
+ def file_path(k, relative = false)
92
94
  k = k.to_sym
93
95
  f = self[:files].nil? ? nil : self[:files][k]
94
96
  return nil if f.nil?
95
- return File.expand_path(f, dir) unless f.is_a? Array
97
+ return File.join(dir(relative), f) unless f.is_a? Array
96
98
 
97
- f.map { |fi| File.expand_path(fi, dir) }
99
+ f.map { |fi| File.join(dir(relative), fi) }
98
100
  end
99
101
 
100
102
  ##
@@ -8,7 +8,7 @@ module MiGA
8
8
  # - Float representing the major.minor version.
9
9
  # - Integer representing gem releases of the current version.
10
10
  # - Integer representing minor changes that require new version number.
11
- VERSION = [0.7, 12, 0]
11
+ VERSION = [0.7, 13, 2]
12
12
 
13
13
  ##
14
14
  # Nickname for the current major.minor version.
@@ -16,7 +16,7 @@ module MiGA
16
16
 
17
17
  ##
18
18
  # Date of the current gem release.
19
- VERSION_DATE = Date.new(2020, 7, 22)
19
+ VERSION_DATE = Date.new(2020, 8, 4)
20
20
 
21
21
  ##
22
22
  # Reference of MiGA.
@@ -13,17 +13,20 @@ echo -n "" > miga-project.log
13
13
  DS=$(miga ls -P "$PROJECT" --ref --no-multi --active)
14
14
 
15
15
  # Extract values
16
- echo "metric a b value sd n omega" | tr " " "\\t" >miga-project.txt
17
- for i in $DS ; do
18
- echo "SELECT CASE WHEN omega!=0 THEN 'AAI' ELSE 'hAAI_AAI' END," \
19
- " seq1, seq2, aai, sd, n, omega from aai;" \
20
- | sqlite3 "$i.db" | tr "\\|" "\\t" >>miga-project.txt
21
- echo "$i" >> miga-project.log
22
- done
16
+ rm -f miga-project.txt
17
+ (
18
+ echo "metric a b value sd n omega" | tr " " "\\t"
19
+ for i in $DS ; do
20
+ echo "SELECT CASE WHEN omega!=0 THEN 'AAI' ELSE 'hAAI_AAI' END," \
21
+ " seq1, seq2, aai, sd, n, omega from aai;" \
22
+ | sqlite3 "$i.db" | tr "\\|" "\\t"
23
+ echo "$i" >> miga-project.log
24
+ done
25
+ ) | gzip -9c > miga-project.txt.gz
23
26
 
24
27
  # R-ify
25
28
  echo "
26
- aai <- read.table('miga-project.txt', sep='\\t', h=T, as.is=TRUE);
29
+ aai <- read.table(gzfile('miga-project.txt.gz'), sep='\\t', h=T, as.is=TRUE);
27
30
  save(aai, file='miga-project.Rdata');
28
31
  if(sum(aai[,'a'] != aai[,'b']) > 0){
29
32
  h <- hist(aai[aai[,'a'] != aai[,'b'], 'value'], breaks=100, plot=FALSE);
@@ -35,9 +38,6 @@ if(sum(aai[,'a'] != aai[,'b']) > 0){
35
38
  }
36
39
  " | R --vanilla
37
40
 
38
- # Gzip
39
- gzip -9 -f miga-project.txt
40
-
41
41
  # Finalize
42
42
  miga date > "miga-project.done"
43
43
  miga add_result -P "$PROJECT" -r "$SCRIPT" -f
@@ -13,16 +13,19 @@ echo -n "" > miga-project.log
13
13
  DS=$(miga ls -P "$PROJECT" --ref --no-multi --active)
14
14
 
15
15
  # Extract values
16
- echo "metric a b value sd n omega" | tr " " "\\t" >miga-project.txt
17
- for i in $DS ; do
18
- echo "SELECT 'ANI', seq1, seq2, ani, sd, n, omega from ani ;" \
19
- | sqlite3 "$i.db" | tr "\\|" "\\t" >>miga-project.txt
20
- echo "$i" >> miga-project.log
21
- done
16
+ rm -f miga-project.txt
17
+ (
18
+ echo "metric a b value sd n omega" | tr " " "\\t"
19
+ for i in $DS ; do
20
+ echo "SELECT 'ANI', seq1, seq2, ani, sd, n, omega from ani ;" \
21
+ | sqlite3 "$i.db" | tr "\\|" "\\t"
22
+ echo "$i" >> miga-project.log
23
+ done
24
+ ) | gzip -9c > miga-project.txt.gz
22
25
 
23
26
  # R-ify
24
27
  echo "
25
- ani <- read.table('miga-project.txt', sep='\\t', h=T, as.is=TRUE);
28
+ ani <- read.table(gzfile('miga-project.txt.gz'), sep='\\t', h=T, as.is=TRUE);
26
29
  save(ani, file='miga-project.Rdata');
27
30
  if(sum(ani[,'a'] != ani[,'b']) > 0){
28
31
  h <- hist(ani[ani[,'a'] != ani[,'b'], 'value'], breaks=100, plot=FALSE);
@@ -34,9 +37,6 @@ if(sum(ani[,'a'] != ani[,'b']) > 0){
34
37
  }
35
38
  " | R --vanilla
36
39
 
37
- # Gzip
38
- gzip -9 -f miga-project.txt
39
-
40
40
  # Finalize
41
41
  miga date > "miga-project.done"
42
42
  miga add_result -P "$PROJECT" -r "$SCRIPT" -f
@@ -17,30 +17,30 @@ echo -n "" > miga-project.log
17
17
  DS=$(miga ls -P "$PROJECT" --ref --no-multi --active)
18
18
 
19
19
  # Extract values
20
- echo "metric a b value sd n omega" | tr " " "\\t" >miga-project.txt
21
- for i in $DS ; do
22
- echo "SELECT 'hAAI', seq1, seq2, aai, sd, n, omega from aai ;" \
23
- | sqlite3 "$i.db" | tr "\\|" "\\t" >>miga-project.txt
24
- echo "$i" >> miga-project.log
25
- done
20
+ rm -f miga-project.txt
21
+ (
22
+ echo "metric a b value sd n omega" | tr " " "\\t"
23
+ for i in $DS ; do
24
+ echo "SELECT 'hAAI', seq1, seq2, aai, sd, n, omega from aai ;" \
25
+ | sqlite3 "$i.db" | tr "\\|" "\\t"
26
+ echo "$i" >> miga-project.log
27
+ done
28
+ ) | gzip -9c > miga-project.txt.gz
26
29
 
27
30
  # R-ify
28
31
  echo "
29
- haai <- read.table('miga-project.txt', sep='\\t', h=T, as.is=TRUE);
32
+ haai <- read.table(gzfile('miga-project.txt.gz'), sep='\\t', h=T, as.is=TRUE);
30
33
  save(haai, file='miga-project.Rdata');
31
34
  if(sum(haai[,'a'] != haai[,'b']) > 0){
32
35
  h <- hist(haai[haai[,'a'] != haai[,'b'], 'value'], breaks=100, plot=FALSE);
33
36
  write.table(
34
37
  cbind(h[['breaks']][-length(h[['breaks']])],
35
- h[['breaks']][-1],h[['counts']]),
38
+ h[['breaks']][-1], h[['counts']]),
36
39
  file='miga-project.hist', quote=FALSE, sep='\\t',
37
40
  col.names=FALSE, row.names=FALSE);
38
41
  }
39
42
  " | R --vanilla
40
43
 
41
- # Gzip
42
- gzip -9 -f miga-project.txt
43
-
44
44
  # Finalize
45
45
  miga date > "miga-project.done"
46
46
  miga add_result -P "$PROJECT" -r "$SCRIPT" -f
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: 0.7.12.0
4
+ version: 0.7.13.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: 2020-07-22 00:00:00.000000000 Z
11
+ date: 2020-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons
@@ -119,6 +119,16 @@ files:
119
119
  - lib/miga/cli/action/add_result.rb
120
120
  - lib/miga/cli/action/archive.rb
121
121
  - lib/miga/cli/action/browse.rb
122
+ - lib/miga/cli/action/browse/about.html
123
+ - lib/miga/cli/action/browse/dataset.html
124
+ - lib/miga/cli/action/browse/dataset_menu_item.html
125
+ - lib/miga/cli/action/browse/datasets.html
126
+ - lib/miga/cli/action/browse/favicon-32.png
127
+ - lib/miga/cli/action/browse/index.html
128
+ - lib/miga/cli/action/browse/layout.html
129
+ - lib/miga/cli/action/browse/redirect.html
130
+ - lib/miga/cli/action/browse/style.css
131
+ - lib/miga/cli/action/browse/summary.html
122
132
  - lib/miga/cli/action/classify_wf.rb
123
133
  - lib/miga/cli/action/console.rb
124
134
  - lib/miga/cli/action/daemon.rb