Mummerplot and circlator issues

Hi,

I’m working on finishing some PacBio-sequenced bacterial genomes so I decided to look for repeats at the ends of the sequences and solve them (merge them). I already found the repeats with nucmer and I was trying to visualize them with mummerplot, yet, I could’t run it as I get this error:

Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at /home/linuxbrew/.linuxbrew/bin/mummerplot line 884.

Apparently is due to a some sort of incompatibility between the syntax of the old and new versions of Perl https://github.com/bioconda/bioconda-recipes/issues/4319 but I couldn’t manage to solve the problem.

I temporarily skipped this step and tried to merge the end-repeats of my genomes by using circlator but I couldn’t launch the program either, this time for this error:

Traceback (most recent call last):
File "/home/linuxbrew/.linuxbrew/bin/circlator", line 3, in <module>
import argparse
ModuleNotFoundError: No module named 'argparse'

In this case I tried to instal the ‘argparse’ Python module but I couldn’t as I don’t have the required permissions.

Probably both are simple issues to solve but I’m stuck on this step so I’d really appreciate your help.

Very best,

This is unfortunate timing - the homebrew/science repository is now deprecated and popular formulae are in the process of being migrated to homebrew/core (see: https://github.com/Homebrew/homebrew-science).

This means that the brew formulae for mummer and circlator won’t get much attention for a while, so its unlikely that the mummer problem will be fixed in the very short term.


To mitigate the circlator/argparse problem, I suggest that you remove the brew version of circlator using:

brew remove circlator

Then make a user install of circlator from using pip:

pip install circlator --user

If you get a “Permission denied: '/home/ubuntu/.local/lib'” warning, then:

sudo chown -R ubuntu:ubuntu /home/ubuntu/.local

and try the pip install again.

You’ll need to logout and login again for the system to detect the new circlator executable.

Hi Matt,

Thank you so much for your reply and help. The removal of circlator worked well and the user installation as well. Now I’ll proceed to process my genomes with the program.

Regarding the mummerplot issue. Do you know about alternative programs I can use to draw dotplots from the .delta files generated by nucmer?

You can try a quick-and-dirty patch of your install of mummerplot, which should get you around the problem for the time being (ref: https://github.com/bioconda/bioconda-recipes/blob/1c50cec10f5905251c6a3bcfc1caea4eb426495c/recipes/mummer/build.sh#L40).

Running the following command will solve the problem and mummerplot should work as intended:

perl -i -pe 's/defined \(%/\(%/' $(which mummerplot)

Again, it worked!. Many thanks for this Matt. I feel a bit dumb now, I didn’t think it could be solved just by removing the term ‘defined’ from the mummerplot file.

1 Like