This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Calculate distance matrix from nucleotide alignment with multiple IUPAC ambiguity characters

I have a nucleotide multiple sequence alignment (MSA) with many IUPAC ambiguity characters like W,S,R, etc. I need to calculate distance matrix for making phylogenetic tree (as next step), but i'd like that all nucleotides (including ambiguity characters) would be taken into account during distances calculation. Is there any solution for my case. Thanks!

alignment sequence phylogenetics

1 answer

The function dist.ml in the R package phangorn handles ambiguity characters like they are handled in ML optimisation.

library(phangorn)
dat <- read.phyDat("msa.fas", format="fasta)
dist.ml(dat, model = "F81", exclude = "none")

Thanks! As i understand F81 model is four parametric in typical case. I'm wondering if it would have much more parameters in case of IUPAC ambiguity characters? It will extract the base frequences from the nucleotide alignment, which i'm using as input. Am i right?

Hi Denis, I look for solution of similar problem my_question. Can you give me an advice, do you have solution? Best regards, Marcin

Log in to answer this question.