Protein structure issue

65 views
Skip to first unread message

邹仁彬

unread,
Oct 21, 2021, 9:29:00 PM10/21/21
to Anvi'o
Dear sir/madam,
  Sorry for bothering you.
  I'm following the tutorial Infant Gut and trying the Chapter VII: From single-amino acid variants to protein structures. I have finished the step of Visualizing proteins with anvi-display-structure and opened the interactive interface but there was nothing showing in the interface. Please tell me if there is anything wrong in my operation.
 Thanks.
4.png1.png2 .png3.png

kiefl...@gmail.com

unread,
Oct 22, 2021, 10:53:28 AM10/22/21
to Anvi'o
Hi,

Thanks for reporting this bug. The blank screen is definitely unexpected.

If it's not too much trouble, could you please send me contigs.db, structure.db, and profile.db? I will take a look.

Cheers,
Evan

kiefl...@gmail.com

unread,
Oct 25, 2021, 1:17:52 PM10/25/21
to Anvi'o
Ok thank you for reporting this issue. I was able to reproduce this error and I fixed it. It will take some time until the data pack `INFANT-GUT-TUTORIAL.tar.gz` downloaded from the start of the tutorial is updated with the new `STRUCTURE.db` file, but in the meantime you can use this `STRUCTURE.db` instead :)

On Thursday, October 21, 2021 at 8:29:00 PM UTC-5 rbzou36...@gmail.com wrote:
STRUCTURE.db

kiefl...@gmail.com

unread,
Oct 30, 2021, 11:01:38 PM10/30/21
to Anvi'o
In a private email you reported that you are still having troubles. I'm going to respond here to keep this a public discussion.

What version of anvi'o are you using? If you're not using v7.1, please upgrade to v7.1 and try again using the new structure file.

Cheers,
Evan



邹仁彬

unread,
Oct 31, 2021, 2:33:46 AM10/31/21
to Anvi'o
It's  v7.1, sir. I installed the newest version in another computer and still failed.

kiefl...@gmail.com

unread,
Oct 31, 2021, 2:54:55 AM10/31/21
to Anvi'o
Could you please send me the exact PROFILE.db, CONTIGS.db, and STRUCTURE.db you're using?

邹仁彬

unread,
Oct 31, 2021, 3:59:36 AM10/31/21
to Anvi'o
OK, I'll send you privately .They are too big to upload here.

kiefl...@gmail.com

unread,
Nov 2, 2021, 2:04:46 PM11/2/21
to Anvi'o
Thanks for your patience.

Unfortunately, I was unable to reproduce your error. It loaded fine for me.

I have 2 ideas:

1. Can you please run the command with the --debug flag and copy-paste the entire output?

2. When the interface appears, can you press F12 and take a screenshot of the console log? I attached a picture of the info I'm interested in.

Meren, is there a way I can rbzou360530577 can save his html page so I can interrogate the console log?





Screen Shot 2021-11-02 at 1.03.07 PM.png

A. Murat Eren

unread,
Nov 2, 2021, 2:27:58 PM11/2/21
to Anvi'o
I think `--debug` is a good idea as it will report every server error which may not end up in the JS console. A right-click on the JS console window gives the option "Save As", so the entire history of the session can be sent through that mechanism.
--

A. Murat Eren (Meren) | he/him
http://merenlab.org :: twitter


--
Anvi'o Paper: https://peerj.com/articles/1319/
Project Page: http://merenlab.org/projects/anvio/
Code Repository: https://github.com/meren/anvio
---
You received this message because you are subscribed to the Google Groups "Anvi'o" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anvio+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/anvio/33e75683-8aa6-4506-a4fc-fb78d24a17b3n%40googlegroups.com.

邹仁彬

unread,
Nov 2, 2021, 9:46:33 PM11/2/21
to Anvi'o
Here are the debug and the screenshot of the console log. Thanks.2021-11-03 09-38-35 的屏幕截图.png2021-11-03 09-39-04 的屏幕截图.png
debug.txt

Evan Kiefl

unread,
Nov 2, 2021, 9:50:37 PM11/2/21
to an...@googlegroups.com
Please copy paste all of the text. Not a screenshot of the end. 

You received this message because you are subscribed to a topic in the Google Groups "Anvi'o" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/anvio/VCCXVPXm4_I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to anvio+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/anvio/7f56c053-30a1-4e0e-aa42-b20ed093e0d1n%40googlegroups.com.

