This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Finding AIC using R for best DNA models and open MSA on web browser on given multisequence fasta file.

Hi,

As per the title, is there any way to see AICs like MEGA does for my msa on R and open the sequences on a web browser?

If someone could help me with how to implement it on my code it would be great too as I am trying to automate some things instead of trying to use MEGA.

I want to do that with the part "OR" of my code.

As per my previous post for my code (still in progress): R, msa and sequence alignment progress?

Code:

library(seqinr)
library(adegenet)
library(ape)
library(ggtree)
library(DECIPHER)
library(Biostrings)
library(viridis)
library(ggplot2)
library(msa)

mySequenceFile <- system.file ("sequences", "allSequences.fasta", package ="msa")
mySequence <- readDNAStringSet(mySequenceFile)
mySequence

THEN (Still working on it)

aligned <- AlignSeqs(mySequence)
BrowseSeqs(aligned, highlight=0) # Doesn't work with "OR" part of the code. 

writeXStringSet(aligned, file= "myAlignment.fasta")
dna <- read.alignment("myAlignment.fasta", format = "fast")
D <- dist.alignment(dna, matrix = "similarity")

OR

myAlignment <- msa(mySequence, "Muscle")
myAlignment

alignment <- msaConvert(myAlignment, "seqinr::alignment")
distMatrix <- dist.alignment(alignnment, "similarity")
clustering <- hclust(distMatrix)
plot(clustering)

dendrogram <- as.dendrogram(clustering)
phylotree = as.phylo(clustering)

plot(phylotree, type="radial")

Thanks in advance for any help. (:

msa r

0 answers

No answers yet.

Log in to answer this question.