-
Notifications
You must be signed in to change notification settings - Fork 11
5 Alignment visualisation
YouTube video tutorial: Plotting sequence alignments with PrimerMiner
Once you have extracted the region of interest, you can plot the alignments using plot_alignments()
. Please keep in mind that all alignments from your groups have the be the same length and from the same region without gaps!
Note: Currently there is an bug when only one alignment is plotted causing the program to crash. If you want to plot only one alignment, polt it twice, to work around this.
You can youse plot_alignments()
to plot you alignments. You have to provide a path to the fasta file for each group File_path <- c("file1.fasta", "file2.fasta")
. The easiest way of doing that is keeping the files in a separate folder and detect them in R with list.files("path/to/folder", full.name=T)
.
To plot the alignments and save them as a pdf file run;
pdf("Sample_Data/primer_plot_complete.pdf", height=6, width=100)
plot_alignments(File_path, Order_names=gsub(".*ts/.._(.*)_.*", "\\1", alignments))
dev.off()
You can provide custom names for each alignment with the variable Order_names
or automatically name the files using regular expressions (see example above).
With start
and end
you can define the part of the alignment you want to plot (On default the whole alignment is plotted). threshold = 0.1
defines the minimum abundance of a nucleotide to be counted in the consensus sequence of all alignments.
You can look at an example plot used for primer evaluation here.