Ribbon
Ribbon copied to clipboard
Running Ribbon without internet access
Hello,
I am trying to get Ribbon to work on Ubuntu 18.04.0 with sandboxed user account and no access to the internet.
The Ribbon webpage loads up fine, however nothing really happens when loading a pair of bam + bai files.
Looking at the Firefox developer console we can see the Uncaught TypeError: _CLI is null
error popping up upon selecting the two files. Firefox version is 101.0.1 64bit.
The two files are located in a shared folder the user has R access to it.
I would really appreciate your help to figure this out and hopefully get it resolved. See the screenshot of the error below this message.
Regards
Can you try checking out the branch offline-mode
and launching an http server on port 1234:
git clone https://github.com/marianattestad/ribbon
cd ribbon
git fetch --all
git checkout offline-mode
python3 -m http.server 1234
Then you can open http://localhost:1234/ and that error should disappear.
Hello, @robertaboukhalil,
I have tried what you suggested but it makes no difference.
After running python3 -m http.server 1234 I opened firefox http://localhost:1234/ then loaded the ribbon index page in a different tab.
I have also tried firefox http://localhost:1234/path/to/ribbon/index.html but I get a 404 error. I doubt what I have been doing has got much sense to be honest. Do I have to setup some sort of webserver to serve the ribbon folder?
Could you please help me figure out what I am doing wrong?
Thank you for your help. Much appreciated.
Regards
@psammarco a few things to try:
- Did you switch to the
offline-mode
branch on the Ribbon repo before launching the server? You'll need to dogit fetch --all
first to make sure git knows about the branch - You should launch the server from the Ribbon folder so that going to localhost:1234 will open the Ribbon app
- In the browser, open Dev Tools --> Network tab --> filter by "wasm". Click on one of these and it should show
Request URL: http://localhost:1234/wasm/base/base.wasm
-- please share a screenshot of what you see if not
Normally, you don't need a webserver to serve the ribbon folder because the .wasm
assets are loaded from the biowasm CDN. But since you want to run Ribbon without internet access, you need a web server to serve .wasm
assets (wouldn't work from a file:///
URL)
Hello @robertaboukhalil ,
thanks for the patience and help. I have now managed to get the offline mode started, however the problem is still persisting.
Here is the screenshot you have asked me
Thanks
That's strange, from your screenshot, the file aioli.worker.js
is downloaded from cdn.biowasm.com instead of the local server, as it's behaving on my end.
Can you try clearing your cache and trying again? Also, if you go to http://localhost:1234/js/vis.js and do a hard refresh, do you see this chunk of code:
// Create Aioli (and the WebWorker in which WASM code will run)
_CLI = await new Aioli({
tool: "samtools",
version: "1.10",
urlPrefix: `${window.location.origin}/wasm/samtools`,
}, {
urlAioli: `${window.location.origin}/wasm/aioli.worker.js`,
urlBaseModule: `${window.location.origin}/wasm/base`,
});
Hello @robertaboukhalil ,
based on the http server response I am not sure the page was found, and looking at the output from the query I don't see the block mentioned. Output is attached. Though is insanely long :| .
Thanks.
I can see at the very bottom of vis.js:
// Create Aioli (and the WebWorker in which WASM code will run)
_CLI = await new Aioli("samtools/1.10");
which means it's not using the correct branch.
Can you make sure you checked out the offline-mode
branch as described in https://github.com/MariaNattestad/Ribbon/issues/50#issuecomment-1199455428?
Running git status
should show that you are on the branch offline-mode
, not main
Hello @robertaboukhalil ,
I am pretty sure I have switched to offline-mode branch. But for some reason the system is not picking it up.
zpietro.sammarco@hpc-prod-grid-login-001:/tools/apps/ribbon$ git status
On branch offline-mode
Your branch is up-to-date with 'origin/offline-mode'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README.md
modified: js/vis.js
deleted: wasm/aioli.worker.js
deleted: wasm/base/base.js
deleted: wasm/base/base.wasm
deleted: wasm/base/config.json
deleted: wasm/samtools/config.json
deleted: wasm/samtools/samtools.data
deleted: wasm/samtools/samtools.js
deleted: wasm/samtools/samtools.wasm
no changes added to commit (use "git add" and/or "git commit -a")
zpietro.sammarco@hpc-prod-grid-login-001:/tools/apps/ribbon$
Hmm, it looks like you're on the offline branch but with the code from main
. Running git status
should just show On branch offline-mode
without any of the lines that say modified
or deleted
.
Can you try git stash
then git pull origin offline-mode
and see if that makes git status
look different.
Alternatively, you can download the offline mode branch code as a zip file and try again in a new folder: https://github.com/MariaNattestad/Ribbon/archive/refs/heads/offline-mode.zip
Hey @robertaboukhalil ,
I downloaded the offline-mode branch directly and its now working. Thanks a lot for your help :)
Regards
I'm sorry to comment on this old fixed issue, but I had the exact same problem, and it was solved by following the procedure here. It's quite hard to find it, as it's only documented in a closed issue. Would you accept a pull request to add this procedure to the README file?
What is the use case?
On Tue, May 30, 2023 at 10:59 AM Marius Bjørnstad @.***> wrote:
I'm sorry to comment on this old fixed issue, but I had the exact same problem, and it was solved by following the procedure here. It's quite hard to find it, as it's only documented in a closed issue. Would you accept a pull request to add this procedure to the README file?
— Reply to this email directly, view it on GitHub https://github.com/MariaNattestad/Ribbon/issues/50#issuecomment-1568847293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4W4PLP3KH7VNGO3D4YKY3XIYYOLANCNFSM55AZLLGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
What is the use case?
I work with patient data, and due to confidentiality and IT security requirements, the sequence data are currently held in an "air-gapped" infrastructure - no connection to other systems. We are trying to get it integrated with the wider hospital IT system. Even when it becomes possible in the future, it may take a lot of process to open the firewall for biowasm.com.
We are trying to do genomic diagnosis of rare diseases. Genome ribbon is really useful in at least two situations related to structural variants, when callers don't call the right variant and IGV isn't very intuitive:
- Visualising how a single long nanopore read with an SV aligns to the reference genome
- Show how a genome assembly from PacBio aligns to the reference genome (in fact, I learned about Ribbon from PacBio)
@fa2k Wow, I'm happy to hear you are finding Ribbon useful for doing such important work! This makes a lot of sense now. @robertaboukhalil and I discussed, and we can make the process a little faster too, so we'll do that and document it in the README. Thanks for bringing this use case to our attention!
@fa2k okay done, #56 uses static assets instead of the biowasm.com CDN, which means that now deployment without access to the internet is easy on the main branch, and we've documented this in the README as well. Thanks again!
Thanks a lot for this @MariaNattestad , fantastic!