Finding AIC using R for best DNA models and open MSA on web browser on given multisequence fasta file.
0
0
Entering edit mode
13 months ago

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(ape)
library(ggtree)
library(DECIPHER)
library(Biostrings)
library(viridis)
library(ggplot2)
library(msa)

mySequenceFile <- system.file ("sequences", "allSequences.fasta", package ="msa")
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)



Thanks in advance for any help. (:

msa R • 305 views
0
Entering edit mode

What I want to achieve with R.