Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cytoscape visualization not being generated #184

Closed
andreaniml opened this issue Sep 28, 2021 · 4 comments
Closed

Cytoscape visualization not being generated #184

andreaniml opened this issue Sep 28, 2021 · 4 comments

Comments

@andreaniml
Copy link

Versions
poppunk 2.4.0
poppunk_sketch 1.7.3

Command used and output returned
Taking the listeria example dataset mentioned on Quickstart in 2.2.0 docs (https://poppunk.readthedocs.io/en/v2.2.0-docs/quickstart.html):
poppunk --create-db --r-files reference_list.txt --output lm_example
poppunk --fit-model bgmm --ref-db lm_example --output modelK4 --K 4
poppunk_visualise --ref-db lm_example --model-dir modelK4 --output Try01 --cytoscape

Describe the bug

Hello! Here's the cytoscape bug I mentioned in the other issue

I can't generate a cytoscape output, whenever I try with --cytoscape flag I get:

Graph-tools OpenMP parallelisation enabled: with 1 threads
PopPUNK: visualise
Loading BGMM 2D Gaussian model
Completed model loading
Building phylogeny
Writing cytoscape output
Traceback (most recent call last):
File "/home/malu/miniconda3/envs/poppunk/bin/poppunk_visualise", line 11, in
sys.exit(main())
File "/home/malu/miniconda3/envs/poppunk/lib/python3.9/site-packages/PopPUNK/visualise.py", line 452, in main
generate_visualisations(args.query_db,
File "/home/malu/miniconda3/envs/poppunk/lib/python3.9/site-packages/PopPUNK/visualise.py", line 440, in generate_visualisations
genomeNetwork = load_network_file(network_file, use_gpu = gpu_graph)
File "/home/malu/miniconda3/envs/poppunk/lib/python3.9/site-packages/PopPUNK/network.py", line 146, in load_network_file
genomeNetwork = gt.load_graph(fn)
File "/home/malu/miniconda3/envs/poppunk/lib/python3.9/site-packages/graph_tool/init.py", line 3381, in load_graph
g.load(file_name, fmt, ignore_vp, ignore_ep, ignore_gp)
File "/home/malu/miniconda3/envs/poppunk/lib/python3.9/site-packages/graph_tool/init.py", line 2927, in load
props = self.__graph.read_from_file("", file_name, fmt,
OSError: error reading from file '':basic_ios::clear: iostream error

A folder is created, however it is empty
I was able create a microreact output, it seems to be a cystoscape-only probem

Maybe useful information:
I'm using poppunk in WSL

@nickjcroucher
Copy link
Collaborator

Hi @andreaniml - does the version you are using have a --network-file option? That has been added in recent versions to enable different types of file to be visualised with cytoscape. If you use this to specify the path to the graph file (e.g. --network-file modelK4/modelK4_graph.gt) that should hopefully generate the output you want.

@andreaniml
Copy link
Author

It worked! Thank you!

Just to check, here the names of the nodes are imported as "n0, n1, n2" instead of the sample names (those on "id")
image
This is normal behavior, right? (I'm sorry for the silly question, I never used cytoscape)

@nickjcroucher
Copy link
Collaborator

Yes, this is the expected format for outputs to Cytoscape - we'll update the tutorial accordingly.

@johnlees
Copy link
Member

Closing as this will be addressed in #185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants