-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from daniel-ji/main
Add stdout/stderr streaming config option: printStream
- Loading branch information
Showing
4 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<h4>Streamed Output of <code>tn93</code>:</h4> | ||
<pre id="output">Loading...</pre> | ||
|
||
<h4>Pairwise distances:</h4> | ||
<pre id="result">Loading...</pre> | ||
|
||
<script type="module" src="/src/examples/stream-std.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Aioli from "../../dist/aioli.mjs"; | ||
|
||
const CLI = await new Aioli(["tn93/1.0.11"], { | ||
debug: true, | ||
printStream: true, | ||
callback: (d) =>{ | ||
document.getElementById("output").innerHTML += "\n<span style='color: red'>timestamp: " + performance.now() + "</span>\n"; | ||
document.getElementById("output").innerHTML += d.stdout; | ||
} | ||
}); | ||
|
||
// Calculate pairwise distances of sequences in test.fas | ||
const output = await CLI.exec("tn93 -t 0.05 -o test.dst /shared/tn93/test.fas"); | ||
const result = await CLI.cat("test.dst"); | ||
|
||
// Output results | ||
document.getElementById("result").innerHTML = result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters