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

Error creating files for visualization #99

Closed
d-golzato opened this issue Aug 11, 2020 · 2 comments
Closed

Error creating files for visualization #99

d-golzato opened this issue Aug 11, 2020 · 2 comments

Comments

@d-golzato
Copy link

d-golzato commented Aug 11, 2020

Hi everyone,

I wanted to visually inspect the results from the fitted model of PopPUNK on a set of E.coli genomes but whenever I add the options "--cytoscape", "--microreact", "--phandango" or "--grapetree" I get the error Error creating files for visualisation: <class 'TypeError'>.

I tested this also on the Listeria monocytogenes genomes from the quickstart tutorial. I prepared the genomes by running the commands:

tar xf listeria_example.tar.bz2 paste <(ls *.contigs_velvet.fa) <(ls *.contigs_velvet.fa) > reference_list.txt

Followed by the command:

poppunk-runner.py --easy-run --r-files reference_list.txt --output lm_example --threads 4 --plot-fit 5 --min-k 13 --full-db --cytoscape

And the output is the following:

Sketching 128 genomes using 4 thread(s)
Writing sketches to file
Calculating random match chances using Monte Carlo
Calculating distances using 4 thread(s)
Fit summary:
        Number of clusters      5
        Number of datapoints    8128
        Number of assignments   32098641

Scaled component means
        [0.94726908 0.90340108]
        [0.00528333 0.07036978]
        [0.21082306 0.37437737]
        [0.12985218 0.34321457]
        [0.11504833 0.2416508 ]

Initial model-based network construction based on DBSCAN fit
Initial boundary based network construction
Decision boundary starts at (0.63,0.62)
Trying to optimise score globally
Trying to optimise score locally

Optimization terminated successfully;
The returned value satisfies the termination criteria
(using xtol =  1e-05 )
Network summary:
        Components      29
        Density 0.0899
        Transitivity    0.9994
        Score   0.9095
Writing grapetree output
Error creating files for visualisation: <class 'TypeError'>
Done

I'm using version 2.1.0 of PopPUNK and all the dependencies indicated at https://poppunk.readthedocs.io/en/latest/installation.html have been installed.

Could you help me solving this problem? Thank you!

@nickjcroucher
Copy link
Collaborator

Hi Davide,

This is a problem with the visualisation functions, sorry - it was fixed recently, and the commands you listed work with the version available from the GitHub repository. If you install the latest updates through git clone https://github.com/johnlees/PopPUNK and use the poppunk-runner.py script in the PopPUNK directory to run the analysis, in place of the conda-installed version, that should do the trick.

Thanks, Nick.

@d-golzato
Copy link
Author

Hi Nick,
Thank you very much for your quick response.

I confirm it works. I was currently running PopPUNK version cloned directly from the GitHub repository. I have just pulled the most recent repository and updated graph-tools and now it runs without problems.

Many thanks,
Davide

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

2 participants