mjsull / chromatiblock

Colinear block visualisation tool
GNU General Public License v3.0
30 stars 4 forks source link

Error making final image #6

Closed alexweisberg closed 4 years ago

alexweisberg commented 4 years ago

I ran chromatiblock on a simple dataset and it worked great, however when I added in more genomes, order, and gene annotations as per the advanced example, I get the following error:

./chromatiblock -w ./working -o image.pdf -gf trnastart.txt -l orderlist.txt -c categories.txt -d ./

Simplification stage 1 of 4

Enumerating vertices of the graph, then performing bulge removal...

[..................................................]

Simplification stage 2 of 4

Enumerating vertices of the graph, then performing bulge removal...

[..................................................]

Simplification stage 3 of 4

Enumerating vertices of the graph, then performing bulge removal...

[..................................................]

Simplification stage 4 of 4

Enumerating vertices of the graph, then performing bulge removal...

[..................................................]

Finding synteny blocks and generating the output...

Traceback (most recent call last):

File "./chromatiblock", line 1555, in

draw_blocks(core_array, noncore_pos, core_size, args.out, args.genome_height, args.gap, legend_size, args.working_directory, args.ppi, args.categorise != None, args.svg_pan_zoom_location, args.hue_start, args.hue_end)

File "./chromatiblock", line 1283, in draw_blocks

svg.drawOutRect(figure_width / 100 + 50 + gap, curr_y, figure_width / 200, genome_height, color, out_color)

TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'

Here is a link to download the full input and working directory from the run that failed. Thanks!

alexweisberg commented 4 years ago

I've narrowed it down to a particular genome (B_erythrophleiGAS401.fna) from NCBI that is causing it to error. Here is a smaller dataset of two genomes that gives a similar error using the newest version of chromatiblock. The output I get is in the output file, also posted here:

./chromatiblock -w ./ -o image.pdf -d ./

output:

Simplification stage 1 of 4 Enumerating vertices of the graph, then performing bulge removal... [..................................................] Simplification stage 2 of 4 Enumerating vertices of the graph, then performing bulge removal... [..................................................] Simplification stage 3 of 4 Enumerating vertices of the graph, then performing bulge removal... [..................................................] Simplification stage 4 of 4 Enumerating vertices of the graph, then performing bulge removal... [..................................................] Finding synteny blocks and generating the output... Traceback (most recent call last): File "/local/cluster/lib/python3.7/xml/etree/ElementTree.py", line 1630, in feed self.parser.Parse(data, 0) xml.parsers.expat.ExpatError: not well-formed (invalid token): line 3, column 9

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "./chromatiblock", line 1555, in draw_blocks(core_array, noncore_pos, core_size, args.out, args.genome_height, args.gap, legend_size, args.working_directory, args.ppi, args.categorise != None, args.svg_pan_zoom_location, args.hue_start, args.hue_end) File "./chromatiblock", line 1351, in draw_blocks cairosvg.svg2pdf(url=os.path.join(working_dir, "temp.svg"), write_to=out_file, dpi=ppi) File "/local/cluster/lib/python3.7/site-packages/cairosvg/init.py", line 80, in svg2pdf output_height=output_height) File "/local/cluster/lib/python3.7/site-packages/cairosvg/surface.py", line 144, in convert **kwargs) File "/local/cluster/lib/python3.7/site-packages/cairosvg/parser.py", line 407, in init forbid_external=not unsafe) File "/local/cluster/lib/python3.7/site-packages/defusedxml/common.py", line 131, in fromstring parser.feed(text) File "/local/cluster/lib/python3.7/xml/etree/ElementTree.py", line 1632, in feed self._raiseerror(v) File "/local/cluster/lib/python3.7/xml/etree/ElementTree.py", line 1531, in _raiseerror raise err xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 3, column 9

Thanks!

testdataset.tar.gz

mjsull commented 4 years ago

Hi this is fixed in the latest commit, will create a release later today.

Best,

Mitch

alexweisberg commented 4 years ago

Hi,

Thank you! I tried the latest version and it ran to completion. Thanks for fixing it.