Entering edit mode
13 months ago
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?
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")
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. (:
What I want to achieve with R.