Open iwilkie opened 1 year ago
For reference I just installed GenoVi in a fresh environment right before testing it:
After setting up the environment and installing GenoVi, I tested it via GenoVi --help
which returned the normal help page with no issues/errors/comments.
Hi, this error probable means Circos could not generate the initial SVG image, because the input files didn't have expected format.
Is it possible for you to send me the Prokka-generated file you are using? Of course, it will be treated with strict confidentiality, used only for debugging purposes and deleted right afterwards. If not possible, I would like to know if it has any special characteristics. Does it have one or more replicons? Are there replicons with no coding sequences? Is there anything special in this file?
Also, do the test cases work properly on your computer? It would be interesting to run test cases or some other GenBank file to fully check it is not a problem in your environment.
Hi @vsaona, thanks for the reply!
I've since tried a couple of things to no avail, but I think the issue might be the environment itself. Based on the error I was getting when I tried to run my file, I thought it might be a dependency issue, so I installed cairosvg
in the environment.
I then ran the same command that I initially ran (shown in the first message of this issue), but got the same error.
Next, I ran the test case (I should've started here, I know, but I only spotted the file afterwards), which worked! I then ran the same command as the test case but with my own file (genovi -i ../03.function/prokka/PROKKA_02082023.gbk -s draft -cs paradise --cogs_unclassified -bc white
), which also worked :)
I then started adding flags I had initially tried, one try at a time, to figure out which one was causing the issue, and it seems to be related to the --title_position top
flag. Since genovi generates svg
files I don't really mind, but I thought I'd let you know.
Here's the output if I run the same command I was trying when I came across the error, except without the --title_position top
flag (it works!):
(genovi) iwilkie@bigmem-3:/hpc-stage/iwilkie/isolate/06.genovi$ ls
(genovi) iwilkie@bigmem-3:/hpc-stage/iwilkie/isolate/06.genovi$ genovi -i ../03.function/prokka/PROKKA_02082023.gbk -cs paradise -s complete --size --cogs_unclassified --title 'M30B9 sp.' --italic_words 1 -te
/home/iwilkie/miniconda3/envs/genovi/lib/python3.7/site-packages/Bio/GenBank/Scanner.py:1219: BiopythonParserWarning: Premature end of file in sequence data
"Premature end of file in sequence data", BiopythonParserWarning
genovi-temp/contig_1-genovi_bands.kar created succesfully.
genovi-temp/contig_1-genovi_tRNA_pos.txt created succesfully.
genovi-temp/contig_1-genovi_tRNA_neg.txt created succesfully.
genovi-temp/contig_1-genovi_rRNA_pos.txt created succesfully.
genovi-temp/contig_1-genovi_rRNA_neg.txt created succesfully.
genovi-temp/contig_1-genovi_CDS_pos.txt created succesfully.
genovi-temp/contig_1-genovi_CDS_neg.txt created succesfully.
Transforming GenBank record LBDLHKHK_1 to .fna
Done
Drawing 1...
Converting to png...
Converting to png...
WARNING! PNG version of image may look weird because italic text transformation is not yet properly implemented.
Please prefer using the svg version instead.
deleting temporary files
(genovi) iwilkie@bigmem-3:/hpc-stage/iwilkie/isolate/06.genovi$ ls *
circos.svg
genovi:
genovi.png genovi.svg genovi-contig_1.png genovi-contig_1.svg genovi_Gral_Stats.csv
Thanks again for commenting, unfortunately I am not at liberty to share the gbk
file I am working with, but let me know if you want me to try anything else to try and narrow down this problem further (e.g. sharing the yml
file of the environment?)
I am having the same issue described above. I tried running the test case on a gbk file downloaded from the test genomes available here in this repository, and still get the same error. I tried installing cairosvg, but to no avail, the same error occurs. Might there be another solution?
I think Im having a similar albeit it different issue. Genovi seems to get stuck on my specific .gbk as it worked out of the box for a few of my other files. Sadly, this file in particular is one I especially wanted to see.
Here's the output:
....
Transforming Genbank record SAMPLE_542_3532 to .fna
Done
Drawing...
Converting to png...
Traceback (most recent call last):
File "/home/svni/mambaforge/envs/genovi/lib/python3.11/xml/etree/ElementTree.py", line 1716, in close
self.parser.Parse(b"", True) # end of data
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
xml.parsers.expat.ExpatError: no element found: line 3, column 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/svni/mambaforge/envs/genovi/bin/genovi", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/svni/mambaforge/envs/genovi/lib/python3.11/site-packages/scripts/GenoVi.py", line 685, in main
visualiseGenome(*get_args())
File "/home/svni/mambaforge/envs/genovi/lib/python3.11/site-packages/scripts/GenoVi.py", line 594, in visualiseGenome
svg2png(bytestring = file.read(), write_to = output_file + "/" + output_file + ".png")
File "/home/svni/mambaforge/envs/genovi/lib/python3.11/site-packages/cairosvg/__init__.py", line 55, in svg2png
return surface.PNGSurface.convert(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/svni/mambaforge/envs/genovi/lib/python3.11/site-packages/cairosvg/surface.py", line 129, in convert
tree = Tree(
^^^^^
File "/home/svni/mambaforge/envs/genovi/lib/python3.11/site-packages/cairosvg/parser.py", line 390, in __init__
tree = ElementTree.fromstring(
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/svni/mambaforge/envs/genovi/lib/python3.11/site-packages/defusedxml/common.py", line 127, in fromstring
return parser.close()
^^^^^^^^^^^^^^
File "/home/svni/mambaforge/envs/genovi/lib/python3.11/xml/etree/ElementTree.py", line 1718, in close
self._raiseerror(v)
File "/home/svni/mambaforge/envs/genovi/lib/python3.11/xml/etree/ElementTree.py", line 1618, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: no element found: line 3, column 0
There seems to be a sudden end to my file? I'm not certain how to decipher this or how I could fix my .gbk file. Any help would be much appreciated.
Edit: The .gbk file that did work had considerably fewer contigs. 56 total, as opposed to the above 3532... So that was the culprit. Re-assembly from raw-reads and more stringent coverage parameters resulted in a new assembly with only 53 contigs and genovi worked!
Same here, I really don't want to have to reassemble to visualize
Hi,
I was hoping to try out GenoVi to visualise a few of my genomes, but have run into an issue I was hoping you could help me with.
From what I can tell there seem to be two different issues, one is something related to the cairoSVG library, which doesn't seem to be a major issue, whereas the other one actually stops the run and seems to be related to with the GenoVi python script itself. Here's the command I submitted and the output:
Would you happen to have any recommendations for how to fix/avoid this issue, and how to go forward?
I really appreciate any help you can provide, thanks in advance!