mase.res <- read.alignment(file = system.file("sequences/test.mase", package = "seqinr"),
format = "mase")
clustal.res <- read.alignment(file = system.file("sequences/test.aln", package = "seqinr"),
format="clustal")
phylip.res <- read.alignment(file = system.file("sequences/test.phylip", package = "seqinr"),
format = "phylip")
msf.res <- read.alignment(file = system.file("sequences/test.msf", package = "seqinr"),
format = "msf")
fasta.res <- read.alignment(file = system.file("sequences/Anouk.fasta", package = "seqinr"),
format = "fasta")
#
# Quality control routine sanity checks:
#
data(mase); stopifnot(identical(mase, mase.res))
data(clustal); stopifnot(identical(clustal, clustal.res))
data(phylip); stopifnot(identical(phylip, phylip.res))
data(msf); stopifnot(identical(msf, msf.res))
data(fasta); stopifnot(identical(fasta, fasta.res))
#
# Example of using extra arguments from the read.fasta function, here to keep
# whole headers for sequences names.
#
whole.header.test <-
read.alignment(file = system.file("sequences/LTPs128_SSU_aligned_First_Two.fasta",
package = "seqinr"), format = "fasta", whole.header = TRUE)
whole.header.test$nam
# Sould be:
#
# [1] "D50541\t1\t1411\t1411bp\trna\tAbiotrophia defectiva\tAerococcaceae"
# [2] "KP233895\t1\t1520\t1520bp\trna\tAbyssivirga alkaniphila\tLachnospiraceae"
#
Run the code above in your browser using DataLab