rjchallis / assembly-stats

Assembly statistic visualisation
http://genomehubs.org
MIT License
88 stars 83 forks source link

Can not get the software work #10

Open xushaolin opened 6 years ago

xushaolin commented 6 years ago

I followed your documentation, and get the .json file ( let's call it output.json) by asm2stats.pl, but I don't the next step to visualize that output file, could you please give more info/guide about the detail after I get the .json file, thanks a lot

here is the script that I have tried: file:///Users/myname/bin/assembly-stats/assembly-stats.html?path=/Users/myname/bin/assembly-stats/json/&assembly=output&view=circle&altView=cumulative&altView=table

btw, the plot from your software is really beautiful best

rjchallis commented 6 years ago

Hi Shaolin

You'll need to open the file as a webpage to make it work - the file:///Users... shows that you have opened it as a file, so the javascript will not be executed. Exactly how to host it in a local web server varies by OS but from the file path it looks like you are using a Mac so this link may help.

Once you have that set up you'l be able to use a url more like:

http://localhost/~/bin/assembly-stats/assembly-stats.html?path=/~/bin/assembly-stats/json/&assembly=output&view=circle&altView=cumulative&altView=table
sheinasim commented 6 years ago

Hello,

I'm having a similar issue except that I am hosting the file.

I tried running it locally on the example files using this string:

http://localhost/assembly-stats.html?path=json/&assembly=Danaus_plexippus_v3&view=circle&altView=cumulative&altView=table

Where the Danaus_plexippus_v3.assembly-stats.json is in a directory called json which is in the same directory as assembly-stats.html.

This generates icons at the top "circle" "cumulative," and "table" but no plot. I've tried using an absolute path and including the full name of the .json file.

Thanks!

rjchallis commented 6 years ago

Hi

You shouldn't need to change anything in the files for it to work - I just ran git clone https://github.com/rjchallis/assembly-stats in my web root directory then modified your link to include the assembly-stats subdirectory and http://localhost/assembly-stats/assembly-stats.html?path=json/&assembly=Danaus_plexippus_v3&view=circle&altView=cumulative&altView=table worked for me.

Hopefully this will just work, otherwise it should be fairly universal but if you let me know what system you are hosting the page on I can make sure to test on that too. I have plans to rewrite some of this code anyway so it will be useful to know if I need to make changes for it to run on certain systems.

sheinasim commented 6 years ago

Hi!

I'm running it on Windows 10.

I also have access to an ubuntu OS, and I've tried running it on our cluster with no luck.

Thanks! Sheina

imneuro commented 6 years ago

Hi Richard,

I use windows 7 set up a local host and test it is running well. And I followed your suggestion to put your code in to c:\input\wwwroot. I open http://localhost/assembly-stats/assembly-stats.html?path=json/&assembly=Danaus_plexippus_v3&view=circle&altView=cumulative&altView=table in my chrome browser. In the console, it complains the "GET http://localhost/assembly-stats/json/Danaus_plexippus_v3.assembly-stats.json 404 (Not Found)" . I check the file is at where it is. Do you have any suggestion what I can do next?

Thank you. Xin

rjchallis commented 6 years ago

Ah, I think I understand these issues now, a 404 error on the JSON file suggests that your Windows web server is not serving .json files by default. You'll need to add a new MIME type (application/json) to your server configuration then it should work as expected. I'm afraid I'm not familiar enough with Windows to suggest how to do this.

imneuro commented 6 years ago

You are right about the MIME type. It works well now!