邹仁彬

unread,
Nov 2, 2021, 10:03:00 PM11/2/21
to Anvi'o
The copy of debug is  in the attachment of the last email, sir. 

邹仁彬

unread,
Nov 4, 2021, 3:05:43 AM11/4/21
to Anvi'o
debug.txt

kiefl...@gmail.com

unread,
Nov 4, 2021, 9:44:34 AM11/4/21
to Anvi'o
I found the issue!

The reason the page never loads is because NGL can't be found: `ReferenceError: NGL is not defined`. I can reproduce the same error if I try to load the interactive interface with no internet. Are you connected to the internet when you run this command?

I interpret this as a bug, meren. We really should not need the internet to display structures, don't you agree? Here is the <head> of structure.html:

<head>
    <title>Structure Display</title>
    <script type="text/javascript" src="lib/jquery/dist/jquery.min.js"></script>
    <script type='text/javascript' src='js/utils.js'></script>
    <link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="lib/colpick/colpick.css" type="text/css" />
    <link rel="stylesheet" href="lib/toastr/build/toastr.min.css" type="text/css" />
    <link rel="stylesheet" href="css/structure.css" />
    <script type="text/javascript" src="lib/bootstrap/dist/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="lib/randomColor/randomColor.js"></script>
    <script type="text/javascript" src="https://cdn.rawgit.com/arose/ngl/v0.10.4/dist/ngl.js"></script>
    <script type="text/javascript" src="lib/colpick/colpick.js"></script>
    <script type="text/javascript" src="lib/toastr/build/toastr.min.js"></script>
    <script type="text/javascript" src="js/constants.js"></script>
    <script type="text/javascript" src="js/structure.js"></script>
</head>

In order for anvi-display-structure to work offline, is it necessary for all of the javascript scripts pulled from CDNs to be added to our anvio/data/js folder as local files?

A. Murat Eren

unread,
Nov 4, 2021, 9:54:15 AM11/4/21
to Anvi'o, Matthew Klein
I agree that we should not need the user to have an internet connection to display structures.

The NGL repo seems to be here, and we can add it to the list of submodules anvi'o repo includes (we can't copy-paste the JS file):


But if we want this to work, we need to do the same thing for every other JS library that is read directly from a CDN. There are more in the header as far as I can see. At least one of them, d3, can already be replaced with the path in our lib directory (you can see it in the default interactive interface headers). But I'm not sure about FileSaver, jszip, bootstrap-slider. If they have GitHub repositories, we can add them as submodules and make sure everything works offline, too. I am pinging Matthew here in case you need help with this, Evan.

And most importantly, even if we ask people to use online resources, we shouldn't give cryptic errors like this one. Matthew recently fixed it for the default interactive, and perhaps he can help us have the same solution here as well. That I think is the first thing to do to make sure this doesn't happen again in the future.

Thanks for figuring this out!


Best wishes,
--

A. Murat Eren (Meren) | he/him
http://merenlab.org :: twitter

邹仁彬

unread,
Nov 4, 2021, 9:30:58 PM11/4/21
to Anvi'o
Yes sir, my tutor found the problem yesterday. We didn't download the PDB database, so the structure need to connect the RCSB PDB online. And we can't connect without VPN , so ....  If we connected to VPN ,we succeeded in running this command. Thank you very much!

But there is another problem showing up. We try to download PDB database by using anvi-setup-pdb-database, but it breaks down when comes to the 11st cluster and shows this error.
2021-11-05 09-12-23屏幕截图.png

kiefl...@gmail.com

unread,
Nov 4, 2021, 11:46:30 PM11/4/21
to Anvi'o
Your tutor is wrong. If you're running `anvi-display-structure`, the structure already exists in STRUCTURE.db. You must be connected to the internet to load NGL, the visualization software.

But if you want to download `anvi-gen-structure-database`, that's a different story. Then yes, you either need internet to download template PDB structures, or you need to run `anvi-setup-pdb-database`.

The  `anvi-setup-pdb-database` error was fixed in v7.1. I can see in the screenshot you're running v7.

邹仁彬

unread,
Nov 5, 2021, 8:51:07 PM11/5/21
to Anvi'o
OK, thank you sir. I will tell him.
Reply all
Reply to author
Forward
0 new messages