Align Sequences
This short example describes how to use DECIPHER to align sets of homologous DNA, RNA, or amino acid sequences, as described in:ES Wright (2015) "DECIPHER: harnessing local sequence context to improve protein multiple sequence alignment." BMC Bioinformatics, doi:10.1186/s12859-015-0749-z.
ES Wright (2020) "RNAconTest: Comparing Tools for Noncoding RNA Multiple Sequence Alignment Based on Structural Consistency." RNA, doi:10.1261/rna.073015.119.
How do I align sequences?
First it is necessary to install DECIPHER and load the library in R. Next, set the "fas" variable to the path to the FASTA file of unaligned sequences (e.g., "~/mySeqs.fas"). Then load the sequences according to their type: DNA, RNA, or amino acids (AA) and proceed with alignment.12-34-567-89-1011-1213-141516# load the DECIPHER library in Rlibrary(DECIPHER) # specify the path to the FASTA file (in quotes)fas <- "<<REPLACE WITH PATH TO FASTA FILE>>" # load the sequences from the file# change "DNA" to "RNA" or "AA" if necessaryseqs <- readDNAStringSet(fas) # look at some of the sequences (optional)seqs # perform the alignmentaligned <- AlignSeqs(seqs) # view the alignment in a browser (optional)BrowseSeqs(aligned, highlight=0) # write the alignment to a new FASTA filewriteXStringSet(aligned, file="<<REPLACE WITH PATH TO OUTPUT FASTA FILE>>")