#
# Read example 'bordetella.fasta': a triplet of orthologous genes from
# three bacterial species (Bordetella pertussis, B. parapertussis and
# B. bronchiseptica):
#
triplet <- read.fasta(system.file('sequences/bordetella.fasta',package='seqinr'))
#
# For this example, 'bordetella.pep.aln' contains the aligned protein
# sequences, in the Clustal format:
#
triplet.pep<- read.alignment(system.file('sequences/bordetella.pep.aln',package='seqinr'),format='clustal')
#
#
#
reverse.align(nucl.file=system.file('sequences/bordetella.fasta',package='seqinr'),
protaln.file=system.file('sequences/bordetella.pep.aln',package='seqinr'),
input.format='clustal', out.file='test.revalign')
#
# Alternatively, we can use ClustalW to align the translated nucleic
#sequences. Here the ClustalW program is accessible simply by the
#'clustalw' name.
#
reverse.align(nucl.file=system.file('sequences/bordetella.fasta',package='seqinr'),
out.file='test.revalign.clustal', align.prot=TRUE, clustal.path='clustalw')
Run the code above in your browser using DataLab