Fixed minor check notes
This commit is contained in:
parent
2ac99025b4
commit
55b3362c58
1 changed files with 3 additions and 3 deletions
|
|
@ -18,12 +18,12 @@
|
|||
load_fasta <- function(msa, keep.singletons = FALSE) {
|
||||
|
||||
# Check inputs
|
||||
if (class(msa) == "character") {
|
||||
if (is(msa, "character")) {
|
||||
if (!file.exists(msa)) stop("Invalid msa or the file does not exist!")
|
||||
seqs <- ape::read.FASTA(msa)
|
||||
} else if (class(msa) == "matrix") {
|
||||
} else if (is(msa, "matrix")) {
|
||||
seqs <- ape::as.DNAbin(msa)
|
||||
} else if (class(msa) == "DNAbin") {
|
||||
} else if (is(msa, "DNAbin")) {
|
||||
seqs <- msa
|
||||
} else {
|
||||
stop("incorrect input for msa!")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue