Closed drhoads closed 3 years ago
My first guess with these things is that one of the sample names might have a character the reader doesn't like for whatever reason – do you have any special characters in the names?
Otherwise:
Saureus908PI2_viz/Saureus908PI2_viz_core_NJ.nwk
file here? Does it open correctly in another tree viewer?--rapidnj rapidnj
to the visualisation command. And also just --rapidnj
which should turn it off?I did have to replace a space in one isolate designation with a _ but now that you mention there are two isolates with parentheses in their name and now it is obvious that will screw up a nwk tree. Close this incident. Sorry for the problems (and dumb questions).!
No problem at all, the best kind of issue is an issue that's easy to resolve 🙂
Versions poppunk v2.2.0 sketchlib v1.7.3 In a WSL2 Ubuntu 42 Staph genomes in .fna downloaded from NCBI Commands: poppunk --create-db --output SaureusPoultryGenomes --r-files r-list.txt --qc-filter continue --threads 8 poppunk --fit-model lineage --ref-db SaureusPoultryGenomes --output PopPunkLineageModel --graph-weights --qc-filter continue poppunk_visualise --ref-db SaureusPoultryGenomes --model-dir PopPunkLineageModel --output SaureusPoultryGenomes_viz --microreact
Output of error in the poppunk_visualize: (Poppunk) dougrhoads@ARSC-GP50LH2:/mnt/e/DNAwork/Saureus/PopunkSaureus908PI2$ poppunk_visualise --ref-db Saureus908PI2 --model-dir PopPunkLineageModel --output Saureus908PI2_viz --microreact > report.txt
Graph-tools OpenMP parallelisation enabled: with 1 threads PopPUNK: visualise Loading lineage cluster model Completed model loading Reading existing tree from Saureus908PI2_viz/Saureus908PI2_viz_core_NJ.nwk Traceback (most recent call last): File "/home/dougrhoads/miniconda3/envs/Poppunk/bin/poppunk_visualise", line 11, in
sys.exit(main())
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/PopPUNK/visualise.py", line 452, in main
generate_visualisations(args.query_db,
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/PopPUNK/visualise.py", line 390, in generate_visualisations
existing_tree = load_tree(output, "NJ")
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/PopPUNK/trees.py", line 107, in load_tree
tree = dendropy.Tree.get(path=tree_fn, schema="newick", preserve_underscores=True)
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/datamodel/treemodel.py", line 2758, in get
return cls._get_from(kwargs)
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/datamodel/basemodel.py", line 156, in _get_from
return cls.get_from_path(src=src, schema=schema, kwargs)
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/datamodel/basemodel.py", line 217, in get_from_path
return cls._parse_and_create_from_stream(stream=fsrc,
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/datamodel/treemodel.py", line 2659, in _parse_and_create_from_stream
tree_lists = reader.read_tree_lists(
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/dataio/ioservice.py", line 370, in read_tree_lists
product = self._read(stream=stream,
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/dataio/newickreader.py", line 324, in _read
for tree in self.tree_iter(stream=stream,
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/dataio/newickreader.py", line 301, in tree_iter
tree = self._parse_tree_statement(
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/dataio/newickreader.py", line 381, in _parse_tree_statement
self._parse_tree_node_description(
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/dataio/newickreader.py", line 557, in _parse_tree_node_description
self._parse_tree_node_description(
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/dataio/newickreader.py", line 557, in _parse_tree_node_description
self._parse_tree_node_description(
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/dataio/newickreader.py", line 557, in _parse_tree_node_description
self._parse_tree_node_description(
[Previous line repeated 6 more times]
File "/home/dougrhoads/miniconda3/envs/Poppunk/lib/python3.9/site-packages/dendropy/dataio/newickreader.py", line 632, in _parse_tree_node_description
raise NewickReader.NewickReaderMalformedStatementError(
dendropy.dataio.newickreader.NewickReaderMalformedStatementError: Error parsing data source 'Saureus908PI2_viz/Saureus908PI2_viz_core_NJ.nwk' on line 1 at column 32: Malformed tree statement
(Poppunk) dougrhoads@ARSC-GP50LH2:/mnt/e/DNAwork/Saureus/PopunkSaureus908PI2$