5

On this Biopython tutorial, they describe how to import a multiple sequence alignment in the Mauve (XMFA: extensible multi fasta format). So I imported the AlignIO module:

from Bio import AlignIO
alignment = AlignIO.read(open("alignment.xmfa"), "mauve")

but I get the following error:

ValueError
Traceback (most recent call last) <ipython-input-30-396e54791d7a> in <module>()
----> 1 alignment = AlignIO.read(open("/Users/cr517/Documents/alignment.xmfa"),
"mauve")

/Users/cr517/anaconda/lib/python3.6/site-packages/Bio/AlignIO/__init__.py
in read(handle, format, seq_count, alphabet)
    422     iterator = parse(handle, format, seq_count, alphabet)
    423     try:
--> 424         first = next(iterator)
    425     except StopIteration:
    426         first = None

/Users/cr517/anaconda/lib/python3.6/site-packages/Bio/AlignIO/__init__.py
in parse(handle, format, seq_count, alphabet)
    366                                                 seq_count=seq_count)
    367         else:
--> 368             raise ValueError("Unknown format '%s'" % format)
    369 
    370         # This imposes some overhead... wait until we drop Python 2.4 to fix it

ValueError: Unknown format 'mauve'
Devon Ryan
  • 19,602
  • 2
  • 29
  • 60
Biomagician
  • 2,459
  • 16
  • 30

1 Answers1

5

You're using version 1.68 or older. Mauve support was added in 1.70.

Devon Ryan
  • 19,602
  • 2
  • 29
  • 60