2

I have created a distance matrix by reading a FASTA file, now I'm asked to write a function that will produce a phylogenetic tree in newick string format. the function will take one argument a distance matrix. Can you please help me with some code to start with.

format example:

print(upgma(edwards))

(E:17.00,((((F:0.50,B:0.50):5.75,G:6.25):2.00,(D:4.00,A:4.00):4.25):6.25,C:14.50):2.50)

Mufassa
  • 41
  • 5

1 Answers1

1

BioPython's Seq type doesn't have an iter_kmer method. Perhaps you're looking for the equivalent class from skbio? http://scikit-bio.org/docs/0.4.2/generated/skbio.sequence.GrammaredSequence.iter_kmers.html

mobiusklein
  • 1,403
  • 9
  • 12