Fixed minor check notes

This commit is contained in:
Waldir Leoncio 2022-05-13 11:22:18 +02:00
parent 2ac99025b4
commit 55b3362c58

View file

@ -18,12 +18,12 @@
load_fasta <- function(msa, keep.singletons = FALSE) { load_fasta <- function(msa, keep.singletons = FALSE) {
# Check inputs # Check inputs
if (class(msa) == "character") { if (is(msa, "character")) {
if (!file.exists(msa)) stop("Invalid msa or the file does not exist!") if (!file.exists(msa)) stop("Invalid msa or the file does not exist!")
seqs <- ape::read.FASTA(msa) seqs <- ape::read.FASTA(msa)
} else if (class(msa) == "matrix") { } else if (is(msa, "matrix")) {
seqs <- ape::as.DNAbin(msa) seqs <- ape::as.DNAbin(msa)
} else if (class(msa) == "DNAbin") { } else if (is(msa, "DNAbin")) {
seqs <- msa seqs <- msa
} else { } else {
stop("incorrect input for msa!") stop("incorrect input for msa!")