This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Distance matrix based on the whole input alignment

I want to compute the distance matrix based on the whole input alignment file strain.maf. The .maf file contains the multi-alignment of 119 genomes. It is downloaded from the UCSC Genome Browser

I have tried this script:

from Bio.Phylo.TreeConstruction import DistanceCalculator
from Bio import AlignIO
file = open("strain.maf")
aln = AlignIO.read(file,"maf")
print(aln)

But it shows the following error :

ValueError                                Traceback (most recent call last)
<ipython-input-15-86a85741d851> in <module>()
      2 from Bio import AlignIO
      3 file = open("strain.maf")
----> 4 aln = AlignIO.read(file,"maf")
      5 print(aln)

~\Anaconda3\lib\site-packages\Bio\AlignIO\__init__.py in read(handle, format, seq_count)
    393     try:
    394         next(iterator)
--> 395         raise ValueError("More than one record found in handle")
    396     except StopIteration:
    397         pass

ValueError: More than one record found in handle

plz help me

alignment python biopython

0 answers

No answers yet.

Log in to answer this question.